Coalesce Scheduler API

Start, stop, retry, and monitor pipeline runs

OpenAPI Specification

coalesce-scheduler-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Coalesce Environments Scheduler API
  description: REST API for integrating with Coalesce, a unified data transformation platform built for Snowflake. Enables automation of pipeline runs, querying metadata about nodes and environments, user management, git account configuration, project management, and CI/CD integration for data warehouse transformation pipelines.
  version: '1'
  contact:
    name: Coalesce Support
    email: support@coalesce.io
    url: https://docs.coalesce.io/docs/api
  x-api-id: coalesce-api
  x-audience: public
servers:
- url: https://app.coalescesoftware.io/api/v1
  description: US (default)
- url: https://app.us-east-1.aws.coalescesoftware.io/api/v1
  description: US East (AWS)
- url: https://app.eu.coalescesoftware.io/api/v1
  description: Europe
- url: https://app.northamerica-northeast1.gcp.coalescesoftware.io/api/v1
  description: Canada (GCP)
- url: https://app.australia-southeast1.gcp.coalescesoftware.io/api/v1
  description: Australia (GCP)
security:
- bearerAuth: []
tags:
- name: Scheduler
  description: Start, stop, retry, and monitor pipeline runs
paths:
  /scheduler/startRun:
    post:
      operationId: startRun
      summary: Start Run
      description: Create and start a new pipeline run. Triggers execution of transformation nodes in the specified environment.
      tags:
      - Scheduler
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartRunRequest'
      responses:
        '200':
          description: Run started successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunReference'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /scheduler/runStatus:
    get:
      operationId: getRunStatus
      summary: Get Run Status
      description: Get the status of a specific run by run ID.
      tags:
      - Scheduler
      parameters:
      - name: runCounter
        in: query
        required: true
        description: The run counter (ID) to check status for
        schema:
          type: integer
      responses:
        '200':
          description: Run status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunStatus'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /scheduler/rerun:
    post:
      operationId: retryRun
      summary: Retry Failed Run
      description: Retry a run from the point of failure. This endpoint starts the run again and runs only the nodes that failed.
      tags:
      - Scheduler
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RerunRequest'
      responses:
        '200':
          description: Run retried successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunReference'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /scheduler/cancelRun:
    post:
      operationId: cancelRun
      summary: Cancel Active Run
      description: Cancel a currently active (running) pipeline run.
      tags:
      - Scheduler
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelRunRequest'
      responses:
        '204':
          description: Run cancelled successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - invalid or missing bearer token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
    RunStatus:
      type: object
      properties:
        runCounter:
          type: integer
          description: Run counter
        status:
          type: string
          description: Current run status
          enum:
          - queued
          - running
          - success
          - failed
          - cancelled
        startedAt:
          type: string
          format: date-time
          description: Timestamp when the run started
        completedAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the run completed
    RunReference:
      type: object
      properties:
        runCounter:
          type: integer
          description: Unique identifier / counter for the started run
    StartRunRequest:
      type: object
      required:
      - environmentID
      properties:
        environmentID:
          type: string
          description: ID of the environment to run
        jobID:
          type: string
          description: Optional job configuration ID
        parallelism:
          type: integer
          description: Maximum number of nodes to run in parallel
        parameters:
          type: object
          additionalProperties:
            type: string
          description: Key-value pairs of runtime parameters passed to the run
    RerunRequest:
      type: object
      required:
      - runCounter
      properties:
        runCounter:
          type: integer
          description: The run counter of the failed run to retry
    CancelRunRequest:
      type: object
      required:
      - runCounter
      properties:
        runCounter:
          type: integer
          description: The run counter of the active run to cancel
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token obtained from the Deploy tab in the Coalesce application. Tokens never expire and remain valid across all environments and projects.