curl --request POST \
--url https://api.storiza.store/apps/{id}/exec \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"command": [
"<string>"
],
"timeoutMs": 60500,
"workingDir": "<string>",
"user": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
command: ['<string>'],
timeoutMs: 60500,
workingDir: '<string>',
user: '<string>'
})
};
fetch('https://api.storiza.store/apps/{id}/exec', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/apps/{id}/exec"
payload = {
"command": ["<string>"],
"timeoutMs": 60500,
"workingDir": "<string>",
"user": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Command finished",
"data": {
"output": "<string>",
"exitCode": 123,
"truncated": true,
"timedOut": true
}
}Run a command in the container
Run a command inside the running container and wait for it to finish.
GET /apps/{id}/terminal reaches the same place interactively; this is the shape a script or an agent can use — argv in, output and exit code out, no session to hold open.
Exec form. ["ls", "-la", "/data"] — each element is one argument and nothing goes through a shell, so &&, pipes and globs need a shell asked for by name: ["sh", "-lc", "ls /data | wc -l"].
This is docker exec, not the app’s start command: nothing here changes how the container starts, and the process ends when the command does.
Bounded on both axes. Output stops at 1 MB and comes back with truncated: true; the call is abandoned after timeoutMs with timedOut: true and exitCode: null, which means the command may still be running inside the container. stdout and stderr are interleaved in the order the container produced them.
Required API key permission: apps:write
curl --request POST \
--url https://api.storiza.store/apps/{id}/exec \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"command": [
"<string>"
],
"timeoutMs": 60500,
"workingDir": "<string>",
"user": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
command: ['<string>'],
timeoutMs: 60500,
workingDir: '<string>',
user: '<string>'
})
};
fetch('https://api.storiza.store/apps/{id}/exec', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/apps/{id}/exec"
payload = {
"command": ["<string>"],
"timeoutMs": 60500,
"workingDir": "<string>",
"user": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Command finished",
"data": {
"output": "<string>",
"exitCode": 123,
"truncated": true,
"timedOut": true
}
}Authorizations
An API key from the Storiza dashboard (API & Integrations), sent as Authorization: Bearer stz_….
Path Parameters
Body
Was this page helpful?