createChecklyClient
createChecklyClient(
opts):object
Defined in: index.ts:65
Creates a Checkly client with alertChannels, checkStatuses, checks, dashboards and statusPages groups.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”object
alertChannels
Section titled “alertChannels”alertChannels:
object
alertChannels.create
Section titled “alertChannels.create”create: (
input) =>Promise<AlertChannel>
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<AlertChannel>
alertChannels.delete
Section titled “alertChannels.delete”delete: (
id) =>Promise<void>
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<void>
alertChannels.get
Section titled “alertChannels.get”get: (
id) =>Promise<AlertChannel>
One alert channel. Throws ProviderApiError 404 if there is none.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<AlertChannel>
alertChannels.list
Section titled “alertChannels.list”list: () =>
Promise<AlertChannel[]>
Every alert channel on the account, read page by page.
Returns
Section titled “Returns”Promise<AlertChannel[]>
alertChannels.subscribe
Section titled “alertChannels.subscribe”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.
Parameters
Section titled “Parameters”number
subscription
Section titled “subscription”Returns
Section titled “Returns”Promise<AlertChannelSubscription>
alertChannels.update
Section titled “alertChannels.update”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.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<AlertChannel>
checks
Section titled “checks”checks:
object
checks.create
Section titled “checks.create”create: (
input) =>Promise<ApiCheck>
Create a new API check.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ApiCheck>
checks.delete
Section titled “checks.delete”delete: (
id) =>Promise<void>
Delete a check (any type) by id.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
checks.get
Section titled “checks.get”get: (
id) =>Promise<ApiCheck>
Get a single check by id. Throws ProviderApiError 404 if not found.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ApiCheck>
checks.list
Section titled “checks.list”list: (
params) =>Promise<ApiCheck[]>
List checks, optionally filtered by a case-insensitive partial name match.
Parameters
Section titled “Parameters”params?
Section titled “params?”ListChecksParams = {}
Returns
Section titled “Returns”Promise<ApiCheck[]>
checks.update
Section titled “checks.update”update: (
id,input) =>Promise<ApiCheck>
Update an existing API check.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ApiCheck>
checkStatuses
Section titled “checkStatuses”checkStatuses:
object
checkStatuses.get
Section titled “checkStatuses.get”get: (
checkId) =>Promise<CheckStatus>
The latest status of one check. Throws ProviderApiError 404 if Checkly has none yet (the check has not run).
Parameters
Section titled “Parameters”checkId
Section titled “checkId”string
Returns
Section titled “Returns”Promise<CheckStatus>
dashboards
Section titled “dashboards”dashboards:
object
dashboards.create
Section titled “dashboards.create”create: (
input) =>Promise<Dashboard>
Make a dashboard. header is required.
Parameters
Section titled “Parameters”DashboardInput & object
Returns
Section titled “Returns”Promise<Dashboard>
dashboards.get
Section titled “dashboards.get”get: (
dashboardId) =>Promise<Dashboard>
One dashboard by its dashboardId. Throws ProviderApiError 404 if there is none.
Parameters
Section titled “Parameters”dashboardId
Section titled “dashboardId”string
Returns
Section titled “Returns”Promise<Dashboard>
dashboards.list
Section titled “dashboards.list”list: () =>
Promise<Dashboard[]>
Every dashboard on the account, read page by page.
Returns
Section titled “Returns”Promise<Dashboard[]>
dashboards.update
Section titled “dashboards.update”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.
Parameters
Section titled “Parameters”dashboardId
Section titled “dashboardId”string
Returns
Section titled “Returns”Promise<Dashboard>
heartbeats
Section titled “heartbeats”heartbeats:
object
heartbeats.create
Section titled “heartbeats.create”create: (
input) =>Promise<Heartbeat>
Create a heartbeat. The response carries the ping URL.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<Heartbeat>
heartbeats.list
Section titled “heartbeats.list”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.
Parameters
Section titled “Parameters”params?
Section titled “params?”ListHeartbeatsParams = {}
Returns
Section titled “Returns”Promise<Heartbeat[]>
heartbeats.listAll
Section titled “heartbeats.listAll”listAll: () =>
Promise<Heartbeat[]>
Every heartbeat on the account, reading the list a page at a time until a page comes back short.
Returns
Section titled “Returns”Promise<Heartbeat[]>
heartbeats.update
Section titled “heartbeats.update”update: (
id,input) =>Promise<Heartbeat>
Update a heartbeat. The response carries the ping URL.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<Heartbeat>
statusPages
Section titled “statusPages”statusPages:
object
statusPages.components
Section titled “statusPages.components”components:
object
statusPages.components.create
Section titled “statusPages.components.create”create: (
pageId,input) =>Promise<StatusComponent>
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
Returns
Section titled “Returns”Promise<StatusComponent>
statusPages.components.list
Section titled “statusPages.components.list”list: (
pageId) =>Promise<StatusComponent[]>
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
Returns
Section titled “Returns”Promise<StatusComponent[]>
statusPages.components.update
Section titled “statusPages.components.update”update: (
pageId,id,input) =>Promise<StatusComponent>
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
string
Returns
Section titled “Returns”Promise<StatusComponent>
statusPages.create
Section titled “statusPages.create”create: (
input) =>Promise<StatusPage>
Makes a status page.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<StatusPage>
statusPages.customDomain
Section titled “statusPages.customDomain”customDomain:
object
statusPages.customDomain.recheck
Section titled “statusPages.customDomain.recheck”recheck: (
pageId) =>Promise<CustomDomainVerification>
Asks Checkly to look for the record again.
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
Returns
Section titled “Returns”Promise<CustomDomainVerification>
statusPages.customDomain.verification
Section titled “statusPages.customDomain.verification”verification: (
pageId) =>Promise<CustomDomainVerification>
The DNS record Checkly asks for and whether it has been found.
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
Returns
Section titled “Returns”Promise<CustomDomainVerification>
statusPages.get
Section titled “statusPages.get”get: (
id) =>Promise<StatusPage>
One status page.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<StatusPage>
statusPages.incidents
Section titled “statusPages.incidents”incidents:
object
statusPages.incidents.addUpdate
Section titled “statusPages.incidents.addUpdate”addUpdate: (
pageId,id,input) =>Promise<Incident>
Appends an update; one with status RESOLVED closes the incident, there is no resolve endpoint.
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
string
Returns
Section titled “Returns”Promise<Incident>
statusPages.incidents.create
Section titled “statusPages.incidents.create”create: (
pageId,input) =>Promise<Incident>
Opens an incident with its first update.
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
Returns
Section titled “Returns”Promise<Incident>
statusPages.incidents.get
Section titled “statusPages.incidents.get”get: (
pageId,id) =>Promise<Incident>
One incident with its updates.
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
string
Returns
Section titled “Returns”Promise<Incident>
statusPages.incidents.list
Section titled “statusPages.incidents.list”list: (
pageId) =>Promise<IncidentSummary[]>
The page’s incidents, most recently updated first, with no updates.
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
Returns
Section titled “Returns”Promise<IncidentSummary[]>
statusPages.incidents.update
Section titled “statusPages.incidents.update”update: (
pageId,id,input) =>Promise<Incident>
Renames an incident or sets its component impacts; the updates stay as they are.
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
string
Returns
Section titled “Returns”Promise<Incident>
statusPages.list
Section titled “statusPages.list”list: () =>
Promise<StatusPage[]>
Every status page on the account.
Returns
Section titled “Returns”Promise<StatusPage[]>
statusPages.rules
Section titled “statusPages.rules”rules:
object
statusPages.rules.create
Section titled “statusPages.rules.create”create: (
pageId,input) =>Promise<StatusRule>
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
Returns
Section titled “Returns”Promise<StatusRule>
statusPages.rules.list
Section titled “statusPages.rules.list”list: (
pageId) =>Promise<StatusRule[]>
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
Returns
Section titled “Returns”Promise<StatusRule[]>
statusPages.rules.update
Section titled “statusPages.rules.update”update: (
pageId,id,input) =>Promise<StatusRule>
Parameters
Section titled “Parameters”pageId
Section titled “pageId”string
string
Returns
Section titled “Returns”Promise<StatusRule>
statusPages.update
Section titled “statusPages.update”update: (
id,input) =>Promise<StatusPage>
Replaces a status page: the fields not sent take their defaults, so send the whole thing.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<StatusPage>