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.
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.
Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.
status_page_id parameter
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.
Your API key. Find it in your Spike dashboard under Settings > API.
Successful response
How many components the status page has in total, whether or not page narrowed the response.
The page returned, or null when the whole set was returned because no usable page was asked for.
How many components a page holds. Read it rather than hardcoding it.
Unauthorized
Not found
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 details of a status page component, including its parent (the component it is nested under, or null) and its order.
Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.
status_page_id parameter
component_id parameter
Your API key. Find it in your Spike dashboard under Settings > API.
Successful response
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.
The component's id. Use it as the parent of a nested component.
The component's name, as it appears on the status page.
Free-text description shown under the name.
The component's own status. Any other value is stored but will not reflect on the status page.
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.
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.
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.
The date from which uptime is tracked for this component.
The id of the status page this component belongs to.
The component's 90-day uptime bars.
Incidents that affected this component.
Unauthorized
Not found
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 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.
Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.
status_page_id parameter
Your API key. Find it in your Spike dashboard under Settings > API.
Successful response
Bad request. error: bad_request when a row is unusable (for example a blank name, naming the row that failed), and error: invalid_parent when parent breaks one of the nesting rules. Nothing is saved in either case.
Unauthorized
Not found
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. 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 componenta 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.
Your organisation's API key. Create one in the Spike dashboard under Settings > API. Sent on every request as the x-api-key header.
status_page_id parameter
component_id parameter
Your API key. Find it in your Spike dashboard under Settings > API.
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.
Sort position among its siblings.
Successful response
Bad request. error: invalid_parent when parent breaks one of the nesting rules; nothing is saved.
Unauthorized
Not found
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

