App settings: Sites
Every site in the organisation, its members, and who may create sites.
| Method | Path | Summary |
|---|---|---|
| GET | /v1/admin/sites/settings | Who may create sites in this tenant |
| PUT | /v1/admin/sites/settings | Update the settings |
| GET | /v1/admin/sites | Every site in the tenant with its owners, members, pages and library size |
| POST | /v1/admin/sites/:id/owners | Make a tenant user an owner of a site (user_id; defaults to the calling admin) |
| GET | /v1/admin/sites/:id/members | List members of a site |
| PUT | /v1/admin/sites/:id/members | Update the members of a site |
| DELETE | /v1/admin/sites/:id/members/:type/:pid | Delete a member |
| DELETE | /v1/admin/sites/:id | Delete a site (its libraries' files are purged by Drive after the bin period) |
#Who may create sites in this tenant
GET
/v1/admin/sites/settings- Address
https://<your-org>.brambleit.cloud/api/v1/admin/sites/settings- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):sites.admin.manage.
Response 200
| Field | Type | Description |
|---|---|---|
creation | string |
Example response
JSON
{
"creation": "string"
}Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/settings' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/sites/settings', {
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/api/v1/admin/sites/settings",
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/api/v1/admin/sites/settings' -Headers $headers#Update the settings
PUT
/v1/admin/sites/settings- Address
https://<your-org>.brambleit.cloud/api/v1/admin/sites/settings- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):sites.admin.manage.
Request body JSON
| Name | Type | Description |
|---|---|---|
creation | any |
Response 200
| Field | Type | Description |
|---|---|---|
creation | any |
Example response
JSON
{
"creation": null
}Example request
Bash
curl -X PUT 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/settings' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"creation":"…"}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/sites/settings', {
method: 'PUT',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"creation":"…"}),
});
const data = await res.json();Python
import os, requests
r = requests.put(
"https://<your-org>.brambleit.cloud/api/v1/admin/sites/settings",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"creation":"…"},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"creation":"…"}'
Invoke-RestMethod -Method PUT -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/settings' -Headers $headers -ContentType 'application/json' -Body $body#Every site in the tenant with its owners, members, pages and library size
GET
/v1/admin/sites- Address
https://<your-org>.brambleit.cloud/api/v1/admin/sites- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):sites.admin.manage.
Response 200
| Field | Type | Description |
|---|---|---|
sites | array of any |
Example response
JSON
{
"sites": []
}Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/sites' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/sites', {
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/api/v1/admin/sites",
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/api/v1/admin/sites' -Headers $headers#Make a tenant user an owner of a site (user_id; defaults to the calling admin)
POST
/v1/admin/sites/:id/owners- Address
https://<your-org>.brambleit.cloud/api/v1/admin/sites/:id/owners- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):sites.admin.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
user_id | integer |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean |
Example response
JSON
{
"ok": true
}Errors
| Status | Message |
|---|---|
| 404 | Site not found |
| 404 | User not found |
Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/owners' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id":7}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/owners', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"user_id":7}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/owners",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"user_id":7},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"user_id":7}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/owners' -Headers $headers -ContentType 'application/json' -Body $body#List members of a site
GET
/v1/admin/sites/:id/members- Address
https://<your-org>.brambleit.cloud/api/v1/admin/sites/:id/members- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):sites.admin.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
members | array of any |
Example response
JSON
{
"members": []
}Errors
| Status | Message |
|---|---|
| 404 | Site not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/members' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/members', {
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/api/v1/admin/sites/42/members",
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/api/v1/admin/sites/42/members' -Headers $headers#Update the members of a site
PUT
/v1/admin/sites/:id/members- Address
https://<your-org>.brambleit.cloud/api/v1/admin/sites/:id/members- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):sites.admin.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
type | string: "user" | "group" | |
role | string | |
id | integer |
Response 200
| Field | Type | Description |
|---|---|---|
members | array of any |
Example response
JSON
{
"members": []
}Errors
| Status | Message |
|---|---|
| 400 | Add a person or a group |
| 400 | Pick a role |
| 400 | A site needs at least one owner |
| 404 | Site not found |
Example request
Bash
curl -X PUT 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/members' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"user","role":"string","id":42}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/members', {
method: 'PUT',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"type":"user","role":"string","id":42}),
});
const data = await res.json();Python
import os, requests
r = requests.put(
"https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/members",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"type":"user","role":"string","id":42},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"type":"user","role":"string","id":42}'
Invoke-RestMethod -Method PUT -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/members' -Headers $headers -ContentType 'application/json' -Body $body#Delete a member
DELETE
/v1/admin/sites/:id/members/:type/:pid- Address
https://<your-org>.brambleit.cloud/api/v1/admin/sites/:id/members/:type/:pid- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):sites.admin.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer | |
typerequired | string: "user" | "group" | |
pidrequired | number |
Response 200
| Field | Type | Description |
|---|---|---|
members | array of any |
Example response
JSON
{
"members": []
}Errors
| Status | Message |
|---|---|
| 400 | Not a member |
| 400 | A site needs at least one owner |
| 404 | Site not found |
| 404 | Not a member |
Example request
Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/members/user/12.5' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/members/user/12.5', {
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/api/v1/admin/sites/42/members/user/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 DELETE -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/42/members/user/12.5' -Headers $headers#Delete a site (its libraries' files are purged by Drive after the bin period)
DELETE
/v1/admin/sites/:id- Address
https://<your-org>.brambleit.cloud/api/v1/admin/sites/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):sites.admin.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean |
Example response
JSON
{
"ok": true
}Errors
| Status | Message |
|---|---|
| 404 | Site not found |
Example request
Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/42' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/sites/42', {
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/api/v1/admin/sites/42",
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/api/v1/admin/sites/42' -Headers $headersWas this page helpful?
Thanks for your feedback.