Workflow DAG definition and management
List workflows
Authorization
bearerAuth In: header
Query Parameters
Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflows?project_id=string"[
{
"id": "string",
"project_id": "string",
"name": "string",
"slug": "string",
"description": "string",
"enabled": true,
"version": 0,
"timeout_secs": 0,
"max_concurrent_runs": 0,
"max_parallel_steps": 0,
"cron": "string",
"cron_timezone": "string",
"skip_if_running": true,
"tags": {
"property1": "string",
"property2": "string"
},
"version_id": "string",
"version_policy": "pin",
"backwards_compatible": true,
"created_by": "string",
"updated_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]Create a workflow
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:8080/v1/workflows" \ -H "Content-Type: application/json" \ -d '{ "project_id": "string", "name": "string", "slug": "string", "steps": [ { "step_ref": "string" } ] }'{
"id": "string",
"project_id": "string",
"name": "string",
"slug": "string",
"description": "string",
"enabled": true,
"version": 0,
"timeout_secs": 0,
"max_concurrent_runs": 0,
"max_parallel_steps": 0,
"cron": "string",
"cron_timezone": "string",
"skip_if_running": true,
"tags": {
"property1": "string",
"property2": "string"
},
"version_id": "string",
"version_policy": "pin",
"backwards_compatible": true,
"created_by": "string",
"updated_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}Get a workflow
Authorization
bearerAuth In: header
Path Parameters
Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflows/string"{
"id": "string",
"project_id": "string",
"name": "string",
"slug": "string",
"description": "string",
"enabled": true,
"version": 0,
"timeout_secs": 0,
"max_concurrent_runs": 0,
"max_parallel_steps": 0,
"cron": "string",
"cron_timezone": "string",
"skip_if_running": true,
"tags": {
"property1": "string",
"property2": "string"
},
"version_id": "string",
"version_policy": "pin",
"backwards_compatible": true,
"created_by": "string",
"updated_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}Update a workflow
Authorization
bearerAuth In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PATCH "http://localhost:8080/v1/workflows/string" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"project_id": "string",
"name": "string",
"slug": "string",
"description": "string",
"enabled": true,
"version": 0,
"timeout_secs": 0,
"max_concurrent_runs": 0,
"max_parallel_steps": 0,
"cron": "string",
"cron_timezone": "string",
"skip_if_running": true,
"tags": {
"property1": "string",
"property2": "string"
},
"version_id": "string",
"version_policy": "pin",
"backwards_compatible": true,
"created_by": "string",
"updated_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}Delete a workflow
Authorization
bearerAuth In: header
Path Parameters
Response Body
curl -X DELETE "http://localhost:8080/v1/workflows/string"Trigger a workflow run
Authorization
bearerAuth In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:8080/v1/workflows/string/trigger" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"workflow_id": "string",
"project_id": "string",
"status": "pending",
"triggered_by": "string",
"workflow_version": 0,
"max_parallel_steps": 0,
"payload": {},
"error": "string",
"started_at": "2019-08-24T14:15:22Z",
"finished_at": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"retry_of_run_id": "string",
"parent_workflow_run_id": "string",
"parent_step_run_id": "string",
"tags": {
"property1": "string",
"property2": "string"
},
"workflow_version_id": "string",
"created_by": "string",
"created_at": "2019-08-24T14:15:22Z"
}List runs for a workflow
Authorization
bearerAuth In: header
Path Parameters
Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflows/string/runs"[
{
"id": "string",
"workflow_id": "string",
"project_id": "string",
"status": "pending",
"triggered_by": "string",
"workflow_version": 0,
"max_parallel_steps": 0,
"payload": {},
"error": "string",
"started_at": "2019-08-24T14:15:22Z",
"finished_at": "2019-08-24T14:15:22Z",
"expires_at": "2019-08-24T14:15:22Z",
"retry_of_run_id": "string",
"parent_workflow_run_id": "string",
"parent_step_run_id": "string",
"tags": {
"property1": "string",
"property2": "string"
},
"workflow_version_id": "string",
"created_by": "string",
"created_at": "2019-08-24T14:15:22Z"
}
]Clone a workflow
Authorization
bearerAuth In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:8080/v1/workflows/string/clone" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"project_id": "string",
"name": "string",
"slug": "string",
"description": "string",
"enabled": true,
"version": 0,
"timeout_secs": 0,
"max_concurrent_runs": 0,
"max_parallel_steps": 0,
"cron": "string",
"cron_timezone": "string",
"skip_if_running": true,
"tags": {
"property1": "string",
"property2": "string"
},
"version_id": "string",
"version_policy": "pin",
"backwards_compatible": true,
"created_by": "string",
"updated_by": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}Get DAG visualization
Authorization
bearerAuth In: header
Path Parameters
Query Parameters
Output format. Default is JSON adjacency list; 'dot' returns Graphviz DOT.
"json" | "dot"Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflows/string/graph"{
"workflow_id": "string",
"roots": [
"string"
],
"adjacency": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"dot": "string"
}Validate a workflow DAG structure
Authorization
bearerAuth In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:8080/v1/workflows/string/dry-run" \ -H "Content-Type: application/json" \ -d '{}'{
"valid": true,
"step_count": 0
}Build topological workflow plan preview
Authorization
bearerAuth In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "http://localhost:8080/v1/workflows/string/plan" \ -H "Content-Type: application/json" \ -d '{}'{
"workflow_id": "string",
"workflow_version": 0,
"step_count": 0,
"roots": [
"string"
],
"topological_order": [
"string"
]
}curl -X GET "http://localhost:8080/v1/workflows/string/versions"[
{
"id": "string",
"workflow_id": "string",
"version": 0,
"project_id": "string",
"name": "string",
"slug": "string",
"description": "string",
"enabled": true,
"timeout_secs": 0,
"max_concurrent_runs": 0,
"max_parallel_steps": 0,
"cron": "string",
"cron_timezone": "string",
"skip_if_running": true,
"version_id": "string",
"created_by": "string",
"updated_by": "string",
"created_at": "2019-08-24T14:15:22Z"
}
]Get workflow version by version ID
Path Parameters
Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflows/string/versions/string"{
"id": "string",
"workflow_id": "string",
"version": 0,
"project_id": "string",
"name": "string",
"slug": "string",
"description": "string",
"enabled": true,
"timeout_secs": 0,
"max_concurrent_runs": 0,
"max_parallel_steps": 0,
"cron": "string",
"cron_timezone": "string",
"skip_if_running": true,
"version_id": "string",
"created_by": "string",
"updated_by": "string",
"created_at": "2019-08-24T14:15:22Z"
}List workflow version steps
Path Parameters
Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflows/string/versions/string/steps"[
{
"job_id": "string",
"step_ref": "string",
"depends_on": [
"string"
],
"condition": {},
"on_failure": "fail_workflow",
"payload": {},
"step_type": "job",
"approval_timeout_secs": 0,
"approval_approvers": [
"string"
],
"retry_max_attempts": 0,
"retry_backoff": "exponential",
"retry_initial_delay_secs": 0,
"retry_max_delay_secs": 0,
"timeout_secs_override": 0,
"output_transform": "string",
"sub_workflow_id": "string",
"max_nesting_depth": 0,
"event_key": "string",
"event_timeout_secs": 0,
"event_notify_url": "string",
"sleep_duration_secs": 0,
"event_emit_key": "string",
"concurrency_key": "string",
"resource_class": "small"
}
]curl -X GET "http://localhost:8080/v1/workflow-runs/string/labels"{
"labels": {
"property1": "string",
"property2": "string"
}
}curl -X GET "http://localhost:8080/v1/workflow-runs/string/graph"{
"workflow_run_id": "string",
"workflow_id": "string",
"version": 0,
"nodes": [
{
"step_ref": "string",
"type": "job",
"status": "pending",
"depends_on": [
"string"
],
"attempt": 0,
"started_at": "2019-08-24T14:15:22Z",
"finished_at": "2019-08-24T14:15:22Z",
"duration_ms": 0
}
],
"edges": [
{
"from": "string",
"to": "string"
}
],
"roots": [
"string"
],
"runnable": [
"string"
],
"critical_path": [
"string"
],
"critical_path_estimate_ms": 0,
"critical_path_remaining_ms": 0
}List workflow step decisions
Path Parameters
Query Parameters
"scheduler" | "concurrency" | "resource" | "condition"Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflow-runs/string/explain"{
"data": [
{
"id": "string",
"workflow_run_id": "string",
"step_run_id": "string",
"step_ref": "string",
"decision_type": "scheduler",
"decision": "string",
"explanation": "string",
"details": {},
"created_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string",
"has_more": true
}Get workflow run timeline for Gantt chart rendering
Path Parameters
Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflow-runs/string/timeline"{
"workflow_run_id": "string",
"status": "string",
"started_at": "2019-08-24T14:15:22Z",
"finished_at": "2019-08-24T14:15:22Z",
"total_ms": 0,
"steps": [
{
"step_run_id": "string",
"step_ref": "string",
"status": "string",
"started_at": "2019-08-24T14:15:22Z",
"finished_at": "2019-08-24T14:15:22Z",
"duration_ms": 0,
"parallel_with": [
"string"
],
"on_critical_path": true,
"wait_ms": 0
}
]
}curl -X POST "http://localhost:8080/v1/workflows/string/simulate"{
"workflow_id": "string",
"version": 0,
"predicted_order": [
"string"
],
"step_count": 0
}Diff workflow versions
Path Parameters
Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflows/string/versions/string/diff/string"{
"from_version_id": "string",
"to_version_id": "string",
"added_steps": [
"string"
],
"removed_steps": [
"string"
]
}Workflow version impact
Path Parameters
Response Body
application/json
curl -X GET "http://localhost:8080/v1/workflows/string/versions/string/impact"{
"version_id": "string",
"matching_runs": 0,
"sampled_runs": 0
}curl -X GET "http://localhost:8080/v1/workflows/string/active-versions"{
"workflow_id": "string",
"versions": [
{
"version_id": "string",
"version": 0,
"pending": 0,
"running": 0,
"paused": 0,
"total": 0
}
]
}curl -X GET "http://localhost:8080/v1/workflow-policies/string"{
"id": "string",
"project_id": "string",
"max_fan_out": 0,
"max_depth": 0,
"forbidden_step_types": [
"string"
],
"require_approval_for_deploy": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}Upsert workflow policy
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "http://localhost:8080/v1/workflow-policies/string" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "string",
"project_id": "string",
"max_fan_out": 0,
"max_depth": 0,
"forbidden_step_types": [
"string"
],
"require_approval_for_deploy": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}