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) |
#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
| Name | Type | Description |
|---|---|---|
siteIdrequired | integer |
Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/sites/api/upload/1' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/sites/api/upload/1', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/sites/api/upload/1",
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 POST -Uri 'https://<your-org>.brambleit.cloud/sites/api/upload/1' -Headers $headers#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
| Name | Type | Description |
|---|---|---|
itemIdrequired | integer |
Example request
Bash
curl -X PATCH 'https://<your-org>.brambleit.cloud/sites/api/item/1/content' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/sites/api/item/1/content', {
method: 'PATCH',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.patch(
"https://<your-org>.brambleit.cloud/sites/api/item/1/content",
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 PATCH -Uri 'https://<your-org>.brambleit.cloud/sites/api/item/1/content' -Headers $headers#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
| Name | Type | Description |
|---|---|---|
itemIdrequired | integer |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/sites/api/download/1' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/sites/api/download/1', {
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/sites/api/download/1",
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/sites/api/download/1' -Headers $headers#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
| Name | Type | Description |
|---|---|---|
itemIdrequired | integer |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/sites/api/preview/1' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/sites/api/preview/1', {
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/sites/api/preview/1",
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/sites/api/preview/1' -Headers $headers#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
| Name | Type | Description |
|---|---|---|
itemIdrequired | integer |
Example request
Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/sites/api/trash/1' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/sites/api/trash/1', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.delete(
"https://<your-org>.brambleit.cloud/sites/api/trash/1",
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 DELETE -Uri 'https://<your-org>.brambleit.cloud/sites/api/trash/1' -Headers $headers#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
| Name | Type | Description |
|---|---|---|
siteIdrequired | integer |
Example request
Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/sites/api/site/1/trash' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/sites/api/site/1/trash', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.delete(
"https://<your-org>.brambleit.cloud/sites/api/site/1/trash",
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 DELETE -Uri 'https://<your-org>.brambleit.cloud/sites/api/site/1/trash' -Headers $headersWas this page helpful?
Thanks for your feedback.