Execute commands on a virtual server via its agent

Send commands directly to your virtual server's (VM) agent for advanced system administration tasks. The endpoint returns a unique 'requestId' to track command execution.

Path Parameters

vmid integer · min: 1 required Example

Unique vmid identifier

Headers

Accept Example
Content-Type Example

Body

required
application/json
command string required

Responses

200
success boolean
timestamp string
requestId string
data object
400
error string
message string
code string
timestamp string
requestId string
500
error string
message string
code string
timestamp string
requestId string
POST https://cloud.hostup.se/api/vm/{vmid}/agent/exec
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/vm/18011/agent/exec" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "command": "string"
  }'
Response
{
  "success": true,
  "timestamp": "string",
  "requestId": "string",
  "data": {
    "success": true,
    "pid": 0,
    "message": "string",
    "command": "string"
  }
}
Request Body
{
  "command": "string"
}