Labels
Tags, correspondents and document types, with their matching rules.
| Method | Path | Summary |
|---|---|---|
| GET | /api/labels/:kind | List labels |
| POST | /api/labels/:kind | Create a label |
| PATCH | /api/labels/:kind/:id | Update a label |
| DELETE | /api/labels/:kind/:id | Delete 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_idcookies from Bramble sign-in).
Licence: Paper.
Path parameters
| Name | Type | Description |
|---|---|---|
kindrequired | string: "tags" | "correspondents" | "doctypes" |
Response 200
| Field | Type | Description |
|---|---|---|
items | array 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_idcookies from Bramble sign-in).
Licence: Paper.
Path parameters
| Name | Type | Description |
|---|---|---|
kindrequired | string |
Request body JSON
| Name | Type | Description |
|---|---|---|
cabinet_id | integer |
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_idcookies from Bramble sign-in).
Licence: Paper.
Path parameters
| Name | Type | Description |
|---|---|---|
kindrequired | string | |
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
cabinet_id | 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('/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_idcookies from Bramble sign-in).
Licence: Paper.
Path parameters
| Name | Type | Description |
|---|---|---|
kindrequired | string | |
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('/paper/api/labels/string/42', {
method: 'DELETE',
credentials: 'include',
});
const data = await res.json();Was this page helpful?
Thanks for your feedback.