Drive & Office API

Bramble Drive: personal files and shared libraries, folders, uploads (small and resumable), sharing with people, groups and links, versions, the bin, search, the change feed Bramble Sync uses, public share links, and opening files in Bramble Office. Works with an API key.

Address
https://<your-org>.brambleit.cloud/drive
Sign-in
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Address
https://<your-org>.brambleit.cloud/api
Sign-in
Signed-in session, X-API-Key, or a Bramble app access token (Authorization: Bearer).
Endpoints
80
OpenAPI
drive.json
Guides
How Drive & Office works

Where things are. Every file and folder is an item with a numeric id. Endpoints that work in a folder take the folder as parent (or parent_id) and the library as site (or site_id); leave both out for the top of your personal files.

Roles. On a library or a shared item a person or group is a viewer, editor or owner. Libraries that belong to a site in Bramble Sites are managed by the site: change their members there.

Uploading. Files up to a few megabytes: POST /api/v2/upload with the bytes as the body and the name in the query. Larger files: start a resumable upload (POST /api/v2/uploads), send each part with PUT /api/v2/uploads/:uid/parts/:n (any part can be retried), then POST /api/v2/uploads/:uid/complete. When a name is taken, conflict decides: rename (keep both) or replace (a new version).

Storage. Files count against the organisation's storage pool. When it's full, uploads are refused with 507.

Resources

Browse & search

Folder listings, recent and starred files, what's shared with you and by you, search, your storage use, and finding people to share with.

MethodPathSummary
GET/api/v2/meWho you are and your Drive settings
GET/api/v2/usageYour storage use
GET/api/v2/listList a folder
GET/api/v2/recentRecent files
GET/api/v2/starredStarred items
GET/api/v2/sharedShared with you
GET/api/v2/shared-by-meShared by you
GET/api/v2/searchSearch files and folders
GET/api/v2/peopleFind people and groups to share with

Files & folders

One item: details, contents and thumbnails, rename, star, versions, activity, and sharing (people, groups and links). Plus creating folders, moving, copying and downloading several items as a zip.

MethodPathSummary
GET/api/v2/items/:idGet an item
GET/api/v2/items/:id/contentDownload a file
GET/api/v2/items/:id/thumbA file's thumbnail
PATCH/api/v2/items/:idRename an item
POST/api/v2/items/:id/starStar or unstar an item
GET/api/v2/items/:id/versionsA file's versions
POST/api/v2/items/:id/versions/:vid/restoreRestore an older version
DELETE/api/v2/items/:id/versions/:vidDelete an older version
GET/api/v2/items/:id/activityAn item's activity
GET/api/v2/items/:id/sharingWho an item is shared with
POST/api/v2/items/:id/sharing/grantsShare an item with a person or group
PATCH/api/v2/items/:id/sharing/grants/:gidChange someone's access to an item
DELETE/api/v2/items/:id/sharing/grants/:gidStop sharing an item with someone
POST/api/v2/items/:id/sharing/linksCreate a share link
DELETE/api/v2/items/:id/sharing/links/:lidDelete a share link
POST/api/v2/items/:id/keepKeep a file out of the bin's automatic clean-up
POST/api/v2/foldersCreate a folder
POST/api/v2/folders/ensureMake sure a folder path exists
POST/api/v2/moveMove items
POST/api/v2/copyCopy items
GET/api/v2/zipDownload items as a zip

Uploading

Small uploads in one request, resumable uploads in parts, and checking which names already exist.

MethodPathSummary
POST/api/v2/uploads/checkWhich of these names already exist in a folder (so the client can ask "replace or keep both" before uploading)
POST/api/v2/uploadUpload a small file
POST/api/v2/uploadsStart a resumable upload
GET/api/v2/uploads/:uidWhich parts of an upload have arrived
PUT/api/v2/uploads/:uid/parts/:nSend one part of an upload
POST/api/v2/uploads/:uid/completeFinish a resumable upload
DELETE/api/v2/uploads/:uidAbandon an upload

Quick share

Upload files and get a share link in one step (they land in a "Quick share" folder).

MethodPathSummary
POST/api/v2/quick-shareQuick share: start (where to upload), then finish (expiry + link)
POST/api/v2/quick-share/:idChange a quick share's link

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

Libraries

Shared libraries and their members.

MethodPathSummary
GET/api/v2/librariesList libraries
POST/api/v2/librariesCreate a library
GET/api/v2/libraries/:idGet a library
PATCH/api/v2/libraries/:idUpdate a library
DELETE/api/v2/libraries/:idDelete a library
GET/api/v2/libraries/:id/membersA library's members
PUT/api/v2/libraries/:id/membersAdd or change a library member
DELETE/api/v2/libraries/:id/members/:type/:midRemove a library member

Sync change feed

What Bramble Sync and the mobile apps use to stay in step: the spaces you can sync (personal files and libraries) and a change feed per space. Keep the cursor from each answer and pass it next time; wait long-polls until something changes.

MethodPathSummary
GET/api/v2/sync/spacesSpaces you can sync
GET/api/v2/sync/changesChanges in a space since a cursor

Office editing

Opening Word, Excel and PowerPoint files in Bramble Office (needs the Docs, Sheets or Slides licence), creating new blank ones, and the start pages' recent files. The /wopi/... endpoints are how the editor reads and saves the file, each call carrying an access token Drive issued for that file; they're refused through the gateway.

MethodPathSummary
GET/wopi/files/:idFile details for the editor (WOPI CheckFileInfo)
GET/wopi/files/:id/contentsFile contents for the editor (WOPI GetFile)
POST/wopi/files/:id/contentsSave from the editor (WOPI PutFile)
POST/wopi/files/:idOther editor requests (WOPI)
GET/api/v2/office/configWhich Office apps you can use
GET/api/v2/office/recentThe Docs / Sheets / Slides start pages: that kind's files the person can reach (their drive, their libraries, shared with them), newest first
POST/api/v2/office/:id/sessionOpens a file in the editor: the URL to post to and the token to post
POST/api/v2/office/newA new blank Word document, spreadsheet or presentation in a folder

What someone with a share link sees, without signing in: the item (or folder listing), unlocking a password-protected link, downloading, and thumbnails.

MethodPathSummary
GET/api/public/:tokenOpen a share link
POST/api/public/:token/unlockUnlock a password-protected share link
GET/api/public/:token/contentDownload from a share link
GET/api/public/:token/thumbThumbnail from a share link

Legacy v1 (BRM-API)

The original Drive endpoints in BRM-API, kept for older clients. Use /drive/api/v2.

MethodPathSummary
GET/v1/app/drive/itemsList items in a folder
GET/v1/app/drive/recentList the caller's 20 most recently updated files
GET/v1/app/drive/searchSearch the caller's items by name
GET/v1/app/drive/quotaGet the caller's personal storage quota and usage
GET/v1/app/drive/item/:id/pathGet the breadcrumb path to an item
POST/v1/app/drive/folderCreate a folder. If parent_id is given it must be an existing, non-deleted item belonging to the caller's tenant
PATCH/v1/app/drive/item/:idRename an item. Only affects items owned (created_by) by the caller
POST/v1/app/drive/item/:id/moveMove an item into a different folder
DELETE/v1/app/drive/item/:idMove an item to trash
GET/v1/app/drive/trashList the caller's trashed items
POST/v1/app/drive/trash/restore/:idRestore an item out of trash
POST/v1/app/drive/item/:id/shareCreate a public share link for a file
GET/v1/app/drive/item/:id/sharesList active share links for an item
DELETE/v1/app/drive/share/:tokenRevoke a share link. Only affects shares on items owned by the caller

Web pages

These return pages for the browser rather than data.

  • GET /
  • GET /edit/:id
  • GET /office/:app
  • GET /s/:token
  • GET /shared/:token