Connections
Stored credentials steps use (mailboxes, HTTP auth, chat webhooks, FTP…), tested before saving.
| Method | Path | Summary |
|---|---|---|
| GET | /api/connection-types | Kinds of connection |
| GET | /api/connections | ?type=a,b ?flow=<id> → only ones that flow could use |
| GET | /api/connections/:id | Editing form: the non-secret fields, and which secrets are set |
| POST | /api/connections | Create a connection |
| PUT | /api/connections/:id | Update a connection |
| DELETE | /api/connections/:id | Delete a connection |
| GET | /api/connections/:id/folders | A mailbox connection's folders (for the IMAP trigger's folder pickers), if the flow (?flow=) may use the connection |
| POST | /api/connections/test | Test a connection: a saved one (:id, optionally with changed fields) or an unsaved one (body.type + body.data) |
#Kinds of connection
GET
/api/connection-types- Address
https://<your-org>.brambleit.cloud/flows/api/connection-types- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Response 200
| Field | Type | Description |
|---|---|---|
types | array of object | |
types[].type | string | |
types[].label | string | |
types[].icon | any | |
types[].help | any | |
types[].use | any | |
types[].fields | array of any |
Example response
JSON
{
"types": [
{
"type": "string",
"label": "Example label",
"icon": null,
"help": null,
"use": null,
"fields": []
}
]
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/connection-types', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#?type=a,b ?flow=<id> → only ones that flow could use
GET
/api/connections- Address
https://<your-org>.brambleit.cloud/flows/api/connections- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Query parameters
| Name | Type | Description |
|---|---|---|
flow | number | |
type | string |
Response 200
| Field | Type | Description |
|---|---|---|
connections | array of object | |
connections[].can_edit | boolean |
Example response
JSON
{
"connections": [
{
"…credentials.summary(r, u": "…",
"can_edit": true
}
]
}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/connections', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Editing form: the non-secret fields, and which secrets are set
GET
/api/connections/:id- Address
https://<your-org>.brambleit.cloud/flows/api/connections/: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 |
|---|---|---|
data | array of any | |
secrets_set | any | |
used_by | any |
Example response
JSON
{
"…credentials.summary(row,": "…",
"data": [],
"secrets_set": null,
"used_by": null
}Errors
| Status | Message |
|---|---|
| 403 | Only the owner can edit this connection |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/connections/42', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Create a connection
POST
/api/connections- Address
https://<your-org>.brambleit.cloud/flows/api/connections- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Request body JSON
| Name | Type | Description |
|---|---|---|
type | string | The kind of connection. |
name | string | Its name. |
scope | any | personal or tenant. |
data | any | Its settings and secrets. |
Response 201
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/connections', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"type":"string","name":"Example name","scope":"…","data":"…"}),
});
const data = await res.json();#Update a connection
PUT
/api/connections/:id- Address
https://<your-org>.brambleit.cloud/flows/api/connections/:id- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
name | string | |
data | any |
Response 200
Errors
| Status | Message |
|---|---|
| 403 | Only the owner can edit this connection |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/connections/42', {
method: 'PUT',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","data":"…"}),
});
const data = await res.json();#Delete a connection
DELETE
/api/connections/:id- Address
https://<your-org>.brambleit.cloud/flows/api/connections/:id- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Query parameters
| Name | Type | Description |
|---|---|---|
force | string | 1 to delete it even though flows use it. |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean |
Example response
JSON
{
"ok": true
}Errors
| Status | Message |
|---|---|
| 403 | Only the owner can delete this connection |
| 409 | Used by …. Those steps will stop working. |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/connections/42', {
method: 'DELETE',
credentials: 'include',
});
const data = await res.json();#A mailbox connection's folders (for the IMAP trigger's folder pickers), if the flow (?flow=) may use the connection
GET
/api/connections/:id/folders- Address
https://<your-org>.brambleit.cloud/flows/api/connections/:id/folders- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Query parameters
| Name | Type | Description |
|---|---|---|
flow | number |
Response 200
| Field | Type | Description |
|---|---|---|
folders | array of any |
Example response
JSON
{
"folders": []
}Errors
| Status | Message |
|---|---|
| 404 | Flow not found |
| 400 | Couldn't list the folders: … |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/connections/42/folders', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Test a connection: a saved one (:id, optionally with changed fields) or an unsaved one (body.type + body.data)
POST
/api/connections/test- Address
https://<your-org>.brambleit.cloud/flows/api/connections/test- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Flows.
Request body JSON
| Name | Type | Description |
|---|---|---|
type | string | |
id | integer | |
data | any |
Response 200
Example response
JSON
trueErrors
| Status | Message |
|---|---|
| 404 | Connection not found |
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/connections/test', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"type":"string","id":42,"data":"…"}),
});
const data = await res.json();Was this page helpful?
Thanks for your feedback.