RMM: scripts
The script library and its categories. Scripts run on devices directly or as steps of a task.
| Method | Path | Summary |
|---|---|---|
| GET | /v1/admin/rmm/scripts | List RMM scripts available to the tenant |
| GET | /v1/admin/rmm/scripts/:id | Get one RMM script's full record, including its body |
| POST | /v1/admin/rmm/scripts | Create an RMM script |
| PUT | /v1/admin/rmm/scripts/:id | Update an RMM script |
| DELETE | /v1/admin/rmm/scripts/:id | Delete an RMM script |
| GET | /v1/admin/rmm/script-categories | List the tenant's RMM script folders |
| POST | /v1/admin/rmm/script-categories | Create an RMM script folder |
| PUT | /v1/admin/rmm/script-categories/:id | Rename or re-parent an RMM script folder |
| DELETE | /v1/admin/rmm/script-categories/:id | Delete an RMM script folder and its subtree |
#List RMM scripts available to the tenant
/v1/admin/rmm/scriptsList RMM scripts available to the tenant. Requires the GLOBAL_ADMIN role. Includes both tenant-owned scripts and global (is_global=1) scripts, ordered global/system first.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):rmm.scripts.manage,rmm.scripts.run,rmm.checks.manage.
Response 200
| Field | Type | Description |
|---|---|---|
scripts | array of any |
Example response
{
"scripts": []
}Example request
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts', {
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/rmm/scripts",
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/rmm/scripts' -Headers $headers#Get one RMM script's full record, including its body
/v1/admin/rmm/scripts/:idGet one RMM script's full record, including its body. Requires the GLOBAL_ADMIN role. Accessible if it belongs to the tenant or is global.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):rmm.scripts.manage,rmm.scripts.run,rmm.checks.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
script | any |
Example response
{
"script": null
}Errors
| Status | Message |
|---|---|
| 404 | Script not found |
Example request
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/42' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/42', {
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/rmm/scripts/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 GET -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/42' -Headers $headers#Create an RMM script
/v1/admin/rmm/scriptsCreate an RMM script. Requires the GLOBAL_ADMIN role. name, language and script_body are required. category_id is validated to belong to the tenant (or silently dropped to null). Always created as a non-global, non-system script at version 1.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):rmm.scripts.manage.
Request body JSON
| Name | Type | Description |
|---|---|---|
namerequired | string | |
description | string | |
languagerequired | any | |
script_bodyrequired | any | |
timeout_seconds | array of any | |
is_enabled | boolean | |
category_id | integer |
Response 201
| Field | Type | Description |
|---|---|---|
message | string | |
id | integer |
Example response
{
"message": "Saved",
"id": 42
}Errors
| Status | Message |
|---|---|
| 400 | name, language and script_body are required |
Example request
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":true,"category_id":7}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":true,"category_id":7}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":True,"category_id":7},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":true,"category_id":7}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts' -Headers $headers -ContentType 'application/json' -Body $body#Update an RMM script
/v1/admin/rmm/scripts/:idUpdate an RMM script. Requires the GLOBAL_ADMIN role. System and global scripts cannot be edited, nor scripts belonging to another tenant. Increments the version column on every update.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):rmm.scripts.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
name | string | |
description | string | |
language | any | |
script_body | any | |
timeout_seconds | array of any | |
is_enabled | boolean | |
category_id | integer |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 404 | Script not found |
| 403 | System and global scripts cannot be edited |
| 403 | Script does not belong to your tenant |
Example request
curl -X PUT 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/42' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":true,"category_id":7}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/42', {
method: 'PUT',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":true,"category_id":7}),
});
const data = await res.json();import os, requests
r = requests.put(
"https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/42",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":True,"category_id":7},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":true,"category_id":7}'
Invoke-RestMethod -Method PUT -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/42' -Headers $headers -ContentType 'application/json' -Body $body#Delete an RMM script
/v1/admin/rmm/scripts/:idDelete an RMM script. Requires the GLOBAL_ADMIN role. System and global scripts cannot be deleted, nor scripts belonging to another tenant.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):rmm.scripts.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 404 | Script not found |
| 403 | System and global scripts cannot be deleted |
| 403 | Script does not belong to your tenant |
Example request
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/42' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/rmm/scripts/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/rmm/scripts/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/rmm/scripts/42' -Headers $headers#List the tenant's RMM script folders
/v1/admin/rmm/script-categoriesList the tenant's RMM script folders. Requires the GLOBAL_ADMIN role. Flat list with self-referencing parent_id — the client builds the tree. The "Bramble Defaults" (system/global scripts) folder is virtual and not represented here.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):rmm.scripts.manage,rmm.scripts.run,rmm.checks.manage.
Response 200
| Field | Type | Description |
|---|---|---|
categories | array of any |
Example response
{
"categories": []
}Example request
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories', {
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/rmm/script-categories",
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/rmm/script-categories' -Headers $headers#Create an RMM script folder
/v1/admin/rmm/script-categoriesCreate an RMM script folder. Requires the GLOBAL_ADMIN role. name is required; parent_id is validated to belong to the tenant (or silently dropped to null/root).
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):rmm.scripts.manage.
Request body JSON
| Name | Type | Description |
|---|---|---|
namerequired | string | |
parent_id | integer |
Response 201
| Field | Type | Description |
|---|---|---|
message | string | |
id | integer |
Example response
{
"message": "Saved",
"id": 42
}Errors
| Status | Message |
|---|---|
| 400 | name is required |
Example request
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","parent_id":7}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","parent_id":7}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","parent_id":7},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","parent_id":7}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories' -Headers $headers -ContentType 'application/json' -Body $body#Rename or re-parent an RMM script folder
/v1/admin/rmm/script-categories/:idRename or re-parent an RMM script folder. Requires the GLOBAL_ADMIN role. name is required. Server-side backstop rejects re-parenting a folder under itself or one of its own descendants (walks the ancestor chain, falls back to the folder's existing parent if a cycle is detected) — the admin UI's picker already filters these out, this is defense in depth.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):rmm.scripts.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Request body JSON
| Name | Type | Description |
|---|---|---|
namerequired | string | |
parent_id | integer |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 400 | name is required |
| 404 | Folder not found |
Example request
curl -X PUT 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories/42' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","parent_id":7}'const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories/42', {
method: 'PUT',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name","parent_id":7}),
});
const data = await res.json();import os, requests
r = requests.put(
"https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories/42",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","parent_id":7},
)
r.raise_for_status()
data = r.json()$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","parent_id":7}'
Invoke-RestMethod -Method PUT -Uri 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories/42' -Headers $headers -ContentType 'application/json' -Body $body#Delete an RMM script folder and its subtree
/v1/admin/rmm/script-categories/:idDelete an RMM script folder and its subtree. Requires the GLOBAL_ADMIN role. Walks and deletes the entire nested folder subtree (no FK cascade available in this database), and uncategorizes (sets category_id=NULL) every script filed under any deleted folder rather than deleting the scripts themselves.
- Address
https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Permission (any of):rmm.scripts.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 404 | Folder not found |
Example request
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories/42' \
-H "X-API-Key: $BRAMBLE_KEY"const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories/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/rmm/script-categories/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/rmm/script-categories/42' -Headers $headersWas this page helpful?
Thanks for your feedback.