<flashduty-status-widget>) with styles isolated from the host page, so neither side affects the other.
Two forms
Both forms support theme (Auto / Light / Dark) and language (中文 / English). The badge additionally supports size options, and the banner supports position options.
Generate the embed code in the console
1
Open the Widget settings
Go to your status page detail view and choose Settings → Widget. The page has three tabs: Status Badge, Event Banner, and API.
2
Configure appearance
On each tab, adjust the theme, language, size (badge), or position (banner); the live preview updates as you go. The preview is for visualization only and never modifies the real status page. For the banner, you can also switch among three preview scenarios: Operational / Incident / Scheduled maintenance.
3
Copy the embed code
Click Copy code and paste the snippet into your website’s HTML. The script version in the embed code always matches what your status page deployment actually serves — no manual maintenance needed.
Embed code examples
The script tag carries
integrity (SRI) and crossorigin="anonymous" attributes — copy the whole snippet, not just the <flashduty-status-widget> tag. Replace https://status.example.com in the examples with your actual status page URL (the code generated in the console already contains the real URL).Attribute reference
<flashduty-status-widget> supports the following attributes:
Behavior
Data refresh
- The widget polls the status endpoint every 30 seconds by default (the interval is delivered by the API’s
poll_after_secondsfield), with random jitter so large numbers of visitors don’t all request at once - Requests carry the
If-None-Match(ETag) conditional header; when data hasn’t changed, the server returns304without re-sending the body - Polling pauses while the page is hidden (background tab) and refreshes immediately when the page becomes visible again
- Failed requests retry with exponential backoff (starting at 5 seconds, capped at 5 minutes)
Stale data
The API declares a freshness window viamax_stale_seconds (120 seconds by default). If data can’t be validated within that window:
- The badge switches to an “unknown” state and shows when the data was last confirmed
- The banner does not render without valid data
Banner display and dismissal
- The banner picks what to show by priority: ongoing incident > in-progress maintenance > scheduled maintenance starting within 24 hours; when multiple events exist, the banner shows “N more”
- Visitors can dismiss the banner with ×. The dismissal is remembered for the current browser session, keyed by “event ID + last updated time” — when the event has new progress (a status change or a new timeline update), the banner reappears
- Set
show-upcoming-maintenance="false"to disable the 24-hour advance display of scheduled maintenance
Status values and colors
Components set to hidden on the status page never appear in widget data — the snapshot only contains incidents and maintenance for components visible to the public.
Public API: summary.json
If you prefer not to use the ready-made Web Component, call the JSON snapshot endpoint built into every public status page and render or integrate the data yourself. The console’s Widget → API tab shows the exact URL.- Public access: no authentication, no API key
- Cross-origin: responses carry
Access-Control-Allow-Origin: *, so browsers can call it directly;GET,HEAD, andOPTIONS(preflight) are supported - Caching: responses include
Cache-Control: public, max-age=30, s-maxage=30, stale-while-revalidate=120, stale-if-error=3600and anETag— sendIf-None-Matchand receive304when nothing changed - Freshness: the
X-Status-Validated-Atresponse header records when the snapshot was last successfully validated against the backend; use it to judge whether data is stale
Response fields
The response is a single JSON object whoseschema_version is currently fixed at "1.0":
Elements of
ongoing_incidents:
Elements of
in_progress_maintenances and scheduled_maintenances: