Templates
Built-in, organisation and MSP-shared templates, and making a flow from one.
| Method | Path | Summary |
|---|---|---|
| GET | /api/templates | List templates |
| POST | /api/templates | Save a flow as a template |
| DELETE | /api/templates/:id | Delete a template |
| POST | /api/templates/use | Create a flow from a template |
#List templates
GET
/api/templates- Address
https://<your-org>.brambleit.cloud/flows/api/templates- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Response 200
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/templates', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Save a flow as a template
POST
/api/templates- Address
https://<your-org>.brambleit.cloud/flows/api/templates- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Request body JSON
| Name | Type | Description |
|---|---|---|
name | string | |
description | string | |
category | any | |
share | any | |
flow_id | integer |
Response 200
| Field | Type | Description |
|---|---|---|
id | integer |
Example response
JSON
{
"id": 42
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/templates', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","description":"string","category":"…","share":"…","flow_id":7}),
});
const data = await res.json();#Delete a template
DELETE
/api/templates/:id- Address
https://<your-org>.brambleit.cloud/flows/api/templates/:id- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean |
Example response
JSON
{
"ok": true
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/templates/42', {
method: 'DELETE',
credentials: 'include',
});
const data = await res.json();#Create a flow from a template
POST
/api/templates/use- Address
https://<your-org>.brambleit.cloud/flows/api/templates/use- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Request body JSON
| Name | Type | Description |
|---|---|---|
scope | string | |
source | any | |
id | integer | |
name | string |
Response 200
| Field | Type | Description |
|---|---|---|
id | integer | |
warnings | array of any |
Example response
JSON
{
"id": 42,
"warnings": []
}Errors
| Status | Message |
|---|---|
| 403 | Only Flows admins can make organisation flows |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/templates/use', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"scope":"string","source":"…","id":42,"name":"Example name"}),
});
const data = await res.json();Was this page helpful?
Thanks for your feedback.