Bin

Deleted items stay in the bin for the organisation's retention period and can be restored.

MethodPathSummary
POST/api/v2/trashMove items to the bin
GET/api/v2/trashList the bin
POST/api/v2/trash/:id/restoreRestore an item from the bin
DELETE/api/v2/trash/:idDelete an item for good
DELETE/api/v2/trashEmpty the bin

#Move items to the bin

POST/api/v2/trash
Address
https://<your-org>.brambleit.cloud/drive/api/v2/trash
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Drive.

Request body JSON

NameTypeDescription
idsarray of anyThe items.

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/drive/api/v2/trash' \
  -H "X-API-Key: $BRAMBLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ids":[]}'

#List the bin

GET/api/v2/trash
Address
https://<your-org>.brambleit.cloud/drive/api/v2/trash
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Drive.

Query parameters

NameTypeDescription
siteinteger

Response 200

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/drive/api/v2/trash' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Restore an item from the bin

POST/api/v2/trash/:id/restore
Address
https://<your-org>.brambleit.cloud/drive/api/v2/trash/:id/restore
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Drive.

Path parameters

NameTypeDescription
idrequirednumber

Response 200

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/drive/api/v2/trash/12.5/restore' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Delete an item for good

DELETE/api/v2/trash/:id
Address
https://<your-org>.brambleit.cloud/drive/api/v2/trash/:id
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Drive.

Path parameters

NameTypeDescription
idrequirednumber

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/drive/api/v2/trash/12.5' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Empty the bin

DELETE/api/v2/trash
Address
https://<your-org>.brambleit.cloud/drive/api/v2/trash
Requires
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Drive.

Query parameters

NameTypeDescription
siteinteger

Response 200

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

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/drive/api/v2/trash' \
  -H "X-API-Key: $BRAMBLE_KEY"