REST API
Endpoints
- public
- workspaces
- workflows
- triggers
- workflow-executions
- actions
- secrets
- schedules
- tags
- users
- organization
- editor
- registry-repositories
- registry-actions
- settings
- organization-secrets
- tables
- auth
Get Workflow Execution
Get a workflow execution.
{
"id": "<string>",
"run_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"execution_time": "2023-11-07T05:31:56Z",
"close_time": "2023-11-07T05:31:56Z",
"status": "RUNNING",
"workflow_type": "<string>",
"task_queue": "<string>",
"history_length": 123,
"parent_wf_exec_id": "<string>",
"events": [
{
"event_id": 123,
"event_time": "2023-11-07T05:31:56Z",
"event_type": "WORKFLOW_EXECUTION_STARTED",
"task_id": 123,
"event_group": {
"event_id": 123,
"udf_namespace": "<string>",
"udf_name": "<string>",
"udf_key": "<string>",
"action_id": "<string>",
"action_ref": "<string>",
"action_title": "<string>",
"action_description": "<string>",
"action_input": {
"task": {
"ref": "<string>",
"description": "<string>",
"action": "<string>",
"args": {},
"depends_on": [
"<string>"
],
"run_if": "<string>",
"for_each": "<string>",
"retry_policy": {
"max_attempts": 123,
"timeout": 123,
"retry_until": "<string>"
},
"start_delay": 123,
"wait_until": "<string>",
"join_strategy": "any"
},
"exec_context": {},
"run_context": {
"wf_id": "<string>",
"wf_exec_id": "<string>",
"wf_run_id": "<string>",
"environment": "<string>"
}
},
"action_result": "<any>",
"current_attempt": 123,
"retry_policy": {
"max_attempts": 123,
"timeout": 123,
"retry_until": "<string>"
},
"start_delay": 0,
"join_strategy": "any",
"related_wf_exec_id": "<string>"
},
"failure": {
"message": "<string>",
"cause": {}
},
"result": "<any>",
"role": {
"type": "user",
"workspace_id": "<string>",
"user_id": "<string>",
"access_level": 0,
"service_id": "tracecat-runner"
},
"parent_wf_exec_id": "<string>",
"workflow_timeout": 123
}
]
}
Authorizations
Path Parameters
Query Parameters
Response
The ID of the workflow execution
The run ID of the workflow execution
The start time of the workflow execution
RUNNING
, COMPLETED
, FAILED
, CANCELED
, TERMINATED
, CONTINUED_AS_NEW
, TIMED_OUT
Number of events in the history
The events in the workflow execution
The event types we care about.
WORKFLOW_EXECUTION_STARTED
, WORKFLOW_EXECUTION_COMPLETED
, WORKFLOW_EXECUTION_FAILED
, WORKFLOW_EXECUTION_TERMINATED
, WORKFLOW_EXECUTION_CANCELED
, WORKFLOW_EXECUTION_CONTINUED_AS_NEW
, WORKFLOW_EXECUTION_TIMED_OUT
, ACTIVITY_TASK_SCHEDULED
, ACTIVITY_TASK_STARTED
, ACTIVITY_TASK_COMPLETED
, ACTIVITY_TASK_FAILED
, ACTIVITY_TASK_TIMED_OUT
, ACTIVITY_TASK_CANCELED
, CHILD_WORKFLOW_EXECUTION_STARTED
, CHILD_WORKFLOW_EXECUTION_COMPLETED
, CHILD_WORKFLOW_EXECUTION_FAILED
, CHILD_WORKFLOW_EXECUTION_CANCELED
, CHILD_WORKFLOW_EXECUTION_TERMINATED
, START_CHILD_WORKFLOW_EXECUTION_INITIATED
, CHILD_WORKFLOW_EXECUTION_TIMED_OUT
The action group of the event. We use this to keep track of what events are related to each other.
This object contains all the information needed to execute an action.
Unique reference for the task
Action type. Equivalent to the UDF key.
Arguments for the action
Task dependencies
Condition to run the task
Iterate over a list of items and run the task for each item.
Retry policy for the action.
Delay before starting the action in seconds. If wait_until
is also provided, the wait_until
timer will take precedence.
Wait until a specific date and time before starting. Overrides start_delay
if both are provided.
The strategy to use when joining on this task. By default, all branches must complete successfully before the join task can complete.
any
, all
This is the runtime context model for a workflow run. Passed into activities.
Total number of execution attempts. 0 means unlimited, 1 means no retries.
Timeout for the action in seconds.
Retry until a specific condition is met.
any
, all
The identity and authorization of a user or service.
Params
type : Literal["user", "service"] The type of role. user_id : UUID | None The user's ID, or the service's user_id. This can be None for internal services, or when a user hasn't been set for the role. service_id : str | None = None The service's role name, or None if the role is a user.
User roles
- User roles are authenticated via JWT.
- The
user_id
is the user's JWT 'sub' claim. - User roles do not have an associated
service_id
, this must be None.
Service roles
- Service roles are authenticated via API key.
- Used for internal services to authenticate with the API.
- A service's
user_id
is the user it's acting on behalf of. This can be None for internal services.
user
, service
tracecat-runner
, tracecat-api
, tracecat-cli
, tracecat-schedule-runner
, tracecat-service
, tracecat-executor
, tracecat-bootstrap
Access control levels for roles.
0
, 999
When this workflow run started or should start.
When the workflow was closed if closed.
Was this page helpful?
{
"id": "<string>",
"run_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"execution_time": "2023-11-07T05:31:56Z",
"close_time": "2023-11-07T05:31:56Z",
"status": "RUNNING",
"workflow_type": "<string>",
"task_queue": "<string>",
"history_length": 123,
"parent_wf_exec_id": "<string>",
"events": [
{
"event_id": 123,
"event_time": "2023-11-07T05:31:56Z",
"event_type": "WORKFLOW_EXECUTION_STARTED",
"task_id": 123,
"event_group": {
"event_id": 123,
"udf_namespace": "<string>",
"udf_name": "<string>",
"udf_key": "<string>",
"action_id": "<string>",
"action_ref": "<string>",
"action_title": "<string>",
"action_description": "<string>",
"action_input": {
"task": {
"ref": "<string>",
"description": "<string>",
"action": "<string>",
"args": {},
"depends_on": [
"<string>"
],
"run_if": "<string>",
"for_each": "<string>",
"retry_policy": {
"max_attempts": 123,
"timeout": 123,
"retry_until": "<string>"
},
"start_delay": 123,
"wait_until": "<string>",
"join_strategy": "any"
},
"exec_context": {},
"run_context": {
"wf_id": "<string>",
"wf_exec_id": "<string>",
"wf_run_id": "<string>",
"environment": "<string>"
}
},
"action_result": "<any>",
"current_attempt": 123,
"retry_policy": {
"max_attempts": 123,
"timeout": 123,
"retry_until": "<string>"
},
"start_delay": 0,
"join_strategy": "any",
"related_wf_exec_id": "<string>"
},
"failure": {
"message": "<string>",
"cause": {}
},
"result": "<any>",
"role": {
"type": "user",
"workspace_id": "<string>",
"user_id": "<string>",
"access_level": 0,
"service_id": "tracecat-runner"
},
"parent_wf_exec_id": "<string>",
"workflow_timeout": 123
}
]
}