Reference › REST API

REST API

The API the dashboard is built on. Base /api, always HTTP 200, envelope responses.

Base URL: http://<host>:2517/api — the API is served under /api on the web UI port.

Conventions

Auth

Every endpoint except /version needs a Bearer API key — a long-lived token minted in the dashboard (Settings → API Keys):

curl -H "Authorization: Bearer $UPTIMER_API_KEY" \
  "http://localhost:2517/api/v1/rules?workspace_id=<uid>"

Endpoints

MethodPathPurpose
GET/versionServer version (string). Public.
GET/v1/workspacesYour workspaces, each with your role.
GET/v1/rules?workspace_id=List rules in a workspace.
POST/v1/rulesCreate a rule.
GET/v1/rules/{uid}Get one rule.
POST/v1/rules/{uid}Update a rule (there is no PUT).
DELETE/v1/rules/{uid}Delete a rule.
GET/v1/regionsList regions + active worker counts.

Rule payload

{
  "name": "home",
  "interval": 60,
  "workspace_id": "<uid>",
  "request":  { "url": "https://example.com", "method": "GET", "content_type": "application/json", "data": "" },
  "response": { "statuses": [200], "body": { "content": "" } }
}

DELETE returns { "message": "Rule deleted successfully", "rule_id": "<uid>" }.

Errors

{ "result": null,
  "error": { "code": 2001, "error_type": "validation_error", "message": "…", "details": "…" },
  "meta": null }

error_type is one of access_denied, validation_error, not_found, forbidden, internal_error.

Prefer a typed client? See the Python SDK.