Flows
This will only return Flows that are either directly associated with the user, or that are associated with a tenant that the user is also a member of. Requires the 'flows.read' permissions.
Amount of flows per page returned. Default is 10.
Number of the page to be returned. Default is 1.
Filter results by flow status. Accepts either string ('active' and 'inactive') or integer (1 or 0)
Filter results by flow type (ordinary, long_running)
Filter by user. Works for admin or users with same tenant.
Sort the result by one property. Supported: createdAt, updatedAt and name. Prefix field name with - for reversed sort order (DESC) i.e. sort=-updatedAt. Default sorting is by id ASC
Search flows by a word or a phrase contained in the flow description OR in the flow name (case-insensitive). Behavior is similar to operator LIKE in SQL but case insensitive.
A list of flows.
GET /flows HTTP/1.1
Host:
Accept: */*
A list of flows.
{
"data": [
{
"name": "SnazzyToCodeComponent",
"description": "This flow polls for persons and posts them on webhoo.site.",
"tenant": "text",
"graph": {
"nodes": [
[
{
"id": "step_1",
"componentId": "string",
"name": "snazzy adapter for oih",
"function": "getPersonsPolling",
"description": "New description in progress"
},
{
"id": "step_2",
"componentId": "string",
"name": "code_component",
"function": "execute",
"description": "",
"fields": {
"code": "function* run() {console.log('Calling external URL');yield request.post({uri: 'http://webhook.site/debc8244-3ca0-4449-af2b-e346c4f57b85', body: msg.body, json: true});}"
}
}
]
],
"edges": [
{
"id": "text",
"config": {
"condition": "text",
"mapper": {}
},
"source": "step_1",
"target": "step_2"
}
]
},
"type": "ordinary",
"cron": "* /2 * * * *",
"owners": [
{
"id": "text",
"type": "text"
}
],
"id": "text",
"status": "inactive",
"createdAt": "2019-07-30T12:52:45.957Z",
"updatedAt": "2019-07-30T12:52:45.957Z"
}
],
"meta": {
"page": 1,
"perPage": 1,
"total": 1,
"totalPages": 1
}
}Returns a single Flow by its ID, if the user is authorized to see it. This requires the 'flows.read' permission
ID of flow to return
Returns the flow
No Flow with this id was found.
GET /flows/{id} HTTP/1.1
Host:
Accept: */*
{
"data": {
"name": "SnazzyToCodeComponent",
"description": "This flow polls for persons and posts them on webhoo.site.",
"tenant": "text",
"graph": {
"nodes": [
[
{
"id": "step_1",
"componentId": "string",
"name": "snazzy adapter for oih",
"function": "getPersonsPolling",
"description": "New description in progress"
},
{
"id": "step_2",
"componentId": "string",
"name": "code_component",
"function": "execute",
"description": "",
"fields": {
"code": "function* run() {console.log('Calling external URL');yield request.post({uri: 'http://webhook.site/debc8244-3ca0-4449-af2b-e346c4f57b85', body: msg.body, json: true});}"
}
}
]
],
"edges": [
{
"id": "text",
"config": {
"condition": "text",
"mapper": {}
},
"source": "step_1",
"target": "step_2"
}
]
},
"type": "ordinary",
"cron": "* /2 * * * *",
"owners": [
{
"id": "text",
"type": "text"
}
],
"id": "text",
"status": "inactive",
"createdAt": "2019-07-30T12:52:45.957Z",
"updatedAt": "2019-07-30T12:52:45.957Z"
},
"meta": {}
}Entirely deletes a Flow from the repository. This cannot be reverted. Requires the 'flows.write' permission.
Flow id to delete
Flow was successfully deleted
Invalid ID supplied
No Flow with this id was found.
Flow is currently not inactive. Only stopped, inactive flows may be deleted.
DELETE /flows/{id} HTTP/1.1
Host:
Accept: */*
{}The id is used to match the existing Flow that will be updated. Requires the 'flows.write' permission.
ID of flow to update
SnazzyToCodeComponentThis flow polls for persons and posts them on webhoo.site.Flow type
ordinaryPossible values: A cron string describing the interval at which this flow is run. If unset, the flow uses webhooks instead
* /2 * * * *The updated Flow.
Flow not found
Flow is currently not inactive. Only stopped, inactive flows may be updated.
PATCH /flows/{id} HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 762
{
"name": "SnazzyToCodeComponent",
"description": "This flow polls for persons and posts them on webhoo.site.",
"tenant": "text",
"graph": {
"nodes": [
[
{
"id": "step_1",
"componentId": "string",
"name": "snazzy adapter for oih",
"function": "getPersonsPolling",
"description": "New description in progress"
},
{
"id": "step_2",
"componentId": "string",
"name": "code_component",
"function": "execute",
"description": "",
"fields": {
"code": "function* run() {console.log('Calling external URL');yield request.post({uri: 'http://webhook.site/debc8244-3ca0-4449-af2b-e346c4f57b85', body: msg.body, json: true});}"
}
}
]
],
"edges": [
{
"id": "text",
"config": {
"condition": "text",
"mapper": {}
},
"source": "step_1",
"target": "step_2"
}
]
},
"type": "ordinary",
"cron": "* /2 * * * *",
"owners": [
{
"id": "text",
"type": "text"
}
]
}{
"data": {
"name": "SnazzyToCodeComponent",
"description": "This flow polls for persons and posts them on webhoo.site.",
"tenant": "text",
"graph": {
"nodes": [
[
{
"id": "step_1",
"componentId": "string",
"name": "snazzy adapter for oih",
"function": "getPersonsPolling",
"description": "New description in progress"
},
{
"id": "step_2",
"componentId": "string",
"name": "code_component",
"function": "execute",
"description": "",
"fields": {
"code": "function* run() {console.log('Calling external URL');yield request.post({uri: 'http://webhook.site/debc8244-3ca0-4449-af2b-e346c4f57b85', body: msg.body, json: true});}"
}
}
]
],
"edges": [
{
"id": "text",
"config": {
"condition": "text",
"mapper": {}
},
"source": "step_1",
"target": "step_2"
}
]
},
"type": "ordinary",
"cron": "* /2 * * * *",
"owners": [
{
"id": "text",
"type": "text"
}
],
"id": "text",
"status": "inactive",
"createdAt": "2019-07-30T12:52:45.957Z",
"updatedAt": "2019-07-30T12:52:45.957Z"
},
"meta": {}
}Initiates the flow's integration process by publishing an appropriate event to the event bus. Requires the 'flows.control' permission.
ID of flow to start, must be a valid MongoDB ID.
Returns the id and new status of the flow
Invalid ID format.
User is not authorised to start flows.
No Flow with this id was found.
Flow is currently not inactive. Only inactive flows can be started.
POST /flows/{id}/start HTTP/1.1
Host:
Accept: */*
{
"data": {
"id": "5c99ec7e5ed40d3e7512cffa",
"status": "starting"
},
"meta": {}
}Stops the flow's integration process by publishing an appropriate event to the event bus. Requires the 'flows.control' permission.
ID of flow to stop, must be a valid MongoDB ID.
Returns id and new status of the stopped flow
Invalid ID format.
User is not authorised to stop flows.
No Flow with this id was found.
Flow is currently not active. Only active flows can be stopped.
POST /flows/{id}/stop HTTP/1.1
Host:
Accept: */*
{
"data": {
"id": "5c99ec7e5ed40d3e7512cffa",
"status": "stopping"
},
"meta": {}
}