App settings: Sites

Every site in the organisation, its members, and who may create sites.

MethodPathSummary
GET/v1/admin/sites/settingsWho may create sites in this tenant
PUT/v1/admin/sites/settingsUpdate the settings
GET/v1/admin/sitesEvery site in the tenant with its owners, members, pages and library size
POST/v1/admin/sites/:id/ownersMake a tenant user an owner of a site (user_id; defaults to the calling admin)
GET/v1/admin/sites/:id/membersList members of a site
PUT/v1/admin/sites/:id/membersUpdate the members of a site
DELETE/v1/admin/sites/:id/members/:type/:pidDelete a member
DELETE/v1/admin/sites/:idDelete 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

FieldTypeDescription
creationstring
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"

#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

NameTypeDescription
creationany

Response 200

FieldTypeDescription
creationany
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":"…"}'

#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

FieldTypeDescription
sitesarray 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"

#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

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
user_idinteger

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
404Site not found
404User 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}'

#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

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
membersarray of any
Example response
JSON
{
  "members": []
}

Errors

StatusMessage
404Site 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"

#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

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
typestring: "user" | "group"
rolestring
idinteger

Response 200

FieldTypeDescription
membersarray of any
Example response
JSON
{
  "members": []
}

Errors

StatusMessage
400Add a person or a group
400Pick a role
400A site needs at least one owner
404Site 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}'

#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

NameTypeDescription
idrequiredinteger
typerequiredstring: "user" | "group"
pidrequirednumber

Response 200

FieldTypeDescription
membersarray of any
Example response
JSON
{
  "members": []
}

Errors

StatusMessage
400Not a member
400A site needs at least one owner
404Site not found
404Not 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"

#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

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
okboolean
Example response
JSON
{
  "ok": true
}

Errors

StatusMessage
404Site not found

Example request

Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/sites/42' \
  -H "X-API-Key: $BRAMBLE_KEY"