The API

Read any public page with the public API, and manage pages, components, incidents, monitors, probes, subscribers and chart annotations with the management API. Every page also speaks Atlassian Statuspage’s read API.

The full reference, generated from the API itself, is at /api/docs ↗ (OpenAPI 3.1, the spec at /api/openapi.json).

Guides and contents

Create an API key

  1. Go to API keys → Create key.
  2. Name it and tick only the Scopes it needs: pages:read, pages:write, components:write, incidents:write, monitors:read, monitors:write, probes:write, subscribers:read, subscribers:write, subscribers:export, alerts:read, annotations:read or annotations:write.
  3. Optionally give it a Prefix (sk_ci_…, so your logs show what a key is for), an Expiration (1, 7, 30 or 90 days, a year, or a date) and Limits: a rate limit (requests per second, minute, hour or day) and a request quota (a total, optionally refilled every day, week or month).
  4. Copy the key. It starts with sk_ and is shown once.

Edit a key later to change its name, expiration or limits; the key itself and its scopes stay the same. An expired key is refused with 401 api_key_expired; make a new one to replace it.

Owners and admins create and revoke any key; editors create and revoke their own. A key never gets more than the role of the person who made it, now as well as when it was made: demote them and their keys lose what the new role can’t do. A key can’t create another key.

Make a request

Send the key as a bearer token. Management endpoints are under /api/v1/admin/; public endpoints are under /api/v1/pages/ and need no key.

curl https://app.upstreamr.com/api/v1/admin/pages \
  -H "Authorization: Bearer sk_…"

{"data":[…]}

Answers come as { "data": … }; errors as { "error": { "code", "message" } }.

Mark deploys from CI

Annotations put a deploy, a configuration change or a note on your monitors’ response-time charts. Create a key with only annotations:write for your pipeline and post one when it deploys: kind is deploy, config or note, text up to 500 characters, and the time is now unless you send startsAt (add endsAt for a window). Add monitorId or componentId to show it on one monitor or one component’s monitors; without either it is on every chart.

curl -X POST https://app.upstreamr.com/api/v1/admin/annotations \
  -H "Authorization: Bearer sk_…" \
  -H "Content-Type: application/json" \
  -d '{"kind":"deploy","text":"Deploy 3f2a91c: faster search"}'

In GitHub Actions, as the last step of the deploy job, with the key saved as a repository secret:

- name: Mark the deploy on Upstreamr
  env:
    UPSTREAMR_API_KEY: ${{ secrets.UPSTREAMR_API_KEY }}
    COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
  run: |
    jq -n --arg sha "${GITHUB_SHA::7}" --arg msg "$COMMIT_MESSAGE" \
      '{kind: "deploy", text: ("Deploy " + $sha + ": " + ($msg | split("\n")[0]))[0:500]}' |
    curl -fsS -X POST https://app.upstreamr.com/api/v1/admin/annotations \
      -H "Authorization: Bearer $UPSTREAMR_API_KEY" \
      -H "Content-Type: application/json" \
      --data-binary @-

The commit message reaches the script through env and jq --arg, never pasted into it, so a message can’t run commands. GET, PATCH and DELETE on /api/v1/admin/annotations list (with annotations:read), edit and remove them; an organization keeps up to 10,000.

Rate limits

The management API allows 300 requests a minute per key or signed-in user, and public reads 300 a minute per address; annotations can be added, edited or deleted 30 times a minute per organization. Over the limit, the answer is 429 with a Retry-After header saying when to try again.

A key can also have its own limits, set when you create or edit it. Over its rate limit the answer is 429 rate_limited; once its quota is used up, 429 quota_exhausted, with Retry-After until the next refill (none if the quota never refills). Quotas refill at 00:00 UTC, and the API keys page shows how many requests each key has left.

Statuspage-compatible API on your page

Every page answers Atlassian Statuspage’s public read API on its own address (your domain or <page>.upstreamr.page), with Statuspage’s fields, nesting and values, so tools built for Statuspage read your page as they are. No key, CORS open, cached for up to 30 seconds:

/api/v2/summary.json
/api/v2/status.json
/api/v2/components.json
/api/v2/incidents/unresolved.json
/api/v2/incidents.json
/api/v2/scheduled-maintenances/upcoming.json
/api/v2/scheduled-maintenances/active.json
/api/v2/scheduled-maintenances.json

Groups are entries with "group": true and their components’ ids; showcase is the component’s Show uptime. Texts come in the page’s language, or add ?lang=ro. What Upstreamr doesn’t have stays empty, as on a Statuspage page that doesn’t use it: no postmortem state, no affected_components per update, and a cancelled maintenance isn’t listed.

Your page’s /api lists these with its live answers, the feeds and the badge, for people who build on your status. Its /api/openapi.json describes only the public endpoints; this reference, with the management API, is on the admin’s address.

OpenStatus addresses on your page

A page that moved here from OpenStatus keeps its addresses on your domain. /feed/json answers in OpenStatus’s shape (title, status, components and groups, status reports and maintenances with their updates, newest first), so an integration that read it, such as a status indicator in your customer portal, keeps working. Incidents and maintenance brought by Import history keep their OpenStatus ids, which are numbers; anything posted here has an Upstreamr id, a string. /feed/rss and /feed/atom are your page’s feeds.

/feed/json
/feed/rss
/feed/atom
/events/report/<id>        → the imported incident
/events/maintenance/<id>   → the imported maintenance
/events                    → /history
/monitors                  → your page
/badge, /badge/v2          → your page’s SVG badge

The status is OpenStatus’s word for your page’s: success, degraded, error or info during maintenance. Upstreamr has no OpenStatus monitors, so monitors is an empty list and components have no monitorId; severity and cancelled maintenance have no OpenStatus field. OpenStatus’s own API on api.openstatus.dev, its badges and its React widget read OpenStatus, not your domain: use this page’s /api, badge or widget instead.

Bring the subscribers too: Import on the Subscribers tab reads them from OpenStatus with your OpenStatus API key, or call POST https://app.upstreamr.com/api/v1/admin/pages/<page id>/subscribers/import/openstatus with { "apiKey": "…" } (a preview unless you send "dryRun": false). Their old manage and unsubscribe links stay with OpenStatus.

If your portal subscribed people through OpenStatus’s API, use the management API with a key that has the subscriber scopes: look one address up with GET https://app.upstreamr.com/api/v1/admin/pages/<page id>/subscribers?email=… (an empty list when it never subscribed; no confirmedAt while the confirmation email waits), subscribe with POST …/subscribers { "email": "…" }, which sends the confirmation email, and unsubscribe with DELETE …/subscribers/<id>. Someone who unsubscribed from an email link can only subscribe again themselves, from the page.

Feeds, calendar and badges

Every public page also has, with no key, a feed, a calendar and a badge. On the page’s own address they’re short: /feed.atom, /feed.rss and /maintenance.ics (plus /history.atom and /history.rss, the addresses Atlassian Statuspage uses, and /feed/atom and /feed/rss, OpenStatus’s, so feed readers keep working after a move). Through the API:

https://app.upstreamr.com/api/v1/pages/<page>/feed.atom
https://app.upstreamr.com/api/v1/pages/<page>/feed.rss
https://app.upstreamr.com/api/v1/pages/<page>/maintenance.ics
https://app.upstreamr.com/api/v1/pages/<page>/badge.svg
https://app.upstreamr.com/api/v1/pages/<page>/og.png
https://app.upstreamr.com/api/v1/pages/<page>/incidents/<id>/og.png

The two og.png paths are the link-preview pictures (1200 × 630), also at /og.png and /incidents/<id>/og.png on the page’s address. They redirect to the current picture’s own address, which changes with the page’s state; private pages have none.

A push monitor’s URL is https://app.upstreamr.com/api/v1/push/<token>; the admin shows it once, when you create the monitor. Its /start, /fail and /<exit code> forms are in the reference under Heartbeats and in Heartbeats from your jobs.

Status widget for your site

Every page serves a small script at /widget.js on its own address. Add it to your website or app with an <upstreamr-status> tag where the status should appear. The admin writes the snippet for you under your page → Embed, with a live preview.

<script src="https://status.example.com/widget.js" async></script>
<upstreamr-status mode="banner" position="top"></upstreamr-status>
  • mode: badge (the current state, linking to your page), banner (shown only while an incident or maintenance is under way, with its title and a link; a visitor can dismiss it, and sees it again only for another incident) or summary (the state, what’s under way and the components it affects).
  • lang: en or ro, when your page offers it; otherwise the page’s default language.
  • theme: light, dark or auto (follows the visitor’s system). position (banner): inline, or top and bottom to pin it to the window.
  • page: not needed when the script comes from your page’s address. To load it another way, give your page’s address, e.g. page="https://status.example.com".

Restyle it with CSS variables on the tag or any parent: --upstreamr-bg, --upstreamr-fg, --upstreamr-muted, --upstreamr-border, --upstreamr-radius, --upstreamr-font, --upstreamr-font-size, --upstreamr-z-index and the status colours --upstreamr-operational, -degraded, -partial, -major and -maintenance. Its parts can be styled with upstreamr-status::part(…).

The widget sets no cookies and loads nothing else: it reads your page’s /summary.json every minute while the tab is visible, less often after errors. It’s keyboard- and screen-reader-friendly and stops its animation for visitors who ask for reduced motion. On a private page it follows the page’s access: it shows only to visitors who may see the page, on the page’s own address, and nowhere else.