Cabinets

Cabinets (from Drive libraries), their folder templates, watching Drive for new files, and saved passwords for locked PDFs.

MethodPathSummary
GET/api/cabinetsList cabinets
GET/api/cabinets/librariesDrive libraries that could become cabinets
POST/api/cabinetsMake a library a cabinet
PATCH/api/cabinets/:idUpdate a cabinet
DELETE/api/cabinets/:idStop using a library as a cabinet
GET/api/cabinets/:id/passwordsSaved passwords for locked PDFs (labels only — never the passwords back)
POST/api/cabinets/:id/passwordsSave a password for locked PDFs
DELETE/api/cabinets/:id/passwords/:pidDelete 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_id cookies from Bramble sign-in).
Licence: Paper.

Response 200

FieldTypeDescription
cabinetsarray 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_id cookies from Bramble sign-in).
Licence: Paper.

Response 200

FieldTypeDescription
librariesarray 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_id cookies from Bramble sign-in).
Licence: Paper.

Request body JSON

NameTypeDescription
library_idintegerThe 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_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
path_templateanyHow filed documents are named and foldered.
watch_driveanyPick 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_id cookies from Bramble sign-in).
Licence: Paper.

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('/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_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
passwordsarray of any
lockednumber
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_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
passwordany
labelstring

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_id cookies from Bramble sign-in).
Licence: Paper.

Path parameters

NameTypeDescription
idrequiredinteger
pidrequiredinteger

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