Shell
Run a restricted shell command
Last-resort shell access. The command is checked against a
server-side denylist (shell metacharacters such as |, ;, &
and backticks are refused anywhere in the string) and every
attempt, allowed or denied, is audit-logged. The response reports
whether the command ran; command output is not returned.
POST
/
v1
/
workspaces
/
{workspaceId}
/
devices
/
{deviceId}
/
shell
Run a restricted shell command
curl --request POST \
--url https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/shell \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"command": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({command: '<string>'})
};
fetch('https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/shell', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/shell"
payload = { "command": "<string>" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"status": "<string>",
"commandId": "<string>",
"durationMs": 123
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
ApiKeyBearerAuth
Workspace API key, created in the dashboard under Settings → API Keys.
Path Parameters
Workspace UUID. Caller must have access.
Device id (paired into the workspace).
Body
application/json
Required string length:
1 - 4096Was this page helpful?
⌘I
Run a restricted shell command
curl --request POST \
--url https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/shell \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"command": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({command: '<string>'})
};
fetch('https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/shell', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/workspaces/{workspaceId}/devices/{deviceId}/shell"
payload = { "command": "<string>" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"status": "<string>",
"commandId": "<string>",
"durationMs": 123
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}
