Get Workflows List
This endpoint retrieves a comprehensive list of workflows within a specified organisation, providing detailed information about each workflow. The response includes the workflow name, all associated attributes, and metadata such as the user who last updated the workflow.
To enhance flexibility, this endpoint supports additional parameters to limit the number of results returned, ensuring efficient data handling. A continuation token can also be used to paginate through large datasets, allowing you to retrieve workflows in manageable chunks for improved performance and scalability.
Syntax: see 'CCall Structure
Type = 'GET'
'https://connect.cambrionix.com/api/workflows/v1/workflows?token=token&limit=return-number' |
Output | Description |
---|---|
token | Continuation token |
return-number | Number of records to return |
Returns:
{ "result": [ { "created": { "time": time, "user": { "id": "user-id", "detail": { "givenName": "given-name", "surname": "surname", "displayName": "display-name", "email": "account-email" } } }, "id": "workflow-id", "name": "workflow-name", "description": "workflow-description", "events": [ { "id": "unique-event-id", "name": "event-name", "template": { "id": "event-id", "name": "event-name", "description": "event-description", "type": "event-type", "app": { "id": "app-id" }, "schema": { "input": { "type": "schema-type", "properties": {}, "default": {} }, "options": { "type": "schema-type", "properties": { "triggerOnWeekends": { "title": "option-name", "description": "option-description", "type": "schema-type", "default": default-value } }, "default": { "triggerOnWeekends": default-value, }, "output": { "type": "schema-type", "properties": {} }, "default": {} } } }, "options": { "triggerOnWeekends": option-status, } } ], "connections": [], "enabled": option-status, "published": option-status, "organization": { "id": "organisation-id", "name": "organisation-name" } } ], "_metadata": { "total": 1 } |
Output | Description |
---|---|
time | The hub time, shown as an integer in ms |
user-id | This is the id of the user as a unique 128-bit number |
given-name | The first name of the user |
surname | The surname of the user |
display-name | The account name of the user |
account-email | The email of the user |
workflow-id | This is the id of the workflow as a unique 128-bit number |
workflow-name | This is the name of the workflow |
workflow-description | This is a description of the workflow |
unique-event-id | This is the id of a unique event as a unique 128-bit number |
event-id | This is the id of the event as a unique 128-bit number |
event-name | This is the name of the event |
event-description | This is a description of the event |
event-type | This is the type of event see Event Types |
schema-type | This is the type of Schema for the event see Schema Types |
option-name | This is the name of the option |
option-description | This is a description of the option |
default-value | This is the default value if one exsists |
option-status | The status of the option (true/false) |
organisation-id | This is the id of the organisation as a unique 128-bit number |
organisation-name | This is the name of the organisation |
Example
curl -X 'GET' \
'https://connect.cambrionix.com/api/workflows/v1/workflows' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJSUz0'
Returns
{
"result": [
{
"created": {
"time": 1724078026179,
"user": {
"id": "f1bf7d50-a496-40ea-a9c3-ab58810f5a5d",
"detail": {
"givenName": "Michael",
"surname": "Shipton",
"displayName": "Michael Shipton",
"email": "michael.shipton@cambrionix.com"
}
}
},
"updated": {
"time": 1732741701925,
"user": {
"id": "b5166f4c-ed5a-4f0a-90a2-5f7bb9a9d7c5",
"detail": {
"givenName": "Kyle",
"surname": "Kirkby",
"displayName": "Kyle Kirkby",
"email": "kyle.kirkby@cambrionix.com"
}
}
},
"id": "285c3632-f558-45a6-ab37-e8bf50879be5",
"name": "My New Workflow",
"description": "New Workflow",
"events": [
{
"id": "1add1c07-9d5d-452d-af06-7a0921afb198",
"name": "Schedule",
"template": {
"id": "00000000-0000-0000-0000-000000000001",
"name": "Every Hour",
"description": "Triggers every hour.",
"type": "trigger",
"app": {
"id": "00000000-0000-0000-0000-000000000003"
},
"schema": {
"input": {
"type": "object",
"properties": {},
"default": {}
},
"options": {
"type": "object",
"properties": {
"triggerOnWeekends": {
"title": "Trigger on Weekends",
"description": "Trigger on Weekends",
"type": "boolean",
"default": false
}
},
"default": {
"triggerOnWeekends": true
}
},
"output": {
"type": "object",
"properties": {
"day": {
"type": "string",
"default": "Monday"
},
"month": {
"type": "string",
"default": "January"
},
"year": {
"type": "number",
"default": 2021
},
"unixTimestamp": {
"type": "number",
"default": 1612128000
}
},
"default": {}
}
}
},
"options": {
"triggerOnWeekends": false
}
}
],
"connections": [],
"enabled": false,
"published": false,
"organization": {
"id": "dafc70d5-a4c8-42a3-ad8d-a8ccb5fa313f",
"name": "Staging Test Platform ( Premium License ) "
}
}
],
"_metadata": {
"total": 1
}
}
Errors
If there is an error in the API method then JSON-RPC Error Object a will be returned