Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Components

Create, read and update the components shown on a status page. Components nest one level deep: set a component's parent to another component's id to nest it there.

Get all components in a status page

get

Gets a list of all the components linked to a status page. The list is flat: every component carries a parent (the id it is nested under, or null) and an order, so you can rebuild the nesting yourself. Rows come back parent-first, with each parent's nested components directly after it.

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

Path parameters
status_page_idstringRequired

status_page_id parameter

Query parameters
pagenumberOptional

Optional. Omit it to get every component on the status page, which is what you want when you are rebuilding the nesting — a narrowed response can separate a parent from the components nested under it. Pass a page number to read perPage at a time; total tells you when to stop. A missing, zero, negative or non-numeric value is treated as "no page asked for" and returns the whole set.

Header parameters
x-api-keystringRequired

Your API key. Find it in your Spike dashboard under Settings > API.

Responses
200

Successful response

application/json
totalnumberOptional

How many components the status page has in total, whether or not page narrowed the response.

pagenumber · nullableOptional

The page returned, or null when the whole set was returned because no usable page was asked for.

perPagenumberOptional

How many components a page holds. Read it rather than hardcoding it.

get/api/status-page/{status_page_id}/component
GET /api/status-page/{status_page_id}/component HTTP/1.1
Host: statuspage.spike.sh
x-api-key: text
Accept: */*
{
  "total": 3,
  "page": null,
  "perPage": 20,
  "components": [
    {
      "_id": "66c1d2e3f4a5b60718293a4c",
      "name": "Asia",
      "desc": "Regional infrastructure",
      "status": "operational",
      "effectiveStatus": "partial-outage",
      "parent": null,
      "order": 0,
      "statusPage": "66c1d2e3f4a5b60718293a4b"
    },
    {
      "_id": "66c1d2e3f4a5b60718293a4d",
      "name": "India",
      "desc": "ap-south-1",
      "status": "partial-outage",
      "effectiveStatus": "partial-outage",
      "parent": "66c1d2e3f4a5b60718293a4c",
      "order": 0,
      "statusPage": "66c1d2e3f4a5b60718293a4b"
    },
    {
      "_id": "66c1d2e3f4a5b60718293a4e",
      "name": "Japan",
      "desc": "ap-northeast-1",
      "status": "operational",
      "effectiveStatus": "operational",
      "parent": "66c1d2e3f4a5b60718293a4c",
      "order": 1,
      "statusPage": "66c1d2e3f4a5b60718293a4b"
    }
  ]
}

Get a component

get

Get details of a status page component, including its parent (the component it is nested under, or null) and its order.

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

Path parameters
status_page_idstringRequired

status_page_id parameter

component_idstringRequired

component_id parameter

Header parameters
x-api-keystringRequired

Your API key. Find it in your Spike dashboard under Settings > API.

Responses
200

Successful response

application/json

A component on a status page. Components can be nested one level deep: a top-level component may have nested components under it, and a nested component cannot itself have anything nested under it.

_idstringOptional

The component's id. Use it as the parent of a nested component.

namestringOptional

The component's name, as it appears on the status page.

descstringOptional

Free-text description shown under the name.

statusstring · enumOptional

The component's own status. Any other value is stored but will not reflect on the status page.

Possible values:
effectiveStatusstring · enumOptional

Read-only, computed. The status the status page actually shows for this component: for a top-level component with nested components it is the worst of its own status and its nested components' statuses; for everything else it equals status. Ranked, least to most severe: operational, planned-maintenance, degraded-performance, partial-outage, critical-outage.

Possible values:
parentstring · nullableOptional

The id of the component this one is nested under, or null when it is top-level. Send it on create or update to nest a component. The parent must already exist, belong to the same status page, and be top-level itself.

ordernumberOptional

Sort position among siblings — top-level components share one sequence, and each parent's nested components have their own. Rows are returned parent-first with each parent's nested components directly after it, both sorted by order.

startDatestring · nullableOptional

The date from which uptime is tracked for this component.

statusPagestringOptional

The id of the status page this component belongs to.

spectrumobject[]Optional

The component's 90-day uptime bars.

incidentsobject[]Optional

Incidents that affected this component.

get/api/status-page/{status_page_id}/component/{component_id}
GET /api/status-page/{status_page_id}/component/{component_id} HTTP/1.1
Host: statuspage.spike.sh
x-api-key: text
Accept: */*
{
  "_id": "66c1d2e3f4a5b60718293a4d",
  "name": "India",
  "desc": "ap-south-1",
  "status": "partial-outage",
  "parent": "66c1d2e3f4a5b60718293a4c",
  "order": 0,
  "statusPage": "66c1d2e3f4a5b60718293a4b",
  "spectrum": [],
  "incidents": []
}

Create a component

post

Create a new component for a status page

{
	"components": [
		{
			"name": "title of the component",
			"desc": "Description of hthe component",
			"status": "degraded-performance",
			"private": true
		}
	]
}

You can create multiple components at once.

Params:

name*: Title of the component.

desc*: Updated description

status: Status of the component valid choices for status are operational, degraded-performance, partial-outage, critical-outage any other choice will not reflect on the status page

private: You can choose to private or public the status page based on this flag

parent: The id of the component this one nests under. Omit it (or send null) for a top-level component.

order: Sort position among its siblings.

* Required

Nested components

To nest one component under another, create the parent first and then create the child with the parent's _id as its parent. There is no separate endpoint and no nested request body — the parent field is what makes a component nested.

Rules, each answered as a 400 with error: invalid_parent:

  • The parent must already exist and belong to the same status page.

  • Nesting is one level deep — you cannot nest under a component that is itself nested.

  • A component cannot be its own parent.

Every row in components is validated before any of them is saved, so one bad row writes nothing.

A parent's status is not something you set: the status page shows the worst of the parent's own status and the statuses of everything nested under it. Read it back as effectiveStatus on the list endpoint.

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

Path parameters
status_page_idstringRequired

status_page_id parameter

Header parameters
x-api-keystringRequired

Your API key. Find it in your Spike dashboard under Settings > API.

Body
Responses
200

Successful response

application/json
statusbooleanOptional
post/api/status-page/{status_page_id}/component/create
POST /api/status-page/{status_page_id}/component/create HTTP/1.1
Host: statuspage.spike.sh
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "components": [
    {
      "name": "from API",
      "desc": "from API"
    }
  ]
}
{
  "status": true,
  "components": [
    {
      "_id": "66c1d2e3f4a5b60718293a4d",
      "name": "India",
      "desc": "ap-south-1",
      "status": "operational",
      "parent": "66c1d2e3f4a5b60718293a4c",
      "order": 0,
      "statusPage": "66c1d2e3f4a5b60718293a4b"
    }
  ]
}

Update a component

post

Update a component. You can update name, description, status. you can also choose to private or public a status page.

{
	"name": "title of the component",
	"desc": "Description of hthe component",
	"status": "degraded-performance",
	"private": true
}

Params:

name: Title of the component.

desc: Updated description

status: Status of the component valid choices for status are operational, degraded-performance, partial-outage, critical-outage any other choice will not reflect on the status page

private: You can choose to private or public the status page based on this flag

parent: Where this component is nested. Send a component id to nest it there, null to lift it back to the top level, or leave the field out entirely to leave the nesting untouched.

order: Sort position among its siblings.

Changing where a component is nested

parent has three meanings here, and they are easy to confuse:

  • field absent — leave the nesting as it is

  • null — make this a top-level component

  • a component id — nest it under that component

The same rules as create apply, each answered as a 400 with error: invalid_parent: the parent must exist, be on the same status page, and be top-level itself. A component that already has things nested under it cannot itself be nested — move or delete those first.

Authorizations
x-api-keystringRequired

Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.

Path parameters
status_page_idstringRequired

status_page_id parameter

component_idstringRequired

component_id parameter

Header parameters
x-api-keystringRequired

Your API key. Find it in your Spike dashboard under Settings > API.

Body
namestringOptional
descstringOptional
statusstring · enumOptionalPossible values:
privatebooleanOptional
startDatestringOptional
parentstring · nullableOptional

Where this component is nested. A component id nests it there, null lifts it back to the top level, and leaving the field out entirely leaves the nesting untouched.

ordernumberOptional

Sort position among its siblings.

Responses
200

Successful response

application/json
post/api/status-page/{status_page_id}/component/{component_id}/update
POST /api/status-page/{status_page_id}/component/{component_id}/update HTTP/1.1
Host: statuspage.spike.sh
x-api-key: text
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "name": "edited with api",
  "desc": "edited with api"
}
{
  "component": {
    "_id": "66c1d2e3f4a5b60718293a4d",
    "name": "India",
    "desc": "ap-south-1",
    "status": "degraded-performance",
    "parent": "66c1d2e3f4a5b60718293a4c",
    "order": 0,
    "statusPage": "66c1d2e3f4a5b60718293a4b"
  }
}

Last updated