curl --request POST \
--url https://api.storiza.store/vps/{vmId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"command": "<string>",
"timeoutMs": 30000
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({command: '<string>', timeoutMs: 30000})
};
fetch('https://api.storiza.store/vps/{vmId}/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/vps/{vmId}/execute"
payload = {
"command": "<string>",
"timeoutMs": 30000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Command executed",
"data": {
"exitCode": 123,
"stdout": "<string>",
"truncated": true
}
}Run a shell command inside a VPS via the QEMU guest agent
Runs one command inside the guest as root and waits for it to finish, returning stdout and the exit code. Goes through the QEMU guest agent, not SSH, so it works without network access to the VPS — but it needs the agent to be installed and answering, which it will not be while the machine is still booting or if the image never had it.
On Linux the command runs through /bin/sh -c; on Windows it runs through PowerShell (powershell.exe -EncodedCommand), where the exit code is 0 or 1. Pipes and redirection work on both. Output is capped; redirect to a file and fetch it in pieces if you need more than that.
This is root (SYSTEM on Windows) on the machine. It is owner-only — a share token cannot reach it — and every call is audit-logged with the command that ran.
Required API key permission: vps:write
curl --request POST \
--url https://api.storiza.store/vps/{vmId}/execute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"command": "<string>",
"timeoutMs": 30000
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({command: '<string>', timeoutMs: 30000})
};
fetch('https://api.storiza.store/vps/{vmId}/execute', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.storiza.store/vps/{vmId}/execute"
payload = {
"command": "<string>",
"timeoutMs": 30000
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Command executed",
"data": {
"exitCode": 123,
"stdout": "<string>",
"truncated": true
}
}Authorizations
An API key from the Storiza dashboard (API & Integrations), sent as Authorization: Bearer stz_….
Path Parameters
Body
Was this page helpful?