Security policies
Conditional access. A policy either requires two-step sign-in or blocks sign-in, for everyone or for chosen people and groups, optionally only from (or except from) named locations — lists of countries and IP ranges. Also the session length (how long people stay signed in).
| Method | Path | Summary |
|---|---|---|
| PATCH | /v1/admin/tenant/session-policy | Set how long people stay signed in |
| GET | /v1/admin/tenant/security-policies | List the tenant's Conditional Access-style security policies |
| POST | /v1/admin/tenant/security-policies | Create a security policy |
| PATCH | /v1/admin/tenant/security-policies/:id | Update a security policy |
| DELETE | /v1/admin/tenant/security-policies/:id | Delete a security policy |
| POST | /v1/admin/tenant/security-policies/:id/subjects | Add an include/exclude subject (user or group) to a security policy |
| DELETE | /v1/admin/tenant/security-policies/:id/subjects/:subjectRowId | Remove a subject entry from a security policy |
| POST | /v1/admin/tenant/security-policies/:id/locations | Add an include/exclude named-location condition to a security policy |
| DELETE | /v1/admin/tenant/security-policies/:id/locations/:locationRowId | Remove a location condition from a security policy |
| GET | /v1/admin/tenant/named-locations | List the tenant's named locations |
| POST | /v1/admin/tenant/named-locations | Create a named location |
| PATCH | /v1/admin/tenant/named-locations/:id | Rename/update a named location |
| DELETE | /v1/admin/tenant/named-locations/:id | Delete a named location |
| POST | /v1/admin/tenant/named-locations/:id/entries | Add a country or CIDR match entry to a named location |
| DELETE | /v1/admin/tenant/named-locations/:id/entries/:entryId | Remove a match entry from a named location |
#Set how long people stay signed in
/v1/admin/tenant/session-policySet the tenant's login session TTL. Requires the GLOBAL_ADMIN role. session_ttl_days must be an integer between 1 and 90, or null/empty to reset to the platform default (7 days).
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/session-policy- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Request body JSON
| Name | Type | Description |
|---|---|---|
session_ttl_days | integer | Days a sign-in lasts, 1–90. null uses the platform default (7). |
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean | |
session_ttl_days | integer |
Example response
{
"success": true,
"session_ttl_days": 1
}Errors
| Status | Message |
|---|---|
| 400 | session_ttl_days must be an integer between 1 and 90, or null for the platform default |
Example request
curl -X PATCH 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/session-policy' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"session_ttl_days":1}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/session-policy', {
method: 'PATCH',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"session_ttl_days":1}),
});
const data = await res.json();import os, requests
r = requests.patch(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/session-policy",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"session_ttl_days":1},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"session_ttl_days":1}'
Invoke-RestMethod -Method PATCH -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/session-policy' -Headers $headers -ContentType 'application/json' -Body $body#List the tenant's Conditional Access-style security policies
/v1/admin/tenant/security-policiesList the tenant's Conditional Access-style security policies. Requires the GLOBAL_ADMIN role. Each policy includes its include/exclude subjects (users/groups) and named-location conditions.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Response 200
| Field | Type | Description |
|---|---|---|
policies | array of any |
Example response
{
"policies": []
}Example request
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies' -Headers $headers#Create a security policy
/v1/admin/tenant/security-policiesCreate a security policy. Requires the GLOBAL_ADMIN role. control must be require_mfa or block; target_scope must be all or specific.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Request body JSON
| Name | Type | Description |
|---|---|---|
namerequired | string | A name admins will recognise. |
description | string | Optional notes. |
control | string: "require_mfa" | "block" | require_mfa asks for two-step sign-in; block refuses the sign-in. |
target_scope | any: "all" | "specific" | all applies to everyone; specific only to the people and groups added as subjects. |
applies_to_user_types | array of any | Which kinds of account it covers, e.g. ["staff", "guest"]. |
Response 201
| Field | Type | Description |
|---|---|---|
success | boolean | |
id | integer |
Example response
{
"success": true,
"id": 42
}Errors
| Status | Message |
|---|---|
| 400 | name is required |
| 400 | control must be 'require_mfa' or 'block' |
| 400 | target_scope must be 'all' or 'specific' |
Example request
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","description":"string","control":"require_mfa","target_scope":"all","applies_to_user_types":[]}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","description":"string","control":"require_mfa","target_scope":"all","applies_to_user_types":[]}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","description":"string","control":"require_mfa","target_scope":"all","applies_to_user_types":[]},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string","control":"require_mfa","target_scope":"all","applies_to_user_types":[]}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies' -Headers $headers -ContentType 'application/json' -Body $body#Update a security policy
/v1/admin/tenant/security-policies/:idUpdate a security policy. Requires the GLOBAL_ADMIN role. All fields optional; omitted fields keep their existing value.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
name | string | |
description | string | |
enabled | boolean | |
control | string: "require_mfa" | "block" | |
target_scope | string: "all" | "specific" | |
applies_to_user_types | array of any |
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 400 | control must be 'require_mfa' or 'block' |
| 400 | target_scope must be 'all' or 'specific' |
| 404 | Policy not found |
Example request
curl -X PATCH 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","description":"string","enabled":true,"control":"require_mfa","target_scope":"all","applies_to_user_types":[]}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42', {
method: 'PATCH',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","description":"string","enabled":true,"control":"require_mfa","target_scope":"all","applies_to_user_types":[]}),
});
const data = await res.json();import os, requests
r = requests.patch(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","description":"string","enabled":True,"control":"require_mfa","target_scope":"all","applies_to_user_types":[]},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string","enabled":true,"control":"require_mfa","target_scope":"all","applies_to_user_types":[]}'
Invoke-RestMethod -Method PATCH -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42' -Headers $headers -ContentType 'application/json' -Body $body#Delete a security policy
/v1/admin/tenant/security-policies/:idDelete a security policy. Requires the GLOBAL_ADMIN role. Cascades to the policy's subject and location rows in a transaction.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 404 | Policy not found |
Example request
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();import os, requests
r = requests.delete(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method DELETE -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42' -Headers $headers#Add an include/exclude subject (user or group) to a security policy
/v1/admin/tenant/security-policies/:id/subjectsAdd an include/exclude subject (user or group) to a security policy. Requires the GLOBAL_ADMIN role. Validates that the subject belongs to the caller's tenant before adding it.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id/subjects- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
mode | string: "include" | "exclude" | include applies the policy to them; exclude exempts them. |
subject_type | string: "user" | "group" | user or group. |
subject_idrequired | integer | The person's or group's id. |
Response 201
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 400 | mode must be 'include' or 'exclude' |
| 400 | subject_type ('user'|'group') and subject_id are required |
| 400 | User not found on this tenant |
| 400 | Group not found on this tenant |
| 404 | Policy not found |
Example request
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"include","subject_type":"user","subject_id":7}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"mode":"include","subject_type":"user","subject_id":7}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"mode":"include","subject_type":"user","subject_id":7},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"mode":"include","subject_type":"user","subject_id":7}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects' -Headers $headers -ContentType 'application/json' -Body $body#Remove a subject entry from a security policy
/v1/admin/tenant/security-policies/:id/subjects/:subjectRowIdRemove a subject entry from a security policy. Requires the GLOBAL_ADMIN role.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id/subjects/:subjectRowId- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer | |
subjectRowIdrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 404 | Policy not found |
| 404 | Subject entry not found |
Example request
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects/1' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects/1', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();import os, requests
r = requests.delete(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects/1",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method DELETE -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/subjects/1' -Headers $headers#Add an include/exclude named-location condition to a security policy
/v1/admin/tenant/security-policies/:id/locationsAdd an include/exclude named-location condition to a security policy. Requires the GLOBAL_ADMIN role. Validates the named location belongs to the caller's tenant.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id/locations- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
mode | string: "include" | "exclude" | include: only sign-ins from this location; exclude: everywhere except it. |
named_location_idrequired | integer | A named location's id. |
Response 201
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 400 | mode must be 'include' or 'exclude' |
| 400 | named_location_id is required |
| 400 | Named location not found on this tenant |
| 404 | Policy not found |
Example request
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"include","named_location_id":7}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"mode":"include","named_location_id":7}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"mode":"include","named_location_id":7},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"mode":"include","named_location_id":7}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations' -Headers $headers -ContentType 'application/json' -Body $body#Remove a location condition from a security policy
/v1/admin/tenant/security-policies/:id/locations/:locationRowIdRemove a location condition from a security policy. Requires the GLOBAL_ADMIN role.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/:id/locations/:locationRowId- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer | |
locationRowIdrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 404 | Policy not found |
| 404 | Location entry not found |
Example request
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations/1' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations/1', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();import os, requests
r = requests.delete(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations/1",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method DELETE -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/security-policies/42/locations/1' -Headers $headers#List the tenant's named locations
/v1/admin/tenant/named-locationsList the tenant's named locations. Requires the GLOBAL_ADMIN role. Each location includes its country/CIDR match entries.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Response 200
| Field | Type | Description |
|---|---|---|
locations | array of any |
Example response
{
"locations": []
}Example request
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations' -Headers $headers#Create a named location
/v1/admin/tenant/named-locationsCreate a named location. Requires the GLOBAL_ADMIN role. name is required.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Request body JSON
| Name | Type | Description |
|---|---|---|
namerequired | string | |
description | string |
Response 201
| Field | Type | Description |
|---|---|---|
success | boolean | |
id | integer |
Example response
{
"success": true,
"id": 42
}Errors
| Status | Message |
|---|---|
| 400 | name is required |
Example request
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","description":"string"}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","description":"string"}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","description":"string"},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string"}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations' -Headers $headers -ContentType 'application/json' -Body $body#Rename/update a named location
/v1/admin/tenant/named-locations/:idRename/update a named location. Requires the GLOBAL_ADMIN role. name is required.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
namerequired | string | |
description | string |
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 400 | name is required |
| 404 | Named location not found |
Example request
curl -X PATCH 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","description":"string"}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42', {
method: 'PATCH',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","description":"string"}),
});
const data = await res.json();import os, requests
r = requests.patch(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","description":"string"},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string"}'
Invoke-RestMethod -Method PATCH -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42' -Headers $headers -ContentType 'application/json' -Body $body#Delete a named location
/v1/admin/tenant/named-locations/:idDelete a named location. Requires the GLOBAL_ADMIN role. Cascades — any security policy referencing this location loses that condition, and the location's match entries are deleted too.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 404 | Named location not found |
Example request
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();import os, requests
r = requests.delete(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method DELETE -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42' -Headers $headers#Add a country or CIDR match entry to a named location
/v1/admin/tenant/named-locations/:id/entriesAdd a country or CIDR match entry to a named location. Requires the GLOBAL_ADMIN role. match_type=country requires a 2-letter ISO code; match_type=cidr requires a CIDR range e.g. 203.0.113.0/24.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/:id/entries- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
match_type | string: "country" | "cidr" | country or cidr. |
value | string | A two-letter country code (GB) or an IP range (203.0.113.0/24). |
Response 201
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 400 | match_type must be 'country' or 'cidr' |
| 400 | value must be a 2-letter ISO country code |
| 400 | value must be a CIDR range, e.g. 203.0.113.0/24 |
| 404 | Named location not found |
Example request
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"match_type":"country","value":"string"}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"match_type":"country","value":"string"}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"match_type":"country","value":"string"},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"match_type":"country","value":"string"}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries' -Headers $headers -ContentType 'application/json' -Body $body#Remove a match entry from a named location
/v1/admin/tenant/named-locations/:id/entries/:entryIdRemove a match entry from a named location. Requires the GLOBAL_ADMIN role.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/:id/entries/:entryId- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Role:GLOBAL_ADMIN.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer | |
entryIdrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
{
"success": true
}Errors
| Status | Message |
|---|---|
| 404 | Named location not found |
| 404 | Entry not found |
Example request
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries/1' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries/1', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();import os, requests
r = requests.delete(
"https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries/1",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method DELETE -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/tenant/named-locations/42/entries/1' -Headers $headersWas this page helpful?
Thanks for your feedback.