Skip to content

API reference

Servers and fleet

Servers, fleet monitoring and actions, commands and scripts, the agent and DigitalOcean.

Servers

Servers the panel manages, over SSH or with the agent.

GET /api/servers

List servers

Lists every managed server (the panel host first, then remote servers by creation date) with the number of sites each one hosts. Private keys are never returned.

  • Token or session
  • Admin

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
  • Sites with serverId null are counted on the local (panel host) row.
  • For fleet data (agent status, metrics, permissions) use GET /api/fleet/servers.
cURL
curl "https://panel.example.com/api/servers" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "servers": [
        {
            "id": 1,
            "name": "Panel host",
            "kind": "local",
            "host": null,
            "port": 22,
            "sshUser": "root",
            "hasKey": false,
            "sshKeyFingerprint": null,
            "status": "online",
            "lastSeenAt": "2026-11-27T10:00:00.000Z",
            "scriptsSynced": true,
            "notes": null,
            "createdAt": "2026-11-27T10:00:00.000Z",
            "monthlyCostMinor": 0,
            "costCurrency": "GEL",
            "siteCount": 8
        },
        {
            "id": 12,
            "name": "web-1",
            "kind": "remote",
            "host": "web1.example.com",
            "port": 22,
            "sshUser": "root",
            "hasKey": true,
            "sshKeyFingerprint": "9f2c4a1be07d3c55",
            "status": "online",
            "lastSeenAt": "2026-11-27T10:00:00.000Z",
            "scriptsSynced": true,
            "notes": null,
            "createdAt": "2026-11-27T10:00:00.000Z",
            "monthlyCostMinor": 4500,
            "costCurrency": "GEL",
            "siteCount": 3
        }
    ]
}
POST /api/servers

Add an SSH server

Registers a remote server reachable over SSH. The private key is encrypted at rest and only a 16-character sha256 checksum is kept for display. Nothing is installed on the server; use POST /api/servers/{id}/prepare for that.

  • Token or session
  • Admin
  • Audit: server.created

Body

name stringrequired
Display name.1โ€“100 chars
host stringrequired
Hostname or IP address for SSH.1โ€“255 chars
port integer
SSH port.1โ€“65535, default 22
sshUser string
SSH login user.1โ€“64 chars, default "root"
sshKey stringrequired
Private SSH key (PEM). Stored encrypted; never returned.1โ€“20000 chars
notes string
Free-text notes.max 1000 chars
monthlyCostMinor integer
Monthly hosting cost in minor currency units (used by the server economics report).0โ€“100000000, default 0
costCurrency string
ISO currency code; stored upper-cased.exactly 3 chars, default "GEL"

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
  • The connection is not tested on create; call POST /api/servers/test-connection first or POST /api/servers/{id}/test afterwards.
  • siteCount is always 0 in this response.
  • Unlike POST /api/fleet/servers this route has no personal-access-token restriction: an admin token can call it.
cURL
curl -X POST "https://panel.example.com/api/servers" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "web-1",
    "host": "web1.example.com",
    "port": 22,
    "sshUser": "root",
    "sshKey": "-----BEGIN OPENSSH PRIVATE KEY-----\nโ€ฆ\n-----END OPENSSH PRIVATE KEY-----",
    "notes": "Main shop server",
    "monthlyCostMinor": 4500,
    "costCurrency": "GEL"
}'
201Response ยท application/json
{
    "id": 12,
    "name": "web-1",
    "kind": "remote",
    "host": "web1.example.com",
    "port": 22,
    "sshUser": "root",
    "hasKey": true,
    "sshKeyFingerprint": "9f2c4a1be07d3c55",
    "status": "unknown",
    "lastSeenAt": null,
    "scriptsSynced": false,
    "notes": null,
    "createdAt": "2026-11-27T10:00:00.000Z",
    "monthlyCostMinor": 4500,
    "costCurrency": "GEL",
    "siteCount": 0
}
PATCH /api/servers/{id}

Update a server

Updates the given fields. For the local (panel host) row only name, notes, monthlyCostMinor and costCurrency are applied; host, port, sshUser and sshKey are silently ignored. A new sshKey resets scriptsSynced to false so the helper scripts are copied again.

  • Token or session
  • Admin
  • Audit: server.updated

Path parameters

id integerrequired
Server id.

Body

name string
Display name.1โ€“100 chars
host string
Hostname or IP address for SSH.1โ€“255 chars
port integer
SSH port.1โ€“65535
sshUser string
SSH login user.1โ€“64 chars
sshKey string
Private SSH key (PEM). Stored encrypted; never returned.1โ€“20000 chars
notes string
Free-text notes.max 1000 chars
monthlyCostMinor integer
Monthly hosting cost in minor currency units (used by the server economics report).0โ€“100000000
costCurrency string
ISO currency code; stored upper-cased.exactly 3 chars

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id.
  • siteCount is always 0 in this response.
  • An empty sshKey is ignored (the key is only replaced when a non-empty value is sent).
  • The id is converted with Number() without validation; a non-numeric id makes the Prisma lookup throw, which surfaces as a 500 instead of a 404.
cURL
curl -X PATCH "https://panel.example.com/api/servers/3" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "web-1 (Frankfurt)",
    "notes": "Upgraded to 4 GB",
    "monthlyCostMinor": 6000
}'
200Response ยท application/json
{
    "id": 12,
    "name": "web-1 (Frankfurt)",
    "kind": "remote",
    "host": "web1.example.com",
    "port": 22,
    "sshUser": "root",
    "hasKey": true,
    "sshKeyFingerprint": "9f2c4a1be07d3c55",
    "status": "online",
    "lastSeenAt": "2026-11-27T10:00:00.000Z",
    "scriptsSynced": true,
    "notes": "Upgraded to 4 GB",
    "createdAt": "2026-11-27T10:00:00.000Z",
    "monthlyCostMinor": 6000,
    "costCurrency": "GEL",
    "siteCount": 0
}
DELETE /api/servers/{id}

Delete a server

Deletes a remote server. Its agent connection is dropped and in-memory fleet data is forgotten; related fleet rows (enroll tokens, traffic, alert events, run targets) are removed by cascade.

  • Token or session
  • Admin
  • Audit: server.deleted

Path parameters

id integerrequired
Server id.

Errors

400
The local server cannot be deleted. The id is the panel host (kind "local").
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id.
409
Server still hosts <n> site(s). Move or remove them first. At least one site has this serverId.
  • Nothing is uninstalled on the remote machine.
  • The id is converted with Number() without validation; a non-numeric id makes the Prisma lookup throw, which surfaces as a 500 instead of a 404.
cURL
curl -X DELETE "https://panel.example.com/api/servers/3" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "ok": true
}
POST /api/servers/test-connection

Test unsaved SSH settings

Opens an SSH connection with the given (unsaved) settings and runs a short identity probe (uname -sr; id -un), 15-second timeout. Always answers 200: a failed connection is reported as ok:false with the error text.

  • Token or session
  • Admin

Body

host stringrequired
Hostname or IP address.1โ€“255 chars
port integer
SSH port.1โ€“65535, default 22
sshUser string
SSH login user.1โ€“64 chars, default "root"
sshKey stringrequired
Private SSH key (PEM). Not stored.1โ€“20000 chars

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
  • On failure the body is {"ok": false, "error": "<stderr or message, max 300 chars>"} (or "Unexpected response from server" when the marker is missing).
  • Not audited.
cURL
curl -X POST "https://panel.example.com/api/servers/test-connection" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "host": "web1.example.com",
    "port": 22,
    "sshUser": "root",
    "sshKey": "-----BEGIN OPENSSH PRIVATE KEY-----\nโ€ฆ\n-----END OPENSSH PRIVATE KEY-----"
}'
200Response ยท application/json
{
    "ok": true,
    "info": "Linux 6.8.0-45-generic root"
}
POST /api/servers/{id}/test

Test a saved server

Runs the identity probe over the saved SSH settings (or locally for the panel host) and updates the server's status (online/offline) and lastSeenAt. A failed probe still answers 200 with ok:false.

  • Token or session
  • Admin
  • Audit: server.test

Path parameters

id integerrequired
Server id.

Errors

400
This server has no SSH access configured. Remote server without a host (agent-only fleet server).
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id.
  • The id is converted with Number() without validation; a non-numeric id makes the Prisma lookup throw, which surfaces as a 500 instead of a 404.
cURL
curl -X POST "https://panel.example.com/api/servers/3/test" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "ok": true,
    "info": "Linux 6.8.0-45-generic root"
}
GET /api/servers/{id}/health

Get live server stats

Reads CPU load, RAM, root disk, swap and uptime: in-process for the panel host, one SSH round-trip (15-second timeout) for a remote server. Updates status/lastSeenAt as a side effect.

  • Token or session
  • Admin

Path parameters

id integerrequired
Server id.

Errors

400
This server has no SSH access configured. Remote server without a host (agent-only fleet server).
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id.
502
<stderr or error message> The SSH call failed (message clipped to 300 chars, "Failed to reach server" when empty). The server is marked offline.
  • For a remote server cpu.percent is load1 / cores ร— 100 (capped at 100), not a measured CPU usage.
  • The id is converted with Number() without validation; a non-numeric id makes the Prisma lookup throw, which surfaces as a 500 instead of a 404.
cURL
curl "https://panel.example.com/api/servers/3/health" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "ok": true,
    "stats": {
        "cpu": {
            "load1": 0.32,
            "load5": 0.28,
            "load15": 0.25,
            "cores": 2,
            "percent": 16
        },
        "ram": {
            "total": 4123000000,
            "used": 1610000000,
            "free": 812000000,
            "percent": 39
        },
        "disk": {
            "total": 80000000000,
            "used": 31000000000,
            "percent": 39
        },
        "swap": {
            "total": 1073741824,
            "used": 0,
            "percent": 0
        },
        "uptime": 864000,
        "hostname": "web-1"
    }
}
POST /api/servers/{id}/prepare

Bootstrap a server

Copies the panel's helper scripts to the remote server if needed and starts bootstrap-server.sh over SSH, which installs the full LEMP stack (PHP 8.1โ€“8.5 with extensions, nginx, MariaDB, Composer, Supervisor, Certbot, Redis). Answers at once; follow the output with GET /api/servers/{id}/prepare/stream.

  • Token or session
  • Admin
  • Audit: server.prepare

Path parameters

id integerrequired
Server id.

Errors

400
The local server is already set up and cannot be bootstrapped from the panel. The id is the panel host.
400
This server has no SSH access configured. Remote server without a host (agent-only fleet server).
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id.
409
A bootstrap is already running for this server. A previous bootstrap of this server has not finished.
502
Could not reach the server: <error> Copying the helper scripts over SSH failed.
  • The bootstrap runs in the background without a TTY; its state lives in memory only (a panel restart loses the stream).
  • Can take many minutes.
  • The id is converted with Number() without validation; a non-numeric id makes the Prisma lookup throw, which surfaces as a 500 instead of a 404.
cURL
curl -X POST "https://panel.example.com/api/servers/3/prepare" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "started": true
}
GET /api/servers/{id}/prepare/stream

Stream bootstrap output

Server-Sent Events of a server bootstrap. Replays the output buffered so far as {"line": "โ€ฆ"} events, then streams new output, and ends with {"done": true, "status": "success"|"failed"}. When no bootstrap is running it replays any buffered output and sends {"done": true, "status": "idle"} immediately.

  • Token or session
  • Admin
  • Server-Sent Events

Path parameters

id integerrequired
Server id.

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
  • Each event is "data: <json>\n\n"; keep-alive comments ": ka" are sent every 20 s.
  • "line" events carry raw output chunks, not necessarily whole lines.
  • The output buffer is kept 30 minutes after the bootstrap finished.
  • Does not check that the server exists: an unknown id simply answers {done:true,status:"idle"}.
  • Send the token in the Authorization header (the web client uses fetch, not EventSource).
cURL
curl -N "https://panel.example.com/api/servers/3/prepare/stream" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท text/event-stream

SSE stream of {line} events ending with {done, status}.

Fleet

Live metrics, inventory, logs, actions, alert rules and settings of fleet servers.

GET /api/fleet/servers

List fleet servers

Lists every server with its fleet state: agent status and version, the channel actions would use right now, permissions, organisation fields, site and open-alert counts and the latest metrics. Also returns the agent version this panel ships.

  • Token or session
  • Admin

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
  • FleetServer: id, name, kind (local|remote), host, hasSsh, sshStatus, agentStatus (none|pending|online|offline), agentVersion, agentArch, agentMode (monitor|control|null), agentAllowTerminal, agentAllowCommands, agentLastSeenAt, agentAutoUpdate, agentUpdateAvailable, channel (agent|ssh|local|none โ€” the channel actions would use right now), location, groupName, tags, provider, notes, preferredChannel (auto|agent|ssh), latencyMs, maintenanceUntil, offlineAlertSecs, terminalEnabled, commandsEnabled, aiActions, siteCount, system{os,kernel,hostname,cpuModel,cores,memTotal,bootTime,capabilities}, latest{at,source,m}|null, activeAlerts. Never contains the SSH key or agent key hash/prefix.
  • Personal access tokens can call all fleet read endpoints.
cURL
curl "https://panel.example.com/api/fleet/servers" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "servers": [
        {
            "id": 12,
            "name": "web-1",
            "kind": "remote",
            "host": "web1.example.com",
            "hasSsh": true,
            "sshStatus": "online",
            "agentStatus": "online",
            "agentVersion": "1.4.0",
            "agentArch": "amd64",
            "agentMode": "control",
            "agentAllowTerminal": true,
            "agentAllowCommands": false,
            "agentLastSeenAt": "2026-11-27T10:00:00.000Z",
            "agentAutoUpdate": true,
            "agentUpdateAvailable": false,
            "channel": "agent",
            "location": "Frankfurt",
            "groupName": "production",
            "tags": [
                "web",
                "php"
            ],
            "provider": "Hetzner",
            "notes": null,
            "preferredChannel": "auto",
            "latencyMs": 24,
            "maintenanceUntil": null,
            "offlineAlertSecs": 120,
            "terminalEnabled": false,
            "commandsEnabled": false,
            "aiActions": [
                "services"
            ],
            "siteCount": 3,
            "system": {
                "os": "Ubuntu 24.04.1 LTS",
                "kernel": "6.8.0-45-generic",
                "hostname": "web-1",
                "cpuModel": "AMD EPYC Processor",
                "cores": 2,
                "memTotal": 4123000000,
                "bootTime": 1794909600,
                "capabilities": [
                    "systemd",
                    "docker",
                    "apt",
                    "journal"
                ]
            },
            "latest": {
                "at": "2026-11-27T10:00:00.000Z",
                "source": "agent",
                "m": {
                    "ts": 1795773600,
                    "cpu": {
                        "percent": 12.4,
                        "perCore": [
                            10.2,
                            14.6
                        ],
                        "load1": 0.32,
                        "load5": 0.28,
                        "load15": 0.25,
                        "cores": 2,
                        "steal": 0,
                        "iowait": 0.4
                    },
                    "mem": {
                        "total": 4123000000,
                        "used": 1610000000,
                        "available": 2400000000,
                        "swapTotal": 1073741824,
                        "swapUsed": 0
                    },
                    "disks": [
                        {
                            "mount": "/",
                            "fs": "ext4",
                            "device": "/dev/vda1",
                            "total": 80000000000,
                            "used": 31000000000,
                            "inodesTotal": 5000000,
                            "inodesUsed": 410000
                        }
                    ],
                    "diskIO": {
                        "readBps": 1200,
                        "writeBps": 54000,
                        "readOps": 1,
                        "writeOps": 9
                    },
                    "net": {
                        "rxBps": 18000,
                        "txBps": 42000,
                        "rxTotal": 912000000000,
                        "txTotal": 1340000000000,
                        "ifaces": [
                            {
                                "name": "eth0",
                                "rxBps": 18000,
                                "txBps": 42000,
                                "rxTotal": 912000000000,
                                "txTotal": 1340000000000
                            }
                        ]
                    },
                    "uptime": 864000,
                    "procs": 142,
                    "tcpConns": 37
                }
            },
            "activeAlerts": 0
        }
    ],
    "shippedAgentVersion": "1.4.0"
}
POST /api/fleet/servers

Add an agent-only server

Creates a remote server without SSH access, to be monitored through the Orchestrator agent only. Generate the install command afterwards with POST /api/fleet/servers/{id}/agent/enroll-token. SSH servers are created with POST /api/servers.

  • Token or session
  • Admin
  • No access tokens
  • Audit: fleet.server.created

Body

name stringrequired
Display name (trimmed).1โ€“100 chars, not blank
location string
Free-text location, e.g. "Frankfurt".max 100 chars; blank โ†’ null
groupName string
Group used to organise servers and scope alert rules.max 100 chars; blank โ†’ null
tags array
Tags (trimmed, blanks and duplicates dropped).max 20 items, each max 40 chars
provider string
Hosting provider, free text.max 100 chars; blank โ†’ null
notes string
Free-text notes.max 1000 chars; blank โ†’ null

Errors

400
A name is required. name is only whitespace.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Not available to the AI: this can only be done by an admin in the panel. Called with a personal access token (orch_โ€ฆ).
  • New servers start with all permissions off (terminalEnabled, commandsEnabled false, aiActions []), offlineAlertSecs 120 and agentAutoUpdate true.
  • An agent-only server can never host sites.
cURL
curl -X POST "https://panel.example.com/api/fleet/servers" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "db-2",
    "location": "Frankfurt",
    "groupName": "production",
    "tags": [
        "db"
    ],
    "provider": "Hetzner",
    "notes": "Replica"
}'
201Response ยท application/json
{
    "id": 13,
    "name": "db-2",
    "kind": "remote",
    "host": null,
    "hasSsh": false,
    "sshStatus": "unknown",
    "agentStatus": "none",
    "agentVersion": null,
    "agentArch": null,
    "agentMode": null,
    "agentAllowTerminal": null,
    "agentAllowCommands": null,
    "agentLastSeenAt": null,
    "agentAutoUpdate": true,
    "agentUpdateAvailable": false,
    "channel": "none",
    "location": "Frankfurt",
    "groupName": "production",
    "tags": [
        "db"
    ],
    "provider": "Hetzner",
    "notes": "Replica",
    "preferredChannel": "auto",
    "latencyMs": null,
    "maintenanceUntil": null,
    "offlineAlertSecs": 120,
    "terminalEnabled": false,
    "commandsEnabled": false,
    "aiActions": [],
    "siteCount": 0,
    "system": {
        "os": null,
        "kernel": null,
        "hostname": null,
        "cpuModel": null,
        "cores": null,
        "memTotal": null,
        "bootTime": null,
        "capabilities": []
    },
    "latest": null,
    "activeAlerts": 0
}
GET /api/fleet/servers/{id}

Get a fleet server

Returns one server (FleetServer) and the newest known inventory (services, containers, pending updates) from either the agent or an earlier SSH read, without contacting the server.

  • Token or session
  • Admin

Path parameters

id integerrequired
Server id.

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id (or the id is not a positive integer).
  • FleetServer: id, name, kind (local|remote), host, hasSsh, sshStatus, agentStatus (none|pending|online|offline), agentVersion, agentArch, agentMode (monitor|control|null), agentAllowTerminal, agentAllowCommands, agentLastSeenAt, agentAutoUpdate, agentUpdateAvailable, channel (agent|ssh|local|none โ€” the channel actions would use right now), location, groupName, tags, provider, notes, preferredChannel (auto|agent|ssh), latencyMs, maintenanceUntil, offlineAlertSecs, terminalEnabled, commandsEnabled, aiActions, siteCount, system{os,kernel,hostname,cpuModel,cores,memTotal,bootTime,capabilities}, latest{at,source,m}|null, activeAlerts. Never contains the SSH key or agent key hash/prefix.
  • Use GET /api/fleet/servers/{id}/inventory?refresh=1 to read a fresh inventory.
cURL
curl "https://panel.example.com/api/fleet/servers/3" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "server": {
        "id": 12,
        "name": "web-1",
        "kind": "remote",
        "host": "web1.example.com",
        "hasSsh": true,
        "sshStatus": "online",
        "agentStatus": "online",
        "agentVersion": "1.4.0",
        "agentArch": "amd64",
        "agentMode": "control",
        "agentAllowTerminal": true,
        "agentAllowCommands": false,
        "agentLastSeenAt": "2026-11-27T10:00:00.000Z",
        "agentAutoUpdate": true,
        "agentUpdateAvailable": false,
        "channel": "agent",
        "location": "Frankfurt",
        "groupName": "production",
        "tags": [
            "web",
            "php"
        ],
        "provider": "Hetzner",
        "notes": null,
        "preferredChannel": "auto",
        "latencyMs": 24,
        "maintenanceUntil": null,
        "offlineAlertSecs": 120,
        "terminalEnabled": false,
        "commandsEnabled": false,
        "aiActions": [
            "services"
        ],
        "siteCount": 3,
        "system": {
            "os": "Ubuntu 24.04.1 LTS",
            "kernel": "6.8.0-45-generic",
            "hostname": "web-1",
            "cpuModel": "AMD EPYC Processor",
            "cores": 2,
            "memTotal": 4123000000,
            "bootTime": 1794909600,
            "capabilities": [
                "systemd",
                "docker",
                "apt",
                "journal"
            ]
        },
        "latest": {
            "at": "2026-11-27T10:00:00.000Z",
            "source": "agent",
            "m": {
                "ts": 1795773600,
                "cpu": {
                    "percent": 12.4,
                    "perCore": [
                        10.2,
                        14.6
                    ],
                    "load1": 0.32,
                    "load5": 0.28,
                    "load15": 0.25,
                    "cores": 2,
                    "steal": 0,
                    "iowait": 0.4
                },
                "mem": {
                    "total": 4123000000,
                    "used": 1610000000,
                    "available": 2400000000,
                    "swapTotal": 1073741824,
                    "swapUsed": 0
                },
                "disks": [
                    {
                        "mount": "/",
                        "fs": "ext4",
                        "device": "/dev/vda1",
                        "total": 80000000000,
                        "used": 31000000000,
                        "inodesTotal": 5000000,
                        "inodesUsed": 410000
                    }
                ],
                "diskIO": {
                    "readBps": 1200,
                    "writeBps": 54000,
                    "readOps": 1,
                    "writeOps": 9
                },
                "net": {
                    "rxBps": 18000,
                    "txBps": 42000,
                    "rxTotal": 912000000000,
                    "txTotal": 1340000000000,
                    "ifaces": [
                        {
                            "name": "eth0",
                            "rxBps": 18000,
                            "txBps": 42000,
                            "rxTotal": 912000000000,
                            "txTotal": 1340000000000
                        }
                    ]
                },
                "uptime": 864000,
                "procs": 142,
                "tcpConns": 37
            }
        },
        "activeAlerts": 0
    },
    "inventory": {
        "at": "2026-11-27T10:00:00.000Z",
        "inv": {
            "services": [
                {
                    "name": "nginx.service",
                    "description": "A high performance web server",
                    "active": "active",
                    "sub": "running",
                    "enabled": "enabled"
                }
            ],
            "failedUnits": [],
            "docker": {
                "available": true,
                "containers": [
                    {
                        "id": "a3f9c21b7d10",
                        "name": "redis",
                        "image": "redis:7",
                        "state": "running",
                        "status": "Up 3 days",
                        "cpu": 0.4,
                        "memBytes": 12000000
                    }
                ]
            },
            "updates": {
                "manager": "apt",
                "count": 4,
                "security": 1,
                "rebootRequired": false,
                "packages": [
                    {
                        "name": "openssl",
                        "current": "3.0.13-0ubuntu3.4",
                        "available": "3.0.13-0ubuntu3.5",
                        "security": true
                    }
                ]
            },
            "os": "Ubuntu 24.04.1 LTS",
            "kernel": "6.8.0-45-generic",
            "hostname": "web-1",
            "timezone": "Etc/UTC"
        }
    }
}
PATCH /api/fleet/servers/{id}

Update fleet settings

Updates organisation fields, channel preference, alerting, maintenance window, agent auto-update and the server's permissions (web terminal, free commands, AI permissions). Granting anything new โ€” turning terminalEnabled or commandsEnabled on, or adding an AI permission the server did not have โ€” requires an active 2FA step-up. Turning things off or removing AI permissions does not.

  • Token or session
  • Admin
  • 2FA step-up
  • Audit: fleet.server.updated

Path parameters

id integerrequired
Server id.

Body

name string
Display name (trimmed).1โ€“100 chars, not blank
location string
Location; null or blank clears it.max 100 chars, nullable
groupName string
Group; null or blank clears it.max 100 chars, nullable
tags array
Replaces the tags (trimmed, blanks and duplicates dropped).max 20 items, each max 40 chars
provider string
Provider; null or blank clears it.max 100 chars, nullable
notes string
Notes; null or blank clears it.max 1000 chars, nullable
preferredChannel string
auto: agent when online, else SSH (or the panel host locally); agent: agent only; ssh: SSH (or local) first, agent as fallback.one of: auto, agent, ssh
offlineAlertSecs integer
Seconds offline before the "server offline" alert fires; 0 disables it.0 or 30โ€“604800
maintenanceUntil string
ISO date-time until which alerts are muted; null or "" ends the window.max 40 chars, nullable, parsable date, at most 366 days ahead
terminalEnabled boolean
Allow the web terminal (WebSocket /api/terminal/fleet/term/{serverId}). Turning it on needs elevation.not allowed for personal access tokens
commandsEnabled boolean
Allow free commands and saved scripts from the panel. Turning it on needs elevation.not allowed for personal access tokens
aiActions array
Replaces what personal access tokens (AI / MCP) may do on this server. Adding a permission needs elevation.max 10 items, each one of: services, docker, reboot, packages, scripts; not allowed for personal access tokens
agentAutoUpdate boolean
Let the panel update the agent automatically when it connects with an older version (control mode only).

Errors

400
A maintenance window can last at most one year. maintenanceUntil is more than 366 days in the future.
400
A name is required. name is only whitespace.
400
Invalid maintenance end time. maintenanceUntil is not a parsable date.
400
The offline alert delay must be 0 (off) or at least 30 seconds. offlineAlertSecs is 1โ€“29.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Confirm with your 2FA code first (step-up required). The browser session has no active 2FA step-up (POST /api/fleet/elevate). The body also carries "code": "elevation_required".
403
Forbidden: insufficient role Your role may not call this endpoint.
403
The AI cannot change the permissions of a server (terminal, commands, AI actions). A personal access token sent terminalEnabled, commandsEnabled or aiActions (even to turn them off).
404
Server not found No server with this id (or the id is not a positive integer).
  • The audit action is fleet.server.permissions when terminalEnabled, commandsEnabled or aiActions was sent, else fleet.server.updated.
  • Elevation error body: {"error": "Confirm with your 2FA code first (step-up required).", "code": "elevation_required"} (403).
  • aiActions is stored in the fixed order services, docker, reboot, packages, scripts.
  • Elevation is only needed when granting; organisation fields alone never need it.
cURL
curl -X PATCH "https://panel.example.com/api/fleet/servers/3" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "groupName": "production",
    "tags": [
        "web",
        "php"
    ],
    "preferredChannel": "auto",
    "offlineAlertSecs": 300,
    "maintenanceUntil": "2026-11-27T12:00:00.000Z",
    "aiActions": [
        "services",
        "docker"
    ]
}'
200Response ยท application/json
{
    "id": 12,
    "name": "web-1",
    "kind": "remote",
    "host": "web1.example.com",
    "hasSsh": true,
    "sshStatus": "online",
    "agentStatus": "online",
    "agentVersion": "1.4.0",
    "agentArch": "amd64",
    "agentMode": "control",
    "agentAllowTerminal": true,
    "agentAllowCommands": false,
    "agentLastSeenAt": "2026-11-27T10:00:00.000Z",
    "agentAutoUpdate": true,
    "agentUpdateAvailable": false,
    "channel": "agent",
    "location": "Frankfurt",
    "groupName": "production",
    "tags": [
        "web",
        "php"
    ],
    "provider": "Hetzner",
    "notes": null,
    "preferredChannel": "auto",
    "latencyMs": 24,
    "maintenanceUntil": "2026-11-27T12:00:00.000Z",
    "offlineAlertSecs": 300,
    "terminalEnabled": false,
    "commandsEnabled": false,
    "aiActions": [
        "services",
        "docker"
    ],
    "siteCount": 3,
    "system": {
        "os": "Ubuntu 24.04.1 LTS",
        "kernel": "6.8.0-45-generic",
        "hostname": "web-1",
        "cpuModel": "AMD EPYC Processor",
        "cores": 2,
        "memTotal": 4123000000,
        "bootTime": 1794909600,
        "capabilities": [
            "systemd",
            "docker",
            "apt",
            "journal"
        ]
    },
    "latest": {
        "at": "2026-11-27T10:00:00.000Z",
        "source": "agent",
        "m": {
            "ts": 1795773600,
            "cpu": {
                "percent": 12.4,
                "perCore": [
                    10.2,
                    14.6
                ],
                "load1": 0.32,
                "load5": 0.28,
                "load15": 0.25,
                "cores": 2,
                "steal": 0,
                "iowait": 0.4
            },
            "mem": {
                "total": 4123000000,
                "used": 1610000000,
                "available": 2400000000,
                "swapTotal": 1073741824,
                "swapUsed": 0
            },
            "disks": [
                {
                    "mount": "/",
                    "fs": "ext4",
                    "device": "/dev/vda1",
                    "total": 80000000000,
                    "used": 31000000000,
                    "inodesTotal": 5000000,
                    "inodesUsed": 410000
                }
            ],
            "diskIO": {
                "readBps": 1200,
                "writeBps": 54000,
                "readOps": 1,
                "writeOps": 9
            },
            "net": {
                "rxBps": 18000,
                "txBps": 42000,
                "rxTotal": 912000000000,
                "txTotal": 1340000000000,
                "ifaces": [
                    {
                        "name": "eth0",
                        "rxBps": 18000,
                        "txBps": 42000,
                        "rxTotal": 912000000000,
                        "txTotal": 1340000000000
                    }
                ]
            },
            "uptime": 864000,
            "procs": 142,
            "tcpConns": 37
        }
    },
    "activeAlerts": 0
}
GET /api/fleet/servers/{id}/metrics

Get metrics history

Returns the stored metric samples of a server over a time range, averaged into at most 400 points. For the panel host the classic monitor samples (serverId null) are included.

  • Token or session
  • Admin

Path parameters

id integerrequired
Server id.

Query parameters

range string
Time range.one of: 1h, 6h, 24h, 7d, 30d; default 24h

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id (or the id is not a positive integer).
  • swap, load1, rx, tx, dr and dw are null when the source could not measure them (e.g. SSH samples have no network or disk I/O).
  • When downsampled, t is the middle of each bucket.
cURL
curl "https://panel.example.com/api/fleet/servers/3/metrics" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "points": [
        {
            "t": "2026-11-27T10:00:00.000Z",
            "cpu": 12.4,
            "ram": 39.1,
            "disk": 38.8,
            "swap": 0,
            "load1": 0.32,
            "rx": 18000,
            "tx": 42000,
            "dr": 1200,
            "dw": 54000
        },
        {
            "t": "2026-11-27T10:01:00.000Z",
            "cpu": 14.1,
            "ram": 39.1,
            "disk": 38.8,
            "swap": 0,
            "load1": 0.32,
            "rx": 18000,
            "tx": 42000,
            "dr": 1200,
            "dw": 54000
        }
    ]
}
GET /api/fleet/servers/{id}/traffic

Get network traffic per day

Returns received/transmitted bytes per day (from the agent's interface counters, panel-local dates) for the last N days, plus totals for this and last calendar month.

  • Token or session
  • Admin

Path parameters

id integerrequired
Server id.

Query parameters

days integer
Number of days in the "days" list, ending today.1โ€“400, default 62

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id (or the id is not a positive integer).
  • Only agent-connected servers record traffic; others return empty lists and zero totals.
  • Monthly totals are computed independently of "days".
cURL
curl "https://panel.example.com/api/fleet/servers/3/traffic" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "days": [
        {
            "date": "2026-11-26",
            "rx": 4800000000,
            "tx": 9100000000
        },
        {
            "date": "2026-11-27",
            "rx": 2100000000,
            "tx": 3900000000
        }
    ],
    "thisMonth": {
        "rx": 98000000000,
        "tx": 170000000000
    },
    "lastMonth": {
        "rx": 120000000000,
        "tx": 210000000000
    }
}
GET /api/fleet/servers/{id}/processes

List top processes

Reads the current top processes live from the server through the agent, SSH or the panel host itself.

  • Token or session
  • Admin

Path parameters

id integerrequired
Server id.

Query parameters

sort string
Sort by CPU or memory.one of: cpu, mem; default cpu
limit integer
Maximum number of processes.1โ€“100, default 50

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id (or the id is not a positive integer).
409
The agent of this server is offline (the server is set to use the agent only). preferredChannel is "agent" and no agent is connected.
409
The agent of this server is offline and the server has no SSH access configured. Agent-only server (no host) whose agent is not connected.
409
This server is not reachable: the agent is not connected and SSH access is not configured. No agent connected and no SSH host + key.
502
SSH command failed: <stderr> SSH channel: the remote read script failed (the panel host itself: "Local command failed: <stderr>").
502
The agent of this server is offline. The agent disconnected while answering.
502
The agent rejected the request: <reason> The agent answered with an error.
504
The agent did not answer in time. Agent request timed out.
  • Agent request timeout 20 s.
cURL
curl "https://panel.example.com/api/fleet/servers/3/processes" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "processes": [
        {
            "pid": 1234,
            "user": "www-data",
            "name": "php-fpm8.3",
            "cmd": "php-fpm: pool www",
            "cpu": 6.2,
            "mem": 2.1,
            "rss": 88000000
        }
    ],
    "channel": "agent"
}
GET /api/fleet/servers/{id}/inventory

Get server inventory

Returns the server's services, failed units, Docker containers, pending package updates and OS facts. Without refresh a cached inventory is returned when it is fresh (agent: any age, SSH: under 60 s); with refresh=1 it is read live.

  • Token or session
  • Admin

Path parameters

id integerrequired
Server id.

Query parameters

refresh string
Force a live read ("1" or "true").max 5 chars

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id (or the id is not a positive integer).
502
SSH command failed: <stderr> SSH channel: the remote read script failed (the panel host itself: "Local command failed: <stderr>").
502
The agent of this server is offline. The agent disconnected while answering.
502
The agent rejected the request: <reason> The agent answered with an error.
504
The agent did not answer in time. Agent request timed out.
  • When no channel is available it answers 200 with the cached inventory (or inventory:null, at:null) and channel "none" instead of an error.
  • A failed live read without refresh falls back to the cached inventory; with refresh=1 the error is returned.
  • Agent request timeout 90 s.
cURL
curl "https://panel.example.com/api/fleet/servers/3/inventory" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "inventory": {
        "services": [
            {
                "name": "nginx.service",
                "description": "A high performance web server",
                "active": "active",
                "sub": "running",
                "enabled": "enabled"
            }
        ],
        "failedUnits": [],
        "docker": {
            "available": true,
            "containers": [
                {
                    "id": "a3f9c21b7d10",
                    "name": "redis",
                    "image": "redis:7",
                    "state": "running",
                    "status": "Up 3 days",
                    "cpu": 0.4,
                    "memBytes": 12000000
                }
            ]
        },
        "updates": {
            "manager": "apt",
            "count": 4,
            "security": 1,
            "rebootRequired": false,
            "packages": [
                {
                    "name": "openssl",
                    "current": "3.0.13-0ubuntu3.4",
                    "available": "3.0.13-0ubuntu3.5",
                    "security": true
                }
            ]
        },
        "os": "Ubuntu 24.04.1 LTS",
        "kernel": "6.8.0-45-generic",
        "hostname": "web-1",
        "timezone": "Etc/UTC"
    },
    "at": "2026-11-27T10:00:00.000Z",
    "channel": "agent"
}
POST /api/fleet/servers/{id}/actions

Run a fixed action

Starts one of the fixed, validated server actions (service control, reboot, package update, Docker container control) as a background run and answers immediately with the run id. Follow it with GET /api/fleet/runs/{id}/stream or GET /api/fleet/runs/{id}. Needs no 2FA step-up and does not depend on the commandsEnabled switch.

  • Token or session
  • Admin
  • โฑ 60 per minute per credential (Authorization header; per IP without one)
  • Audit: fleet.action.<action>

Path parameters

id integerrequired
Server id.

Body

action stringrequired
The action to run.one of: service.start, service.stop, service.restart, service.reload, service.status, reboot, reboot.cancel, packages.update, docker.start, docker.stop, docker.restart
args object
Action arguments. Only the keys listed for the action are accepted.max 4 properties; values string (max 200 chars) or number; default {}
args.name string
service.* actions (required for them): systemd unit name, e.g. "nginx" or "php8.3-fpm.service".pattern ^[A-Za-z0-9@:._-]{1,128}$
args.id string
docker.* actions (required for them): container id or name.pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$
args.delayMin integer
reboot only: minutes until the reboot.0โ€“10080, default 0
args.mode string
packages.update only: apt upgrade or dist-upgrade.one of: upgrade, dist-upgrade; default upgrade

Errors

400
Invalid container id. docker.*: args.id missing or not matching the pattern.
400
Invalid service name. service.*: args.name missing or not matching the pattern.
400
The reboot delay must be between 0 and 10080 minutes. reboot: delayMin not an integer in range.
400
The update mode must be "upgrade" or "dist-upgrade". packages.update: invalid mode.
400
Unexpected argument "<key>" for <action>. args contains a key the action does not take (reboot.cancel takes none).
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
403
The AI is not allowed to run <action> on this server (the "<permission>" AI permission is off in the panel). Personal access token and the server's aiActions lack the permission the action needs.
404
Server not found No server with this id (or the id is not a positive integer).
409
The agent of this server is offline (the server is set to use the agent only). preferredChannel is "agent" and no agent is connected.
409
The agent of this server is offline and the server has no SSH access configured. Agent-only server (no host) whose agent is not connected.
409
This server is not reachable: the agent is not connected and SSH access is not configured. No agent connected and no SSH host + key.
429
Rate limit exceeded, retry in โ€ฆ Too many requests โ€” see the Retry-After header.
  • Allowed actions โ€” args โ€” AI permission needed by personal access tokens โ€” timeout: service.start โ€” args {name: string} โ€” AI permission "services" โ€” timeout 180 s; service.stop โ€” args {name: string} โ€” AI permission "services" โ€” timeout 180 s; service.restart โ€” args {name: string} โ€” AI permission "services" โ€” timeout 180 s; service.reload โ€” args {name: string} โ€” AI permission "services" โ€” timeout 180 s; service.status โ€” args {name: string} โ€” no AI permission needed (read-only, always allowed for tokens) โ€” timeout 30 s; reboot โ€” args {delayMin?: integer 0โ€“10080, default 0} โ€” AI permission "reboot" โ€” timeout 60 s; reboot.cancel โ€” no args ({}) โ€” AI permission "reboot" โ€” timeout 60 s; packages.update โ€” args {mode?: "upgrade" | "dist-upgrade", default "upgrade"} โ€” AI permission "packages" โ€” timeout 3600 s; docker.start โ€” args {id: string} โ€” AI permission "docker" โ€” timeout 180 s; docker.stop โ€” args {id: string} โ€” AI permission "docker" โ€” timeout 180 s; docker.restart โ€” args {id: string} โ€” AI permission "docker" โ€” timeout 180 s.
  • The audit action is "fleet.action." + action, e.g. fleet.action.service.restart.
  • The run's command text is "<action> <key>=<value> โ€ฆ", e.g. "service.restart name=nginx"; its source is "mcp" for personal access tokens, else "ui".
  • The result (success | failed | timeout | offline | denied | cancelled, exit code, output) is only known from the run. An agent in monitor mode refuses actions; that target ends as "denied".
  • An unknown action is rejected by the schema enum (400 FST_ERR_VALIDATION).
  • The rate-limit key hashes the Authorization header, so each session/token has its own budget.
cURL
curl -X POST "https://panel.example.com/api/fleet/servers/3/actions" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "service.restart",
    "args": {
        "name": "nginx"
    }
}'
200Response ยท application/json
{
    "runId": 345
}
GET /api/fleet/servers/{id}/logs/stream

Stream server logs

Server-Sent Events of a server's journal or a log file under /var/log: {"line": "โ€ฆ"} per line, then {"done": true, "status": "<status>"} (plus "error" when it failed). With follow=1 new lines keep streaming until the client disconnects (closing the connection stops the remote process) or 2 hours pass.

  • Token or session
  • Admin
  • Server-Sent Events

Path parameters

id integerrequired
Server id.

Query parameters

source string
Where to read from: the systemd journal or a log file.one of: journal, file; default journal
unit string
systemd unit to filter the journal by (source=journal only).max 128 chars; pattern ^[A-Za-z0-9@:._-]{1,128}$
path string
Log file to read (required when source=file).absolute path under /var/log/, 10โ€“512 chars, characters [A-Za-z0-9._@:+=,~/-], no "..", no trailing slash, must be normalised
lines integer
Number of most recent lines.1โ€“2000, default 200
follow string
Keep streaming new lines ("1" or "true").max 5 chars; "1"/"true" = on
grep string
Only lines containing this text.max 200 chars, no control characters

Errors

400
Invalid service name. unit does not match the allowed pattern.
400
Lines must be between 1 and 2000. lines out of range (normally caught by the schema first).
400
The filter text is too long or contains control characters. grep contains control characters.
400
The log file must be an absolute path under /var/log (no ".."). source=file with a missing or invalid path.
400
The log source must be "journal" or "file". Invalid source (normally caught by the schema first).
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id (or the id is not a positive integer).
409
The agent of this server is offline (the server is set to use the agent only). preferredChannel is "agent" and no agent is connected.
409
The agent of this server is offline and the server has no SSH access configured. Agent-only server (no host) whose agent is not connected.
409
This server is not reachable: the agent is not connected and SSH access is not configured. No agent connected and no SSH host + key.
  • Validation and channel errors are answered as JSON before the stream starts.
  • When the read fails a "[<status>] <error>" line is sent before the done event.
  • status is one of success, failed, timeout, offline, cancelled, denied.
  • One-shot reads time out after 60 s.
  • Keep-alive comments ": ka" every 20 s. Send the token in the Authorization header.
cURL
curl -N "https://panel.example.com/api/fleet/servers/3/logs/stream" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท text/event-stream

SSE stream of {line} events ending with {done, status[, error]}.

GET /api/fleet/servers/{id}/logs

Read server logs

Non-streaming variant for scripts and the AI: reads the last lines of the journal or a log file under /var/log and returns them as JSON. follow is ignored.

  • Token or session
  • Admin

Path parameters

id integerrequired
Server id.

Query parameters

source string
Where to read from: the systemd journal or a log file.one of: journal, file; default journal
unit string
systemd unit to filter the journal by (source=journal only).max 128 chars; pattern ^[A-Za-z0-9@:._-]{1,128}$
path string
Log file to read (required when source=file).absolute path under /var/log/, 10โ€“512 chars, characters [A-Za-z0-9._@:+=,~/-], no "..", no trailing slash, must be normalised
lines integer
Number of most recent lines.1โ€“2000, default 200
grep string
Only lines containing this text.max 200 chars, no control characters
follow string
Accepted but ignored (always one-shot).max 5 chars

Errors

400
Invalid service name. unit does not match the allowed pattern.
400
Lines must be between 1 and 2000. lines out of range (normally caught by the schema first).
400
The filter text is too long or contains control characters. grep contains control characters.
400
The log file must be an absolute path under /var/log (no ".."). source=file with a missing or invalid path.
400
The log source must be "journal" or "file". Invalid source (normally caught by the schema first).
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id (or the id is not a positive integer).
409
The agent of this server is offline (the server is set to use the agent only). preferredChannel is "agent" and no agent is connected.
409
The agent of this server is offline and the server has no SSH access configured. Agent-only server (no host) whose agent is not connected.
409
This server is not reachable: the agent is not connected and SSH access is not configured. No agent connected and no SSH host + key.
502
Could not read the logs: <error> The read failed and produced no output ("Could not read the logs." when there is no error text).
  • If the read failed but produced some output, it answers 200 with that output and the non-success status.
  • One-shot reads time out after 60 s.
cURL
curl "https://panel.example.com/api/fleet/servers/3/logs" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "lines": [
        "Nov 27 10:00:01 web-1 nginx[812]: 2026/11/27 10:00:01 [notice] signal process started"
    ],
    "status": "success",
    "channel": "agent"
}
POST /api/fleet/servers/{id}/agent/enroll-token

Create an agent install command

Creates a one-time enrollment token (valid 1 hour) and returns the install command to run as root on the server. Any older unused token of the server is invalidated, and a server without an agent is marked "pending".

  • Token or session
  • Admin
  • No access tokens
  • Audit: fleet.agent.enroll_token

Path parameters

id integerrequired
Server id.

Body

mode string
Agent mode the install command is generated for: control (actions, commands, terminal possible) or monitor (read-only).one of: control, monitor; default control

Errors

400
The panel could not determine its public https:// URL. Set panel_public_url in Settings first. The panel_public_url setting is not a clean https origin and the request did not arrive over https with a usable Host header.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Not available to the AI: this can only be done by an admin in the panel. Called with a personal access token (orch_โ€ฆ).
404
Server not found No server with this id (or the id is not a positive integer).
  • Only the sha256 of the token is stored; it is shown once.
  • The agent exchanges it at POST /api/fleet/agent/enroll.
  • Does not need a 2FA step-up.
cURL
curl -X POST "https://panel.example.com/api/fleet/servers/3/agent/enroll-token" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "control"
}'
200Response ยท application/json
{
    "command": "curl -fsSL https://panel.example.com/api/fleet/install.sh | sudo bash -s -- --token 3q2-7wEXAMPLEtokenEXAMPLEtokenEXAMPLE1234 --mode control",
    "token": "3q2-7wEXAMPLEtokenEXAMPLEtokenEXAMPLE1234",
    "expiresAt": "2026-11-27T11:00:00.000Z"
}
POST /api/fleet/servers/{id}/agent/install-ssh

Install the agent over SSH

Installs the agent on a server that has SSH access: creates an enrollment token and runs the installer (fetched with curl or wget from this panel) over SSH as a background run (kind "action", command "agent.install mode=<mode>", timeout 900 s). A non-root SSH user must have passwordless sudo, which is checked first.

  • Token or session
  • Admin
  • No access tokens
  • Audit: fleet.agent.install_ssh

Path parameters

id integerrequired
Server id.

Body

mode string
Agent mode the install command is generated for: control (actions, commands, terminal possible) or monitor (read-only).one of: control, monitor; default control

Errors

400
The SSH user needs root or passwordless sudo (sudo -n) to install the agent. Non-root SSH user without passwordless sudo.
400
The panel could not determine its public https:// URL. Set panel_public_url in Settings first. The panel_public_url setting is not a clean https origin and the request did not arrive over https with a usable Host header.
400
This server has no SSH access configured. No host or key, or the panel host itself.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Not available to the AI: this can only be done by an admin in the panel. Called with a personal access token (orch_โ€ฆ).
404
Server not found No server with this id (or the id is not a positive integer).
502
Could not connect over SSH. The sudo probe (non-root user) could not connect.
  • Follow the output with GET /api/fleet/runs/{runId}/stream.
  • Does not need a 2FA step-up.
cURL
curl -X POST "https://panel.example.com/api/fleet/servers/3/agent/install-ssh" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "control"
}'
200Response ยท application/json
{
    "runId": 346
}
POST /api/fleet/servers/{id}/agent/update

Update the agent

Asks the connected agent to update itself to the binary this panel ships (download URL and sha256 are sent to the agent) and waits for its answer. Works only for agents in control mode.

  • Token or session
  • Admin
  • No access tokens
  • Audit: fleet.agent.update

Path parameters

id integerrequired
Server id.

Errors

401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Not available to the AI: this can only be done by an admin in the panel. Called with a personal access token (orch_โ€ฆ).
404
Server not found No server with this id (or the id is not a positive integer).
409
The agent of this server is offline. No agent connected for this server (or the hub is not running).
502
The agent could not update itself: <error> The agent answered with an error, or the panel could not prepare the update (e.g. monitor mode, binaries not built, panel URL unknown, unsupported architecture).
  • The audit entry (with from/to versions) is written before the update is attempted, whatever the outcome.
  • Takes no body.
cURL
curl -X POST "https://panel.example.com/api/fleet/servers/3/agent/update" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "ok": true
}
POST /api/fleet/servers/{id}/agent/revoke

Revoke the agent key

Deletes the server's agent key and unused enrollment tokens, disconnects a connected agent and sets the agent status to "none". The agent keeps running on the server but can no longer connect until it is enrolled again.

  • Token or session
  • Admin
  • No access tokens
  • Audit: fleet.agent.revoked

Path parameters

id integerrequired
Server id.

Errors

401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Not available to the AI: this can only be done by an admin in the panel. Called with a personal access token (orch_โ€ฆ).
404
Server not found No server with this id (or the id is not a positive integer).
  • Takes no body.
  • Nothing is uninstalled on the server.
cURL
curl -X POST "https://panel.example.com/api/fleet/servers/3/agent/revoke" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "ok": true
}
GET /api/fleet/alerts

List fleet alert events

Lists fleet alert events (what fired, on which server, when it cleared), newest first. Alert rules themselves are managed under /api/alerts.

  • Token or session
  • Admin

Query parameters

active string
Only unresolved events ("1" or "true").max 5 chars
serverId integer
Only events of this server.minimum 1
limit integer
Maximum number of events.1โ€“500, default 100

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
  • kind is one of cpu, ram, disk, swap, load, inode, offline, disk_forecast, service_failed.
  • ruleId is null for built-in alerts (offline, disk forecast).
cURL
curl "https://panel.example.com/api/fleet/alerts" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "events": [
        {
            "id": 77,
            "serverId": 12,
            "serverName": "web-1",
            "ruleId": 3,
            "kind": "cpu",
            "message": "CPU above 90% for 5 minutes",
            "value": 94.2,
            "startedAt": "2026-11-27T10:00:00.000Z",
            "resolvedAt": null
        }
    ]
}
GET /api/fleet/servers/{id}/forecast

Get disk-full forecast

Returns the current usage of each mounted disk and, for the root disk only, the estimated days until it is full from a linear trend over the last 7 days.

  • Token or session
  • Admin

Path parameters

id integerrequired
Server id.

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Server not found No server with this id (or the id is not a positive integer).
  • daysLeft is null for every mount except "/", and for "/" when there are fewer than 10 samples, less than 6 hours of history, no growing trend or more than 3650 days left; 0 when already full.
  • Per-mount usage comes from the latest live metrics; without them only "/" from the stored samples is listed (or an empty list).
cURL
curl "https://panel.example.com/api/fleet/servers/3/forecast" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "mounts": [
        {
            "mount": "/",
            "usedPct": 38.8,
            "daysLeft": 41.5
        },
        {
            "mount": "/var/lib/docker",
            "usedPct": 61.2,
            "daysLeft": null
        }
    ]
}

Fleet commands and scripts

Commands on many servers, saved scripts and run history.

GET /api/fleet/elevate

Get 2FA step-up state

Tells whether the caller has two-factor authentication enabled and whether the current browser session is elevated (2FA step-up), and until when.

  • Token or session
  • Admin

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
  • For a personal access token elevated is always false and until null (tokens can never be elevated).
  • Elevation is in memory only: a panel restart ends every elevation.
cURL
curl "https://panel.example.com/api/fleet/elevate" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "totpEnabled": true,
    "elevated": true,
    "until": "2026-11-27T10:15:00.000Z"
}
POST /api/fleet/elevate

Confirm a 2FA step-up

Verifies a current TOTP code of the caller (the same authenticator as login, ยฑ30 s) and elevates the current browser session for 15 minutes. Elevation is needed for free commands, running and editing saved scripts from the panel, granting server permissions and the fleet terminal.

  • Token or session
  • Admin
  • No access tokens
  • โฑ 10 per minute per IP
  • Audit: fleet.elevated

Body

code stringrequired
Current 6โ€“8 digit TOTP code (whitespace is removed).6โ€“12 chars; must be 6โ€“8 digits after removing whitespace

Errors

400
A 2FA step-up needs a browser session. No bearer session token could be identified.
400
Two-factor authentication is not enabled for your account. Enable it first to use this feature. The user has no TOTP configured.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Invalid 2FA code. Wrong code, wrong format, or a code that was just used (for login or a step-up) within the last 2 minutes.
403
The AI cannot confirm a 2FA step-up. Called with a personal access token.
429
Rate limit exceeded, retry in โ€ฆ Too many requests โ€” see the Retry-After header.
429
Too many wrong 2FA codes. Try again in 10 minutes. 5 wrong codes within 10 minutes for this user.
  • A wrong code writes the audit action fleet.elevation_failed.
  • The elevation is bound to the exact JWT used for this request (sha256 of the token); other tokens of the same user, including a new login, are not elevated.
  • In memory only: a panel restart drops every elevation.
cURL
curl -X POST "https://panel.example.com/api/fleet/elevate" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "492039"
}'
200Response ยท application/json
{
    "totpEnabled": true,
    "elevated": true,
    "until": "2026-11-27T10:15:00.000Z"
}
POST /api/fleet/runs

Run a command or script

Runs a free shell command or a saved script on 1โ€“50 servers in the background (at most 5 servers at a time) and answers immediately with the run id. Targets that are not allowed are not executed and end as "denied" with the reason in their output. From the panel both kinds need an active 2FA step-up; personal access tokens can only run scripts marked aiAllowed.

  • Token or session
  • Admin
  • 2FA step-up
  • โฑ 30 per minute per credential (Authorization header; per IP without one)
  • Audit: fleet.command

Body

kind stringrequired
command = free shell command; script = a saved script.one of: command, script
serverIds arrayrequired
Target server ids (duplicates are merged).1โ€“50 items, integers โ‰ฅ 1
command string
kind=command: the shell command (required, not blank).1โ€“20000 chars
timeoutSec integer
kind=command: per-server timeout in seconds (ignored for scripts, which use their own timeoutSecs).1โ€“3600, default 300
scriptId integer
kind=script: id of the saved script (required).minimum 1

Errors

400
A command is required. kind=command and command is missing or blank.
400
A script is required. kind=script without scriptId.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Confirm with your 2FA code first (step-up required). The browser session has no active 2FA step-up (POST /api/fleet/elevate). The body also carries "code": "elevation_required".
403
Forbidden: insufficient role Your role may not call this endpoint.
403
The AI cannot run free commands. Use a saved script that is allowed for the AI. kind=command with a personal access token.
403
This script is not allowed for the AI (enable "AI may run" on the script in the panel). Personal access token and the script has aiAllowed false.
404
Script not found kind=script and no script with scriptId.
404
Server not found One of serverIds does not exist.
429
Rate limit exceeded, retry in โ€ฆ Too many requests โ€” see the Retry-After header.
  • The audit action is fleet.command for kind=command (meta includes the first 2000 chars of the command) and fleet.script.run for kind=script.
  • Per target, kind=command needs the server's commandsEnabled switch, else the target is denied with "Free commands are disabled for this server (enable them in its settings).".
  • Per target, kind=script from the panel needs commandsEnabled (else denied: "Commands and scripts are disabled for this server (enable \"free commands\" in its settings).") and from a personal access token needs "scripts" in the server's aiActions (else denied: "The AI may not run scripts on this server (the \"scripts\" AI permission is off in the panel).").
  • The switches are checked again when each target starts; the agent additionally enforces its own mode / allowCommands (refusals end as "denied").
  • A target whose server cannot be reached ends as "offline".
  • Personal access tokens need no elevation for scripts (they are gated by aiAllowed + the "scripts" permission).
  • Target status values: pending, running, success, failed, timeout, offline, denied, cancelled. Run kind: command | script | action. Run source: ui | mcp (personal access token). finishedAt is null while the run is still executing.
  • Elevation error body: {"error": "Confirm with your 2FA code first (step-up required).", "code": "elevation_required"} (403). Elevate with POST /api/fleet/elevate; it lasts 15 minutes for the browser session (JWT) it was confirmed with.
cURL
curl -X POST "https://panel.example.com/api/fleet/runs" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "script",
    "serverIds": [
        12,
        13
    ],
    "scriptId": 4
}'
200Response ยท application/json
{
    "runId": 347
}
GET /api/fleet/runs

List runs

Lists runs (actions, commands, scripts, agent installs) newest first with their per-server targets, without output. Page with nextCursor.

  • Token or session
  • Admin

Query parameters

limit integer
Page size.1โ€“100, default 30
cursor integer
Return runs with an id lower than this (the nextCursor of the previous page).minimum 1
serverId integer
Only runs that targeted this server.minimum 1

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
  • Target status values: pending, running, success, failed, timeout, offline, denied, cancelled. Run kind: command | script | action. Run source: ui | mcp (personal access token). finishedAt is null while the run is still executing.
cURL
curl "https://panel.example.com/api/fleet/runs" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "runs": [
        {
            "id": 345,
            "kind": "action",
            "scriptId": null,
            "scriptName": null,
            "command": "service.restart name=nginx",
            "source": "ui",
            "createdByEmail": "[email protected]",
            "createdAt": "2026-11-27T10:00:00.000Z",
            "finishedAt": "2026-11-27T10:00:04.000Z",
            "targets": [
                {
                    "id": 901,
                    "serverId": 12,
                    "serverName": "web-1",
                    "status": "success",
                    "channel": "agent",
                    "exitCode": 0,
                    "output": null,
                    "startedAt": "2026-11-27T10:00:01.000Z",
                    "finishedAt": "2026-11-27T10:00:04.000Z"
                }
            ]
        }
    ],
    "nextCursor": null
}
GET /api/fleet/runs/{id}

Get a run

Returns one run with each target's status, exit code and output. While the run is executing, unfinished targets show their live output so far.

  • Token or session
  • Admin

Path parameters

id integerrequired
Run id.

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Run not found No run with this id.
  • Target status values: pending, running, success, failed, timeout, offline, denied, cancelled. Run kind: command | script | action. Run source: ui | mcp (personal access token). finishedAt is null while the run is still executing.
  • channel is agent, ssh or null (null for the panel host or when not executed).
  • Poll this, or use GET /api/fleet/runs/{id}/stream, to wait for completion.
cURL
curl "https://panel.example.com/api/fleet/runs/3" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "id": 345,
    "kind": "action",
    "scriptId": null,
    "scriptName": null,
    "command": "service.restart name=nginx",
    "source": "ui",
    "createdByEmail": "[email protected]",
    "createdAt": "2026-11-27T10:00:00.000Z",
    "finishedAt": "2026-11-27T10:00:04.000Z",
    "targets": [
        {
            "id": 901,
            "serverId": 12,
            "serverName": "web-1",
            "status": "success",
            "channel": "agent",
            "exitCode": 0,
            "output": "",
            "startedAt": "2026-11-27T10:00:01.000Z",
            "finishedAt": "2026-11-27T10:00:04.000Z"
        }
    ]
}
GET /api/fleet/runs/{id}/stream

Stream run output

Server-Sent Events of a run. First replays what already happened, then streams: {"serverId": n, "chunk": "โ€ฆ"} for output, {"serverId": n, "status": "<status>", "exitCode": n|null} on each status change, and finally {"done": true}, after which the stream closes.

  • Token or session
  • Admin
  • Server-Sent Events

Path parameters

id integerrequired
Run id.

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
404
Run not found No run with this id.
  • For runs no longer in memory (finished more than 30 minutes ago, or from before a panel restart) the stored output and final status of each target are replayed from the database, followed by {done:true}.
  • Chunks are at most 64 KiB.
  • Target status values: pending, running, success, failed, timeout, offline, denied, cancelled. Run kind: command | script | action. Run source: ui | mcp (personal access token). finishedAt is null while the run is still executing.
  • Keep-alive comments ": ka" every 20 s. Send the token in the Authorization header.
cURL
curl -N "https://panel.example.com/api/fleet/runs/3/stream" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท text/event-stream

SSE stream of chunk/status events ending with {done:true}.

POST /api/fleet/runs/{id}/cancel

Cancel a run

Cancels a run that is still executing: running targets are stopped (the remote process is killed) and pending ones are marked cancelled. Answers ok:true even when the run had already finished.

  • Token or session
  • Admin
  • Audit: fleet.run.cancelled

Path parameters

id integerrequired
Run id.

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Not available to the AI: this can only be done by an admin in the panel. A personal access token tried to cancel a run started from the panel (source "ui").
404
Run not found No run with this id.
  • Personal access tokens may cancel only runs they (any token) started (source "mcp").
  • Takes no body; needs no elevation.
  • Only runs executing in this panel process can be cancelled (audit meta wasRunning tells whether it was).
cURL
curl -X POST "https://panel.example.com/api/fleet/runs/3/cancel" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "ok": true
}
GET /api/fleet/scripts

List saved scripts

Lists all saved scripts by name, including their body.

  • Token or session
  • Admin

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
  • Personal access tokens can read all scripts (including ones not allowed for the AI).
cURL
curl "https://panel.example.com/api/fleet/scripts" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "scripts": [
        {
            "id": 4,
            "name": "Clear tmp",
            "description": "Remove files older than 7 days from /tmp",
            "body": "find /tmp -type f -mtime +7 -delete",
            "timeoutSecs": 300,
            "aiAllowed": false,
            "createdAt": "2026-11-27T10:00:00.000Z",
            "updatedAt": "2026-11-27T10:00:00.000Z"
        }
    ]
}
POST /api/fleet/scripts

Create a saved script

Saves a shell script that can later be run on one or many servers with POST /api/fleet/runs. Needs an active 2FA step-up.

  • Token or session
  • Admin
  • No access tokens
  • 2FA step-up
  • Audit: fleet.script.created

Body

name stringrequired
Unique script name (trimmed).1โ€“100 chars, not blank
description string
Short description; blank โ†’ null.max 500 chars
body stringrequired
Shell script executed with bash on each target.1โ€“100000 chars, not blank
timeoutSecs integer
Per-server timeout in seconds.1โ€“3600, default 300
aiAllowed boolean
Whether personal access tokens (AI / MCP) may run it; they also need the "scripts" AI permission on each target server.default false

Errors

400
A name is required. name is only whitespace.
400
The script body is empty. body is only whitespace.
401
Unauthorized No token, or an invalid session.
403
Confirm with your 2FA code first (step-up required). The browser session has no active 2FA step-up (POST /api/fleet/elevate). The body also carries "code": "elevation_required".
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Not available to the AI: this can only be done by an admin in the panel. Called with a personal access token (orch_โ€ฆ).
409
A script with this name already exists. Script names are unique.
  • Elevation error body: {"error": "Confirm with your 2FA code first (step-up required).", "code": "elevation_required"} (403). Elevate with POST /api/fleet/elevate; it lasts 15 minutes for the browser session (JWT) it was confirmed with.
  • The body is stored as sent (not trimmed).
cURL
curl -X POST "https://panel.example.com/api/fleet/scripts" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Clear tmp",
    "description": "Remove files older than 7 days from /tmp",
    "body": "find /tmp -type f -mtime +7 -delete",
    "timeoutSecs": 300,
    "aiAllowed": false
}'
201Response ยท application/json
{
    "id": 4,
    "name": "Clear tmp",
    "description": "Remove files older than 7 days from /tmp",
    "body": "find /tmp -type f -mtime +7 -delete",
    "timeoutSecs": 300,
    "aiAllowed": false,
    "createdAt": "2026-11-27T10:00:00.000Z",
    "updatedAt": "2026-11-27T10:00:00.000Z"
}
PATCH /api/fleet/scripts/{id}

Update a saved script

Changes the given fields of a saved script. Needs an active 2FA step-up.

  • Token or session
  • Admin
  • No access tokens
  • 2FA step-up
  • Audit: fleet.script.updated

Path parameters

id integerrequired
Script id.

Body

name string
Unique script name (trimmed).1โ€“100 chars, not blank
description string
Short description; null or blank clears it.max 500 chars, nullable
body string
Shell script executed with bash on each target.1โ€“100000 chars, not blank
timeoutSecs integer
Per-server timeout in seconds.1โ€“3600
aiAllowed boolean
Whether personal access tokens (AI / MCP) may run it; they also need the "scripts" AI permission on each target server.

Errors

400
A name is required. name is only whitespace.
400
The script body is empty. body is only whitespace.
401
Unauthorized No token, or an invalid session.
403
Confirm with your 2FA code first (step-up required). The browser session has no active 2FA step-up (POST /api/fleet/elevate). The body also carries "code": "elevation_required".
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Not available to the AI: this can only be done by an admin in the panel. Called with a personal access token (orch_โ€ฆ).
404
Script not found No saved script with this id.
409
A script with this name already exists. Script names are unique.
  • Elevation error body: {"error": "Confirm with your 2FA code first (step-up required).", "code": "elevation_required"} (403). Elevate with POST /api/fleet/elevate; it lasts 15 minutes for the browser session (JWT) it was confirmed with.
  • The token and elevation checks run before the script is looked up.
cURL
curl -X PATCH "https://panel.example.com/api/fleet/scripts/3" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "body": "find /tmp -type f -mtime +3 -delete",
    "aiAllowed": true
}'
200Response ยท application/json
{
    "id": 4,
    "name": "Clear tmp",
    "description": "Remove files older than 7 days from /tmp",
    "body": "find /tmp -type f -mtime +3 -delete",
    "timeoutSecs": 300,
    "aiAllowed": true,
    "createdAt": "2026-11-27T10:00:00.000Z",
    "updatedAt": "2026-11-27T10:05:00.000Z"
}
DELETE /api/fleet/scripts/{id}

Delete a saved script

Deletes a saved script. Past runs keep the script id and name. Needs an active 2FA step-up.

  • Token or session
  • Admin
  • No access tokens
  • 2FA step-up
  • Audit: fleet.script.deleted

Path parameters

id integerrequired
Script id.

Errors

401
Unauthorized No token, or an invalid session.
403
Confirm with your 2FA code first (step-up required). The browser session has no active 2FA step-up (POST /api/fleet/elevate). The body also carries "code": "elevation_required".
403
Forbidden: insufficient role Your role may not call this endpoint.
403
Not available to the AI: this can only be done by an admin in the panel. Called with a personal access token (orch_โ€ฆ).
404
Script not found No saved script with this id.
  • Elevation error body: {"error": "Confirm with your 2FA code first (step-up required).", "code": "elevation_required"} (403). Elevate with POST /api/fleet/elevate; it lasts 15 minutes for the browser session (JWT) it was confirmed with.
cURL
curl -X DELETE "https://panel.example.com/api/fleet/scripts/3" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "ok": true
}

Fleet live and terminal

WebSockets for live metrics and the server terminal.

WS /api/terminal/fleet/live

Live metrics WebSocket

Browser WebSocket for live fleet metrics. After connecting the server sends {t:"snapshot"} with every server's status, channel and latest metrics; the client then sends {"t":"watch","serverIds":[โ€ฆ]|"all"} and receives {t:"metrics"}, {t:"status"} and {t:"inventory"} events for the watched servers. Watching a server switches its agent to live mode (metrics every 2 s); servers without a connected agent are polled every 10 s (SSH or the panel host).

  • Browser session only
  • Admin
  • WebSocket

Query parameters

token stringrequired
The panel session JWT (browsers cannot set headers on a WebSocket). Personal access tokens are refused.

Errors

401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
1013
The fleet hub is not running on this panel instance. Sent as an error frame, then close code 1013.
4401
Forbidden: administrators only The user's role in the database is not admin (close code 4401).
4401
Invalid token The JWT does not verify (close code 4401).
4401
Unauthorized Sent as {"t":"error","error":"Unauthorized"} then close code 4401: no token, a personal access token, or the user no longer exists.
  • Messages: {t:"metrics", serverId, at, source (agent|ssh|local), m: FleetMetrics}; {t:"status", serverId, agentStatus (online|offline|pending|none), channel (agent|ssh|local|none)}; {t:"inventory", serverId, at} (fetch the inventory over REST).
  • A new watch message replaces the previous watch set; at most 500 server ids; unknown ids are dropped; other message types are ignored; frames over 64 KiB are ignored.
  • Metrics frames are skipped for slow clients (more than 2 MiB buffered).
  • Error "statuses" here are WebSocket close codes, not HTTP statuses: the upgrade itself always succeeds and authentication happens afterwards.
  • The role is read from the database, not from the JWT claim.
JavaScript
// Browser only: WebSockets use the panel's login session, not personal access tokens.
const ws = new WebSocket(`wss://panel.example.com/api/terminal/fleet/live?token=${sessionToken}`);

ws.addEventListener('message', (event) => console.log(event.data));
ws.addEventListener('close', (event) => console.log('closed', event.code));
101Response ยท application/json
{
    "t": "snapshot",
    "servers": [
        {
            "serverId": 12,
            "agentStatus": "online",
            "channel": "agent",
            "latest": {
                "at": "2026-11-27T10:00:00.000Z",
                "source": "agent",
                "m": {
                    "ts": 1795773600,
                    "cpu": {
                        "percent": 12.4,
                        "perCore": [
                            10.2,
                            14.6
                        ],
                        "load1": 0.32,
                        "load5": 0.28,
                        "load15": 0.25,
                        "cores": 2,
                        "steal": 0,
                        "iowait": 0.4
                    },
                    "mem": {
                        "total": 4123000000,
                        "used": 1610000000,
                        "available": 2400000000,
                        "swapTotal": 1073741824,
                        "swapUsed": 0
                    },
                    "disks": [
                        {
                            "mount": "/",
                            "fs": "ext4",
                            "device": "/dev/vda1",
                            "total": 80000000000,
                            "used": 31000000000,
                            "inodesTotal": 5000000,
                            "inodesUsed": 410000
                        }
                    ],
                    "diskIO": {
                        "readBps": 1200,
                        "writeBps": 54000,
                        "readOps": 1,
                        "writeOps": 9
                    },
                    "net": {
                        "rxBps": 18000,
                        "txBps": 42000,
                        "rxTotal": 912000000000,
                        "txTotal": 1340000000000,
                        "ifaces": [
                            {
                                "name": "eth0",
                                "rxBps": 18000,
                                "txBps": 42000,
                                "rxTotal": 912000000000,
                                "txTotal": 1340000000000
                            }
                        ]
                    },
                    "uptime": 864000,
                    "procs": 142,
                    "tcpConns": 37
                }
            }
        }
    ]
}
WS /api/terminal/fleet/term/{serverId}

Server terminal WebSocket

Interactive shell on a fleet server through the agent (control mode with terminal allowed) or SSH (`ssh -tt`, starting in the login user's home), honouring the server's preferredChannel. Requires an admin browser session, the server's terminalEnabled switch and an active 2FA step-up confirmed with the same JWT. Same message format as the site terminal.

  • Browser session only
  • Admin
  • 2FA step-up
  • WebSocket
  • Audit: fleet.terminal.connect

Path parameters

serverId integerrequired
Server id.positive integer

Query parameters

token stringrequired
The panel session JWT. Must be the token the 2FA step-up was confirmed with. Personal access tokens are refused.
cols integer
Terminal width.10โ€“500, default 120
rows integer
Terminal height.5โ€“200, default 30

Errors

401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
4401
Unauthorized Sent as {"type":"error","error":โ€ฆ} then close code 4401: no token, a personal access token or unknown user. Also "Invalid token" and "Forbidden: administrators only" with code 4401.
4403
Confirm your two-factor code first (2FA step-up), then open the terminal again. This JWT has no active elevation (close code 4403).
4403
No terminal is available for this server: the agent is not connected and SSH access is not configured. Neither channel is available.
4403
The agent could not open a terminal. Opening the PTY through the agent failed (or the agent's error message).
4403
The agent of this server is offline (the server is set to use the agent only). preferredChannel "agent" and no usable agent.
4403
The web terminal is disabled for this server. Turn it on in the server settings first. terminalEnabled is off (close code 4403).
4403
forbidden: monitor mode The connected agent runs in monitor mode and no SSH fallback applies.
4403
forbidden: terminal disabled on this server The agent's own config does not allow a terminal and no SSH fallback applies.
4404
Server not found Unknown or invalid serverId (close code 4404).
  • fleet.terminal.disconnect is audited when the socket closes.
  • Error "statuses" are WebSocket close codes sent after an error frame; the HTTP upgrade itself always succeeds.
  • Keystrokes and resizes sent before the shell is ready are queued (up to 200 messages).
  • Elevation is per JWT: elevate with POST /api/fleet/elevate using the same token, then connect within 15 minutes.
  • SSH start-up errors are sent as the error text of the failure (close code 4403).
JavaScript
// Browser only: WebSockets use the panel's login session, not personal access tokens.
const ws = new WebSocket(`wss://panel.example.com/api/terminal/fleet/term/3?token=${sessionToken}`);

ws.addEventListener('message', (event) => console.log(event.data));
ws.addEventListener('close', (event) => console.log('closed', event.code));
101Response ยท application/json
{
    "type": "output",
    "data": "root@web-1:~# "
}

Fleet agent

Endpoints the monitoring agent and its installer use.

POST /api/fleet/agent/enroll

Enroll an agent

Called by the agent installer: exchanges a one-time enrollment token (from the panel's install command) for the server's permanent agent key. The token is consumed atomically, any previous agent key of the server stops working and a still-connected agent is disconnected.

  • Public
  • โฑ 10 per minute per IP
  • Audit: fleet.agent_enrolled

Body

token stringrequired
The enrollment token from the install command (trimmed).16โ€“200 chars
mode stringrequired
The agent's own configured mode (stored as the server's agentMode; the token's mode is only recorded in the audit log).one of: control, monitor
hostname string
Machine hostname (stored in the server's system info).max 255 chars
arch string
CPU architecture, e.g. amd64 or arm64.max 16 chars; stored only when it matches ^[a-z0-9_]{1,16}$
version string
Agent version.max 64 chars
machineId string
Machine id (e.g. /etc/machine-id).max 128 chars

Errors

401
Invalid enrollment token. Unknown token (or its server no longer exists).
401
This enrollment token has expired. Generate a new install command in the panel. Older than 1 hour.
401
This enrollment token was already used. Generate a new install command in the panel. The token was used before, or a concurrent request consumed it first.
429
Rate limit exceeded, retry in โ€ฆ Too many requests โ€” see the Retry-After header.
  • No panel login: the enrollment token is the credential.
  • Only the sha256 of the agent key is stored. The agent then connects to the WebSocket /api/terminal/fleet/agent with Authorization: Bearer <agentKey>.
  • The server's agent status becomes "pending" until the agent connects.
  • The body schema has no additionalProperties:false, so unknown fields are accepted and ignored.
  • Protocol details: apps/agent/PROTOCOL.md.
cURL
curl -X POST "https://panel.example.com/api/fleet/agent/enroll" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "3q2-7wEXAMPLEtokenEXAMPLEtokenEXAMPLE1234",
    "mode": "control",
    "hostname": "web-1",
    "arch": "amd64",
    "version": "1.4.0",
    "machineId": "5f1c0a8e2b7d4c9a8f3e6d2b1a0c9e8f"
}'
200Response ยท application/json
{
    "serverId": 12,
    "agentKey": "oa_12_EXAMPLEagentKeyEXAMPLEagentKeyEXAMPLE12"
}
GET /api/fleet/install.sh

Download the agent installer

Returns the agent installer shell script with this panel's public URL baked in (no secrets). Used as `curl -fsSL https://<panel>/api/fleet/install.sh | sudo bash -s -- --token <token> --mode control|monitor`. When the panel cannot determine its public https URL, it returns a script that prints an error and exits 1.

  • Public

Errors

404
scripts/agent-install.sh is missing on this panel. The installer file is missing from the panel installation.
  • The panel URL is the panel_public_url setting when set, else the https origin of the request (Host + X-Forwarded-Proto / CF-Visitor).
  • The "no URL" fallback script is still answered with 200, so `curl -f` does not fail โ€” the script itself exits 1.
  • Uncertain: the 404 path sends a JSON object after Content-Type text/x-shellscript was already set; Fastify may refuse to serialize it and answer 500 instead.
cURL
curl "https://panel.example.com/api/fleet/install.sh"
200Response ยท text/x-shellscript

The installer script (charset utf-8, Cache-Control: no-store).

GET /api/fleet/agent/binary/{file}

Download an agent binary

Downloads a prebuilt agent binary or its sha256 checksum file from the panel (strict allowlist of file names). Used by the installer and by agent self-updates.

  • Public

Path parameters

file stringrequired
File to download.one of: orchestrator-agent-linux-amd64, orchestrator-agent-linux-arm64, orchestrator-agent-linux-amd64.sha256, orchestrator-agent-linux-arm64.sha256, and the aliases amd64, arm64, amd64.sha256, arm64.sha256

Errors

404
Agent binaries are not built on this panel โ€” run scripts/build-agent.sh The file does not exist in apps/agent/dist.
404
Unknown agent file. file is not in the allowlist.
  • The arch aliases (amd64, arm64) return the full binary orchestrator-agent-linux-<arch>; the Content-Disposition filename is always the full name.
  • Headers: Cache-Control: no-cache, X-Content-Type-Options: nosniff.
cURL
curl "https://panel.example.com/api/fleet/agent/binary/orchestrator-agent-linux-amd64"
200Response ยท application/octet-stream

The binary (application/octet-stream) or, for .sha256 files, the checksum as text/plain; charset=utf-8. Sent as an attachment with Content-Length.

WS /api/terminal/fleet/agent

Agent WebSocket

The persistent WebSocket the installed agent keeps open to the panel: it pushes hello, metrics and inventory and receives requests (inventory, processes, action, exec, logs, PTY, update). The agent key is checked before the upgrade; a bad key gets a plain HTTP 401 and never becomes a WebSocket.

  • Agent key
  • โฑ 30 per minute per IP
  • WebSocket

Headers

Authorization stringrequired
Bearer <agentKey> from POST /api/fleet/agent/enroll.pattern ^Bearer oa_[1-9][0-9]{0,9}_[A-Za-z0-9_-]{20,128}$

Errors

401
Invalid agent key. Missing, malformed, revoked or wrong agent key.
429
Rate limit exceeded, retry in โ€ฆ Too many requests โ€” see the Retry-After header.
503
The fleet hub is not running on this panel instance. The fleet hub is not started.
  • Lives under /api/terminal/ because the panel's nginx already upgrades that prefix.
  • A newer connection of the same server replaces the older one (the old socket is closed with code 4409).
  • Not meant for API clients; documented for completeness. Message types are defined in apps/agent/PROTOCOL.md and lib/fleet/contract.ts.
JavaScript
// Browser only: WebSockets use the panel's login session, not personal access tokens.
const ws = new WebSocket(`wss://panel.example.com/api/terminal/fleet/agent`);

ws.addEventListener('message', (event) => console.log(event.data));
ws.addEventListener('close', (event) => console.log('closed', event.code));
101Response ยท application/json
{
    "t": "metrics",
    "ts": 1795773600,
    "cpu": {
        "percent": 12.4,
        "perCore": [
            10.2,
            14.6
        ],
        "load1": 0.32,
        "load5": 0.28,
        "load15": 0.25,
        "cores": 2,
        "steal": 0,
        "iowait": 0.4
    },
    "mem": {
        "total": 4123000000,
        "used": 1610000000,
        "available": 2400000000,
        "swapTotal": 1073741824,
        "swapUsed": 0
    },
    "disks": [
        {
            "mount": "/",
            "fs": "ext4",
            "device": "/dev/vda1",
            "total": 80000000000,
            "used": 31000000000,
            "inodesTotal": 5000000,
            "inodesUsed": 410000
        }
    ],
    "diskIO": {
        "readBps": 1200,
        "writeBps": 54000,
        "readOps": 1,
        "writeOps": 9
    },
    "net": {
        "rxBps": 18000,
        "txBps": 42000,
        "rxTotal": 912000000000,
        "txTotal": 1340000000000,
        "ifaces": [
            {
                "name": "eth0",
                "rxBps": 18000,
                "txBps": 42000,
                "rxTotal": 912000000000,
                "txTotal": 1340000000000
            }
        ]
    },
    "uptime": 864000,
    "procs": 142,
    "tcpConns": 37
}

DigitalOcean

Control the connected DigitalOcean droplet.

GET /api/server/status

Get droplet status

Tells whether DigitalOcean is configured and returns the selected droplet. Without a token it answers configured:false; with a token but no droplet id it asks for a droplet to be selected.

  • Token or session
  • Admin

Errors

401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
  • Credentials come from the settings do_api_token (encrypted) and do_droplet_id.
cURL
curl "https://panel.example.com/api/server/status" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "configured": true,
    "droplet": {
        "id": 412345678,
        "name": "shop-prod",
        "memory": 4096,
        "vcpus": 2,
        "disk": 80,
        "status": "active",
        "created_at": "2026-11-27T10:00:00.000Z",
        "size_slug": "s-2vcpu-4gb",
        "region": {
            "slug": "fra1",
            "name": "Frankfurt 1"
        },
        "networks": {
            "v4": [
                {
                    "ip_address": "203.0.113.10",
                    "type": "public"
                }
            ]
        }
    },
    "needsDropletSelection": false
}
GET /api/server/droplets

List droplets

Lists the droplets of the DigitalOcean account (first 200), used to pick the droplet the panel controls.

  • Token or session
  • Admin

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
  • Only one page of up to 200 droplets is fetched.
cURL
curl "https://panel.example.com/api/server/droplets" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
[
    {
        "id": 412345678,
        "name": "shop-prod",
        "memory": 4096,
        "vcpus": 2,
        "disk": 80,
        "status": "active",
        "created_at": "2026-11-27T10:00:00.000Z",
        "size_slug": "s-2vcpu-4gb",
        "region": {
            "slug": "fra1",
            "name": "Frankfurt 1"
        },
        "networks": {
            "v4": [
                {
                    "ip_address": "203.0.113.10",
                    "type": "public"
                }
            ]
        }
    }
]
GET /api/server/sizes

List droplet sizes

Lists the DigitalOcean sizes that are currently available, for the resize picker.

  • Token or session
  • Admin

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl "https://panel.example.com/api/server/sizes" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
[
    {
        "slug": "s-2vcpu-4gb",
        "memory": 4096,
        "vcpus": 2,
        "disk": 80,
        "transfer": 4,
        "price_monthly": 24,
        "price_hourly": 0.03571,
        "regions": [
            "fra1",
            "ams3"
        ],
        "available": true,
        "description": "Basic"
    }
]
POST /api/server/actions

Run a droplet action

Starts a parameterless DigitalOcean droplet action (power, IPv6, backups toggle, root password reset) on the selected droplet. DigitalOcean executes it asynchronously; poll GET /api/server/actions/{id}.

  • Token or session
  • Admin
  • Audit: server.<type>

Body

type stringrequired
Droplet action type.one of: reboot, power_cycle, power_off, power_on, shutdown, enable_ipv6, enable_backups, disable_backups, password_reset (checked in code)

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
400
No droplet selected. Pick one in Settings first. The do_droplet_id setting is empty.
400
Unsupported action: <type> type is not one of the allowed actions.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The audit action is "server." + type, e.g. server.reboot, server.power_off.
  • power_off, shutdown and power_cycle really stop the production droplet.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl -X POST "https://panel.example.com/api/server/actions" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "reboot"
}'
200Response ยท application/json
{
    "id": 2087263451,
    "status": "in-progress",
    "type": "reboot",
    "started_at": "2026-11-27T10:00:00.000Z",
    "completed_at": null,
    "resource_id": 412345678,
    "resource_type": "droplet",
    "region_slug": "fra1"
}
GET /api/server/actions

List droplet actions

Returns the 30 most recent actions of the selected droplet. Answers an empty array when no droplet is selected.

  • Token or session
  • Admin

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl "https://panel.example.com/api/server/actions" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
[
    {
        "id": 2087263451,
        "status": "completed",
        "type": "reboot",
        "started_at": "2026-11-27T10:00:00.000Z",
        "completed_at": "2026-11-27T10:00:40.000Z",
        "resource_id": 412345678,
        "resource_type": "droplet",
        "region_slug": "fra1"
    }
]
GET /api/server/actions/{id}

Get a droplet action

Returns one DigitalOcean action by id, to poll long operations such as resize or snapshot.

  • Token or session
  • Admin

Path parameters

id stringrequired
DigitalOcean action id.not validated

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • Any action of the account can be read (it is not checked against the selected droplet).
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl "https://panel.example.com/api/server/actions/1" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "id": 2087263451,
    "status": "completed",
    "type": "reboot",
    "started_at": "2026-11-27T10:00:00.000Z",
    "completed_at": "2026-11-27T10:00:40.000Z",
    "resource_id": 412345678,
    "resource_type": "droplet",
    "region_slug": "fra1"
}
POST /api/server/resize

Resize the droplet

Starts a resize of the selected droplet to another size; with disk:true the disk is resized too. DigitalOcean requires the droplet to be powered off and reports its own error otherwise.

  • Token or session
  • Admin
  • Audit: server.resize

Body

size stringrequired
Target size slug (see GET /api/server/sizes).not validated by the panel
disk boolean
Also resize the disk.default false

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
400
No droplet selected. The do_droplet_id setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl -X POST "https://panel.example.com/api/server/resize" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "size": "s-4vcpu-8gb",
    "disk": false
}'
200Response ยท application/json
{
    "id": 2087263451,
    "status": "in-progress",
    "type": "resize",
    "started_at": "2026-11-27T10:00:00.000Z",
    "completed_at": null,
    "resource_id": 412345678,
    "resource_type": "droplet",
    "region_slug": "fra1"
}
PATCH /api/server/rename

Rename the droplet

Renames the selected droplet at DigitalOcean.

  • Token or session
  • Admin
  • Audit: server.rename

Body

name stringrequired
New droplet name.1โ€“255 chars

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
400
No droplet selected. The do_droplet_id setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl -X PATCH "https://panel.example.com/api/server/rename" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "shop-prod-fra1"
}'
200Response ยท application/json
{
    "id": 2087263451,
    "status": "in-progress",
    "type": "rename",
    "started_at": "2026-11-27T10:00:00.000Z",
    "completed_at": null,
    "resource_id": 412345678,
    "resource_type": "droplet",
    "region_slug": "fra1"
}
GET /api/server/snapshots

List droplet snapshots

Lists up to 100 snapshots of the selected droplet. Answers an empty array when no droplet is selected.

  • Token or session
  • Admin

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl "https://panel.example.com/api/server/snapshots" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
[
    {
        "id": 168204513,
        "name": "before-upgrade",
        "regions": [
            "fra1"
        ],
        "created_at": "2026-11-27T10:00:00.000Z",
        "resource_id": "412345678",
        "resource_type": "droplet",
        "min_disk_size": 80,
        "size_gigabytes": 12.4,
        "type": "snapshot"
    }
]
POST /api/server/snapshots

Create a droplet snapshot

Starts a snapshot of the selected droplet. DigitalOcean runs it asynchronously; poll the returned action.

  • Token or session
  • Admin
  • Audit: server.snapshot_create

Body

name stringrequired
Snapshot name.1โ€“255 chars

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
400
No droplet selected. The do_droplet_id setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl -X POST "https://panel.example.com/api/server/snapshots" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "before-upgrade"
}'
200Response ยท application/json
{
    "id": 2087263451,
    "status": "in-progress",
    "type": "snapshot",
    "started_at": "2026-11-27T10:00:00.000Z",
    "completed_at": null,
    "resource_id": 412345678,
    "resource_type": "droplet",
    "region_slug": "fra1"
}
DELETE /api/server/snapshots/{id}

Delete a snapshot

Permanently deletes a DigitalOcean snapshot.

  • Token or session
  • Admin
  • Audit: server.snapshot_delete

Path parameters

id stringrequired
DigitalOcean snapshot id.not validated

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • Any snapshot of the account can be deleted (it is not checked against the selected droplet).
  • Does not require a selected droplet.
cURL
curl -X DELETE "https://panel.example.com/api/server/snapshots/1" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
{
    "ok": true
}
GET /api/server/backups

List droplet backups

Lists up to 100 automatic backups of the selected droplet (read-only; enable or disable backups with POST /api/server/actions). Answers an empty array when no droplet is selected.

  • Token or session
  • Admin

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl "https://panel.example.com/api/server/backups" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
[
    {
        "id": 168204600,
        "name": "shop-prod 2026-11-26",
        "regions": [
            "fra1"
        ],
        "created_at": "2026-11-27T10:00:00.000Z",
        "min_disk_size": 80,
        "size_gigabytes": 11.9,
        "type": "backup"
    }
]
GET /api/server/firewalls

List droplet firewalls

Lists the DigitalOcean cloud firewalls (first 100 of the account) that are attached to the selected droplet. Answers an empty array when no droplet is selected.

  • Token or session
  • Admin

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • The body is the DigitalOcean API v2 object passed through unchanged; only a few fields are shown in the example.
cURL
curl "https://panel.example.com/api/server/firewalls" \
  -H "Authorization: Bearer $ORCH_TOKEN"
200Response ยท application/json
[
    {
        "id": "bb4b2611-3d72-467b-8602-280330ecd65c",
        "name": "web",
        "status": "succeeded",
        "inbound_rules": [
            {
                "protocol": "tcp",
                "ports": "443",
                "sources": {
                    "addresses": [
                        "0.0.0.0/0",
                        "::/0"
                    ]
                }
            }
        ],
        "outbound_rules": [
            {
                "protocol": "tcp",
                "ports": "all",
                "destinations": {
                    "addresses": [
                        "0.0.0.0/0",
                        "::/0"
                    ]
                }
            }
        ],
        "droplet_ids": [
            412345678
        ],
        "created_at": "2026-11-27T10:00:00.000Z"
    }
]
POST /api/server/firewalls/{id}/rules

Add firewall rules

Adds inbound and/or outbound rules to a DigitalOcean cloud firewall. The body is forwarded to DigitalOcean unchanged.

  • Token or session
  • Admin
  • Audit: server.firewall_rule_add

Path parameters

id stringrequired
DigitalOcean firewall id (UUID).not validated

Body

inbound_rules array
DigitalOcean inbound rule objects (protocol, ports, sources), passed to DigitalOcean unchanged.array; items not validated
outbound_rules array
DigitalOcean outbound rule objects (protocol, ports, destinations), passed to DigitalOcean unchanged.array; items not validated

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • Any firewall of the account can be changed (it is not checked against the selected droplet).
  • Rule objects are validated by DigitalOcean only.
cURL
curl -X POST "https://panel.example.com/api/server/firewalls/1/rules" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inbound_rules": [
        {
            "protocol": "tcp",
            "ports": "8080",
            "sources": {
                "addresses": [
                    "198.51.100.0/24"
                ]
            }
        }
    ]
}'
200Response ยท application/json
{
    "ok": true
}
DELETE /api/server/firewalls/{id}/rules

Remove firewall rules

Removes the given inbound and/or outbound rules from a DigitalOcean cloud firewall. Takes a JSON body (the rules to remove), forwarded to DigitalOcean unchanged.

  • Token or session
  • Admin
  • Audit: server.firewall_rule_remove

Path parameters

id stringrequired
DigitalOcean firewall id (UUID).not validated

Body

inbound_rules array
DigitalOcean inbound rule objects (protocol, ports, sources), passed to DigitalOcean unchanged.array; items not validated
outbound_rules array
DigitalOcean outbound rule objects (protocol, ports, destinations), passed to DigitalOcean unchanged.array; items not validated

Errors

400
DigitalOcean API token not configured. Add it in Settings โ†’ DigitalOcean. The do_api_token setting is empty.
401
Invalid or expired access token The personal access token is unknown, revoked or expired.
401
Unauthorized No token, or an invalid session.
403
Forbidden: insufficient role Your role may not call this endpoint.
502
<DigitalOcean error message> The DigitalOcean API failed: its own HTTP status (400โ€“599) and message are passed through ("DigitalOcean API error (HTTP <status>)" when it sent none); network errors โ†’ 502 with the error text.
  • This DELETE request carries a JSON body.
  • Any firewall of the account can be changed (it is not checked against the selected droplet).
cURL
curl -X DELETE "https://panel.example.com/api/server/firewalls/1/rules" \
  -H "Authorization: Bearer $ORCH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "inbound_rules": [
        {
            "protocol": "tcp",
            "ports": "8080",
            "sources": {
                "addresses": [
                    "198.51.100.0/24"
                ]
            }
        }
    ]
}'
200Response ยท application/json
{
    "ok": true
}