Sites API
Bramble Sites: team and communication sites with pages and news, members and roles, navigation and branding, and document libraries (which are Drive libraries managed by the site). Works with an API key.
- Address
https://<your-org>.brambleit.cloud/sites- 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
- 58
- OpenAPI
- sites.json
- Guides
- How Sites works
Sites are found by id or address. Endpoints with :ref take either the
site's number or its slug.
Pages have a draft and a published version. Edit the draft, then publish it; every publish is kept as a version you can restore.
Files in a site's libraries are Drive files: use the Drive API
with the library as site.
Resources
Home & search
Your sites home page, search, news across sites, and finding people.
| Method | Path | Summary |
|---|---|---|
| GET | /api/v2/me | Who you are: the signed-in person and what they can do here |
| GET | /api/v2/home | Your sites home page |
| GET | /api/v2/search | Search sites and pages |
| GET | /api/v2/news | News from your sites |
| GET | /api/v2/people | Find people |
Sites
Create and change sites, members and roles, following, libraries, pages and news.
| Method | Path | Summary |
|---|---|---|
| GET | /api/v2/sites | List sites you can see |
| POST | /api/v2/sites | Create a site |
| GET | /api/v2/sites/:ref | Get a site |
| PATCH | /api/v2/sites/:id | Update a site |
| DELETE | /api/v2/sites/:id | Delete a site |
| POST | /api/v2/sites/:id/follow | Follow or unfollow a site |
| GET | /api/v2/sites/:id/members | A site's members |
| PUT | /api/v2/sites/:id/members | Add or change a member |
| DELETE | /api/v2/sites/:id/members/:type/:pid | Remove a member |
| POST | /api/v2/sites/:id/libraries | Add a document library |
| PATCH | /api/v2/sites/:id/libraries/:lid | Rename a document library |
| DELETE | /api/v2/sites/:id/libraries/:lid | Delete a document library |
| GET | /api/v2/sites/:id/pages | A site's pages |
| POST | /api/v2/sites/:id/pages | Create a page or news post |
| GET | /api/v2/sites/:ref/page/:slug | Get a page by its address |
| GET | /api/v2/sites/:id/news | A site's news |
| GET | /api/v2/sites/:id/blocks/files | Files for a Files block |
| GET | /api/v2/sites/:id/libraries/:lid/folders | Folders of a site library, for the Files block's folder picker |
| POST | /api/v2/sites/:id/assets | Upload an image |
Pages & news
A page's draft, publishing, versions, pinning and making it the site's home page.
| Method | Path | Summary |
|---|---|---|
| GET | /api/v2/pages/:id | Get a page |
| PUT | /api/v2/pages/:id/draft | Save a page's draft |
| POST | /api/v2/pages/:id/publish | Publish a page's draft |
| POST | /api/v2/pages/:id/discard | Throw away a page's draft |
| DELETE | /api/v2/pages/:id | Delete a page |
| POST | /api/v2/pages/:id/home | Make a page the site's home page |
| POST | /api/v2/pages/:id/pin | Pin or unpin a news post |
| GET | /api/v2/pages/:id/versions | A page's published versions |
| POST | /api/v2/pages/:id/versions/:vid/restore | Restore a published version |
Page blocks
Data page blocks use (files, people, embed checks) and uploading images.
| Method | Path | Summary |
|---|---|---|
| GET | /api/v2/blocks/people | People for a People block |
| POST | /api/v2/blocks/embed-check | Can this address be embedded? |
| GET | /api/v2/assets/:id | Get an image |
Library files (Bramble Sync)
Older file routes Bramble Sync uses for site libraries. They pass straight through to Drive.
| Method | Path | Summary |
|---|---|---|
| POST | /api/upload/:siteId | Upload a file to a site library (Sync) |
| PATCH | /api/item/:itemId/content | Replace a file's contents (Sync) |
| GET | /api/download/:itemId | Download a file (Sync) |
| GET | /api/preview/:itemId | Preview a file (Sync) |
| DELETE | /api/trash/:itemId | Move a file to the bin (Sync) |
| DELETE | /api/site/:siteId/trash | Empty a site library's bin (Sync) |
Legacy v1 (BRM-API)
The original Sites endpoints in BRM-API, before Sites v2. Use /sites/api/v2.
| Method | Path | Summary |
|---|---|---|
| GET | /v1/app/sites | List sites the caller is a member of |
| POST | /v1/app/sites | Create a site. Creator is automatically added as a drive_site_members row with role owner |
| DELETE | /v1/app/sites/:id | Soft-delete a site. Requires owner role on the site (drive_site_members) |
| GET | /v1/app/sites/:id/quota | Get a site's storage usage against the tenant's shared site-storage pool |
| GET | /v1/app/sites/:id/items | List items in a site folder |
| GET | /v1/app/sites/:id/item/:itemId/path | Get the breadcrumb path to an item within a site |
| POST | /v1/app/sites/:id/folder | Create a folder within a site |
| PATCH | /v1/app/sites/:id/item/:itemId | Rename an item within a site |
| POST | /v1/app/sites/:id/item/:itemId/move | Move an item into a different folder within a site |
| DELETE | /v1/app/sites/:id/item/:itemId | Soft-delete an item within a site |
| GET | /v1/app/sites/:id/trash | List trashed items within a site |
| POST | /v1/app/sites/:id/trash/restore/:itemId | Restore an item out of trash within a site |
| GET | /v1/app/sites/:id/members | List a site's members |
| POST | /v1/app/sites/:id/members | Add or update a site member |
| DELETE | /v1/app/sites/:id/member/:targetUserId | Remove a member from a site |
| GET | /v1/app/sites/:id/search | Search a site's items by name |
Web pages
These return pages for the browser rather than data.
GET /GET /portal