Tables

Simple data tables flows can read and write.

MethodPathSummary
GET/api/tablesList tables
POST/api/tablesCreate a table
GET/api/tables/:idGet a table and its rows
PUT/api/tables/:idUpdate a table's columns
DELETE/api/tables/:idDelete a table
POST/api/tables/:id/rowsAdd a row
PUT/api/tables/:id/rows/:rowIdUpdate a row
DELETE/api/tables/:id/rows/:rowIdDelete a row
DELETE/api/tables/:id/rowsDelete every row

#List tables

GET/api/tables
Address
https://<your-org>.brambleit.cloud/flows/api/tables
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Flows.

Query parameters

NameTypeDescription
flownumber

Response 200

FieldTypeDescription
tablesarray of object
tables[].can_editboolean
Example response
JSON
{
  "tables": [
    {
      "…tables.summary(t)": "…",
      "can_edit": true
    }
  ]
}

Errors

StatusMessage
404Flow not found

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/tables', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Create a table

POST/api/tables
Address
https://<your-org>.brambleit.cloud/flows/api/tables
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Flows.

Request body JSON

NameTypeDescription
namestring
scopeany
columnsarray of any

Response 201

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/tables', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"name":"Example name","scope":"…","columns":[]}),
});
const data = await res.json();

#Get a table and its rows

GET/api/tables/:id
Address
https://<your-org>.brambleit.cloud/flows/api/tables/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Flows.

Path parameters

NameTypeDescription
idrequiredinteger

Query parameters

NameTypeDescription
offsetinteger
limitinteger
qany

Response 200

FieldTypeDescription
can_editboolean
Example response
JSON
{
  "…tables.summary(t)": "…",
  "can_edit": true,
  "…page": "…"
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/tables/42', {
  method: 'GET',
  credentials: 'include',
});
const data = await res.json();

#Update a table's columns

PUT/api/tables/:id
Address
https://<your-org>.brambleit.cloud/flows/api/tables/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Flows.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
namestring
columnsarray of any

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/tables/42', {
  method: 'PUT',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"name":"Example name","columns":[]}),
});
const data = await res.json();

#Delete a table

DELETE/api/tables/:id
Address
https://<your-org>.brambleit.cloud/flows/api/tables/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Flows.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
okboolean
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/tables/42', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();

#Add a row

POST/api/tables/:id/rows
Address
https://<your-org>.brambleit.cloud/flows/api/tables/:id/rows
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Flows.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
dataany

Response 201

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/tables/42/rows', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"data":"…"}),
});
const data = await res.json();

#Update a row

PUT/api/tables/:id/rows/:rowId
Address
https://<your-org>.brambleit.cloud/flows/api/tables/:id/rows/:rowId
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Flows.

Path parameters

NameTypeDescription
idrequiredinteger
rowIdrequiredinteger

Request body JSON

NameTypeDescription
dataany

Response 200

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/tables/42/rows/1', {
  method: 'PUT',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"data":"…"}),
});
const data = await res.json();

#Delete a row

DELETE/api/tables/:id/rows/:rowId
Address
https://<your-org>.brambleit.cloud/flows/api/tables/:id/rows/:rowId
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Flows.

Path parameters

NameTypeDescription
idrequiredinteger
rowIdrequiredinteger

Response 200

FieldTypeDescription
okboolean
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/tables/42/rows/1', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();

#Delete every row

DELETE/api/tables/:id/rows
Address
https://<your-org>.brambleit.cloud/flows/api/tables/:id/rows
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Flows.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
deletedany
Example response
JSON
{
  "deleted": null
}

Example request

JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/flows/api/tables/42/rows', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();