Cabinets
Cabinets (from Drive libraries), their folder templates, watching Drive for new files, and saved passwords for locked PDFs.
| Method | Path | Summary |
|---|---|---|
| GET | /api/cabinets | List cabinets |
| GET | /api/cabinets/libraries | Drive libraries that could become cabinets |
| POST | /api/cabinets | Make a library a cabinet |
| PATCH | /api/cabinets/:id | Update a cabinet |
| DELETE | /api/cabinets/:id | Stop using a library as a cabinet |
| GET | /api/cabinets/:id/passwords | Saved passwords for locked PDFs (labels only — never the passwords back) |
| POST | /api/cabinets/:id/passwords | Save a password for locked PDFs |
| DELETE | /api/cabinets/:id/passwords/:pid | Delete a saved password |
#List cabinets
GET
/api/cabinets- Address
https://<your-org>.brambleit.cloud/paper/api/cabinets- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Paper.
Response 200
| Field | Type | Description |
|---|---|---|
cabinets | array of any |
Example response
JSON
{
"cabinets": []
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/cabinets', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Drive libraries that could become cabinets
GET
/api/cabinets/libraries- Address
https://<your-org>.brambleit.cloud/paper/api/cabinets/libraries- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Paper.
Response 200
| Field | Type | Description |
|---|---|---|
libraries | array of any |
Example response
JSON
{
"libraries": []
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/cabinets/libraries', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Make a library a cabinet
POST
/api/cabinets- Address
https://<your-org>.brambleit.cloud/paper/api/cabinets- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Paper.
Request body JSON
| Name | Type | Description |
|---|---|---|
library_id | integer | The Drive library. |
Response 201
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/cabinets', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"library_id":7}),
});
const data = await res.json();#Update a cabinet
PATCH
/api/cabinets/:id- Address
https://<your-org>.brambleit.cloud/paper/api/cabinets/:id- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Paper.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
path_template | any | How filed documents are named and foldered. |
watch_drive | any | Pick up files added to the library in Drive. |
Response 200
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/cabinets/42', {
method: 'PATCH',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"path_template":"…","watch_drive":"…"}),
});
const data = await res.json();#Stop using a library as a cabinet
DELETE
/api/cabinets/:id- Address
https://<your-org>.brambleit.cloud/paper/api/cabinets/:id- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Paper.
Path parameters
| Name | Type | Description |
|---|---|---|
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/cabinets/42', {
method: 'DELETE',
credentials: 'include',
});
const data = await res.json();#Saved passwords for locked PDFs (labels only — never the passwords back)
GET
/api/cabinets/:id/passwords- Address
https://<your-org>.brambleit.cloud/paper/api/cabinets/:id/passwords- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Paper.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
passwords | array of any | |
locked | number |
Example response
JSON
{
"passwords": [],
"locked": 12.5
}Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/cabinets/42/passwords', {
method: 'GET',
credentials: 'include',
});
const data = await res.json();#Save a password for locked PDFs
POST
/api/cabinets/:id/passwords- Address
https://<your-org>.brambleit.cloud/paper/api/cabinets/:id/passwords- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Paper.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
password | any | |
label | string |
Response 201
Example request
JavaScript
// From a page served by Bramble (uses the signed-in session)
const res = await fetch('/paper/api/cabinets/42/passwords', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({"password":"…","label":"Example label"}),
});
const data = await res.json();#Delete a saved password
DELETE
/api/cabinets/:id/passwords/:pid- Address
https://<your-org>.brambleit.cloud/paper/api/cabinets/:id/passwords/:pid- Requires
- Signed-in browser session (the
sso_session/session_idcookies from Bramble sign-in).
Licence: Paper.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer | |
pidrequired | 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/cabinets/42/passwords/1', {
method: 'DELETE',
credentials: 'include',
});
const data = await res.json();Was this page helpful?
Thanks for your feedback.