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 |
#People for a People block
GET
/api/v2/blocks/people- Address
https://<your-org>.brambleit.cloud/sites/api/v2/blocks/people- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Sites.
Query parameters
| Name | Type | Description |
|---|---|---|
ids | array of any |
Response 200
| Field | Type | Description |
|---|---|---|
people | any |
Example response
JSON
{
"people": null
}Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/sites/api/v2/blocks/people' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/sites/api/v2/blocks/people', {
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/v2/blocks/people",
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/v2/blocks/people' -Headers $headers#Can this address be embedded?
POST
/api/v2/blocks/embed-check- Address
https://<your-org>.brambleit.cloud/sites/api/v2/blocks/embed-check- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Sites.
Request body JSON
| Name | Type | Description |
|---|---|---|
url | string |
Response 200
| Field | Type | Description |
|---|---|---|
src | any |
Example response
JSON
{
"src": null
}Errors
| Status | Message |
|---|---|
| 400 | That link can't be embedded. Use a YouTube, Vimeo, Loom, Google Maps/Docs or Microsoft Forms link. |
Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/sites/api/v2/blocks/embed-check' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/…"}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/sites/api/v2/blocks/embed-check', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"url":"https://example.com/…"}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/sites/api/v2/blocks/embed-check",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"url":"https://example.com/…"},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"url":"https://example.com/…"}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/sites/api/v2/blocks/embed-check' -Headers $headers -ContentType 'application/json' -Body $body#Get an image
GET
/api/v2/assets/:id- Address
https://<your-org>.brambleit.cloud/sites/api/v2/assets/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: Sites.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | number |
Errors
| Status | Message |
|---|---|
| 404 | Image not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/sites/api/v2/assets/12.5' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/sites/api/v2/assets/12.5', {
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/v2/assets/12.5",
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/v2/assets/12.5' -Headers $headersWas this page helpful?
Thanks for your feedback.