Skip to main content

Get Workflow Definition

Endpoint: GET /api/metadata/workflow/{name}

Gets a specific workflow definition from the cluster.

Path parameters

ParameterDescriptionTypeRequired/Optional
taskTypeThe name of the workflow definition to be retrieved.stringRequired.

Query parameters

ParameterDescriptionTypeRequired/Optional
versionThe version of the workflow to be retrieved.integerOptional.
metadataWhether metadata (such as tags) should be included in the response. Default is false.booleanOptional.

Response

Returns the workflow definition and includes the metadata if queried.

Examples

Get an individual workflow definition without metadata

Get an individual workflow definition without metadata

Request

curl -X 'GET' \
'https://<YOUR-CLUSTER>/api/metadata/workflow/api-test?metadata=false' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>'

Response

{
"createTime": 0,
"updateTime": 1735802256013,
"name": "api-test",
"description": "Sample workflow created using API",
"version": 1,
"tasks": [
{
"name": "event",
"taskReferenceName": "event_ref",
"inputParameters": {},
"type": "EVENT",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"sink": "sqs:internal_event_name",
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": [],
"onStateChange": {},
"permissive": false
}
],
"inputParameters": [],
"outputParameters": {},
"failureWorkflow": "",
"schemaVersion": 2,
"restartable": false,
"workflowStatusListenerEnabled": false,
"ownerEmail": "john.doe@acme.com",
"timeoutPolicy": "ALERT_ONLY",
"timeoutSeconds": 0,
"variables": {},
"inputTemplate": {},
"enforceSchema": true
}

Get an individual workflow definition with metadata

Get an individual workflow definition with metadata

Request

curl -X 'GET' \
'https://<YOUR-CLUSTER>/api/metadata/workflow/api-test?metadata=true' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>'

Response

{
"createTime": 0,
"updateTime": 1735802256013,
"name": "api-test",
"description": "Sample workflow created using API",
"version": 1,
"tasks": [
{
"name": "event",
"taskReferenceName": "event_ref",
"inputParameters": {},
"type": "EVENT",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"sink": "sqs:internal_event_name",
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": [],
"onStateChange": {},
"permissive": false
}
],
"inputParameters": [],
"outputParameters": {},
"failureWorkflow": "",
"schemaVersion": 2,
"restartable": false,
"workflowStatusListenerEnabled": false,
"ownerEmail": "john.doe@acme.com",
"timeoutPolicy": "ALERT_ONLY",
"timeoutSeconds": 0,
"variables": {},
"inputTemplate": {},
"enforceSchema": true,
"overwriteTags": true,
"tags": [
{
"key": "api",
"value": "doc"
}
]
}