Servor. docs
fr

Command history API

Read a server's command history over the Servor API with a commands:read token — every command run on a server, searchable and exportable.

Read the recorded command history for a server over the API. Every command run on a server — from the web terminal, run commands or the AI copilot — is saved to a searchable history, and this endpoint lets you pull it for audits, exports or your own dashboards.

This endpoint requires the commands:read scope.

get/v1/servers/{id}/commandsScope: commands:read

List command history for a server

Parameters

  • iduuidpath · required

    The server id.

  • pageintegerquery · optional

    1-based page number (default 1).

  • pageSizeintegerquery · optional

    Items per page, max 100 (default 20).

Example request

curl https://api.servor.app/v1/servers/:id/commands \
  -H "Authorization: Bearer sv_live_..."

Example response

{
  "items": [
    {
      "id": "uuid",
      "command": "uptime",
      "source": "manual",
      "status": "succeeded",
      "exitCode": 0,
      "durationMs": 42,
      "startedAt": "2026-08-20T10:00:00.000Z",
      "finishedAt": "2026-08-20T10:00:00.100Z",
      "createdAt": "2026-08-20T10:00:00.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 20
}

What you get back

GET /v1/servers/{id}/commands returns the command history for one server, most recent first. Each entry records what was run and when, so you can reconstruct who did what over time.

You need the server's id first — get it from the Servers API:

curl https://api.servor.app/v1/servers \
  -H "Authorization: Bearer sv_live_..."

Then read that server's command history:

curl https://api.servor.app/v1/servers/srv_123/commands \
  -H "Authorization: Bearer sv_live_..."

Read-only, always

The API can read command history but never run commands. Execution is signed in your browser, which a token can't do — so there is no "run command" endpoint by design. Use the web terminal or run commands in the dashboard to execute anything — open your servers in Servor.

Notes

  • History includes commands run by the AI copilot, so this endpoint is a good way to review what the copilot did after the fact.
  • Dangerous commands are blocked before they ever run by a shared blacklist, so they won't appear as executed history.
  • A 403 means your token is missing the commands:read scope; a 404 means the server id doesn't exist or isn't in your team. See errors.

See also