Skip to content
betterstack-alchemyUnofficial

Incidents.StatusPageSection

Kind ResourceType id BetterStack.Incidents.StatusPageSectionSource src/Incidents/StatusPageSection.tsLive test available A live lifecycle test exists: it runs against the offline mock by default and against the real API under bun run test:live. This records that the test exists, not a dated live run (see Compatibility). Test file: test/Incidents/StatusPageSection.test.ts.

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.

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.

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.

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.