Statuspage SDK

Statuspage SDK

Statuspage API client, generated from the OpenAPI spec.

Please don’t abuse the API, and please report all feature requests and issues to https://support.atlassian.com/contact

Learn more about Statuspage API at statuspage.io.

This is an unofficial SDK for the Statuspage public API, generated by Voxgig with @voxgig/sdkgen. It is not affiliated with, endorsed by, or sponsored by the upstream API provider.

Learn more about Voxgig SDKs at voxgig.com/sdk.

TypeScript, Python, Golang, Ruby SDKs, and an interactive REPL — all generated from one OpenAPI spec by @voxgig/sdkgen.

Entities, not endpoints

This SDK exposes the API as a small set of semantic entities — Component, ComponentGroupUptime, GroupComponent, Incident, IncidentPostmortem, IncidentSubscriber, IncidentTemplate, IncidentUpdate, Metric, MetricsProvider, Page, PageAccessGroup, PageAccessUser, Permission, Postmortem, StatusEmbedConfig, Subscriber and User — that you call directly, instead of assembling URL paths and query strings. Entities are Capitalised to mark them as the primary surface, each with the operations they support (list, load, create, update, remove, patch):

const client = new StatuspageSDK()
const items = await client.Component().list()

Thinking in entities keeps the mental model small — for people and AI agents alike — rather than reasoning about raw HTTP routes and query parameters.

Offline unit testing

Every SDK ships a built-in test mode that swaps the HTTP transport for an in-memory mock, so your unit tests run fully offline — no server, no network, and no credentials:

TypeScript

const client = StatuspageSDK.test()
const components = await client.Component().list()
// components is an array of bare Component records populated with mock data
console.log(components)

Python

client = StatuspageSDK.test()
components = client.Component().list()
print(components)

Golang

client := sdk.Test()
result, err := client.Component(nil).List(
    nil, nil,
)

Ruby

# Seed fixture data so offline calls resolve without a live server.
client = StatuspageSDK.test({
  "entity" => { "component" => { "test01" => { "id" => "test01" } } },
})
components = client.Component.list()

Packages

LanguagePackageInstall
TypeScript@voxgig-sdk/statuspagepublish pending — install from git tag
Pythonvoxgig-sdk-statuspagepublish pending — install from git tag
Golanggithub.com/voxgig-sdk/statuspage-sdk/gogo get github.com/voxgig-sdk/statuspage-sdk/go@latest
Rubyvoxgig-sdk-statuspagepublish pending — install from git tag

Quickstart

TypeScript

import { StatuspageSDK } from '@voxgig-sdk/statuspage'

const client = new StatuspageSDK({
  apikey: process.env.STATUSPAGE_APIKEY,
})

// List all components (returns Component[])
const components = await client.Component().list()
for (const component of components) {
  console.log(component)
}

// Load a specific component (returns a Component)
const component = await client.Component().load({
  page_id: 'example_page_id',
  id: 'example_id',
})
console.log(component)

See the TypeScript README for the full guide.

Surfaces

SurfacePath
SDK (TypeScript, Python, Golang, Ruby)ts/ py/ go/ rb/

Entities

The API exposes 18 entities:

EntityDescriptionAPI path
ComponentThe Component entity (create, list, load, patch, remove, update)./pages/{page_id}/components/{component_id}/page_access_groups
ComponentGroupUptimeThe ComponentGroupUptime entity (load)./pages/{page_id}/component-groups/{id}/uptime
GroupComponentThe GroupComponent entity (create, list, load, patch, remove, update)./pages/{page_id}/component-groups
IncidentThe Incident entity (create, list, load, patch, remove, update)./pages/{page_id}/incidents
IncidentPostmortemThe IncidentPostmortem entity (remove)./pages/{page_id}/incidents/{incident_id}/postmortem
IncidentSubscriberThe IncidentSubscriber entity (create)./pages/{page_id}/incidents/{incident_id}/subscribers/{subscriber_id}/resend_confirmation
IncidentTemplateThe IncidentTemplate entity (create, list)./pages/{page_id}/incident_templates
IncidentUpdateThe IncidentUpdate entity (patch, update)./pages/{page_id}/incidents/{incident_id}/incident_updates/{incident_update_id}
MetricThe Metric entity (create, list, load, patch, remove, update)./pages/{page_id}/metrics/{metric_id}/data
MetricsProviderThe MetricsProvider entity (create, list, load, patch, remove, update)./pages/{page_id}/metrics_providers
PageThe Page entity (list, load, patch, update)./pages
PageAccessGroupThe PageAccessGroup entity (create, list, load, patch, remove, update)./pages/{page_id}/page_access_groups/{page_access_group_id}/components
PageAccessUserThe PageAccessUser entity (create, list, load, patch, remove, update)./pages/{page_id}/page_access_users/{page_access_user_id}/components
PermissionThe Permission entity (load, update)./organizations/{organization_id}/permissions/{user_id}
PostmortemThe Postmortem entity (load, update)./pages/{page_id}/incidents/{incident_id}/postmortem
StatusEmbedConfigThe StatusEmbedConfig entity (load, patch, update)./pages/{page_id}/status_embed_config
SubscriberThe Subscriber entity (create, list, load, remove, update)./pages/{page_id}/subscribers/{subscriber_id}/resend_confirmation
UserThe User entity (create, list, remove)./organizations/{organization_id}/users

The operations available across these entities are load, list, create, update, remove — see each entity’s own list above for exactly which it supports.

Quickstart in other languages

Python

import os
from statuspage_sdk import StatuspageSDK

client = StatuspageSDK({
    "apikey": os.environ.get("STATUSPAGE_APIKEY"),
})

# List all components (returns a list, raises on error)
components = client.Component().list()
for component in components:
    print(component)

# Load a specific component (returns the record, raises on error)
component = client.Component().load({"id": "example_id", "page_id": "example_page_id"})
print(component)

Golang

import sdk "github.com/voxgig-sdk/statuspage-sdk/go"

client := sdk.NewStatuspageSDK(map[string]any{
    "apikey": os.Getenv("STATUSPAGE_APIKEY"),
})

// List all components
components, err := client.Component(nil).List(nil, nil)
if err != nil {
    panic(err)
}
fmt.Println(components)

// Load a specific component
component, err := client.Component(nil).Load(
    map[string]any{"page_id": "example_page_id", "id": "example_id"}, nil,
)
if err != nil {
    panic(err)
}
fmt.Println(component)

Ruby

require_relative "Statuspage_sdk"

client = StatuspageSDK.new({
  "apikey" => ENV["STATUSPAGE_APIKEY"],
})

# List all components (returns an Array; raises on error)
components = client.Component.list
puts components

# Load a specific component (returns the bare record; raises on error)
component = client.Component.load({ "id" => "example_id", "page_id" => "example_page_id" })
puts component

Direct and prepare

For endpoints the entity model doesn’t cover, use the low-level methods:

  • direct(fetchargs) — build and send an HTTP request in one step.
  • prepare(fetchargs) — build the request without sending it.

Both accept a map with path, method, params, query, headers, and body. See the How-to guides below.

How-to guides

Make a direct API call

When the entity interface does not cover an endpoint, use direct:

TypeScript:

const result = await client.direct({
  path: '/api/resource/{id}',
  method: 'GET',
  params: { id: 'example' },
})
if (result instanceof Error) {
  throw result
}
console.log(result.data)

Python:

result = client.direct({
    "path": "/api/resource/{id}",
    "method": "GET",
    "params": {"id": "example"},
})

Go:

result, err := client.Direct(map[string]any{
    "path":   "/api/resource/{id}",
    "method": "GET",
    "params": map[string]any{"id": "example"},
})
if err != nil {
    panic(err)
}
fmt.Println(result)

Ruby:

result = client.direct({
  "path" => "/api/resource/{id}",
  "method" => "GET",
  "params" => { "id" => "example" },
})

Advanced

Everyday use only needs the sections above. This explains the internals behind every call — relevant when writing custom features.

Every SDK call runs the same five-stage pipeline:

  1. Point — resolve the API endpoint from the operation definition.
  2. Spec — build the HTTP specification (URL, method, headers, body).
  3. Request — send the HTTP request.
  4. Response — receive and parse the response.
  5. Result — extract the result data for the caller.

A feature hook fires at each stage (e.g. PrePoint, PreSpec, PreRequest), so features can inspect or modify the pipeline without forking the SDK.

Features

FeaturePurpose
TestFeatureIn-memory mock transport for testing without a live server

Pass custom features via the extend option at construction time.

Per-language documentation

Upstream API

This SDK is generated from the upstream OpenAPI specification. It is an unofficial client and is not affiliated with the API provider.

Security

Please report security issues to security@voxgig.com. See SECURITY.md. Do not open public issues for suspected vulnerabilities.


Generated from the Statuspage API OpenAPI spec by @voxgig/sdkgen.

Get the Voxgig dispatch

Short notes on building SDKs, CLIs, REPLs, and MCPs for API-first teams, plus the occasional Fireside episode pick.

By signing up you agree to our Terms and Conditions.