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: getCompleteGraphs 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: Getcompletegraphs200Example: summary: Default getCompleteGraphs 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 components: schemas: TaskRun: type: object description: A task run executing a standalone task or a DAG of tasks starting from the root task. properties: root_task_name: type: string description: The name of the root task in the current task run. readOnly: true example: example_value database_name: type: string description: The name of the current database for the task run. readOnly: true example: example_value schema_name: type: string description: The name of the current schema for the task run. readOnly: true example: example_value state: type: string description: The current state of the task run. enum: - SCHEDULED - EXECUTING - SUCCEEDED - FAILED - CANCELLED - SKIPPED readOnly: true example: SCHEDULED first_error_task_name: type: string description: The name of the first task throwing an error in the task run. readOnly: true example: example_value first_error_code: type: integer description: The first error code thrown in the task run. readOnly: true example: 10 first_error_message: type: string description: The first error message thrown in the task run. readOnly: true example: example_value scheduled_time: type: string description: The scheduled time for the task run. format: date-time readOnly: true example: '2026-01-15T10:30:00Z' query_start_time: type: string description: The start time for the task run query. format: date-time readOnly: true example: '2026-01-15T10:30:00Z' next_scheduled_time: type: string description: The next upcoming time for the task run. format: date-time readOnly: true example: '2026-01-15T10:30:00Z' completed_time: type: string description: The time this task run was last completed. format: date-time readOnly: true example: '2026-01-15T10:30:00Z' root_task_id: type: string description: The unique task ID for the root task. readOnly: true example: '500123' graph_version: type: integer description: The current version of the DAG on the task run. readOnly: true example: 10 run_id: type: integer description: The unique ID for the current task run. readOnly: true example: '500123' example: root_task_name: root_task database_name: test_db schema_name: test_schema state: SCHEDULED first_error_task_name: test_task first_error_code: 0 first_error_message: ERROR scheduled_time: '2024-06-18T01:01:01.111111' query_start_time: '2024-06-18T01:01:01.111111' next_scheduled_time: '2024-06-18T01:01:01.111111' completed_time: '2024-06-18T01:01:01.111111' root_task_id: '0' graph_version: 0 run_id: 0 required: - root_task_name - database_name - schema_name - state - scheduled_time - next_scheduled_time - root_task_id - graph_version - run_id Task: type: object description: A Snowflake task, used to execute SQL code. properties: name: $ref: ./common.yaml#/components/schemas/Identifier description: String that specifies the identifier (i.e. name) for the task. warehouse: $ref: ./common.yaml#/components/schemas/Identifier description: Specifies the virtual warehouse that provides compute resources for task runs. Omit this parameter to use serverless compute resources for runs of this task. schedule: $ref: '#/components/schemas/TaskSchedule' description: Specifies the schedule for periodically running the task. comment: type: string description: Specifies a comment for the task. example: example_value finalize: type: string description: Specifies the name of the root task that the finalizer task is associated with. example: example_value task_auto_retry_attempts: type: integer description: Root task settable only. Specifies the number of automatic task graph retry attempts. Valid range is 0 to 30. When not specified, no retry would happen. minimum: 0 maximum: 30 example: 10 config: type: object additionalProperties: true description: Task Config example: example_value session_parameters: type: object additionalProperties: true description: Session Parameters for the task at runtime. example: example_value definition: type: string description: The SQL definition for the task. Any one of single SQL statement, call to stored procedure, or procedural logic using Snowflake scripting. example: example_value predecessors: type: array description: Specifies one or more predecessor tasks for the current task items: type: string description: The identifier for the task. example: [] task_relations: type: string description: Displays the relationship between the root task and its corresponding finalizer tasks. readOnly: true example: example_value user_task_managed_initial_warehouse_size: type: string description: Specifies the size of the compute resources to provision for the first run of the task. This parameter only applies to serverless tasks. example: example_value target_completion_interval: $ref: '#/components/schemas/MinutesSchedule' description: Specifies the desired task completion time. This parameter only applies to serverless tasks. serverless_task_min_statement_size: type: string description: Specifies the minimum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. This parameter only applies to serverless tasks. example: example_value serverless_task_max_statement_size: type: string description: Specifies the maximum allowed warehouse size for the serverless task. Minimum XSMALL, Maximum XXLARGE. This parameter only applies to serverless tasks. example: example_value user_task_timeout_ms: type: integer description: Specifies the time limit on a single run of the task before it times out (in milliseconds). example: 10 suspend_task_after_num_failures: type: integer description: Specifies the number of consecutive failed task runs after which the current task is suspended automatically. example: 10 condition: type: string description: Specifies a Boolean SQL expression condition; multiple conditions joined with AND/OR are supported example: example_value allow_overlapping_execution: type: boolean description: Specifies whether to allow multiple instances of the DAG to run concurrently. example: true error_integration: type: string description: Specifies the name of the notification integration used to communicate with Amazon SNS, MS Azure Event Grid, or Google Pub/Sub. example: example_value created_on: type: string description: The time the task was created on. format: date-time readOnly: true example: '2026-01-15T10:30:00Z' id: type: string description: An ID for the current task. readOnly: true example: abc123 owner: type: string description: The role that owns the task. readOnly: true example: example_value owner_role_type: type: string description: The role type of the task owner. readOnly: true example: example_value state: type: string description: The state of the task. Must be one of started or suspended. readOnly: true enum: - started - suspended example: started last_committed_on: type: string description: The time the task was last committed on. readOnly: true format: date-time example: '2026-01-15T10:30:00Z' last_suspended_on: type: string description: The time the task was last suspended on. readOnly: true format: date-time example: '2026-01-15T10:30:00Z' database_name: type: string description: The name of the parent database for the task. readOnly: true example: example_value schema_name: type: string description: The name of the parent schema for the task. readOnly: true example: example_value example: name: name_example schedule: schedule_type: MINUTES_TYPE minutes: 10 comment: test_comment config: output_dir: /temp/test_directory/ learning_rate: '0.1' definition: this task does... predecessors: - task1 - task2 - task3 user_task_managed_initial_warehouse_size: SMALL target_completion_interval: schedule_type: MINUTES_TYPE minutes: 5 serverless_task_min_statement_size: XSMALL serverless_task_max_statement_size: MEDIUM user_task_timeout_ms: 10 suspend_task_after_num_failures: 3 condition: select 1 allow_overlapping_execution: false error_integration: my_notification_int created_on: '2024-06-18T01:01:01.111111' id: task_id owner: TASK_ADMIN owner_role_type: ADMIN state: started last_committed_on: '2024-06-18T01:01:01.111111' last_suspended_on: '2024-06-18T01:01:01.111111' database_name: TESTDB schema_name: TESTSCHEMA required: - name - definition TaskSchedule: type: object description: Specifies the schedule for periodically running the task. properties: schedule_type: description: Type of the schedule, can be either CRON_TYPE or MINUTES_TYPE. type: string example: example_value discriminator: propertyName: schedule_type mapping: CRON_TYPE: CronSchedule MINUTES_TYPE: MinutesSchedule CronSchedule: description: A cron schedule for executing a task at a specified interval. allOf: - $ref: '#/components/schemas/TaskSchedule' properties: cron_expr: type: string description: A cron expression for the task execution. example: example_value timezone: type: string description: The time zone for the schedule. example: example_value example: cron_expr: '* * * * ? *' timezone: america/los_angeles required: - cron_expr - timezone MinutesSchedule: description: A schedule for executing a task at specified intervals of minutes. allOf: - $ref: '#/components/schemas/TaskSchedule' properties: minutes: type: integer description: The number of minutes between each task run. example: 10 example: minutes: 10 required: - minutes securitySchemes: KeyPair: $ref: common.yaml#/components/securitySchemes/KeyPair ExternalOAuth: $ref: common.yaml#/components/securitySchemes/ExternalOAuth SnowflakeOAuth: $ref: common.yaml#/components/securitySchemes/SnowflakeOAuth security: - KeyPair: [] - ExternalOAuth: [] - SnowflakeOAuth: [] externalDocs: description: Streams and Tasks Reference url: https://docs.snowflake.com/en/sql-reference/commands-stream