Templates
This will only return Flow Templates 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 'flowTemplates.read' permissions.
Number of flow templates per page returned. Default is 10.
Number of the page to be returned. Default is 1.
Filter results by flow status. Published = 1. Draft = 0
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 template description OR in the template name (case-insensitive). Behavior is similar to operator LIKE in SQL but case insensitive.
Returns templates that have any of the supplied tags. Pass as comma-separated values. Untagged templates are always returned.
premium,devA list of flow templates.
GET /templates HTTP/1.1
Host:
Accept: */*
A list of flow templates.
{
"data": [
{
"name": "SnazzyToCodeComponent",
"description": "This flow polls for persons and posts them on webhoo.site.",
"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": "draft",
"tags": [
"advanced",
"premium"
],
"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 Template by its ID, if the user is authorized to see it. This requires the 'flowTemplates.read' permission
ID of flow template to return
Returns the flow template
Template not found
GET /templates/{id} HTTP/1.1
Host:
Accept: */*
{
"data": {
"name": "SnazzyToCodeComponent",
"description": "This flow polls for persons and posts them on webhoo.site.",
"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": "draft",
"tags": [
"advanced",
"premium"
],
"createdAt": "2019-07-30T12:52:45.957Z",
"updatedAt": "2019-07-30T12:52:45.957Z"
},
"meta": {}
}