{
  "openapi": "3.1.0",
  "info": {
    "title": "Runs",
    "version": "6.2"
  },
  "servers": [
    {
      "url": "https://app.coalescesoftware.io",
      "description": "Region: us-central1"
    },
    {
      "url": "https://app.australia-southeast1.gcp.coalescesoftware.io",
      "description": "Region: australia-southeast1 (Sydney)"
    },
    {
      "url": "https://app.northamerica-northeast1.gcp.coalescesoftware.io",
      "description": "Region: northamerica-northeast1 (Montreal)"
    },
    {
      "url": "https://app.eu-west-2.aws.coalescesoftware.io",
      "description": "Region: eu-west-2 (London)"
    },
    {
      "url": "https://app.eu.coalescesoftware.io",
      "description": "Region: europe-west-3 (Frankfurt)"
    },
    {
      "url": "https://app.europe-west1.gcp.coalescesoftware.io",
      "description": "Region: europe-west-1 (Belgium)"
    },
    {
      "url": "https://app.us-east-1.aws.coalescesoftware.io/",
      "description": "Region: us-east-1 (Virginia)"
    },
    {
      "url": "https://app.us-east-2.aws.coalescesoftware.io",
      "description": "Region: us-east-2 (Ohio)"
    },
    {
      "url": "https://app.us-west-2.aws.coalescesoftware.io",
      "description": "Region: us-west-2 (Oregon)"
    },
    {
      "url": "https://app.centralus.azure.coalescesoftware.io",
      "description": "Region: centralus (Iowa)"
    },
    {
      "url": "https://app.eastus2.azure.coalescesoftware.io",
      "description": "Region: eastus2 (Virginia)"
    },
    {
      "url": "https://app.westus2.azure.coalescesoftware.io",
      "description": "Region: westus2 (Washington)"
    },
    {
      "url": "https://app.southcentralus.azure.coalescesoftware.io",
      "description": "Region: southcentral (San Antonio)"
    },
    {
      "url": "https://app.eu-central-1.aws.coalescesoftware.io",
      "description": "Region: eu-central-1 (Frankfurt)"
    },
    {
      "url": "https://app.eastus2.azure.coalescesoftware.io",
      "description": "Region: eastus2 (Virginia)"
    },
    {
      "url": "https://app.us-east4.gcp.coalescesoftware.io",
      "description": "Region: us-east4 (Virginia)"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/scheduler/startRun": {
      "post": {
        "summary": "Start a Run",
        "tags": [
          "Runs"
        ],
        "description": "Create a new Run.",
        "operationId": "startrun",
        "x-codeSamples": [
          {
            "lang": "Python",
            "label": "KeyPair Auth",
            "source": "import requests\nimport json\n\nurl = \"https://app.<your-base-url>.coalescesoftware.io/scheduler/startRun\"\n\n# The private key needs to be escaped properly.\nkeypairkey = r\"\"\"-----BEGIN ENCRYPTED PRIVATE KEY-----\nXxx\nXxx\n-----END ENCRYPTED PRIVATE KEY-----\"\"\"\nkeypairpass = \"keypass\"\n\npayload = json.dumps({\n  \"runDetails\": {\n        \"environmentID\": \"<string>\",\n        \"includeNodesSelector\": \"{ location: SAMPLE name: CUSTOMER } OR { location: SAMPLE name: LINEITEM }\",\n        \"excludeNodesSelector\": \"<string>\",\n        \"jobID\": \"<string>\",\n  },\n  \"userCredentials\": {\n    \"snowflakeUsername\": \"<string>\",\n    \"snowflakePassword\": \"<string>\",\n    \"snowflakeKeyPairKey\": keypairkey,\n    \"snowflakeKeyPairPass\": keypairpass,\n    \"snowflakeWarehouse\": \"<string>\",\n    \"snowflakeRole\": \"<string>\",\n    \"snowflakeAuthType\": \"Basic\"\n  },\n    \"parameters\": {\n      \"foo\": \"bar\"\n    }\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'Accept': 'application/json',\n  'Authorization': 'Bearer bearerToken'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n\n"
          },
          {
            "lang": "Python",
            "label": "Basic Auth",
            "source": "import requests\nimport json\n\nurl = \"https://app.<your-base-url>.coalescesoftware.io.io/scheduler/startRun\"\n\npayload = json.dumps({\n  \"runDetails\": {\n        \"environmentID\": \"<string>\",\n        \"includeNodesSelector\": \"{ location: SAMPLE name: CUSTOMER } OR { location: SAMPLE name: LINEITEM }\",\n        \"excludeNodesSelector\": \"<string>\",\n        \"jobID\": \"<string>\",\n  },\n  \"userCredentials\": {\n    \"snowflakeUsername\": \"<string>\",\n    \"snowflakePassword\": \"<string>\",\n    \"snowflakeWarehouse\": \"<string>\",\n    \"snowflakeRole\": \"<string>\",\n    \"snowflakeAuthType\": \"Basic\"\n  },\n  \"parameters\": {\n    \"foo\": \"bar\"\n  }\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'Accept': 'application/json',\n  'Authorization': 'Bearer bearerToken'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
          },
          {
            "lang": "Python",
            "label": "OAuth",
            "source": "import requests\nimport json\n\nurl = \"https://app.<your-base-url>.coalescesoftware.io/scheduler/startRun\"\n\npayload = json.dumps({\n  \"runDetails\": {\n        \"environmentID\": \"<string>\",\n        \"includeNodesSelector\": \"{ location: SAMPLE name: CUSTOMER } OR { location: SAMPLE name: LINEITEM }\",\n        \"excludeNodesSelector\": \"<string>\",\n        \"jobID\": \"<string>\",\n  },\n  \"userCredentials\": {\n    \"snowflakeUsername\": \"<string>\",\n    \"snowflakeWarehouse\": \"<string>\",\n    \"snowflakeRole\": \"<string>\",\n    \"snowflakeAuthType\": \"Oauth\"\n  },\n    \"parameters\": {\n      \"foo\": \"bar\"\n    }\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'Accept': 'application/json',\n  'Authorization': 'Bearer bearerToken'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n\n"
          },
          {
            "lang": "PowerShell",
            "label": "KeyPair Auth",
            "source": "# The private key needs to be escaped properly.\n$privateKey = @\"\n-----BEGIN PRIVATE KEY-----\nkey\nkey\nkey\nkey\nkey\nkey\n-----END PRIVATE KEY-----\n\"@\n\n$jsonBody = @{\n    runDetails = @{\n        environmentID = \"<string>\"\n        includeNodesSelector = \"{ location: SAMPLE name: CUSTOMER } OR { location: SAMPLE name: LINEITEM }\"\n        excludeNodesSelector = \"{ location: SAMPLE name: CUSTOMER } OR { location: SAMPLE name: LINEITEM }\"\n        jobID = \"<string>\"\n    }\n    userCredentials = @{\n        snowflakeUsername    = \"USERNAME\"\n        snowflakeKeyPairKey  = $privateKey\n        snowflakeKeyPairPass = \"<string>\"\n        snowflakeWarehouse   = \"COMPUTE_WH\"\n        snowflakeRole        = \"SF_ROLE\"\n        snowflakeAuthType    = \"KeyPair\"\n    }\n\n    parameters = @{\n        param1 = \"value1\"\n        param2 = \"value2\"\n    }\n\n} | ConvertTo-Json -Compress\n\n\n$headers = @{\n    \"Content-Type\"  = \"application/json\"\n    \"Accept\"        = \"application/json\"\n    \"Authorization\" = \"Bearer token\"\n}\n\n$response = Invoke-RestMethod -Uri 'https://app.<your-base-url>.coalescesoftware.io/scheduler/startRun' -Method 'POST' -Headers $headers -Body $jsonBody\n\n$response | ConvertTo-Json"
          },
          {
            "lang": "PowerShell",
            "label": "OAuth",
            "source": "$headers = New-Object \"System.Collections.Generic.Dictionary[[String],[String]]\"\n$headers.Add(\"Content-Type\", \"application/json\")\n$headers.Add(\"Accept\", \"application/json\")\n$headers.Add(\"Authorization\", \"Bearer bearerToken\")\n\n$body = @\"\n{\n  `\"runDetails`\": {\n    `\"environmentID`\": `\"<string>`\",\n    `\"includeNodesSelector`\": `\"{ location: SAMPLE name: CUSTOMER } OR { location: SAMPLE name: LINEITEM }`\",\n    `\"excludeNodesSelector`\": `\"<string>`\",\n    `\"jobID`\": `\"<string>`\"\n  },\n  `\"userCredentials`\": {\n    `\"snowflakeUsername`\": `\"<string>`\",\n    `\"snowflakeWarehouse`\": `\"<string>`\",\n    `\"snowflakeRole`\": `\"<string>`\",\n    `\"snowflakeAuthType`\": `\"Oauth`\"\n  },\n  `\"parameters`\": {\n    `\"foo`\": `\"bar`\"\n  }\n}\n\"@\n\n$response = Invoke-RestMethod 'https://app.coalescesoftware.io/scheduler/startRun' -Method 'POST' -Headers $headers -Body $body\n$response | ConvertTo-Json"
          },
          {
            "lang": "PowerShell",
            "label": "Basic Auth",
            "source": "$headers = New-Object \"System.Collections.Generic.Dictionary[[String],[String]]\"\n$headers.Add(\"Content-Type\", \"application/json\")\n$headers.Add(\"Accept\", \"application/json\")\n$headers.Add(\"Authorization\", \"Bearer bearerToken\")\n\n$body = @\"\n{\n  `\"runDetails`\": {\n    `\"environmentID`\": `\"<string>`\",\n    `\"includeNodesSelector`\": `\"{ location: SAMPLE name: CUSTOMER } OR { location: SAMPLE name: LINEITEM }`\",\n    `\"excludeNodesSelector`\": `\"<string>`\",\n    `\"jobID`\": `\"<string>`\"\n  },\n  `\"userCredentials`\": {\n    `\"snowflakeUsername`\": `\"<string>`\",\n    `\"snowflakePassword`\": `\"<string>`\",\n    `\"snowflakeWarehouse`\": `\"<string>`\",\n    `\"snowflakeRole`\": `\"<string>`\",\n    `\"snowflakeAuthType`\": `\"Basic`\"\n  },\n  `\"parameters`\": {\n    `\"foo`\": `\"bar`\"\n  }\n}\n\"@\n\n$response = Invoke-RestMethod 'https://app.<your-base-url>.coalescesoftware.io/scheduler/startRun' -Method 'POST' -Headers $headers -Body $body\n$response | ConvertTo-Json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "runDetails",
                  "userCredentials"
                ],
                "properties": {
                  "runDetails": {
                    "type": "object",
                    "description": "Object containing the necessary target details required to successfully start a refresh.",
                    "required": [
                      "environmentID"
                    ],
                    "properties": {
                      "environmentID": {
                        "type": "string",
                        "description": "The environment being refreshed"
                      },
                      "includeNodesSelector": {
                        "type": "string",
                        "description": "Nodes included for an ad-hoc job"
                      },
                      "excludeNodesSelector": {
                        "type": "string",
                        "description": "Nodes excluded for an ad-hoc job."
                      },
                      "jobID": {
                        "type": "string",
                        "description": "The ID of a job being run."
                      },
                      "parallelism": {
                        "type": "integer",
                        "description": "Maximum number of parallel nodes to run.",
                        "default": 16,
                        "format": "int32"
                      },
                      "forceIgnoreWorkspaceStatus": {
                        "type": "boolean",
                        "description": "Allows refreshing an environment even if the last deployment on that environment failed. Use with caution as this can put your environment into an even worse state.",
                        "default": false
                      }
                    }
                  },
                  "userCredentials": {
                    "description": "userCredentials contains connection credentials for connecting to Snowflake. When using OAuth, set `\"userCredentials\": {\"snowflakeAuthType\": \"OAuth\"}`.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/userCredentials-Snowflake-Basic"
                      },
                      {
                        "$ref": "#/components/schemas/userCredentials-Snowflake-KeyPair",
                        "x-stoplight": {
                          "id": "aupsx2sm3w2ml"
                        }
                      },
                      {
                        "$ref": "#/components/schemas/userCredentials-Snowflake-OAuth",
                        "x-stoplight": {
                          "id": "0dz4zlfu68ed8"
                        }
                      },
                      {
                        "$ref": "#/components/schemas/userCredentials-Databrics-OAuthM2M",
                        "x-stoplight": {
                          "id": "19uhnmatxe5ow"
                        }
                      },
                      {
                        "$ref": "#/components/schemas/userCredentials-Databricks-Token",
                        "x-stoplight": {
                          "id": "83tnz8tkckpxm"
                        }
                      }
                    ]
                  },
                  "parameters": {
                    "type": "string",
                    "description": "Optional. When set, defines the complete runtime parameters for the Run; environment defaults are not merged in. Omit the field to use environment defaults only. In JSON request bodies, send a JSON object mapping parameter names to JSON-serializable values.",
                    "format": "json"
                  }
                }
              },
              "examples": {}
            }
          },
          "description": ""
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {},
                "schema": {
                  "type": "object",
                  "properties": {
                    "runCounter": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\":{\n    \"errorString\":\"400: Error Message\",\n    \"errorDetail\":\"400: Error Message\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "errorString": {
                          "type": "string",
                          "example": "400: Error Message"
                        },
                        "errorDetail": {
                          "type": "string",
                          "example": "400: Error Message"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\":{\n    \"errorString\":\"401: Unable to authenticate, please ensure your token is valid.\",\n    \"errorDetail\":\"401: Unable to authenticate, please ensure your token is valid.\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "errorString": {
                          "type": "string",
                          "example": "401: Unable to authenticate, please ensure your token is valid."
                        },
                        "errorDetail": {
                          "type": "string",
                          "example": "401: Unable to authenticate, please ensure your token is valid."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/scheduler/runStatus": {
      "get": {
        "summary": "Check Run Status",
        "tags": [
          "Runs"
        ],
        "description": "Get the status of a specific Run.",
        "operationId": "run-status",
        "parameters": [
          {
            "name": "runCounter",
            "in": "query",
            "description": "ID of the run to query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {},
                "schema": {
                  "type": "object",
                  "properties": {
                    "runStatus": {
                      "type": "string",
                      "enum": [
                        "completed",
                        "initializing",
                        "rendering",
                        "canceled",
                        "failed",
                        "running",
                        "waitingToRun"
                      ]
                    },
                    "runType": {
                      "type": "string",
                      "enum": [
                        "deploy",
                        "refresh"
                      ]
                    },
                    "runLink": {
                      "type": "string",
                      "example": "https://app.coalescesoftware.io/runs/1"
                    },
                    "hasTestFailures": {
                      "type": "boolean",
                      "x-stoplight": {
                        "id": "c4jr9hfddi670"
                      },
                      "description": "If a refresh Node or column test has failed, this field will return in the response with a `true`. If there are no failures, then this isn't present in the response."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\":{\n    \"errorString\":\"400: Error Message\",\n    \"errorDetail\":\"400: Error Message\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "errorString": {
                          "type": "string",
                          "example": "400: Error Message"
                        },
                        "errorDetail": {
                          "type": "string",
                          "example": "400: Error Message"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\":{\n    \"errorString\":\"401: Unable to authenticate, please ensure your token is valid.\",\n    \"errorDetail\":\"401: Unable to authenticate, please ensure your token is valid.\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "errorString": {
                          "type": "string",
                          "example": "401: Unable to authenticate, please ensure your token is valid."
                        },
                        "errorDetail": {
                          "type": "string",
                          "example": "401: Unable to authenticate, please ensure your token is valid."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/scheduler/rerun": {
      "post": {
        "summary": " Retry Failed Run",
        "tags": [
          "Runs"
        ],
        "description": "Retry a run the point of failure. This endpoint will start the run again and run only the nodes that failed.\n",
        "operationId": "retry-failed-run",
        "x-codeSamples": [
          {
            "lang": "Python",
            "label": "KeyPair Auth",
            "source": "import requests\nimport json\n\nurl = \"https://app.<your-base-url>.coalescesoftware.io/scheduler/rerun\"\n\n# The private key needs to be escaped properly.\nkeypairkey = r\"\"\"-----BEGIN ENCRYPTED PRIVATE KEY-----\nXxx\nXxx\n-----END ENCRYPTED PRIVATE KEY-----\"\"\"\nkeypairpass = \"keypass\"\n\npayload = json.dumps({\n  \"runDetails\": {\n    \"runID\": \"<string>\"\n  },\n  \"userCredentials\": {\n    \"snowflakeUsername\": \"<string>\",\n    \"snowflakePassword\": \"<string>\",\n    \"snowflakeKeyPairKey\": keypairkey,\n    \"snowflakeKeyPairPass\": keypairpass,\n    \"snowflakeWarehouse\": \"<string>\",\n    \"snowflakeRole\": \"<string>\",\n    \"snowflakeAuthType\": \"Basic\"\n  },\n    \"parameters\": {\n      \"foo\": \"bar\"\n    }\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'Accept': 'application/json',\n  'Authorization': 'Bearer bearerToken'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n\n"
          },
          {
            "lang": "Python",
            "label": "Basic Auth",
            "source": "import requests\nimport json\n\nurl = \"https://app.<your-base-url>.coalescesoftware.io/scheduler/startRun\"\n\npayload = json.dumps({\n  \"runDetails\": {\n    \"environmentID\": \"<string>\",\n    \"includeNodesSelector\": \"{ location: SAMPLE name: CUSTOMER } OR { location: SAMPLE name: LINEITEM }\",\n    \"excludeNodesSelector\": \"<string>\",\n    \"jobID\": \"<string>\"\n  },\n  \"userCredentials\": {\n    \"snowflakeUsername\": \"<string>\",\n    \"snowflakePassword\": \"<string>\",\n    \"snowflakeWarehouse\": \"<string>\",\n    \"snowflakeRole\": \"<string>\",\n    \"snowflakeAuthType\": \"Basic\"\n  },\n  \"parameters\": {\n    \"foo\": \"bar\"\n  }\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'Accept': 'application/json',\n  'Authorization': 'Bearer bearerToken'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
          },
          {
            "lang": "Python",
            "label": "OAuth",
            "source": "import requests\nimport json\n\nurl = \"https://app.<your-base-url>.coalescesoftware.io/scheduler/startRun\"\n\npayload = json.dumps({\n  \"runDetails\": {\n    \"environmentID\": \"<string>\",\n    \"includeNodesSelector\": \"{ location: SAMPLE name: CUSTOMER } OR { location: SAMPLE name: LINEITEM }\",\n    \"excludeNodesSelector\": \"<string>\",\n    \"jobID\": \"<string>\"\n  },\n  \"userCredentials\": {\n    \"snowflakeUsername\": \"<string>\",\n    \"snowflakeWarehouse\": \"<string>\",\n    \"snowflakeRole\": \"<string>\",\n    \"snowflakeAuthType\": \"Oauth\"\n  },\n  \"parameters\": {\n    \"foo\": \"bar\"\n  }\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'Accept': 'application/json',\n  'Authorization': 'Bearer bearerToken'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
          },
          {
            "lang": "PowerShell",
            "label": "KeyPair Auth",
            "source": "# The private key needs to be escaped properly.\n\n$privateKey = @\"\n-----BEGIN PRIVATE KEY-----\nkey\nkey\nkey\nkey\nkey\nkey\n-----END PRIVATE KEY-----\n\"@\n\n$jsonBody = @{\n    runDetails = @{\n        runID = \"<string>\"\n    }\n    userCredentials = @{\n        snowflakeUsername    = \"USERNAME\"\n        snowflakeKeyPairKey  = $privateKey\n        snowflakeKeyPairPass = \"<string>\"\n        snowflakeWarehouse   = \"COMPUTE_WH\"\n        snowflakeRole        = \"SF_ROLE\"\n        snowflakeAuthType    = \"KeyPair\"\n    }\n\n    parameters = @{\n        param1 = \"value1\"\n        param2 = \"value2\"\n    }\n\n} | ConvertTo-Json -Compress\n\n\n$headers = @{\n    \"Content-Type\"  = \"application/json\"\n    \"Accept\"        = \"application/json\"\n    \"Authorization\" = \"Bearer token\"\n}\n\n$response = Invoke-RestMethod -Uri 'https://app.<your-base-url>.coalescesoftware.io/scheduler/rerun' -Method 'POST' -Headers $headers -Body $jsonBody\n\n$response | ConvertTo-Json"
          },
          {
            "lang": "PowerShell",
            "label": "OAuth",
            "source": "$headers = New-Object \"System.Collections.Generic.Dictionary[[String],[String]]\"\n$headers.Add(\"Content-Type\", \"application/json\")\n$headers.Add(\"Accept\", \"application/json\")\n$headers.Add(\"Authorization\", \"Bearer bearerToken\")\n\n$body = @\"\n{\n  `\"runDetails`\": {\n    `\"runID`\": `\"<string>`\",\n  },\n  `\"userCredentials`\": {\n    `\"snowflakeUsername`\": `\"<string>`\",\n    `\"snowflakeWarehouse`\": `\"<string>`\",\n    `\"snowflakeRole`\": `\"<string>`\",\n    `\"snowflakeAuthType`\": `\"OAuth`\"\n  },\n  `\"parameters`\": {\n    `\"foo`\": `\"bar`\"\n  }\n}\n\"@\n\n$response = Invoke-RestMethod 'https://app.<your-base-url>.coalescesoftware.io/scheduler/rerun' -Method 'POST' -Headers $headers -Body $body\n$response | ConvertTo-Json"
          },
          {
            "lang": "PowerShell",
            "label": "Basic Auth",
            "source": "$headers = New-Object \"System.Collections.Generic.Dictionary[[String],[String]]\"\n$headers.Add(\"Content-Type\", \"application/json\")\n$headers.Add(\"Accept\", \"application/json\")\n$headers.Add(\"Authorization\", \"Bearer bearerToken\")\n\n$body = @\"\n{\n  `\"runDetails`\": {\n    `\"runID`\": `\"<string>`\",\n  },\n  `\"userCredentials`\": {\n    `\"snowflakeUsername`\": `\"<string>`\",\n    `\"snowflakePassword`\": `\"<string>`\",\n    `\"snowflakeWarehouse`\": `\"<string>`\",\n    `\"snowflakeRole`\": `\"<string>`\",\n    `\"snowflakeAuthType`\": `\"Basic`\"\n  },\n  `\"parameters`\": {\n    `\"foo`\": `\"bar`\"\n  }\n}\n\"@\n\n$response = Invoke-RestMethod 'https://app.<your-base-url>.coalescesoftware.io/scheduler/rerun' -Method 'POST' -Headers $headers -Body $body\n$response | ConvertTo-Json"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "runDetails",
                  "userCredentials"
                ],
                "properties": {
                  "runDetails": {
                    "type": "object",
                    "description": "Contains the runID to be re-run.",
                    "required": [
                      "runID"
                    ],
                    "properties": {
                      "runID": {
                        "type": "string",
                        "description": "The number of the run you want to be retried."
                      },
                      "forceIgnoreWorkspaceStatus": {
                        "type": "boolean",
                        "description": "Allows refreshing an environment even if the last deployment on that environment failed. Use with caution as this can put your environment into an even worse state.",
                        "default": false
                      }
                    }
                  },
                  "userCredentials": {
                    "description": "userCredentials contains connection credentials for connecting to Snowflake. When using OAuth, set `\"userCredentials\": {\"snowflakeAuthType\": \"OAuth\"}`.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/userCredentials-Snowflake-Basic",
                        "x-stoplight": {
                          "id": "pfpdt686pmijb"
                        }
                      },
                      {
                        "$ref": "#/components/schemas/userCredentials-Snowflake-KeyPair",
                        "x-stoplight": {
                          "id": "xm9t7epw2xlh8"
                        }
                      },
                      {
                        "$ref": "#/components/schemas/userCredentials-Snowflake-OAuth",
                        "x-stoplight": {
                          "id": "16vuzn409fvjq"
                        }
                      },
                      {
                        "$ref": "#/components/schemas/userCredentials-Databricks-Token",
                        "x-stoplight": {
                          "id": "tnq6dadcrgt47"
                        }
                      },
                      {
                        "$ref": "#/components/schemas/userCredentials-Databrics-OAuthM2M",
                        "x-stoplight": {
                          "id": "70u81ahk7rwge"
                        }
                      }
                    ]
                  },
                  "parameters": {
                    "type": "string",
                    "description": "Optional. When set, defines the complete runtime parameters for the Run; environment defaults are not merged in. Omit the field to use environment defaults only. In JSON request bodies, send a JSON object mapping parameter names to JSON-serializable values.",
                    "format": "json"
                  }
                }
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {},
                "schema": {
                  "type": "object",
                  "properties": {
                    "runCounter": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\":{\n    \"errorString\":\"400: Error Message\",\n    \"errorDetail\":\"400: Error Message\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "errorString": {
                          "type": "string",
                          "example": "400: Error Message"
                        },
                        "errorDetail": {
                          "type": "string",
                          "example": "400: Error Message"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\":{\n    \"errorString\":\"401: Unable to authenticate, please ensure your token is valid.\",\n    \"errorDetail\":\"401: Unable to authenticate, please ensure your token is valid.\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "errorString": {
                          "type": "string",
                          "example": "401: Unable to authenticate, please ensure your token is valid."
                        },
                        "errorDetail": {
                          "type": "string",
                          "example": "401: Unable to authenticate, please ensure your token is valid."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/scheduler/cancelRun": {
      "post": {
        "summary": "Stop Active Run",
        "tags": [
          "Runs"
        ],
        "description": "Cancel a currently active run.",
        "operationId": "cancelrun",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "runID"
                ],
                "properties": {
                  "runID": {
                    "type": "integer",
                    "description": "The ID of the run the user would like to cancel.",
                    "format": "int32"
                  },
                  "orgID": {
                    "type": "string",
                    "description": "The organization's ID of the run the user would like to cancel."
                  },
                  "environmentID": {
                    "type": "string",
                    "description": "The environment ID of the run the user would like to cancel."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "204",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\":{\n    \"errorString\":\"400: Error Message\",\n    \"errorDetail\":\"400: Error Message\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "errorString": {
                          "type": "string",
                          "example": "400: Error Message"
                        },
                        "errorDetail": {
                          "type": "string",
                          "example": "400: Error Message"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\":{\n    \"errorString\":\"401: Unable to authenticate, please ensure your token is valid.\",\n    \"errorDetail\":\"401: Unable to authenticate, please ensure your token is valid.\"\n\t}\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "errorString": {
                          "type": "string",
                          "example": "401: Unable to authenticate, please ensure your token is valid."
                        },
                        "errorDetail": {
                          "type": "string",
                          "example": "401: Unable to authenticate, please ensure your token is valid."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "userCredentials-Snowflake-Basic": {
        "title": "Snowflake Basic",
        "x-stoplight": {
          "id": "49ok53xxl9e0p"
        },
        "type": "object",
        "description": "Use KeyPair for automated tasks.",
        "required": [
          "snowflakeUsername",
          "snowflakePassword",
          "snowflakeRole",
          "snowflakeAuthType",
          "snowflakeWarehouse"
        ],
        "properties": {
          "snowflakeUsername": {
            "type": "string",
            "x-stoplight": {
              "id": "g50zmruvtjmgc"
            },
            "description": "Snowflake Account Username."
          },
          "snowflakePassword": {
            "type": "string",
            "x-stoplight": {
              "id": "at7138hkxuizt"
            },
            "description": "Snowflake Account password.\n"
          },
          "snowflakeRole": {
            "type": "string",
            "x-stoplight": {
              "id": "4vms4d0x03hf2"
            },
            "description": "Snowflake user role"
          },
          "snowflakeAuthType": {
            "type": "string",
            "x-stoplight": {
              "id": "ip9ebj4dq41gm"
            },
            "description": "Authorization Type. Basic",
            "default": "Basic",
            "example": "Basic"
          },
          "snowflakeWarehouse": {
            "type": "string",
            "x-stoplight": {
              "id": "17lnf021w4nep"
            },
            "description": "Snowflake compute warehouse"
          }
        }
      },
      "userCredentials-Snowflake-KeyPair": {
        "title": "Snowflake-KeyPair",
        "x-stoplight": {
          "id": "glernrnj28f73"
        },
        "type": "object",
        "required": [
          "snowflakeUsername",
          "snowflakeKeyPairKey",
          "snowflakeKeyPairPass",
          "snowflakeWarehouse",
          "snowflakeRole",
          "snowflakeAuthType"
        ],
        "properties": {
          "snowflakeUsername": {
            "type": "string",
            "x-stoplight": {
              "id": "rpxcdw1vmv260"
            },
            "description": "Snowflake Account Username."
          },
          "snowflakeKeyPairKey": {
            "type": "string",
            "x-stoplight": {
              "id": "j5x3g521n8g7q"
            },
            "description": "The PEM-encoded private key to use when authenticating to Snowflake. It's recommended to use environment variables or read from a secure file. Python requires the encypyted key be tripled quoted to run."
          },
          "snowflakeKeyPairPass": {
            "type": "string",
            "x-stoplight": {
              "id": "e7h5b2awcj3qf"
            },
            "description": "The password to use to decrypt the private key. This is only applicable when the the private key is encrypted.\n\n"
          },
          "snowflakeWarehouse": {
            "type": "string",
            "x-stoplight": {
              "id": "crajchlmdck7k"
            },
            "description": "Snowflake compute warehouse."
          },
          "snowflakeRole": {
            "type": "string",
            "x-stoplight": {
              "id": "e1t1hsbh1at6l"
            },
            "description": "Snowflake user role."
          },
          "snowflakeAuthType": {
            "type": "string",
            "x-stoplight": {
              "id": "3azht5d7he8d8"
            },
            "description": "KeyPair",
            "default": "KeyPair",
            "example": "KeyPair"
          }
        }
      },
      "userCredentials-Snowflake-OAuth": {
        "title": "Snowflake-OAuth",
        "x-stoplight": {
          "id": "5p6fff8c2z1pw"
        },
        "type": "object",
        "properties": {
          "snowflakeAuthType": {
            "type": "string",
            "x-stoplight": {
              "id": "unj913i7081t6"
            },
            "default": "OAuth",
            "example": "OAuth",
            "description": "Snowflake with automatically use the OAuth credentials on the environment."
          }
        }
      },
      "userCredentials-Databricks-Token": {
        "title": "Databricks-Token",
        "x-stoplight": {
          "id": "bcfuc7lvq25qg"
        },
        "type": "object",
        "required": [
          "platformKind",
          "token",
          "databricksPath",
          "databricksAuthType"
        ],
        "properties": {
          "platformKind": {
            "type": "string",
            "x-stoplight": {
              "id": "ps9v93b0dc2wt"
            },
            "default": "databricks",
            "example": "databricks",
            "description": "Set to databricks"
          },
          "token": {
            "type": "string",
            "x-stoplight": {
              "id": "5lk96cnmevs7c"
            },
            "description": "Your databricks token."
          },
          "databricksPath": {
            "type": "string",
            "x-stoplight": {
              "id": "hux3r354lawz7"
            },
            "description": "Your databricks SQL Warehouse path."
          },
          "databricksAuthType": {
            "type": "string",
            "x-stoplight": {
              "id": "f99tv6hfwtj6u"
            },
            "default": "Token",
            "example": "Token",
            "description": "The auth type."
          }
        },
        "description": "For automation, we recommend using Oauth Machine to Machine"
      },
      "userCredentials-Databrics-OAuthM2M": {
        "title": "userCredentials-Databrics-OAuthM2M",
        "x-stoplight": {
          "id": "5na20wz40dfrg"
        },
        "type": "object",
        "required": [
          "platformKind",
          "databricksClientSecret",
          "databricksClientID",
          "databricksPath",
          "databricksAuthType"
        ],
        "properties": {
          "platformKind": {
            "type": "string",
            "x-stoplight": {
              "id": "whhyq6wfs9sdh"
            },
            "description": "Set to databricks"
          },
          "databricksClientSecret": {
            "type": "string",
            "x-stoplight": {
              "id": "wsjw65oxr0oa8"
            }
          },
          "databricksClientID": {
            "type": "string",
            "x-stoplight": {
              "id": "tg7wzuhl2nobg"
            }
          },
          "databricksPath": {
            "type": "string",
            "x-stoplight": {
              "id": "t8vup66o7up2l"
            },
            "description": "Your SQL Warehouse path"
          },
          "databricksAuthType": {
            "type": "string",
            "x-stoplight": {
              "id": "qvvjjz6a6gjzv"
            },
            "default": "OAuthM2M",
            "example": "OAuthM2M"
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false,
    "samples-enabled": true
  }
}