Library files (Bramble Sync)

Older file routes Bramble Sync uses for site libraries. They pass straight through to Drive.

MethodPathSummary
POST/api/upload/:siteIdUpload a file to a site library (Sync)
PATCH/api/item/:itemId/contentReplace a file's contents (Sync)
GET/api/download/:itemIdDownload a file (Sync)
GET/api/preview/:itemIdPreview a file (Sync)
DELETE/api/trash/:itemIdMove a file to the bin (Sync)
DELETE/api/site/:siteId/trashEmpty a site library's bin (Sync)

#Upload a file to a site library (Sync)

POST/api/upload/:siteId
Address
https://<your-org>.brambleit.cloud/sites/api/upload/:siteId
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
siteIdrequiredinteger

Example request

Bash
curl -X POST 'https://<your-org>.brambleit.cloud/sites/api/upload/1' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Replace a file's contents (Sync)

PATCH/api/item/:itemId/content
Address
https://<your-org>.brambleit.cloud/sites/api/item/:itemId/content
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
itemIdrequiredinteger

Example request

Bash
curl -X PATCH 'https://<your-org>.brambleit.cloud/sites/api/item/1/content' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Download a file (Sync)

GET/api/download/:itemId
Address
https://<your-org>.brambleit.cloud/sites/api/download/:itemId
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
itemIdrequiredinteger

Example request

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

#Preview a file (Sync)

GET/api/preview/:itemId
Address
https://<your-org>.brambleit.cloud/sites/api/preview/:itemId
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
itemIdrequiredinteger

Example request

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

#Move a file to the bin (Sync)

DELETE/api/trash/:itemId
Address
https://<your-org>.brambleit.cloud/sites/api/trash/:itemId
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
itemIdrequiredinteger

Example request

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

#Empty a site library's bin (Sync)

DELETE/api/site/:siteId/trash
Address
https://<your-org>.brambleit.cloud/sites/api/site/:siteId/trash
Requires
None: public, or protected by a token in the address or body.

Path parameters

NameTypeDescription
siteIdrequiredinteger

Example request

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