Get Workflow Definition
Endpoint: GET /api/metadata/workflow/{name}
Gets a specific workflow definition from the cluster.
Path parameters
Parameter | Description | Type | Required/Optional |
---|---|---|---|
taskType | The name of the workflow definition to be retrieved. | string | Required. |
Query parameters
Parameter | Description | Type | Required/Optional |
---|---|---|---|
version | The version of the workflow to be retrieved. | integer | Optional. |
metadata | Whether metadata (such as tags) should be included in the response. Default is false. | boolean | Optional. |
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"
}
]
}