Tasks

Run a task

Executes a task, creating a new task run. The run executes asynchronously. Use events or poll the task run endpoint to track progress.

post/tasks/{task_id}/run

Path parameters

task_idstring required

Unique identifier for the task (prefixed with task_).

Request body

credential_idstring nullable

The credential to authenticate with. Prefixed with cred_.

source_idstring nullable

The source to run the task against. Prefixed with src_.

session_idstring nullable

An existing session to reuse for this run. Prefixed with sess_.

{"stackTrail":"components:schemas:RunTaskRequest:properties:input","oasType":"schema","type":"unknown","description":"Input data matching the task's `input_schema`."}
request_idstring nullable

Client-specified request identifier for tracing.

Response

Created

idstring required

Unique identifier for the task run, prefixed with trun_.

objectstring required

Always task_run.

statusstring required

Run status: queued, running, canceling, interaction_required, review_required, completed, canceled, or failed.

resultstring nullable required

Run result after completion: success, failure, or unknown. Null while running.

task_idstring required

The task that was executed. Prefixed with task_.

trigger_idstring nullable required

The trigger that created this run, if any. Prefixed with trg_. null for runs created directly through the API.

credential_idstring nullable required

The credential used for authentication, if any. Prefixed with cred_.

session_idstring nullable required

The session this run executed within, if any. Prefixed with sess_.

agent_idstring required

The agent that executed this run. Prefixed with agt_.

source_idstring nullable required

The source this run connected to, if any. Prefixed with src_.

{"stackTrail":"components:schemas:JsonElement","oasType":"schema","type":"unknown","description":"Arbitrary JSON value."}
tokenizedstring[] nullable

Names of input fields whose values were tokenized when the run was created. The listed fields are removed from input. Returned alongside input (only when include=input is requested and one or more fields were vaulted); omitted otherwise.

{"stackTrail":"components:schemas:JsonElement","oasType":"schema","type":"unknown","description":"Arbitrary JSON value."}
{"stackTrail":"components:schemas:JsonElement","oasType":"schema","type":"unknown","description":"Arbitrary JSON value."}
created_atstring date-time required

ISO 8601 timestamp of when the resource was created.

updated_atstring date-time required

ISO 8601 timestamp of when the resource was last updated.

request_idstring required

Unique identifier for the API request. Include this when contacting support.

Changes

No recorded changes to this endpoint across all 1 revision of this API.