Snowflake Task API

The Snowflake Task API is a REST API that you can use to access, update, and perform certain actions on task resources in a Snowflake database.

OpenAPI Specification

task.yaml Raw ↑
openapi: 3.0.0
servers:
- description: Snowflake Task API
  url: https://org-account.snowflakecomputing.com
info:
  version: 0.0.1
  title: Snowflake Task API
  description: The Snowflake Task API is a REST API that you can use to access, update, and perform certain actions on task resources in a Snowflake database.
  contact:
    name: Snowflake, Inc.
    url: https://snowflake.com
    email: support@snowflake.com
paths:
  /api/v2/databases/{database}/schemas/{schema}/tasks:
    get:
      summary: List Tasks
      tags:
      - task
      description: Lists tasks under the database and schema, with show options as query parameters.
      operationId: listTasks
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/rootOnly
      - $ref: common.yaml#/components/parameters/like
      - $ref: common.yaml#/components/parameters/startsWith
      - $ref: common.yaml#/components/parameters/showLimit
      - $ref: common.yaml#/components/parameters/fromName
      responses:
        '200':
          description: successful
          headers:
            X-Snowflake-Request-ID:
              $ref: common.yaml#/components/headers/X-Snowflake-Request-ID
            Link:
              $ref: common.yaml#/components/headers/Link
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Task'
              examples:
                Listtasks200Example:
                  summary: Default listTasks 200 response
                  x-microcks-default: true
                  value:
                  - name: {}
                    warehouse: {}
                    schedule:
                      schedule_type: example_value
                    comment: example_value
                    finalize: example_value
                    task_auto_retry_attempts: 10
                    config: example_value
                    session_parameters: example_value
                    definition: example_value
                    predecessors:
                    - example_value
                    task_relations: example_value
                    user_task_managed_initial_warehouse_size: example_value
                    target_completion_interval:
                      minutes: 10
                    serverless_task_min_statement_size: example_value
                    serverless_task_max_statement_size: example_value
                    user_task_timeout_ms: 10
                    suspend_task_after_num_failures: 10
                    condition: example_value
                    allow_overlapping_execution: true
                    error_integration: example_value
                    created_on: '2026-01-15T10:30:00Z'
                    id: abc123
                    owner: example_value
                    owner_role_type: example_value
                    state: started
                    last_committed_on: '2026-01-15T10:30:00Z'
                    last_suspended_on: '2026-01-15T10:30:00Z'
                    database_name: example_value
                    schema_name: example_value
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '408':
          $ref: common.yaml#/components/responses/408RequestTimeout
        '409':
          $ref: common.yaml#/components/responses/409Conflict
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      summary: Create a Task
      tags:
      - task
      description: Create a task, with standard create modifiers as query parameters. See the Task component definition for what is required to be provided in the request body.
      operationId: createTask
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/createMode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task'
            example:
              name: name_example
              warehouse: REGRESS
              schedule:
                schedule_type: MINUTES_TYPE
                minutes: 10
              predecessors:
              - task1
              - task2
              - task3
              comment: test_comment
              definition: select 1
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '408':
          $ref: common.yaml#/components/responses/408RequestTimeout
        '409':
          $ref: common.yaml#/components/responses/409Conflict
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:
    get:
      summary: Fetch a Task
      tags:
      - task
      description: Fetch a task using the describe command output.
      operationId: fetchTask
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      responses:
        '200':
          description: successful
          headers:
            X-Snowflake-Request-ID:
              $ref: common.yaml#/components/headers/X-Snowflake-Request-ID
            Link:
              $ref: common.yaml#/components/headers/Link
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
              examples:
                Fetchtask200Example:
                  summary: Default fetchTask 200 response
                  x-microcks-default: true
                  value:
                    name: {}
                    warehouse: {}
                    schedule:
                      schedule_type: example_value
                    comment: example_value
                    finalize: example_value
                    task_auto_retry_attempts: 10
                    config: example_value
                    session_parameters: example_value
                    definition: example_value
                    predecessors:
                    - example_value
                    task_relations: example_value
                    user_task_managed_initial_warehouse_size: example_value
                    target_completion_interval:
                      minutes: 10
                    serverless_task_min_statement_size: example_value
                    serverless_task_max_statement_size: example_value
                    user_task_timeout_ms: 10
                    suspend_task_after_num_failures: 10
                    condition: example_value
                    allow_overlapping_execution: true
                    error_integration: example_value
                    created_on: '2026-01-15T10:30:00Z'
                    id: abc123
                    owner: example_value
                    owner_role_type: example_value
                    state: started
                    last_committed_on: '2026-01-15T10:30:00Z'
                    last_suspended_on: '2026-01-15T10:30:00Z'
                    database_name: example_value
                    schema_name: example_value
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      summary: Create a (or Alter an Existing) Task
      tags:
      - task
      description: Create a (or alter an existing) task. Even if the operation is just an alter, the full property set must be provided.
      operationId: createOrAlterTask
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task'
            examples:
              CreateoraltertaskRequestExample:
                summary: Default createOrAlterTask request
                x-microcks-default: true
                value:
                  name: {}
                  warehouse: {}
                  schedule:
                    schedule_type: example_value
                  comment: example_value
                  finalize: example_value
                  task_auto_retry_attempts: 10
                  config: example_value
                  session_parameters: example_value
                  definition: example_value
                  predecessors:
                  - example_value
                  task_relations: example_value
                  user_task_managed_initial_warehouse_size: example_value
                  target_completion_interval:
                    minutes: 10
                  serverless_task_min_statement_size: example_value
                  serverless_task_max_statement_size: example_value
                  user_task_timeout_ms: 10
                  suspend_task_after_num_failures: 10
                  condition: example_value
                  allow_overlapping_execution: true
                  error_integration: example_value
                  created_on: '2026-01-15T10:30:00Z'
                  id: abc123
                  owner: example_value
                  owner_role_type: example_value
                  state: started
                  last_committed_on: '2026-01-15T10:30:00Z'
                  last_suspended_on: '2026-01-15T10:30:00Z'
                  database_name: example_value
                  schema_name: example_value
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      - $ref: common.yaml#/components/parameters/ifExists
      summary: Delete a Task
      tags:
      - task
      description: Delete a task with the task name. If ifExists is used, the operation will succeed even if the object does not exist. Otherwise, there will be a failure if the drop is unsuccessful.
      operationId: deleteTask
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:execute:
    post:
      summary: Execute a Task Object.
      tags:
      - task
      description: Execute a task -- this is equivalent to EXECUTE IMMEDIATE.
      operationId: executeTask
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      - $ref: common.yaml#/components/parameters/asyncExec
      - name: retryLast
        in: query
        description: Retry the last failed run of the DAG.
        schema:
          type: boolean
          default: false
        example: true
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:resume:
    post:
      summary: Resume a Suspended Task.
      tags:
      - task
      description: Resumes a suspended task object. This is equivalento an ALTER TASK ... RESUME.
      operationId: resumeTask
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/tasks/{name}:suspend:
    post:
      summary: Suspend a Running Task.
      tags:
      - task
      description: Suspends a running task. This is equivalent to an ALTER TASK ... SUSPEND.
      operationId: suspendTask
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      responses:
        '200':
          $ref: common.yaml#/components/responses/200SuccessResponse
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/dependents:
    get:
      summary: Fetch the Dependent Tasks of a Task
      tags:
      - task
      description: This operation returns a list of the dependent tasks of the task with identifier {name}.
      operationId: fetchTaskDependents
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      - name: recursive
        in: query
        description: Specifies whether to limit the output to include only direct child tasks or to include all recursive child tasks.
        schema:
          type: boolean
          default: true
        example: true
      responses:
        '200':
          description: successful
          headers:
            X-Snowflake-Request-ID:
              $ref: common.yaml#/components/headers/X-Snowflake-Request-ID
            Link:
              $ref: common.yaml#/components/headers/Link
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Task'
              examples:
                Fetchtaskdependents200Example:
                  summary: Default fetchTaskDependents 200 response
                  x-microcks-default: true
                  value:
                  - name: {}
                    warehouse: {}
                    schedule:
                      schedule_type: example_value
                    comment: example_value
                    finalize: example_value
                    task_auto_retry_attempts: 10
                    config: example_value
                    session_parameters: example_value
                    definition: example_value
                    predecessors:
                    - example_value
                    task_relations: example_value
                    user_task_managed_initial_warehouse_size: example_value
                    target_completion_interval:
                      minutes: 10
                    serverless_task_min_statement_size: example_value
                    serverless_task_max_statement_size: example_value
                    user_task_timeout_ms: 10
                    suspend_task_after_num_failures: 10
                    condition: example_value
                    allow_overlapping_execution: true
                    error_integration: example_value
                    created_on: '2026-01-15T10:30:00Z'
                    id: abc123
                    owner: example_value
                    owner_role_type: example_value
                    state: started
                    last_committed_on: '2026-01-15T10:30:00Z'
                    last_suspended_on: '2026-01-15T10:30:00Z'
                    database_name: example_value
                    schema_name: example_value
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/current_graphs:
    get:
      deprecated: true
      summary: Get the Graph Runs That Are Executing or Scheduled for the Task for the Next 8 Days.
      tags:
      - task
      description: This function returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days.
      operationId: getCurrentGraphsDeprecated
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      - in: query
        name: resultLimit
        schema:
          type: integer
          description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000.
        example: 10
      responses:
        '200':
          description: successful
          headers:
            X-Snowflake-Request-ID:
              $ref: common.yaml#/components/headers/X-Snowflake-Request-ID
            Link:
              $ref: common.yaml#/components/headers/Link
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskRun'
              examples:
                Getcurrentgraphsdeprecated200Example:
                  summary: Default getCurrentGraphsDeprecated 200 response
                  x-microcks-default: true
                  value:
                  - root_task_name: example_value
                    database_name: example_value
                    schema_name: example_value
                    state: SCHEDULED
                    first_error_task_name: example_value
                    first_error_code: 10
                    first_error_message: example_value
                    scheduled_time: '2026-01-15T10:30:00Z'
                    query_start_time: '2026-01-15T10:30:00Z'
                    next_scheduled_time: '2026-01-15T10:30:00Z'
                    completed_time: '2026-01-15T10:30:00Z'
                    root_task_id: '500123'
                    graph_version: 10
                    run_id: '500123'
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/current-graphs:
    get:
      summary: Get the Graph Runs That Are Executing or Scheduled for the Task for the Next 8 Days.
      tags:
      - task
      description: This function returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days.
      operationId: getCurrentGraphs
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      - in: query
        name: resultLimit
        schema:
          type: integer
          description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000.
        example: 10
      responses:
        '200':
          description: successful
          headers:
            X-Snowflake-Request-ID:
              $ref: common.yaml#/components/headers/X-Snowflake-Request-ID
            Link:
              $ref: common.yaml#/components/headers/Link
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskRun'
              examples:
                Getcurrentgraphs200Example:
                  summary: Default getCurrentGraphs 200 response
                  x-microcks-default: true
                  value:
                  - root_task_name: example_value
                    database_name: example_value
                    schema_name: example_value
                    state: SCHEDULED
                    first_error_task_name: example_value
                    first_error_code: 10
                    first_error_message: example_value
                    scheduled_time: '2026-01-15T10:30:00Z'
                    query_start_time: '2026-01-15T10:30:00Z'
                    next_scheduled_time: '2026-01-15T10:30:00Z'
                    completed_time: '2026-01-15T10:30:00Z'
                    root_task_id: '500123'
                    graph_version: 10
                    run_id: '500123'
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/complete_graphs:
    get:
      deprecated: true
      summary: Get the Graph Runs That Are Completed for the Task.
      tags:
      - task
      description: This function returns details for graph runs that are completed.
      operationId: getCompleteGraphsDeprecated
      parameters:
      - $ref: common.yaml#/components/parameters/database
      - $ref: common.yaml#/components/parameters/schema
      - $ref: common.yaml#/components/parameters/name
      - in: query
        name: resultLimit
        schema:
          type: integer
        description: Number of results to return, at most. Default is 1000, valid range is 1 to 10000.
        example: 10
      - in: query
        name: errorOnly
        schema:
          type: boolean
        description: Whether to only return results for tasks runs that have failed. Default is false.
        example: true
      responses:
        '200':
          description: successful
          headers:
            X-Snowflake-Request-ID:
              $ref: common.yaml#/components/headers/X-Snowflake-Request-ID
            Link:
              $ref: common.yaml#/components/headers/Link
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskRun'
              examples:
                Getcompletegraphsdeprecated200Example:
                  summary: Default getCompleteGraphsDeprecated 200 response
                  x-microcks-default: true
                  value:
                  - root_task_name: example_value
                    database_name: example_value
                    schema_name: example_value
                    state: SCHEDULED
                    first_error_task_name: example_value
                    first_error_code: 10
                    first_error_message: example_value
                    scheduled_time: '2026-01-15T10:30:00Z'
                    query_start_time: '2026-01-15T10:30:00Z'
                    next_scheduled_time: '2026-01-15T10:30:00Z'
                    completed_time: '2026-01-15T10:30:00Z'
                    root_task_id: '500123'
                    graph_version: 10
                    run_id: '500123'
        '202':
          $ref: common.yaml#/components/responses/202SuccessAcceptedResponse
        '400':
          $ref: common.yaml#/components/responses/400BadRequest
        '401':
          $ref: common.yaml#/components/responses/401Unauthorized
        '403':
          $ref: common.yaml#/components/responses/403Forbidden
        '404':
          $ref: common.yaml#/components/responses/404NotFound
        '405':
          $ref: common.yaml#/components/responses/405MethodNotAllowed
        '429':
          $ref: common.yaml#/components/responses/429LimitExceeded
        '500':
          $ref: common.yaml#/components/responses/500InternalServerError
        '503':
          $ref: common.yaml#/components/responses/503ServiceUnavailable
        '504':
          $ref: common.yaml#/components/responses/504GatewayTimeout
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /api/v2/databases/{database}/schemas/{schema}/tasks/{name}/complete-graphs:
    get:
      summary: Get the Graph Runs That Are Completed for the Task.
      tags:
      - task
      description: This function returns details for graph runs that are completed.
      operationId: getCompleteGrap

# --- truncated at 32 KB (47 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/snowflake/refs/heads/main/openapi/task.yaml