Labels

Tags, correspondents and document types, with their matching rules.

MethodPathSummary
GET/api/labels/:kindList labels
POST/api/labels/:kindCreate a label
PATCH/api/labels/:kind/:idUpdate a label
DELETE/api/labels/:kind/:idDelete a label

#List labels

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

Path parameters

NameTypeDescription
kindrequiredstring: "tags" | "correspondents" | "doctypes"

Response 200

FieldTypeDescription
itemsarray of any
Example response
JSON
{
  "items": []
}

Example request

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

#Create a label

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

Path parameters

NameTypeDescription
kindrequiredstring

Request body JSON

NameTypeDescription
cabinet_idinteger

Response 201

Example request

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

#Update a label

PATCH/api/labels/:kind/:id
Address
https://<your-org>.brambleit.cloud/paper/api/labels/:kind/:id
Requires
Signed-in browser session (the sso_session / session_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
kindrequiredstring
idrequiredinteger

Request body JSON

NameTypeDescription
cabinet_idinteger

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('/paper/api/labels/string/42', {
  method: 'PATCH',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({"cabinet_id":7}),
});
const data = await res.json();

#Delete a label

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

Path parameters

NameTypeDescription
kindrequiredstring
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('/paper/api/labels/string/42', {
  method: 'DELETE',
  credentials: 'include',
});
const data = await res.json();