Skip to content

createChecklyClient

createChecklyClient(opts): object

Defined in: index.ts:65

Creates a Checkly client with alertChannels, checkStatuses, checks, dashboards and statusPages groups.

ChecklyClientOptions

object

alertChannels: object

create: (input) => Promise<AlertChannel>

AlertChannelInput

Promise<AlertChannel>

delete: (id) => Promise<void>

number

Promise<void>

get: (id) => Promise<AlertChannel>

One alert channel. Throws ProviderApiError 404 if there is none.

number

Promise<AlertChannel>

list: () => Promise<AlertChannel[]>

Every alert channel on the account, read page by page.

Promise<AlertChannel[]>

subscribe: (id, subscription) => Promise<AlertChannelSubscription>

Subscribe one check (or group) to a channel, or switch that subscription on or off. This is the call that makes a subscription take effect: Checkly’s create and update accept a subscriptions list but have been seen not to apply it, so read the channel back after writing it and use this for whatever is missing.

number

AlertChannelSubscription

Promise<AlertChannelSubscription>

update: (id, input) => Promise<AlertChannel>

Replace a channel. Checkly’s update takes the whole channel, so send every setting and subscription you want to keep; there is no version check, so callers must not update the same channel concurrently.

number

AlertChannelInput

Promise<AlertChannel>

checks: object

create: (input) => Promise<ApiCheck>

Create a new API check.

ApiCheckInput

Promise<ApiCheck>

delete: (id) => Promise<void>

Delete a check (any type) by id.

string

Promise<void>

get: (id) => Promise<ApiCheck>

Get a single check by id. Throws ProviderApiError 404 if not found.

string

Promise<ApiCheck>

list: (params) => Promise<ApiCheck[]>

List checks, optionally filtered by a case-insensitive partial name match.

ListChecksParams = {}

Promise<ApiCheck[]>

update: (id, input) => Promise<ApiCheck>

Update an existing API check.

string

ApiCheckInput

Promise<ApiCheck>

checkStatuses: object

get: (checkId) => Promise<CheckStatus>

The latest status of one check. Throws ProviderApiError 404 if Checkly has none yet (the check has not run).

string

Promise<CheckStatus>

dashboards: object

create: (input) => Promise<Dashboard>

Make a dashboard. header is required.

DashboardInput & object

Promise<Dashboard>

get: (dashboardId) => Promise<Dashboard>

One dashboard by its dashboardId. Throws ProviderApiError 404 if there is none.

string

Promise<Dashboard>

list: () => Promise<Dashboard[]>

Every dashboard on the account, read page by page.

Promise<Dashboard[]>

update: (dashboardId, input) => Promise<Dashboard>

Change a dashboard. Checkly’s update schema has no required field, so only what is passed is sent; read the dashboard back to see what it holds.

string

DashboardInput

Promise<Dashboard>

heartbeats: object

create: (input) => Promise<Heartbeat>

Create a heartbeat. The response carries the ping URL.

HeartbeatInput

Promise<Heartbeat>

list: (params) => Promise<Heartbeat[]>

List the account’s heartbeats. Checkly’s /checks lists every kind of check, heartbeats included, so this reads a page of it and keeps the ones whose checkType is HEARTBEAT. A page holds up to limit checks of every kind.

ListHeartbeatsParams = {}

Promise<Heartbeat[]>

listAll: () => Promise<Heartbeat[]>

Every heartbeat on the account, reading the list a page at a time until a page comes back short.

Promise<Heartbeat[]>

update: (id, input) => Promise<Heartbeat>

Update a heartbeat. The response carries the ping URL.

string

HeartbeatInput

Promise<Heartbeat>

statusPages: object

components: object

create: (pageId, input) => Promise<StatusComponent>

string

StatusComponentInput

Promise<StatusComponent>

list: (pageId) => Promise<StatusComponent[]>

string

Promise<StatusComponent[]>

update: (pageId, id, input) => Promise<StatusComponent>

string

string

StatusComponentInput

Promise<StatusComponent>

create: (input) => Promise<StatusPage>

Makes a status page.

StatusPageInput

Promise<StatusPage>

customDomain: object

recheck: (pageId) => Promise<CustomDomainVerification>

Asks Checkly to look for the record again.

string

Promise<CustomDomainVerification>

verification: (pageId) => Promise<CustomDomainVerification>

The DNS record Checkly asks for and whether it has been found.

string

Promise<CustomDomainVerification>

get: (id) => Promise<StatusPage>

One status page.

string

Promise<StatusPage>

incidents: object

addUpdate: (pageId, id, input) => Promise<Incident>

Appends an update; one with status RESOLVED closes the incident, there is no resolve endpoint.

string

string

IncidentUpdateInput

Promise<Incident>

create: (pageId, input) => Promise<Incident>

Opens an incident with its first update.

string

IncidentInput

Promise<Incident>

get: (pageId, id) => Promise<Incident>

One incident with its updates.

string

string

Promise<Incident>

list: (pageId) => Promise<IncidentSummary[]>

The page’s incidents, most recently updated first, with no updates.

string

Promise<IncidentSummary[]>

update: (pageId, id, input) => Promise<Incident>

Renames an incident or sets its component impacts; the updates stay as they are.

string

string

IncidentPatch

Promise<Incident>

list: () => Promise<StatusPage[]>

Every status page on the account.

Promise<StatusPage[]>

rules: object

create: (pageId, input) => Promise<StatusRule>

string

StatusRuleInput

Promise<StatusRule>

list: (pageId) => Promise<StatusRule[]>

string

Promise<StatusRule[]>

update: (pageId, id, input) => Promise<StatusRule>

string

string

StatusRuleInput

Promise<StatusRule>

update: (id, input) => Promise<StatusPage>

Replaces a status page: the fields not sent take their defaults, so send the whole thing.

string

StatusPageInput

Promise<StatusPage>