Skip to main content
Version: v5.2

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}/taskdefs

Request

Query parameters

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired
_offsetStringPoint at which to list Taskdefs. Default is 0.Optional
_pageSizeStringNumber of Taskdefs to list per page. Default is 10.Optional
_nameStringPartial search for name of TaskDefOptional
_typeStringPartial search for type of TaskDefOptional
sortStringSpecify if sorting is required. For example: %7B%22_name%22%3A1%7DOptional

Path parameters

ParameterTypeDescriptionRequired
workflowDefIdStringWorkflow definition ID to search forRequired

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%7D

Response

Codes

CodeDescription
200Success
400Bad Request
404Not 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

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired

Path parameters

ParameterTypeDescriptionRequired
taskdefidStringID of the task definitionRequired
workflowdefidStringID of the workflow definitionRequired
Request body example
GET /workflowsvc/api/v1/workflowdefs/4b6525cc-9bea-4521-85bf-603c50521403/taskdefs/36ed7fcb-202e-4bf9-b9a3-866de1f42055?nsfilter={{nsfilter}}

Response

Codes

CodeDescription
200Success

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!"]
}
}