Get your free beta license ↗
API operation · load group
POST

/load/sessions

First published 26 Oct 20260.2.17Unchanged since publication

Start a Load monitor session

Who may call it
AdministratorResellerCustomer
Token scope, any of
settingsall
Answers201 Created

Starts a session and returns 201. The server takes a reading every seconds as specified by every, for a total of readings readings. The interval must be a whole number from 2 to 60 seconds and defaults to 5. The number of readings must be a whole number from 1 to 720 and defaults to 100. The request body may contain every, readings, and keep. An invalid body returns 400.

The session runs as a single root process in the transient systemd unit urbestack-load-session. Only one session can run at a time. If a session is already running, the operation returns 409 and reports who started it and when it is due to end. Any administrator with a token that has the settings scope can watch or stop the running session.

The session ends after its last reading, when stopped through DELETE /load/sessions/{id}, or after one minute without a request for its readings. Set keep to true to save the readings when the session ends or to false to discard them. If keep is omitted, the session uses panel.load_keep_sessions. UrbeStack retains up to 50 kept sessions, keeping the newest.

As a command

Run as root on the server

Request body

JSON ·LoadStart· 3 fields
everyinteger, 2 to 60
Interval between readings in seconds. Defaults to 5.
keepboolean
Whether to retain the readings after the session ends. Defaults to the panel.load_keep_sessions setting.
readingsinteger, 1 to 720
Number of readings to take. Defaults to 100.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/load/sessions" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "every": 1,
    "keep": true,
    "readings": 1
  }'
Response · 201 Created
{
  "session": {
    "ended_at": "text",
    "ends_at": "text",
    "every": 1,
    "how": "done",
    "id": 1,
    "keep": true,
    "readings": 1,
    "started_at": "2026-09-09T10:15:01Z",
    "started_by": "text",
    "state": "running",
    "stopped_by": "text",
    "taken": 1,
    "worst": {
      "apache_busy_max": 1,
      "apache_full": 1,
      "blocked_max": 1,
      "disk": {
        "busy_pct": 1,
        "name": "alice",
        "wait_ms": 1
      },
      "iowait_max": 1,
      "kernel_errors": 1,
      "load_max": 1,
      "mariadb_stuck": 1,
      "pool": {
        "domain": "example.com",
        "hits": 1,
        "kind": "domain",
        "max": 1,
        "name": "alice",
        "peak": 1,
        "php": "text",
        "waiting_peak": 1
      },
      "query": {
        "database": "alice_shop",
        "seconds": 1,
        "state": "text",
        "user": "alice"
      },
      "running_max": 1,
      "steal_max": 1,
      "threads_running_max": 1
    }
  },
  "started": true
}

Errors

7 errors, each a status and a sentence
400Invalid id
400The body is an object: <words>
400Unknown field
400keep is true or false
401Authentication required
409A session is running, started by <cur.started_by> at <cur.started_at> and ending by <cur.ends_at>:
409A session named <id> exists already; start again in a second
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.17 on 26 Oct 2026.
urbestack.com/docs/api/post-load-sessions/