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
- Every response is HTTP
200with a{ "result", "error", "meta" }envelope — checkerror, not the status code. - On success
errorisnullandresultholds the data; on failureresultisnullanderroris filled. - Objects carry a
kindfield (rule,workspace,region, …).
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
| Method | Path | Purpose |
|---|---|---|
| GET | /version | Server version (string). Public. |
| GET | /v1/workspaces | Your workspaces, each with your role. |
| GET | /v1/rules?workspace_id= | List rules in a workspace. |
| POST | /v1/rules | Create 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/regions | List 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": "" } }
}
methodis one ofGET,POST,PATCH,OPTIONS.intervalis seconds, in whole minutes (≥ 60).- Region assignment via the API isn’t available yet — see Regions.
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.