Status Hub Pages, Incidents and Maintenance with the AlertOps SDKs
Build AlertOps Status Hub pages, keep your service catalog current, and post incidents and scheduled maintenance from code with the AlertOps SDKs.
Overview
Relevant for Teams publishing service status to customers or staff
Status Hub shows the health of your services on branded status pages. With the AlertOps SDKs you can build pages, keep the service catalog in step with your architecture, and post incidents and scheduled maintenance straight from your incident tooling or deployment pipeline.
Key benefits:
- Status as code — create pages, services and layouts from one script.
- You control notifications — incidents, updates and maintenance notify subscribers only when you choose to.
- Safe page changes — status_hub.pages.patch changes only the fields you pass.
- Read what visitors see — the viewer API returns a page's live status, services and incidents.
Create a status page
Relevant for Developers creating and publishing a page
status_hub.pages.create creates a draft page with a slug, display name, time zone and visibility. Publish it with status_hub.pages.publish when it is ready.
| Visibility | Who can see the page |
| public | Anyone, at your status subdomain or a custom domain |
| private_sso | Visitors who sign in through your SAML identity provider |
| internal | Users of your AlertOps account |
You can also upload a logo and favicon, set brand colors, connect a custom domain with SSL, and configure SSO from the same status_hub.pages resource.
Services and page layout
Relevant for Developers maintaining the service catalog
Services and service groups are shared across your account, and each page shows the ones in its layout.
| Task | Operation |
| Create a service | status_hub.services.create |
| Create a service group | status_hub.service_groups.create |
| Add services to a group | status_hub.service_groups.services.add |
| Lay out a page's groups and services | status_hub.pages.services.set_layout |
Communicate an incident
Relevant for Incident commanders keeping customers informed
Open an incident on the affected services, post updates as you learn more, then resolve it:
Python
inc = ao.status_hub.incidents.create(title="Checkout errors", description="<p>Some payments fail.</p>",
status=1, impact=3, affectedServiceIds=[api_id])
ao.status_hub.incidents.updates.create(inc["incidentId"], status=2, message="Cause identified: a bad deploy.")
ao.status_hub.incidents.resolve(inc["incidentId"], "Rolled back. All payments succeed.")
TypeScript
const inc = await ao.statusHub.incidents.create({
title: "Checkout errors", description: "<p>Some payments fail.</p>",
status: 1, impact: 3, affectedServiceIds: [apiId],
});
await ao.statusHub.incidents.updates.create(inc.incidentId, { status: 2, message: "Cause identified: a bad deploy." });
await ao.statusHub.incidents.resolve(inc.incidentId, "Rolled back. All payments succeed.");
Go
inc, err := ao.StatusHub.Incidents.Create(ctx, &alertops.Request{Fields: alertops.M{
"title": "Checkout errors", "description": "<p>Some payments fail.</p>",
"status": 1, "impact": 3, "affectedServiceIds": []any{apiID},
}})
if err != nil {
return err
}
iid := alertops.Get(inc, "incidentId")
if _, err = ao.StatusHub.Incidents.Updates.Create(ctx, iid,
&alertops.Request{Fields: alertops.M{"status": 2, "message": "Cause identified: a bad deploy."}}); err != nil {
return err
}
_, err = ao.StatusHub.Incidents.Resolve(ctx, iid, "Rolled back. All payments succeed.", false)
Java
JsonNode inc = ao.statusHub().incidents().create(Request.of(
"title", "Checkout errors", "description", "<p>Some payments fail.</p>",
"status", 1, "impact", 3, "affectedServiceIds", List.of(apiId)));
JsonNode iid = inc.get("incidentId");
ao.statusHub().incidents().updates().create(iid, Request.of("status", 2, "message", "Cause identified: a bad deploy."));
ao.statusHub().incidents().resolve(iid, "Rolled back. All payments succeed.", false);
.NET
var inc = await ao.StatusHub.Incidents.CreateAsync(new Kwargs
{
["title"] = "Checkout errors", ["description"] = "<p>Some payments fail.</p>",
["status"] = 1, ["impact"] = 3, ["affectedServiceIds"] = new[] { apiId },
});
var iid = inc!["incidentId"]!;
await ao.StatusHub.Incidents.Updates.CreateAsync(iid, new Kwargs { ["status"] = 2, ["message"] = "Cause identified: a bad deploy." });
await ao.StatusHub.Incidents.ResolveAsync(iid, "Rolled back. All payments succeed.");
To email or message subscribers about an incident or update, pass notifySubscribers: true. After the incident, write a postmortem with status_hub.incidents.postmortem.create and publish it to the page with status_hub.incidents.postmortem.publish.
Scheduled maintenance
Relevant for Ops teams announcing planned work
status_hub.maintenance.create announces planned work on chosen services with a title, description and start and end times. Change it later with status_hub.maintenance.patch, and complete it with status_hub.maintenance.complete when the work is done. status_hub.maintenance.upcoming lists what is planned.
Templates, subscribers and access
Relevant for Admins standardizing messages and managing pages
| Task | Operation |
| Create incident and maintenance templates | status_hub.templates.incident.create, status_hub.templates.maintenance.create |
| List and manage subscribers (email, SMS, webhook, Slack, Teams) | status_hub.pages.subscribers |
| Grant or restrict who manages a page | status_hub.pages.access |
The status viewer
Relevant for Developers embedding or checking what visitors see
status_viewer.public reads a published page's overall status, services and active incidents, ready to embed in your own app or portal. status_viewer.internal reads internal pages with your API key.
Best Practices
Relevant for Teams communicating during incidents
- Lead with impact — say which services are affected and what customers will notice.
- Update often — post an update at each milestone, even if nothing has changed.
- Use templates so every incident and maintenance notice is consistent.
Related Articles
- AlertOps SDKs for Python, TypeScript, Go, Java and .NET
- Working with Alerts in the AlertOps SDKs
- Workflows, Outbound Integrations and Maintenance Windows with the AlertOps SDKs
Need help?
Email support@alertops.com or contact your AlertOps representative.