New to Corsair? See API access, authentication, and error handling.
Data
list
data.list
Read a monitor’s check history, optionally as a diff per entry
Risk: read
await corsair.wachete.api.data.list({ id: '9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e', returnDiff: true });
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The monitor id. |
from | string | No | ISO 8601 start. |
to | string | No | ISO 8601 end. |
count | number | No | — |
returnDiff | boolean | No | Return a Google-style diff per entry rather than the raw value. |
continuationToken | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | null | No | — |
continuationToken | string | null | No | — |
data full type
data full type
{
lastCheckTimestamp?: string | null,
valueChangedTimestamp?: string | null,
raw?: string | null,
error?: string | null,
diff?: {
o?: number | null,
t?: string | null,
operation?: number | null,
text?: string | null
}[] | null
}[] | null
Folders
delete
folders.delete
Delete a folder with every subfolder and monitor inside it; this cannot be undone
Risk: destructive
await corsair.wachete.api.folders.delete({ id: '576b3f7e-e126-4e92-9b95-f72a8d187a18' });
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
deleted | true | Yes | — |
list
folders.list
List a folder subfolders and monitors, with the path to that folder
Risk: read
await corsair.wachete.api.folders.list({ parentId: '576b3f7e-e126-4e92-9b95-f72a8d187a18' });
| Name | Type | Required | Description |
|---|---|---|---|
parentId | string | No | The folder to list. Omit to list the root. |
continuationToken | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
subfolders | object[] | null | No | — |
tasks | object[] | null | No | — |
path | object[] | null | No | — |
continuationToken | string | null | No | — |
subfolders full type
subfolders full type
{
id?: string | null,
name?: string | null,
parentId?: string | null,
count?: number | null,
failedCount?: number | null,
pausedCount?: number | null
}[] | null
tasks full type
tasks full type
{
id?: string | null,
name?: string | null,
method?: string | null,
url?: string | null,
headers?: {
key?: string | null,
value?: string | null
}[] | null,
body?: string | null,
xPath?: string | null,
excludeXPath?: string | null,
regex?: string | null,
alerts?: {
type?: string | number | null,
value?: string | null,
parameters?: {
compare?: string | number | null,
value?: string | null
} | null
}[] | null,
recurrenceInSeconds?: number | null,
folderId?: string | null,
data?: {
lastCheckTimestamp?: string | null,
valueChangedTimestamp?: string | null,
raw?: string | null,
error?: string | null,
diff?: {
o?: number | null,
t?: string | null,
operation?: number | null,
text?: string | null
}[] | null
} | null,
notificationEndpoints?: {
type?: string | number | null,
value?: string | null
}[] | null,
proxies?: {
location?: string | null
}[] | null,
location?: string | number | null,
dynamicContent?: boolean | null,
scrollPage?: boolean | null,
ignoreInvalidPages?: boolean | null,
collectRawHtml?: boolean | null,
jobType?: string | number | null,
crawlingDepth?: number | null,
crawlBinaryContent?: boolean | null,
urlFilter?: {
include?: {
filter?: string | null,
type?: string | number | null
}[] | null,
exclude?: {
filter?: string | null,
type?: string | number | null
}[] | null
} | null,
crawlPagesFromAllDomains?: boolean | null,
note?: string | null
}[] | null
path full type
path full type
{
id?: string | null,
name?: string | null,
parentId?: string | null,
count?: number | null,
failedCount?: number | null,
pausedCount?: number | null
}[] | null
move
folders.move
Move monitors and folders into another folder
Risk: write
await corsair.wachete.api.folders.move({ folderId: '576b3f7e-e126-4e92-9b95-f72a8d187a18', taskIds: ['9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e'] });
| Name | Type | Required | Description |
|---|---|---|---|
folderId | string | Yes | The destination folder. An empty string means the root. |
taskIds | string[] | No | — |
folderIds | string[] | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
moved | true | Yes | — |
upsert
folders.upsert
Create a folder, or rename and move one by sending its id
Risk: write
await corsair.wachete.api.folders.upsert({ name: 'Products' });
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | Omit to create, send to rename or move that folder. |
name | string | Yes | — |
parentId | string | No | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | null | No | — |
name | string | null | No | — |
parentId | string | null | No | — |
count | number | null | No | — |
failedCount | number | null | No | — |
pausedCount | number | null | No | — |
Notifications
get
notifications.get
Read one notification: the monitor name, URL, time and the HTML that was sent
Risk: read
await corsair.wachete.api.notifications.get({ alertId: 'alert-1' });
| Name | Type | Required | Description |
|---|---|---|---|
alertId | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
jobType | string | number | null | No | — |
syntheticExpression | string | null | No | — |
url | string | null | No | — |
name | string | null | No | — |
html | string | null | No | — |
timestampUtc | string | null | No | — |
list
notifications.list
List triggered notifications newest first, filtered by monitor and date range
Risk: read
await corsair.wachete.api.notifications.list({ taskId: '9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e', from: '2024-01-01T00:00:00Z' });
| Name | Type | Required | Description |
|---|---|---|---|
taskId | string | No | Only this monitor. Omit for every monitor. |
from | string | No | ISO 8601 start. |
to | string | No | ISO 8601 end. |
count | number | No | — |
continuationToken | string | No | The token the previous page returned. |
html | boolean | No | Include the notification HTML, which makes the response large. |
| Name | Type | Required | Description |
|---|---|---|---|
data | object[] | null | No | — |
continuationToken | string | null | No | Pass this back to read the next page; null on the last. |
data full type
data full type
{
id?: string | null,
type?: string | number | null,
current?: string | null,
comparand?: string | null,
html?: string | null,
error?: string | null,
timestamp?: string | null,
serverTime?: string | null,
taskId?: string | null,
taskName?: string | null,
url?: string | null
}[] | null
Tasks
delete
tasks.delete
Permanently delete a monitor and its history; this cannot be undone
Risk: destructive
await corsair.wachete.api.tasks.delete({ id: '9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e' });
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
deleted | true | Yes | — |
get
tasks.get
Read one monitor with its settings, its last value and when that value changed
Risk: read
await corsair.wachete.api.tasks.get({ id: '9f7e1ae7-9a7f-49e0-baa2-ffd8760f7b9e' });
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
| Name | Type | Required | Description |
|---|---|---|---|
id | string | null | No | — |
name | string | null | No | — |
method | string | null | No | — |
url | string | null | No | — |
headers | object[] | null | No | — |
body | string | null | No | — |
xPath | string | null | No | — |
excludeXPath | string | null | No | — |
regex | string | null | No | — |
alerts | object[] | null | No | — |
recurrenceInSeconds | number | null | No | — |
folderId | string | null | No | — |
data | object | null | No | — |
notificationEndpoints | object[] | null | No | — |
proxies | object[] | null | No | — |
location | string | number | null | No | — |
dynamicContent | boolean | null | No | — |
scrollPage | boolean | null | No | — |
ignoreInvalidPages | boolean | null | No | — |
collectRawHtml | boolean | null | No | — |
jobType | string | number | null | No | — |
crawlingDepth | number | null | No | — |
crawlBinaryContent | boolean | null | No | — |
urlFilter | object | null | No | — |
crawlPagesFromAllDomains | boolean | null | No | — |
note | string | null | No | — |
headers full type
headers full type
{
key?: string | null,
value?: string | null
}[] | null
alerts full type
alerts full type
{
type?: string | number | null,
value?: string | null,
parameters?: {
compare?: string | number | null,
value?: string | null
} | null
}[] | null
data full type
data full type
{
lastCheckTimestamp?: string | null,
valueChangedTimestamp?: string | null,
raw?: string | null,
error?: string | null,
diff?: {
o?: number | null,
t?: string | null,
operation?: number | null,
text?: string | null
}[] | null
} | null
notificationEndpoints full type
notificationEndpoints full type
{
type?: string | number | null,
value?: string | null
}[] | null
proxies full type
proxies full type
{
location?: string | null
}[] | null
urlFilter full type
urlFilter full type
{
include?: {
filter?: string | null,
type?: string | number | null
}[] | null,
exclude?: {
filter?: string | null,
type?: string | number | null
}[] | null
} | null
pages
tasks.pages
List the pages a Portal monitor is crawling
Risk: read
await corsair.wachete.api.tasks.pages({ id: 'c0a1b2c3-1111-2222-3333-444455556666' });
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | A Portal monitor id. |
object[]
Output full type
Output full type
{
id?: string | null,
name?: string | null,
url?: string | null,
data?: {
lastCheckTimestamp?: string | null,
valueChangedTimestamp?: string | null,
raw?: string | null,
error?: string | null,
diff?: {
o?: number | null,
t?: string | null,
operation?: number | null,
text?: string | null
}[] | null
} | null
}[]
search
tasks.search
Search monitors by name, returning at most 500 and no paging
Risk: read
await corsair.wachete.api.tasks.search({ query: 'docs' });
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | A word matched against monitor names and URLs. Whole words only: a hyphenated name is found by one of its words, not the full name. |
object[]
Output full type
Output full type
{
id?: string | null,
name?: string | null,
method?: string | null,
url?: string | null,
headers?: {
key?: string | null,
value?: string | null
}[] | null,
body?: string | null,
xPath?: string | null,
excludeXPath?: string | null,
regex?: string | null,
alerts?: {
type?: string | number | null,
value?: string | null,
parameters?: {
compare?: string | number | null,
value?: string | null
} | null
}[] | null,
recurrenceInSeconds?: number | null,
folderId?: string | null,
data?: {
lastCheckTimestamp?: string | null,
valueChangedTimestamp?: string | null,
raw?: string | null,
error?: string | null,
diff?: {
o?: number | null,
t?: string | null,
operation?: number | null,
text?: string | null
}[] | null
} | null,
notificationEndpoints?: {
type?: string | number | null,
value?: string | null
}[] | null,
proxies?: {
location?: string | null
}[] | null,
location?: string | number | null,
dynamicContent?: boolean | null,
scrollPage?: boolean | null,
ignoreInvalidPages?: boolean | null,
collectRawHtml?: boolean | null,
jobType?: string | number | null,
crawlingDepth?: number | null,
crawlBinaryContent?: boolean | null,
urlFilter?: {
include?: {
filter?: string | null,
type?: string | number | null
}[] | null,
exclude?: {
filter?: string | null,
type?: string | number | null
}[] | null
} | null,
crawlPagesFromAllDomains?: boolean | null,
note?: string | null
}[]
upsert
tasks.upsert
Create a monitor, or update one by sending its id; sets the URL, the part of the page watched, how often to check and who to notify
Risk: write
await corsair.wachete.api.tasks.upsert({ name: 'My First Monitor', url: 'http://www.mypage.com', xPath: '/', recurrenceInSeconds: 86400, alerts: [{ type: 'Error' }, { type: 'NotEq' }] });
| Name | Type | Required | Description |
|---|---|---|---|
id | string | No | Omit to create, send to update that monitor. |
name | string | Yes | — |
url | string | Yes | — |
xPath | string | No | The part of the page to watch. / is the whole page. |
excludeXPath | string | No | A part of the page to ignore, such as a timestamp. |
regex | string | No | — |
method | string | No | The HTTP method to fetch with. Defaults to GET. |
headers | object[] | No | Request headers, as { key, value } pairs. |
body | string | No | Request body, for a POST monitor. |
alerts | object[] | No | — |
recurrenceInSeconds | number | Yes | How often to check, in seconds. 86400 is daily. |
folderId | string | No | — |
notificationEndpoints | object[] | No | Who to tell. An empty list uses the default email recipients; omit it to notify every endpoint on the account. |
proxies | object[] | No | — |
location | us | gb | number | No | The location to check from. The docs name us and gb. |
dynamicContent | boolean | No | Set when the watched content is rendered by JavaScript. |
scrollPage | boolean | No | — |
ignoreInvalidPages | boolean | No | — |
collectRawHtml | boolean | No | — |
jobType | SinglePage | Portal | number | No | SinglePage watches one page; Portal crawls a site. Defaults to SinglePage. |
crawlingDepth | 1 | 2 | 3 | No | Portal only: how deep to crawl, 1 to 3. Defaults to 2. |
crawlBinaryContent | boolean | No | — |
urlFilter | object | No | Portal only: which crawled URLs to keep or skip. |
crawlPagesFromAllDomains | boolean | No | — |
note | string | No | — |
headers full type
headers full type
{
key: string,
value: string
}[]
alerts full type
alerts full type
{
type: Error | Changed | NotEq | Eq | Contains | NotContains | StartsWith | EndsWith | Regex | Lower | Greater | Exists | NotExists | number,
value?: string | null,
parameters?: {
compare?: Error | Changed | NotEq | Eq | Contains | NotContains | StartsWith | EndsWith | Regex | Lower | Greater | Exists | NotExists | number | null,
value?: string | null
} | null
}[]
notificationEndpoints full type
notificationEndpoints full type
{
type: Email | Webhook | Sms | Slack | Teams | Telegram | Pushover | Discord | 0 | 1 | 4 | 8 | 16 | 32 | 64 | 92,
value: string
}[]
proxies full type
proxies full type
{
location: string
}[]
urlFilter full type
urlFilter full type
{
include?: {
filter: string,
type: Contains | Regex | number
}[] | null,
exclude?: {
filter: string,
type: Contains | Regex | number
}[] | null
}
| Name | Type | Required | Description |
|---|---|---|---|
id | string | null | No | — |
name | string | null | No | — |
method | string | null | No | — |
url | string | null | No | — |
headers | object[] | null | No | — |
body | string | null | No | — |
xPath | string | null | No | — |
excludeXPath | string | null | No | — |
regex | string | null | No | — |
alerts | object[] | null | No | — |
recurrenceInSeconds | number | null | No | — |
folderId | string | null | No | — |
data | object | null | No | — |
notificationEndpoints | object[] | null | No | — |
proxies | object[] | null | No | — |
location | string | number | null | No | — |
dynamicContent | boolean | null | No | — |
scrollPage | boolean | null | No | — |
ignoreInvalidPages | boolean | null | No | — |
collectRawHtml | boolean | null | No | — |
jobType | string | number | null | No | — |
crawlingDepth | number | null | No | — |
crawlBinaryContent | boolean | null | No | — |
urlFilter | object | null | No | — |
crawlPagesFromAllDomains | boolean | null | No | — |
note | string | null | No | — |
headers full type
headers full type
{
key?: string | null,
value?: string | null
}[] | null
alerts full type
alerts full type
{
type?: string | number | null,
value?: string | null,
parameters?: {
compare?: string | number | null,
value?: string | null
} | null
}[] | null
data full type
data full type
{
lastCheckTimestamp?: string | null,
valueChangedTimestamp?: string | null,
raw?: string | null,
error?: string | null,
diff?: {
o?: number | null,
t?: string | null,
operation?: number | null,
text?: string | null
}[] | null
} | null
notificationEndpoints full type
notificationEndpoints full type
{
type?: string | number | null,
value?: string | null
}[] | null
proxies full type
proxies full type
{
location?: string | null
}[] | null
urlFilter full type
urlFilter full type
{
include?: {
filter?: string | null,
type?: string | number | null
}[] | null,
exclude?: {
filter?: string | null,
type?: string | number | null
}[] | null
} | null