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
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
_name | String | Name filter to apply | Optional |
_userType | String | User type filter to apply | Optional |
_offset | Integer | Position to start listing from in list of workflow definitions | Optional |
_pageSize | Integer | Number of workflow definitions to be listed per page. Default is 10. | Optional |
sort | String | Set a sort option | Optional |
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
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request |
404 | Not 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
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | ID to search for | Required |
Request example
GET /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750?nsfilter=first_tchgt1VU
Response
Codes
| Code | Description |
|---|---|
200 | Success |
401 | Unauthorized |
403 | Forbidden |
500 | Internal 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
| Parameter | Type | Description | Required |
|---|---|---|---|
nsFilter | String | Namespace filter to apply | Required |
Request body
| Parameter | Type | Description | Required |
|---|---|---|---|
_name | String | Name of the workflow | Required |
_description | String | Description of the workflow | Optional |
_userType | String | User type or category | Required |
_namespaces | Array | List of namespaces(filters) | Required |
_taskDefs | Array | List of task definitions | Required |
_timeoutSeconds | Integer | Timeout for the workflow in seconds | Optional |
Request example
POST /workflowsvc/api/v1/workflowdefs?nsfilter=first_tchgt1VU
Content-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
| Code | Description |
|---|---|
201 | Created |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
500 | Internal 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
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
workflowdefid | String | ID of workflow definition | Required |
Request body
| Parameter | Type | Description | Required |
|---|---|---|---|
_name | String | Name of the workflow definition | Required |
_description | String | Description of the workflow definition | Optional |
_userType | String | User type or category | Required |
_namespaces | Array | List of namespaces (filters) | Required |
_taskDefs | Array | List of task definitions | Required |
_timeoutSeconds | Integer | Timeout for the workflow in seconds | Optional |
Request example
PUT /workflowsvc/api/v1/workflowdefs/1e7895b2-743a-4d43-be22-8e789c4f1649?nsfilter=first_tchgt1VU
Content-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
| Code | Description |
|---|---|
200 | OK |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
500 | Internal 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
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
id | String | ID of workflow | Required |
Request example
DELETE /workflowsvc/api/v1/workflowdefs/1e7895b2-743a-4d43-be22-8e789c4f1649?nsfilter=first_tchgt1VU
Response
Codes
| Code | Description |
|---|---|
204 | No content |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Response example
(No Content, HTTP 204)
Create a schedule
Endpoints
POST /workflowsvc/api/v1/workflowdefs/{workflowdefid}/schedules
Request
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
workflowdefid | String | ID of workflow definition | Required |
Request body parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
_schedule | Object | Schedule configuration details | Required |
_schedule._type | String | Type of schedule (for example, COMPLETION_BASED, TIME_BASED) | Required |
_schedule._runInterval | String | Cron expression specifying when to run the workflow | Required |
_namespaces | Array | List of namespaces in this schedule | Required |
Request example
POST /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/schedules?nsfilter=first_tchgt1VU
Content-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
| Code | Description |
|---|---|
201 | Created |
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
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
_offset | Integer | Point at which to begin listing schedules. Default is 0. | Optional |
_pagesize | Integer | Number of schedules listed per page. Default is 10. | Optional |
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
workflowdefid | String | ID of workflow definition | Required |
Request example
GET /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/schedules?nsfilter=first_tchgt1VU&_offset=0&_pageSize=10
Response
Codes
| Code | Description |
|---|---|
200 | Success |
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
| Parameter | Type | Description | Required |
|---|---|---|---|
defIf | String | Partial search by workflow definition ID | Optional |
_offset | String | Point in schedules to start listing. Default is 0. | Optional |
_pageSize | String | Number of schdedules to list per page. Default is 10 | Optional |
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
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
workflowdefid | String | ID of workflow definition | Required |
Request example
GET /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/jobs?nsfilter=first_tchgt1VU
Response
Codes
| Code | Description |
|---|---|
200 | Success |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal 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
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
workflowdefid | String | ID of workflow definition | Required |
Request example
GET /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/triggers?nsfilter=first_tchgt1VU
Response
Codes
| Code | Description |
|---|---|
200 | Success |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal 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
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
workflowdefid | String | ID of workflow definition | Required |
jobid | String | ID of job | Required |
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
| Code | Description |
|---|---|
204 | No content |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Response example
(No Content, HTTP 204)
Delete a trigger
Endpoints
DELETE /workflowsvc/api/v1/workflowdefs/{workflowdefid}/triggers/{id}
Request
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
nsfilter | String | Namespace filter to apply | Required |
Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
workflowdefid | String | ID of workflow definition | Required |
id | String | ID of trigger | Required |
Request example
DELETE /workflowsvc/api/v1/workflowdefs/5792091f-4ce6-4120-a0cf-9c696b13c750/triggers/6da64b5bd2ee-8604f9b5-158c-4ea3-b8d9-4e34201dfd29?nsfilter=first_tchgt1VU
Response
Codes
| Code | Description |
|---|---|
204 | No content |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Response example
(No Content, HTTP 204)
Note: If all triggers of a job are deleted, then the job will also get deleted.