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/json

Always verify against the raw request body before parsing JSON.

+ +
+

Status Pages

+

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}.

+ +

List pages

+
GET/status-pages
+

Returns all status pages for the authenticated account.

+ +

Create page

+
POST/status-pages
+
+
json — request body
+
{
+  "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" }
+  ]
+}
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescription
slugstringURL slug (lowercase, hyphens, 1-80 chars). Must be unique.
titlestringPage title shown in the header (up to 200 chars).
descriptionstring?Shown below the title (up to 2000 chars).
themestring?auto, light, or dark. Default auto.
passwordstring?Plain text, hashed at write time. Pass null to clear.
display_modestring?compact or expanded. Default expanded.
default_windowstring?24h, 7d, 30d, or 90d. Default 24h.
bar_frequencystring?hourly or daily. Default daily.
bar_countnumber?How many bars to show (1-180). Default 90.
auto_refresh_snumber?Auto-refresh interval in seconds (10-3600). Default 60.
custom_cssstring?Custom CSS injected after the default stylesheet (up to 50KB).
footer_textstring?Text shown in the page footer (up to 5000 chars).
og_image_urlstring?OpenGraph image URL for social previews.
analytics_htmlstring?Raw HTML injected in the head (e.g. analytics snippet).
index_searchboolean?Allow search engine indexing. Default true.
show_powered_byboolean?Show "Powered by PingQL" footer. Default true.
show_response_timeboolean?Display response time per monitor. Default true.
show_cert_expiryboolean?Show cert expiry info. Default false.
groupsarray?Groups to organize monitors. Each has name (string) and optional position (number).
monitorsarray?Monitors to display. See monitor fields below.
+ +

Monitor fields

+

Each entry in the monitors array accepts:

+ + + + + + + + + +
FieldTypeDescription
monitor_idstringID of a monitor you own.
group_indexnumber?Index into the groups array (0-based). Omit for ungrouped.
display_namestring?Override the monitor's name on this page.
display_modestring?compact or expanded. Overrides the page default for this monitor.
positionnumber?Sort order within the group.
+ +

Get page

+
GET/status-pages/:id
+

Returns the page with its groups and monitors arrays, plus has_password (boolean).

+ +

Update page

+
PATCH/status-pages/:id
+

All fields optional. If groups or monitors are provided, they replace the full set.

+ +

Delete page

+
DELETE/status-pages/:id
+

Permanently removes the page and all associated groups and monitor links.

+ +

Public endpoints

+

Each published page is available at status.pingql.com/{slug} in multiple formats:

+ + + + + + + + + +
URLDescription
/{slug}HTML page with live uptime, bars, and incidents.
/{slug}.jsonFull JSON payload (monitors, uptime, incidents).
/{slug}.rssRSS feed of incidents.
/{slug}/badge.svgEmbeddable SVG status badge.
/{slug}/monitor/{id}.jsonPer-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.

+
+ + +
+

Incidents

+

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.

+ +

List incidents

+
GET/incidents
+

Returns the 200 most recent incidents, newest first.

+ +

Create incident

+
POST/incidents
+
+
json — request body
+
{
+  "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."
+  }
+}
+
+ + + + + + + + + + + +
FieldTypeDescription
titlestringShort description (up to 200 chars).
statusstringinvestigating, identified, monitoring, or resolved.
severitystring?minor, major, or critical. Default minor.
pinnedboolean?Pinned incidents show in the active section on status pages. Default true.
monitor_idsarray?IDs of affected monitors.
status_page_idsarray?IDs of status pages to display this incident on.
initial_updateobject?Create the first timeline update along with the incident. Has one field: body (string, supports basic markdown).
+ +

Get incident

+
GET/incidents/:id
+

Returns the incident with its updates timeline, monitor_ids, and status_page_ids.

+ +

Update incident

+
PATCH/incidents/:id
+

All fields optional. Setting status to resolved automatically sets resolved_at. Changing to any other status clears it.

+ +

Post update

+
POST/incidents/:id/updates
+
+
json — request body
+
{
+  "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.

+ +

Delete incident

+
DELETE/incidents/:id
+

Permanently removes the incident, all its updates, and all monitor/page links.

+
+

Query Language — Fields

diff --git a/apps/web/src/views/landing.ejs b/apps/web/src/views/landing.ejs index 30a75e7..5002ad7 100644 --- a/apps/web/src/views/landing.ejs +++ b/apps/web/src/views/landing.ejs @@ -552,18 +552,31 @@
- +
- Create an account + Create a status page
-
$ 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" +}