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.
| Method | Path | Summary |
|---|---|---|
| GET | /api/v2/sync/spaces | Spaces you can sync |
| GET | /api/v2/sync/changes | Changes in a space since a cursor |
#Spaces you can sync
GET
/api/v2/sync/spaces- Address
https://<your-org>.brambleit.cloud/drive/api/v2/sync/spaces- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Drive.
Response 200
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/drive/api/v2/sync/spaces' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/drive/api/v2/sync/spaces', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/drive/api/v2/sync/spaces",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/drive/api/v2/sync/spaces' -Headers $headers#Changes in a space since a cursor
GET
/api/v2/sync/changes- Address
https://<your-org>.brambleit.cloud/drive/api/v2/sync/changes- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Drive.
Query parameters
| Name | Type | Description |
|---|---|---|
space | any | The space (from GET /api/v2/sync/spaces). |
cursor | any | The cursor from the last answer (leave out the first time). |
after | any | |
wait | any | Seconds to wait for a change before answering (long poll). |
Response 200
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/drive/api/v2/sync/changes' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/drive/api/v2/sync/changes', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/drive/api/v2/sync/changes",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/drive/api/v2/sync/changes' -Headers $headersWas this page helpful?
Thanks for your feedback.