Skip to main content
Version: v5.1

WorkflowDefs

The Workflow definition API allows you to list Workflow definitions, search Workflow definitions by ID, create new Workflow definitions, and update Workflow definitions. You can also use this API to perform operations on schedules, jobs, and triggers.

List workflowDefs#

Endpoints#

GET workflowsvc/api/v1/workflowdefs

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired
_nameStringName filter to applyOptional
_userTypeStringUser type filter to applyOptional
_offsetIntegerPosition to start listing from in list of workflow definitionsOptional
_pageSizeIntegerNumber of workflow definitions to be listed per page. Default is 10.Optional
sortStringSet a sort optionOptional

Request example#

GET /workflowsvc/api/v1/workflowdefs?nsfilter=first_tchgt1VU&_name=mqtt&_offset=0&_pageSize=10&sort=%7B%22_updatedAt%22%3A-1%2C%22_name%22%3A1%7D

Response#

Codes#

CodeDescription
200Success
400Bad Request
404Not Found

Response example#

{  "_offset": 0,  "_pageSize": 10,  "_total": 2,  "_list": [    {      "_id": "4b6525cc-9bea-4521-85bf-603c50521403",      "_name": "mqtt_publish_workflow",      "_description": "MQTT Publish Workflow",      "_namespaces": ["first_tchgt1VU"],      "_userType": "activemq_publish",      "_taskDefs": [        {          "_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!"]          }        }      ],      "_createdAt": "2025-08-15T21:18:38.295172Z",      "_updatedAt": "2025-08-15T21:18:38.295177Z",      "_createdBy": "c9daff7e-b55b-41ec-aa46-d0150f3199dc",      "_updatedBy": "c9daff7e-b55b-41ec-aa46-d0150f3199dc",      "_timeoutSeconds": 20    }  ]}

Get WorkflowDef by ID#

Endpoints#

GET workflowsvc/api/v1/workflowdefs/{id}

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired

Path parameters#

ParameterTypeDescriptionRequired
idStringID to search forRequired
Request example#
GET /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750?nsfilter=first_tchgt1VU

Response#

Codes#

CodeDescription
200Success
401Unauthorized
403Forbidden
500Internal Server Error

Response example#

{    "_id": "5792091f-4ce6-4120-a0cf-9c696b13c750",    "_name": "sample_workflow",    "_description": "Sample Workflow",    "_namespaces": [        "first_tchgt1VU"    ],    "_userType": "iaq_realtime_setup",    "_taskDefs": [        {           "_id": "36ed7fcb-202e-4bf9-b9a3-866de1f42055",           "_name": "rest_connector_task_1",           "_type": "REST_CONNECTOR",           "_sequenceno": 1,           "_inputParams": {             "_url": "<URL>",             "_auth": {                "_type": "NoAuth"            }        },        {            "_id": "5f1d8dfd-dc2f-4b28-84f4-c3bd542f661b",            "_name": "rest_connector_task_2",            "_type": "REST_CONNECTOR",            "_sequenceno": 2,            "_inputParams": {               "_url": "<URL>",               "_auth": {                    "_type": "NoAuth"               }             }        }       }    ],    "_createdAt": "2025-08-15T21:53:29.458161Z",    "_updatedAt": "2025-08-15T21:53:29.458163Z",    "_createdBy": "c9daff7e-b55b-41ec-aa46-d0150f3199dc",    "_updatedBy": "c9daff7e-b55b-41ec-aa46-d0150f3199dc",    "_timeoutSeconds": 20}

Create a new WorkflowDef#

Endpoints#

POST workflowsvcsvc/api/v1/workflowdefs?nsfilter={{nsfilter}}

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsFilterStringNamespace filter to applyRequired

Request body#

ParameterTypeDescriptionRequired
_nameStringName of the workflowRequired
_descriptionStringDescription of the workflowOptional
_userTypeStringUser type or categoryRequired
_namespacesArrayList of namespaces(filters)Required
_taskDefsArrayList of task definitionsRequired
_timeoutSecondsIntegerTimeout for the workflow in secondsOptional
Request example#
POST /workflowsvc/api/v1/workflowdefs?nsfilter=first_tchgt1VUContent-Type: application/json
{  "_name": "mqtt_publish_workflow",  "_description": "MQTT Publish Workflow",  "_userType": "activemq_publish",  "_namespaces": ["first_tchgt1VU"],  "_taskDefs": [    {      "_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!"]      }    }  ],  "_timeoutSeconds": 20}

Response#

Codes#

CodeDescription
201Created
400Bad request
401Unauthorized
403Forbidden
500Internal server error

Response example#

{  "_id": "1e7895b2-743a-4d43-be22-8e789c4f1649",  "_name": "mqtt_publish_workflow",  "_description": "MQTT Publish Workflow",  "_namespaces": ["first_tchgt1VU"],  "_userType": "activemq_publish",  "_taskDefs": [    {      "_id": "9f45d7d7-144a-46a7-9e3a-5e7bc316b264",      "_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!"]      }    }  ],  "_createdAt": "2025-08-15T21:19:40.493812263Z",  "_updatedAt": "2025-08-15T21:19:40.493813055Z",  "_createdBy": "c9daff7e-b55b-41ec-aa46-d0150f3199dc",  "_updatedBy": "c9daff7e-b55b-41ec-aa46-d0150f3199dc",  "_timeoutSeconds": 20}

Update a WorkflowDef#

Endpoints#

PUT workflowsvc/api/v1/workflowdefs/{workflowdefid}

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired

Path parameters#

ParameterTypeDescriptionRequired
workflowdefidStringID of workflow definitionRequired

Request body#

ParameterTypeDescriptionRequired
_nameStringName of the workflow definitionRequired
_descriptionStringDescription of the workflow definitionOptional
_userTypeStringUser type or categoryRequired
_namespacesArrayList of namespaces (filters)Required
_taskDefsArrayList of task definitionsRequired
_timeoutSecondsIntegerTimeout for the workflow in secondsOptional
Request example#
PUT /workflowsvc/api/v1/workflowdefs/1e7895b2-743a-4d43-be22-8e789c4f1649?nsfilter=first_tchgt1VUContent-Type: application/json
{  "_name": "mqtt_publish_workflow_updated",  "_description": "Updated MQTT Publish Workflow",  "_userType": "activemq_publish",  "_namespaces": ["first_tchgt1VU"],  "_taskDefs": [    {      "_id": "9f45d7d7-144a-46a7-9e3a-5e7bc316b264",      "_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/updated",        "_messages": ["Hello Updated MQTT!"]      }    }  ],  "_timeoutSeconds": 30}

Response#

Codes#

CodeDescription
200OK
400Bad request
401Unauthorized
403Forbidden
500Internal server error

Response example#

{  "_id": "1e7895b2-743a-4d43-be22-8e789c4f1649",  "_name": "mqtt_publish_workflow_updated",  "_description": "Updated MQTT Publish Workflow",  "_namespaces": ["first_tchgt1VU"],  "_userType": "activemq_publish",  "_taskDefs": [    {      "_id": "9f45d7d7-144a-46a7-9e3a-5e7bc316b264",      "_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/updated",        "_messages": ["Hello Updated MQTT!"]      }    }  ],  "_createdAt": "2025-08-15T21:19:40.493812263Z",  "_updatedAt": "2025-08-16T10:00:00.000000000Z",  "_createdBy": "c9daff7e-b55b-41ec-aa46-d0150f3199dc",  "_updatedBy": "c9daff7e-b55b-41ec-aa46-d0150f3199dc",  "_timeoutSeconds": 30}

Delete a WorkflowDef by ID#

Endpoints#

DELETE workflowsvc/api/v1/workflowdefs/{id}

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired

Path parameters#

ParameterTypeDescriptionRequired
idStringID of workflowRequired

Request example#

DELETE /workflowsvc/api/v1/workflowdefs/1e7895b2-743a-4d43-be22-8e789c4f1649?nsfilter=first_tchgt1VU

Response#

Codes#

CodeDescription
204No content
401Unauthorized
403Forbidden
404Not Found
500Internal Server Error

Response example#

(No Content, HTTP 204)

Create a schedule#

Endpoints#

POST /workflowsvc/api/v1/workflowdefs/{workflowdefid}/schedules

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired

Path parameters#

ParameterTypeDescriptionRequired
workflowdefidStringID of workflow definitionRequired

Request body parameters#

ParameterTypeDescriptionRequired
_scheduleObjectSchedule configuration detailsRequired
_schedule._typeStringType of schedule (for example, COMPLETION_BASED, TIME_BASED)Required
_schedule._runIntervalStringCron expression specifying when to run the workflowRequired
_namespacesArrayList of namespaces in this scheduleRequired
Request example#
POST /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/schedules?nsfilter=first_tchgt1VUContent-Type: application/json
{  "_workflowDefId": "5792091f-4ce6-4120-a0cf-9c696b13c750",  "_schedule": {    "_type": "COMPLETION_BASED",    "_runInterval": "0 0/5 11 16 8 ? 2025"  },  "_namespaces": ["first_tchgt1VU"],  "_inputParams": {    "_url": "https://api.example.com/data",    "_topic": "test/topic",    "_messages": ["Scheduled message"]  }}

Response#

Codes#

CodeDescription
201Created

Response example#

{  "_triggerKey": "6da64b5bd2ee-8604f9b5-158c-4ea3-b8d9-4e34201dfd29",  "_runInterval": "0 0/5 11 16 8 ? 2025",  "_jobKey": "workflowRunJob-5792091f-4ce6-4120-a0cf-9c696b13c750-1755295126413",  "_nextFireTime": "2025-08-16T11:00:00.000+00:00",  "_type": "COMPLETION_BASED",  "_inputParams": {    "_url": "https://api.example.com/data",    "_topic": "test/topic",    "_messages": ["Scheduled message"]  }}

Get schedules for a WorkflowDef#

Endpoints#

GET /workflowsvc/api/v1/workflowdefs/{workflowdefid}/schedules

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired
_offsetIntegerPoint at which to begin listing schedules. Default is 0.Optional
_pagesizeIntegerNumber of schedules listed per page. Default is 10.Optional

Path parameters#

ParameterTypeDescriptionRequired
workflowdefidStringID of workflow definitionRequired
Request example#
GET /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/schedules?nsfilter=first_tchgt1VU&_offset=0&_pageSize=10

Response#

Codes#

CodeDescription
200Success

Response example#

{  "_list": [    {      "_triggerKey": "6da64b5bd2ee-8604f9b5-158c-4ea3-b8d9-4e34201dfd29",      "_runInterval": "0 0/5 11 16 8 ? 2025",      "_jobKey": "workflowRunJob-5792091f-4ce6-4120-a0cf-9c696b13c750-1755295126413",      "_nextFireTime": "2025-08-16T11:00:00.000+00:00",      "_type": "COMPLETION_BASED",      "_inputParams": {        "_url": "https://api.example.com/data",        "_topic": "test/topic",        "_messages": ["Scheduled message"]      }    }  ],  "_workflowDefId": "5792091f-4ce6-4120-a0cf-9c696b13c750",  "_offset": 0,  "_pageSize": 10,  "_total": 1}

Get all schedules#

Endpoints#

GET /workflowsvc/api/v1/schedules

Request#

Query parameters#

ParameterTypeDescriptionRequired
defIfStringPartial search by workflow definition IDOptional
_offsetStringPoint in schedules to start listing. Default is 0.Optional
_pageSizeStringNumber of schdedules to list per page. Default is 10Optional

Request example#

GET /workflowsvc/api/v1/schedules?_offset=0&_pageSize=10

Response example#

{  "_offset": 0,  "_pageSize": 10,  "_total": 2,  "_list": [    {      "_triggerKey": "6da64b5bd2ee-8604f9b5-158c-4ea3-b8d9-4e34201dfd29",      "_runInterval": "0 0/5 11 16 8 ? 2025",      "_jobKey": "workflowRunJob-5792091f-4ce6-4120-a0cf-9c696b13c750-1755295126413",      "_nextFireTime": "2025-08-16T11:00:00.000+00:00",      "_type": "COMPLETION_BASED",      "_inputParams": {        "_url": "https://api.example.com/data",        "_topic": "test/topic",        "_messages": ["Scheduled message"]      }    },    {      "_triggerKey": "6da64b5bd2ee-1234abcd-5678-efgh-ijklmnopqrst",      "_runInterval": "0 0/10 12 17 9 ? 2025",      "_jobKey": "workflowRunJob-12345678-90ab-cdef-1234-567890abcdef-1755295126414",      "_nextFireTime": "2025-09-17T12:00:00.000+00:00",      "_type": "TIME_BASED",      "_inputParams": {        "_url": "https://api.example.com/other",        "_topic": "other/topic",        "_messages": ["Another scheduled message"]      }    }  ]}

Get jobs for a WorkflowDef#

Endpoints#

GET /workflowsvc/api/v1/workflowdefs/{workflowdefid}/jobs

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired

Path parameters#

ParameterTypeDescriptionRequired
workflowdefidStringID of workflow definitionRequired

Request example#

GET /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/jobs?nsfilter=first_tchgt1VU

Response#

Codes#

CodeDescription
200Success
401Unauthorized
403Forbidden
404Not Found
500Internal Server Error

Response example#

{    "_triggers": [        {            "_triggerKey": "6da64b5bd2ee-8604f9b5-158c-4ea3-b8d9-4e34201dfd29",            "_runInterval": "0 0/5 11 16 8 ? 2025",            "_nextFireTime": "2025-08-16T11:00:00.000+00:00"        }    ],    "_workflowDefId": "5792091f-4ce6-4120-a0cf-9c696b13c750",    "_jobKey": "workflowRunJob-5792091f-4ce6-4120-a0cf-9c696b13c750-1755295126413"}

Get triggers for a WorkflowDef#

Endpoints#

GET /workflowsvc/api/v1/workflowdefs/{workflowdefid}/triggers

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired

Path parameters#

ParameterTypeDescriptionRequired
workflowdefidStringID of workflow definitionRequired

Request example#

GET /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/triggers?nsfilter=first_tchgt1VU

Response#

Codes#

CodeDescription
200Success
401Unauthorized
403Forbidden
404Not Found
500Internal Server Error

Response example#

{  "_workflowDefId": "5792091f-4ce6-4120-a0cf-9c696b13c750",  "_list": [    {      "_jobKey": "workflowRunJob-5792091f-4ce6-4120-a0cf-9c696b13c750-1755295126413",      "_triggerKey": "6da64b5bd2ee-8604f9b5-158c-4ea3-b8d9-4e34201dfd29",      "_runInterval": "0 0/5 11 16 8 ? 2025",      "_nextFireTime": "2025-08-16T11:00:00.000+00:00"    }  ],  "_offset": 0,  "_pageSize": 10,  "_total": 1}

Delete a job#

Endpoints#

DELETE /workflowsvc/api/v1/workflowdefs/{workflowdefid}/jobs/{id}

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired

Path parameters#

ParameterTypeDescriptionRequired
workflowdefidStringID of workflow definitionRequired
jobidStringID of jobRequired

Request example#

DELETE /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/jobs/workflowRunJob-5792091f-4ce6-4120-a0cf-9c696b13c750-1755295126413?nsfilter=first_tchgt1VU

Response#

Codes#

CodeDescription
204No content
401Unauthorized
403Forbidden
404Not Found
500Internal Server Error

Response example#

(No Content, HTTP 204)

Delete a trigger#

Endpoints#

DELETE /workflowsvc/api/v1/workflowdefs/{workflowdefid}/triggers/{id}

Request#

Query parameters#

ParameterTypeDescriptionRequired
nsfilterStringNamespace filter to applyRequired

Path parameters#

ParameterTypeDescriptionRequired
workflowdefidStringID of workflow definitionRequired
idStringID of triggerRequired
Request example#
DELETE /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/triggers/6da64b5bd2ee-8604f9b5-158c-4ea3-b8d9-4e34201dfd29?nsfilter=first_tchgt1VU

Response#

Codes#

CodeDescription
204No content
401Unauthorized
403Forbidden
404Not Found
500Internal Server Error

Response example#

(No Content, HTTP 204)

Note: If all triggers of a job are deleted, then the job will also get deleted.