TaskDefs
The TaskDefs API allows you to list all task definitions for a WorlflowDef and search task definitions by ID.
Get all TaskDefs for a WorkflowDef#
Endpoints#
GET /workflowsvc/api/v1/workflowdefs/{workflowDefId}/taskdefsRequest#
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
_offset | String | Point at which to list Taskdefs. Default is 0. | Optional |
_pageSize | String | Number of Taskdefs to list per page. Default is 10. | Optional |
_name | String | Partial search for name of TaskDef | Optional |
_type | String | Partial search for type of TaskDef | Optional |
sort | String | Specify if sorting is required. For example: %7B%22_name%22%3A1%7D | Optional |
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
workflowDefId | String | Workflow definition ID to search for | Required |
Request body example#
GET /workflowsvc/api/v1/workflowdefs/4b6525cc-9bea-4521-85bf-603c50521403/taskdefs?nsfilter={{nsfilter}}&_offset=0&_pageSize=10&_name=publish&_type=MQTT_PUBLISH&sort=%7B%22_name%22%3A1%7DResponse#
Codes#
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not Found |
Response body example#
{ "_offset": 0, "_pageSize": 10, "_total": 1, "_list": [ { "_id": "36ed7fcb-202e-4bf9-b9a3-866de1f42055", "_name": "publish_task", "_type": "MQTT_PUBLISH", "_sequenceno": 1, "_inputParams": { "_mqtt_target": [{ "_type": "password", "_config": { "_username": "mqtt_user", "_password": "***", "_url": "ssl://broker:8883" } }], "_topic": "test/topic", "_messages": ["Hello MQTT!"] } } ]}Get TaskDef by ID#
Endpoints#
GET /workflowsvc/api/v1/workflowdefs/{workflowdefid}/taskdefs/{taskdefid}Request#
Query parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
Path parameters#
| Parameter | Type | Description | Required |
|---|---|---|---|
taskdefid | String | ID of the task definition | Required |
workflowdefid | String | ID of the workflow definition | Required |
Request body example#
GET /workflowsvc/api/v1/workflowdefs/4b6525cc-9bea-4521-85bf-603c50521403/taskdefs/36ed7fcb-202e-4bf9-b9a3-866de1f42055?nsfilter={{nsfilter}}Response#
Codes#
| Code | Description |
|---|---|
200 | Success |
Response body example#
{ "_id": "36ed7fcb-202e-4bf9-b9a3-866de1f42055", "_name": "publish_task", "_type": "MQTT_PUBLISH", "_sequenceno": 1, "_inputParams": { "_mqtt_target": [{ "_type": "password", "_config": { "_username": "mqtt_user", "_password": "***", "_url": "ssl://broker:8883" } }], "_topic": "test/topic", "_messages": ["Hello MQTT!"] }}