RMM: scripts

The script library and its categories. Scripts run on devices directly or as steps of a task.

MethodPathSummary
GET/v1/admin/rmm/scriptsList RMM scripts available to the tenant
GET/v1/admin/rmm/scripts/:idGet one RMM script's full record, including its body
POST/v1/admin/rmm/scriptsCreate an RMM script
PUT/v1/admin/rmm/scripts/:idUpdate an RMM script
DELETE/v1/admin/rmm/scripts/:idDelete an RMM script
GET/v1/admin/rmm/script-categoriesList the tenant's RMM script folders
POST/v1/admin/rmm/script-categoriesCreate an RMM script folder
PUT/v1/admin/rmm/script-categories/:idRename or re-parent an RMM script folder
DELETE/v1/admin/rmm/script-categories/:idDelete an RMM script folder and its subtree

#List RMM scripts available to the tenant

GET/v1/admin/rmm/scripts

List 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

FieldTypeDescription
scriptsarray of any
Example response
JSON
{
  "scripts": []
}

Example request

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

#Get one RMM script's full record, including its body

GET/v1/admin/rmm/scripts/:id

Get 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

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
scriptany
Example response
JSON
{
  "script": null
}

Errors

StatusMessage
404Script not found

Example request

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

#Create an RMM script

POST/v1/admin/rmm/scripts

Create 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

NameTypeDescription
namerequiredstring
descriptionstring
languagerequiredany
script_bodyrequiredany
timeout_secondsarray of any
is_enabledboolean
category_idinteger

Response 201

FieldTypeDescription
messagestring
idinteger
Example response
JSON
{
  "message": "Saved",
  "id": 42
}

Errors

StatusMessage
400name, language and script_body are required

Example request

Bash
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}'

#Update an RMM script

PUT/v1/admin/rmm/scripts/:id

Update 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

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
namestring
descriptionstring
languageany
script_bodyany
timeout_secondsarray of any
is_enabledboolean
category_idinteger

Response 200

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Errors

StatusMessage
404Script not found
403System and global scripts cannot be edited
403Script does not belong to your tenant

Example request

Bash
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}'

#Delete an RMM script

DELETE/v1/admin/rmm/scripts/:id

Delete 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

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Errors

StatusMessage
404Script not found
403System and global scripts cannot be deleted
403Script does not belong to your tenant

Example request

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

#List the tenant's RMM script folders

GET/v1/admin/rmm/script-categories

List 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

FieldTypeDescription
categoriesarray of any
Example response
JSON
{
  "categories": []
}

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/admin/rmm/script-categories' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Create an RMM script folder

POST/v1/admin/rmm/script-categories

Create 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

NameTypeDescription
namerequiredstring
parent_idinteger

Response 201

FieldTypeDescription
messagestring
idinteger
Example response
JSON
{
  "message": "Saved",
  "id": 42
}

Errors

StatusMessage
400name is required

Example request

Bash
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}'

#Rename or re-parent an RMM script folder

PUT/v1/admin/rmm/script-categories/:id

Rename 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

NameTypeDescription
idrequiredinteger

Request body JSON

NameTypeDescription
namerequiredstring
parent_idinteger

Response 200

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Errors

StatusMessage
400name is required
404Folder not found

Example request

Bash
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}'

#Delete an RMM script folder and its subtree

DELETE/v1/admin/rmm/script-categories/:id

Delete 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

NameTypeDescription
idrequiredinteger

Response 200

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Errors

StatusMessage
404Folder not found

Example request

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