diff --git a/apps/web/src/views/docs.ejs b/apps/web/src/views/docs.ejs index 9de2590..334887f 100644 --- a/apps/web/src/views/docs.ejs +++ b/apps/web/src/views/docs.ejs @@ -60,6 +60,8 @@ Monitors Notifications Webhook payload + Status Pages + Incidents
Fields @@ -340,6 +342,159 @@ Content-Type: application/jsonAlways verify against the raw request body before parsing JSON.
+ +Create public status pages that display live uptime, heartbeat bars, and incidents for your monitors. Each page gets a unique slug and is publicly accessible at status.pingql.com/{slug}.
Returns all status pages for the authenticated account.
+ +{
+ "slug": "my-app",
+ "title": "My App Status",
+ "groups": [
+ { "name": "Core", "position": 0 },
+ { "name": "Integrations", "position": 1 }
+ ],
+ "monitors": [
+ { "monitor_id": "a1b2c3d4e5f67890", "group_index": 0 },
+ { "monitor_id": "f0e1d2c3b4a59687", "group_index": 1, "display_name": "Stripe" }
+ ]
+}
+ | Field | Type | Description |
|---|---|---|
| slug | string | URL slug (lowercase, hyphens, 1-80 chars). Must be unique. |
| title | string | Page title shown in the header (up to 200 chars). |
| description | string? | Shown below the title (up to 2000 chars). |
| theme | string? | auto, light, or dark. Default auto. |
| password | string? | Plain text, hashed at write time. Pass null to clear. |
| display_mode | string? | compact or expanded. Default expanded. |
| default_window | string? | 24h, 7d, 30d, or 90d. Default 24h. |
| bar_frequency | string? | hourly or daily. Default daily. |
| bar_count | number? | How many bars to show (1-180). Default 90. |
| auto_refresh_s | number? | Auto-refresh interval in seconds (10-3600). Default 60. |
| custom_css | string? | Custom CSS injected after the default stylesheet (up to 50KB). |
| footer_text | string? | Text shown in the page footer (up to 5000 chars). |
| og_image_url | string? | OpenGraph image URL for social previews. |
| analytics_html | string? | Raw HTML injected in the head (e.g. analytics snippet). |
| index_search | boolean? | Allow search engine indexing. Default true. |
| show_powered_by | boolean? | Show "Powered by PingQL" footer. Default true. |
| show_response_time | boolean? | Display response time per monitor. Default true. |
| show_cert_expiry | boolean? | Show cert expiry info. Default false. |
| groups | array? | Groups to organize monitors. Each has name (string) and optional position (number). |
| monitors | array? | Monitors to display. See monitor fields below. |
Each entry in the monitors array accepts:
| Field | Type | Description |
|---|---|---|
| monitor_id | string | ID of a monitor you own. |
| group_index | number? | Index into the groups array (0-based). Omit for ungrouped. |
| display_name | string? | Override the monitor's name on this page. |
| display_mode | string? | compact or expanded. Overrides the page default for this monitor. |
| position | number? | Sort order within the group. |
Returns the page with its groups and monitors arrays, plus has_password (boolean).
All fields optional. If groups or monitors are provided, they replace the full set.
Permanently removes the page and all associated groups and monitor links.
+ +Each published page is available at status.pingql.com/{slug} in multiple formats:
| URL | Description |
|---|---|
| /{slug} | HTML page with live uptime, bars, and incidents. |
| /{slug}.json | Full JSON payload (monitors, uptime, incidents). |
| /{slug}.rss | RSS feed of incidents. |
| /{slug}/badge.svg | Embeddable SVG status badge. |
| /{slug}/monitor/{id}.json | Per-monitor detail (uptime, regions, incidents). |
Password-protected pages return 404 for all formats unless a valid auth cookie is present. Post credentials via POST /{slug}/auth with a form-encoded password field.
Declare incidents, post updates as the situation develops, and link them to monitors and status pages. Active incidents appear on any linked status page automatically.
+ +Returns the 200 most recent incidents, newest first.
+ +{
+ "title": "API returning 503s",
+ "status": "investigating",
+ "severity": "major",
+ "monitor_ids": ["a1b2c3d4e5f67890"],
+ "status_page_ids": ["f8c1a2b3-..."],
+ "initial_update": {
+ "body": "We're seeing elevated error rates on the API. Investigating now."
+ }
+}
+ | Field | Type | Description |
|---|---|---|
| title | string | Short description (up to 200 chars). |
| status | string | investigating, identified, monitoring, or resolved. |
| severity | string? | minor, major, or critical. Default minor. |
| pinned | boolean? | Pinned incidents show in the active section on status pages. Default true. |
| monitor_ids | array? | IDs of affected monitors. |
| status_page_ids | array? | IDs of status pages to display this incident on. |
| initial_update | object? | Create the first timeline update along with the incident. Has one field: body (string, supports basic markdown). |
Returns the incident with its updates timeline, monitor_ids, and status_page_ids.
All fields optional. Setting status to resolved automatically sets resolved_at. Changing to any other status clears it.
{
+ "status": "identified",
+ "body": "Root cause identified — a bad deploy at 14:02 UTC. Rolling back now."
+}
+ The body field supports basic markdown: **bold**, *italic*, `code`, and [links](url). The incident's status is automatically synced to the latest update's status.
Permanently removes the incident, all its updates, and all monitor/page links.
+$ curl -X POST https://pingql.com/api/register +$ curl -X POST https://pingql.com/api/status-pages \ + -H "X-Key: abcd-1234-efgh-5678" \ + -d '{ + "slug": "my-app", + "title": "My App Status", + "monitors": [ + { "monitor_id": "a1b2c3d4e5f67890" } + ] + }' -{ "key": "abcd-1234-efgh-5678" }+{ + "id": "f8c1a2b3-...", + "slug": "my-app", + "title": "My App Status", + "theme": "auto" +}