Incidents.StatusPageSection
A section of a Better Stack StatusPage: a titled block that groups
the StatusPageResources shown on the page (a “Website” section, an
“API” section, …).
name, position and fixedPosition update in place; statusPageId
(the parent) and teamId replace the section. position counts from 0:
inserting at a position shifts the sections at or after it, and with
fixedPosition: true the position is saved as given and nothing moves.
fixedPosition is never returned by the API.
Deleting a section also deletes the status page resources placed in it
(the monitors and heartbeats they show are not affected); a
StatusPageResource that pointed into a deleted section is created
again on its next deploy.
Adding sections to a page
Section titled “Adding sections to a page”Two sections in a fixed order
const page = yield* BetterStack.Incidents.StatusPage("status", { companyName: "Acme Cloud", timezone: "UTC",});const website = yield* BetterStack.Incidents.StatusPageSection("website", { statusPageId: page.id, name: "Website", position: 0,});const api = yield* BetterStack.Incidents.StatusPageSection("api", { statusPageId: page.id, name: "API", position: 1,});statusPageId string required
fixedPosition boolean
Saves position as given, without moving the other sections.
name string | null
Section name.
position number
Display order on the page, counting from 0. A position past the end lands last. Moving a section shifts only the sections between its old and new place. Must be a non-negative integer. Leave it out to add a new section at the end or to keep an updated one in place. Inserting at a position shifts the sections at or after it down one. With fixed_position set to true, the position is written as given and nothing shifts.
teamId string
Team that owns the resource, such as t123. Defaults to the credentials' team (BETTERSTACK_TEAM_ID, or the profile's team). Changing it replaces the resource.
Attributes
Section titled “Attributes”id string always set
The status_page_section's id.
statusPageId string always set
The status page the section is on.
name string | null
Section name.
position number
Display order on the page, counting from 0. A position past the end lands last. Moving a section shifts only the sections between its old and new place.
Lookup
Section titled “Lookup”StatusPageSection.lookup(props) reads an object this stack does not manage. It is never created, updated or deleted.
id string required
The section's id.
statusPageId string required
The status page's id.
teamId string
Team whose token selects the page, such as t123. Defaults to the credentials' team.