Scripts
The script library and running a script on a device. Scripts are written in Admin Centre → RMM.
| Method | Path | Summary |
|---|---|---|
| GET | /v1/app/rmm/scripts | List scripts (legacy) |
| GET | /v1/app/rmm/scripts/:id | Get a script (legacy) |
| POST | /v1/app/rmm/scripts | Create a script (legacy) |
| PUT | /v1/app/rmm/scripts/:id | Update a script (legacy) |
| DELETE | /v1/app/rmm/scripts/:id | Delete a script (legacy) |
| POST | /v1/app/rmm/scripts/run | Run a script on a device (legacy) |
| GET | /v2/app/rmm/scripts | List scripts |
| GET | /v2/app/rmm/script-categories | List script folders |
| GET | /v2/app/rmm/scripts/:id | Get a script |
| POST | /v2/app/rmm/scripts | Create a script |
| PUT | /v2/app/rmm/scripts/:id | Update a script |
| DELETE | /v2/app/rmm/scripts/:id | Delete a script |
| POST | /v2/app/rmm/scripts/run | Run a script on a device |
#List scripts (legacy)
GET
/v1/app/rmm/scripts- Address
https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Response 200
| Field | Type | Description |
|---|---|---|
scripts | array of object | |
scripts[].id | integer | |
scripts[].tenant_id | integer, or null | |
scripts[].name | string | |
scripts[].description | string, or null | |
scripts[].language | string | |
scripts[].timeout_seconds | integer | |
scripts[].version | integer | |
scripts[].is_enabled | boolean | |
scripts[].is_global | boolean | |
scripts[].is_system | boolean | |
scripts[].created_at | string (date-time) | |
scripts[].updated_at | string (date-time) |
Example response
JSON
{
"scripts": [
{
"id": 42,
"tenant_id": 1,
"name": "Example name",
"description": "string",
"language": "string",
"timeout_seconds": 1,
"version": 1,
"is_enabled": true,
"is_global": true,
"is_system": true,
"created_at": "2026-11-12T09:30:00.000Z",
"updated_at": "2026-11-12T09:30:00.000Z"
}
]
}Errors
| Status | Message |
|---|---|
| 400 | tenant_id is required |
| 404 | User not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts', {
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/app/rmm/scripts",
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/app/rmm/scripts' -Headers $headers#Get a script (legacy)
GET
/v1/app/rmm/scripts/:id- Address
https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
script | any |
Example response
JSON
{
"script": null
}Errors
| Status | Message |
|---|---|
| 400 | tenant_id is required |
| 404 | Script not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/42' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/42', {
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/app/rmm/scripts/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 GET -Uri 'https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/42' -Headers $headers#Create a script (legacy)
POST
/v1/app/rmm/scripts- Address
https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
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 |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 400 | Missing required fields |
Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[]}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/app/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":[]}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[]}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts' -Headers $headers -ContentType 'application/json' -Body $body#Update a script (legacy)
PUT
/v1/app/rmm/scripts/:id- Address
https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
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 |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 404 | Script not found |
| 403 | System/global scripts cannot be edited |
| 403 | Script does not belong to tenant |
Example request
Bash
curl -X PUT 'https://<your-org>.brambleit.cloud/api/v1/app/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}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/app/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}),
});
const data = await res.json();Python
import os, requests
r = requests.put(
"https://<your-org>.brambleit.cloud/api/v1/app/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},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":true}'
Invoke-RestMethod -Method PUT -Uri 'https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/42' -Headers $headers -ContentType 'application/json' -Body $body#Delete a script (legacy)
DELETE
/v1/app/rmm/scripts/:id- Address
https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Permission (any of):rmm.scripts.manage.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 400 | tenant_id is required |
| 404 | Script not found |
| 403 | System/global scripts cannot be deleted |
| 403 | Script does not belong to tenant |
Example request
Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/42' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/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/app/rmm/scripts/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/app/rmm/scripts/42' -Headers $headers#Run a script on a device (legacy)
POST
/v1/app/rmm/scripts/run- Address
https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/run- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Request body JSON
| Name | Type | Description |
|---|---|---|
script_idrequired | integer | |
device_idrequired | integer | |
script_args | array of any |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 400 | tenant_id, user_id, script_id and device_id are required |
| 404 | User not found |
| 404 | Device not found |
| 403 | Device does not belong to tenant |
| 404 | Script not found |
Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/run' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"script_id":7,"device_id":7,"script_args":[]}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/run', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"script_id":7,"device_id":7,"script_args":[]}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/run",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"script_id":7,"device_id":7,"script_args":[]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"script_id":7,"device_id":7,"script_args":[]}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/app/rmm/scripts/run' -Headers $headers -ContentType 'application/json' -Body $body#List scripts
GET
/v2/app/rmm/scripts- Address
https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Response 200
| Field | Type | Description |
|---|---|---|
scripts | array of any |
Example response
JSON
{
"scripts": []
}Errors
| Status | Message |
|---|---|
| 404 | User not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts', {
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/v2/app/rmm/scripts",
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/v2/app/rmm/scripts' -Headers $headers#List script folders
GET
/v2/app/rmm/script-categoriesRead-only: folders are only created/renamed/deleted from BRM-Admin's Scripts tab. RMM2 just needs the tree to group the run-script picker.
- Address
https://<your-org>.brambleit.cloud/api/v2/app/rmm/script-categories- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Response 200
| Field | Type | Description |
|---|---|---|
categories | array of any |
Example response
JSON
{
"categories": []
}Errors
| Status | Message |
|---|---|
| 404 | User not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/script-categories' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v2/app/rmm/script-categories', {
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/v2/app/rmm/script-categories",
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/v2/app/rmm/script-categories' -Headers $headers#Get a script
GET
/v2/app/rmm/scripts/:id- Address
https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
script | any |
Example response
JSON
{
"script": null
}Errors
| Status | Message |
|---|---|
| 404 | User not found |
| 404 | Script not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/42' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/42', {
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/v2/app/rmm/scripts/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 GET -Uri 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/42' -Headers $headers#Create a script
POST
/v2/app/rmm/scripts- Address
https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Request body JSON
| Name | Type | Description |
|---|---|---|
namerequired | string | The script's name. |
description | string | |
languagerequired | any | The interpreter, e.g. bash, powershell, python. |
script_bodyrequired | any | The script itself. |
timeout_seconds | array of any | Stop it after this many seconds. |
Response 201
| Field | Type | Description |
|---|---|---|
message | string | |
script_id | integer |
Example response
JSON
{
"message": "Saved",
"script_id": 7
}Errors
| Status | Message |
|---|---|
| 400 | name, language, and script_body are required |
| 404 | User not found |
Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[]}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v2/app/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":[]}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[]}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts' -Headers $headers -ContentType 'application/json' -Body $body#Update a script
PUT
/v2/app/rmm/scripts/:id- Address
https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
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 |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 404 | User not found |
| 404 | Script not found |
| 403 | System/global scripts cannot be edited |
| 403 | Script does not belong to your tenant |
Example request
Bash
curl -X PUT 'https://<your-org>.brambleit.cloud/api/v2/app/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}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v2/app/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}),
});
const data = await res.json();Python
import os, requests
r = requests.put(
"https://<your-org>.brambleit.cloud/api/v2/app/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},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name","description":"string","language":"…","script_body":"…","timeout_seconds":[],"is_enabled":true}'
Invoke-RestMethod -Method PUT -Uri 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/42' -Headers $headers -ContentType 'application/json' -Body $body#Delete a script
DELETE
/v2/app/rmm/scripts/:id- Address
https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | integer |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 404 | User not found |
| 404 | Script not found |
| 403 | System/global scripts cannot be deleted |
| 403 | Script does not belong to your tenant |
Example request
Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/42' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/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/v2/app/rmm/scripts/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/v2/app/rmm/scripts/42' -Headers $headers#Run a script on a device
POST
/v2/app/rmm/scripts/runNeeds rmm.scripts.run. Queues the script; its output appears in the device's command list.
- Address
https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/run- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Licence: RMM.
Request body JSON
| Name | Type | Description |
|---|---|---|
script_idrequired | number | The script. |
device_idrequired | integer | The device. |
script_args | array of any | Arguments for the script. |
Response 201
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 400 | script_id and device_id are required |
| 404 | User not found |
| 404 | Device not found |
| 403 | Device does not belong to your tenant |
| 404 | Script not found |
Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/run' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"script_id":12.5,"device_id":7,"script_args":[]}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/run', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"script_id":12.5,"device_id":7,"script_args":[]}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/run",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"script_id":12.5,"device_id":7,"script_args":[]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"script_id":12.5,"device_id":7,"script_args":[]}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v2/app/rmm/scripts/run' -Headers $headers -ContentType 'application/json' -Body $bodyWas this page helpful?
Thanks for your feedback.