Editor helpers
Lists the editor uses for pickers, sample event data, schedule previews and test events.
| Method | Path | Summary |
|---|---|---|
| GET | /api/devices | RMM devices (for the device step) |
| GET | /api/bramble/form | A form's questions, for the "Form response submitted" trigger (as the flow's owner: their own access decides) |
| GET | /api/bramble/options | Pickers in Bramble steps (engine/nodes/bramble.js OPTION_SOURCES), as the flow's owner: ?flow=&source=psa.queues[&project=12] |
| POST | /api/events/test | Sends a "flows.test" event for the current user, to try event triggers |
| POST | /api/schedule/preview | When a schedule would next run, for the settings panel |
| GET | /api/events/:type/sample | Example data for an app event |
#RMM devices (for the device step)
GET
/api/devices- Address
https://<your-org>.brambleit.cloud/flows/api/devices- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Query parameters
| Name | Type | Description |
|---|---|---|
flow | number | |
q | any |
Response 200
Errors
| Status | Message |
|---|---|
| 404 | Flow not found |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/devices', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#A form's questions, for the "Form response submitted" trigger (as the flow's owner: their own access decides)
GET
/api/bramble/form- Address
https://<your-org>.brambleit.cloud/flows/api/bramble/form- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Query parameters
| Name | Type | Description |
|---|---|---|
flow | number | |
form | number |
Response 200
Errors
| Status | Message |
|---|---|
| 404 | Flow not found |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/bramble/form', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Pickers in Bramble steps (engine/nodes/bramble.js OPTION_SOURCES), as the flow's owner: ?flow=&source=psa.queues[&project=12]
GET
/api/bramble/options- Address
https://<your-org>.brambleit.cloud/flows/api/bramble/options- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Query parameters
| Name | Type | Description |
|---|---|---|
flow | number | |
source | string | |
project | any |
Response 200
| Field | Type | Description |
|---|---|---|
options | array of any |
Example response
JSON
{
"options": []
}Errors
| Status | Message |
|---|---|
| 400 | Unknown list |
| 404 | Flow not found |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/bramble/options', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Sends a "flows.test" event for the current user, to try event triggers
POST
/api/events/test- Address
https://<your-org>.brambleit.cloud/flows/api/events/test- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Request body JSON
| Name | Type | Description |
|---|---|---|
message | string |
Response 201
| Field | Type | Description |
|---|---|---|
event_id | integer |
Example response
JSON
{
"event_id": 7
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/events/test', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"message":"Saved"}),
});
const data = await res.json();#When a schedule would next run, for the settings panel
POST
/api/schedule/preview- Address
https://<your-org>.brambleit.cloud/flows/api/schedule/preview- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Request body JSON
| Name | Type | Description |
|---|---|---|
schedule | any |
Response 200
| Field | Type | Description |
|---|---|---|
description | string | |
next | array of any |
Example response
JSON
{
"description": "string",
"next": []
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/schedule/preview', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"schedule":"…"}),
});
const data = await res.json();#Example data for an app event
GET
/api/events/:type/sample- Address
https://<your-org>.brambleit.cloud/flows/api/events/:type/sample- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Path parameters
| Name | Type | Description |
|---|---|---|
typerequired | string |
Response 200
| Field | Type | Description |
|---|---|---|
sample | object | |
sample.event | string |
Example response
JSON
{
"sample": {
"event": "string",
"…e.sample": "…"
}
}Errors
| Status | Message |
|---|---|
| 404 | Unknown event |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/events/string/sample', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();Was this page helpful?
Thanks for your feedback.