> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Pingdom API reference

> API reference for the Pingdom plugin in Corsair: every `pingdom.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Alerting

### contacts.create

`alerting.contacts.create`

Create an alerting contact with notification targets

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.alerting.contacts.create({ name: "John Doe", notificationTargets: [{ email: "john@example.com", severity: "HIGH" }, { email: "john@example.com", severity: "LOW" }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Contact name |
| `paused` | `boolean` | No | Create the contact paused |
| `notificationTargets` | `object[]` | Yes | Notification targets, each an email or a number (+countryCode) with severity HIGH or LOW; Pingdom wants at least one HIGH and one LOW |

notificationTargets each take email, or number with countryCode, plus severity HIGH or LOW; Pingdom wants at least one HIGH and one LOW target.

> [accordion] notificationTargets full type
>
> ```ts theme={null}
> {
>   severity: HIGH | LOW,
>   email?: string,
>   number?: string,
>   countryCode?: string,
>   provider?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact` | `object` | Yes | — |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: number | null
> }
> ```

***

### contacts.delete

`alerting.contacts.delete`

Delete an alerting contact

**Risk:** `destructive`

```ts theme={null}
await corsair.pingdom.api.alerting.contacts.delete({ contactId: 111250 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contactId` | `number` | Yes | The contact id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Deletion result |

***

### contacts.get

`alerting.contacts.get`

Read one alerting contact

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.alerting.contacts.get({ contactId: 111250 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contactId` | `number` | Yes | The contact id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact` | `object \| null` | No | The contact |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   paused?: boolean | null,
>   type?: string | null,
>   notification_targets?: {
>     email?: {
>       severity?: string | null,
>       address?: string | null,
>       country_code?: string | null,
>       number?: string | null,
>       provider?: string | null
>     }[] | null,
>     sms?: {
>       severity?: string | null,
>       address?: string | null,
>       country_code?: string | null,
>       number?: string | null,
>       provider?: string | null
>     }[] | null
>   } | null
> } | null
> ```

***

### contacts.list

`alerting.contacts.list`

List the alerting contacts

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.alerting.contacts.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contacts` | `object[]` | Yes | — |

> [accordion] contacts full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   paused?: boolean | null,
>   type?: string | null,
>   notification_targets?: {
>     email?: {
>       severity?: string | null,
>       address?: string | null,
>       country_code?: string | null,
>       number?: string | null,
>       provider?: string | null
>     }[] | null,
>     sms?: {
>       severity?: string | null,
>       address?: string | null,
>       country_code?: string | null,
>       number?: string | null,
>       provider?: string | null
>     }[] | null
>   } | null
> }[]
> ```

***

### contacts.update

`alerting.contacts.update`

Modify an alerting contact

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.alerting.contacts.update({ contactId: 111250, name: "John Doe", paused: true, notificationTargets: [{ email: "john@example.com", severity: "HIGH" }, { email: "john@example.com", severity: "LOW" }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contactId` | `number` | Yes | The contact id |
| `name` | `string` | Yes | Contact name |
| `paused` | `boolean` | Yes | Whether alerts are paused |
| `notificationTargets` | `object[]` | Yes | Notification targets, each an email or a number (+countryCode) with severity HIGH or LOW; Pingdom wants at least one HIGH and one LOW |

> [accordion] notificationTargets full type
>
> ```ts theme={null}
> {
>   severity: HIGH | LOW,
>   email?: string,
>   number?: string,
>   countryCode?: string,
>   provider?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact` | `object \| null` | No | The contact |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   paused?: boolean | null,
>   type?: string | null,
>   notification_targets?: {
>     email?: {
>       severity?: string | null,
>       address?: string | null,
>       country_code?: string | null,
>       number?: string | null,
>       provider?: string | null
>     }[] | null,
>     sms?: {
>       severity?: string | null,
>       address?: string | null,
>       country_code?: string | null,
>       number?: string | null,
>       provider?: string | null
>     }[] | null
>   } | null
> } | null
> ```

***

### teams.create

`alerting.teams.create`

Create an alerting team

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.alerting.teams.create({ name: "API Team", memberIds: [12345, 54321] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Team name |
| `memberIds` | `number[]` | Yes | Contact ids of the team members |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `team` | `object` | Yes | — |

> [accordion] team full type
>
> ```ts theme={null}
> {
>   id?: number | null
> }
> ```

***

### teams.delete

`alerting.teams.delete`

Delete an alerting team

**Risk:** `destructive`

```ts theme={null}
await corsair.pingdom.api.alerting.teams.delete({ teamId: 63 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `teamId` | `number` | Yes | The team id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Deletion result |

***

### teams.get

`alerting.teams.get`

Read one alerting team

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.alerting.teams.get({ teamId: 63 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `teamId` | `number` | Yes | The team id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `team` | `object \| null` | No | The team |

> [accordion] team full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   members?: {
>     id?: number | null,
>     name?: string | null
>   }[] | null
> } | null
> ```

***

### teams.list

`alerting.teams.list`

List the alerting teams

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.alerting.teams.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `teams` | `object[]` | Yes | — |

> [accordion] teams full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   members?: {
>     id?: number | null,
>     name?: string | null
>   }[] | null
> }[]
> ```

***

### teams.update

`alerting.teams.update`

Modify an alerting team

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.alerting.teams.update({ teamId: 63, name: "Engineering", memberIds: [111250] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `teamId` | `number` | Yes | The team id |
| `name` | `string` | Yes | Team name |
| `memberIds` | `number[]` | Yes | Contact ids of the team members |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `team` | `object \| null` | No | The team |

> [accordion] team full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   members?: {
>     id?: number | null,
>     name?: string | null
>   }[] | null
> } | null
> ```

***

## Analysis

### get

`analysis.get`

Read one raw root cause analysis

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.analysis.get({ checkId: 100, analysisId: 123 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |
| `analysisId` | `number` | Yes | The analysis id |

**Output:** *empty object*

***

### list

`analysis.list`

List the latest root cause analyses of a check

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.analysis.list({ checkId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |
| `limit` | `number` | No | Maximum analyses returned |
| `offset` | `number` | No | Offset for pagination |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `analysis` | `object[]` | Yes | — |

> [accordion] analysis full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   time?: number | null,
>   rootcause?: any | null
> }[]
> ```

***

## Checks

### create

`checks.create`

Create an uptime check of any documented type

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.checks.create({ name: "api", host: "example.com", type: "http", typeSettings: { url: "/health", encryption: true }, resolution: "5" });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | Check name |
| `host` | `string` | Yes | Target host |
| `type` | `http \| httpcustom \| tcp \| ping \| dns \| udp \| smtp \| pop3 \| imap` | Yes | Type of check |
| `typeSettings` | `Record<string, any>` | No | Type-specific settings as flat body fields, per the check type docs: http takes url/encryption/port/shouldcontain/shouldnotcontain/postdata/requestheaders/verify\_certificate/ssl\_down\_days\_before; tcp takes port/encryption/stringtoexpect; dns takes nameserver/expectedip; udp/smtp/pop3/imap take port/stringtoexpect |
| `paused` | `boolean` | No | Create or leave the check paused |
| `resolution` | `1 \| 5 \| 15 \| 30 \| 60 \| 1 \| 5 \| 15 \| 30 \| 60` | No | Test interval in minutes (1, 5, 15, 30 or 60) |
| `userIds` | `number[]` | No | User ids to alert |
| `teamIds` | `number[]` | No | Team ids to alert |
| `integrationIds` | `number[]` | No | Integration ids to alert |
| `sendNotificationWhenDown` | `number` | No | Alert after this many consecutive failures |
| `notifyAgainEvery` | `number` | No | Re-notify every N failures |
| `notifyWhenBackup` | `boolean` | No | Send an alert when the check recovers |
| `tags` | `string` | No | Comma-separated tags for filtering |
| `probeFilters` | `string[]` | No | Probe region filters, e.g. \["region: EU"] or \["region: NA"] |
| `ipv6` | `boolean` | No | Test over IPv6 |
| `responseTimeThreshold` | `number` | No | Response time threshold in ms |
| `customMessage` | `string` | No | Custom alert message |

type is one of http, httpcustom, tcp, ping, dns, udp, smtp, pop3, imap; typeSettings carries the flat type-specific fields from the docs (http: url, encryption, port, shouldcontain, shouldnotcontain, postdata, requestheaders, verify\_certificate, ssl\_down\_days\_before; tcp: port, encryption, stringtoexpect; dns: nameserver, expectedip).

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `check` | `object` | Yes | — |

> [accordion] check full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null
> }
> ```

***

### delete

`checks.delete`

Delete a check

**Risk:** `destructive`

```ts theme={null}
await corsair.pingdom.api.checks.delete({ checkId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Deletion result |

***

### deleteMulti

`checks.deleteMulti`

Delete several checks at once

**Risk:** `destructive`

```ts theme={null}
await corsair.pingdom.api.checks.deleteMulti({ checkIds: [1, 2, 3] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkIds` | `number[]` | Yes | Ids of the checks to delete |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Deletion result |

***

### get

`checks.get`

Read one check with its type settings

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.checks.get({ checkId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `check` | `object` | Yes | A Pingdom check with its settings |

> [accordion] check full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   hostname?: string | null,
>   type?: Record<string, any> | null,
>   created?: number | null,
>   paused?: any | null,
>   resolution?: number | null,
>   sendnotificationwhendown?: number | null,
>   notifyagainevery?: number | null,
>   notifywhenbackup?: boolean | null,
>   userids?: number[] | null,
>   teamids?: number[] | null,
>   integrationids?: number[] | null,
>   tags?: any | null,
>   probe_filters?: any[] | null,
>   ipv6?: boolean | null,
>   status?: string | null,
>   lasterrortime?: number | null,
>   lasttesttime?: number | null,
>   lastresponsetime?: number | null
> }
> ```

***

### list

`checks.list`

List the checks with paging and tag filters

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.checks.list({ includeTags: true, limit: 20 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Maximum checks returned |
| `offset` | `number` | No | Offset for pagination |
| `showEncryption` | `boolean` | No | Include encryption state for http checks |
| `includeTags` | `boolean` | No | Include tags |
| `includeSeverity` | `boolean` | No | Include severity of the latest error |
| `tags` | `string` | No | Comma-separated tag filter |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `checks` | `object[]` | Yes | — |

> [accordion] checks full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   type?: any | null,
>   hostname?: string | null,
>   lasterrortime?: number | null,
>   lasttesttime?: number | null,
>   lastresponsetime?: number | null,
>   lastdownstart?: number | null,
>   lastdownend?: number | null,
>   created?: number | null,
>   paused?: any | null,
>   resolution?: number | null,
>   status?: string | null,
>   tags?: any | null
> }[]
> ```

***

### update

`checks.update`

Modify the settings of one check

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.checks.update({ checkId: 100, name: "renamed" });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |
| `name` | `string` | No | New check name |
| `host` | `string` | No | New target host |
| `type` | `http \| httpcustom \| tcp \| ping \| dns \| udp \| smtp \| pop3 \| imap` | No | New type of check |
| `typeSettings` | `Record<string, any>` | No | Type-specific settings as flat body fields |
| `paused` | `boolean` | No | Create or leave the check paused |
| `resolution` | `1 \| 5 \| 15 \| 30 \| 60 \| 1 \| 5 \| 15 \| 30 \| 60` | No | Test interval in minutes (1, 5, 15, 30 or 60) |
| `userIds` | `number[]` | No | User ids to alert |
| `teamIds` | `number[]` | No | Team ids to alert |
| `integrationIds` | `number[]` | No | Integration ids to alert |
| `sendNotificationWhenDown` | `number` | No | Alert after this many consecutive failures |
| `notifyAgainEvery` | `number` | No | Re-notify every N failures |
| `notifyWhenBackup` | `boolean` | No | Send an alert when the check recovers |
| `tags` | `string` | No | Comma-separated tags for filtering |
| `probeFilters` | `string[]` | No | Probe region filters, e.g. \["region: EU"] or \["region: NA"] |
| `ipv6` | `boolean` | No | Test over IPv6 |
| `responseTimeThreshold` | `number` | No | Response time threshold in ms |
| `customMessage` | `string` | No | Custom alert message |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Modification result |

***

### updateMulti

`checks.updateMulti`

Pause, unpause or re-time the listed checks at once

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.checks.updateMulti({ checkIds: [1, 2, 3], paused: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkIds` | `number[]` | Yes | Checks to modify (sent as checkids); Pingdom changes every check in the account when the list is missing |
| `paused` | `boolean` | No | Pause (true) or unpause (false) |
| `resolution` | `1 \| 5 \| 15 \| 30 \| 60 \| 1 \| 5 \| 15 \| 30 \| 60` | No | New test interval in minutes (1, 5, 15, 30 or 60) |

Pauses, unpauses or re-times the checks listed in checkIds, in one call. Without checkIds Pingdom would change every check, so the plugin requires the list.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Modification result |

***

## Maintenance

### create

`maintenance.create`

Create a maintenance window

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.maintenance.create({ description: "Deploy window", from: 2000000000, to: 2000003600, recurrenceType: "week", repeatEvery: 1, uptimeIds: [100] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string` | Yes | Description |
| `from` | `number` | Yes | Window start, UNIX time (future only) |
| `to` | `number` | Yes | Window end, UNIX time (future only) |
| `recurrenceType` | `none \| day \| week \| month` | No | Recurrence (sent as recurrencetype); default none |
| `repeatEvery` | `number` | No | Repeat every N recurrence units (sent as repeatevery) |
| `effectiveTo` | `number` | No | When the recurrence stops, UNIX time (sent as effectiveto) |
| `uptimeIds` | `number[]` | No | Uptime check ids the window covers (sent as uptimeids) |
| `tmsIds` | `number[]` | No | Transaction check ids the window covers (sent as tmsids) |

recurrenceType is none, day, week or month, with repeatEvery; from and to must be later than the request time; effectiveTo 0 means the recurrence never stops.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `maintenance` | `object` | Yes | — |

> [accordion] maintenance full type
>
> ```ts theme={null}
> {
>   id?: number | null
> }
> ```

***

### delete

`maintenance.delete`

Delete a maintenance window

**Risk:** `destructive`

```ts theme={null}
await corsair.pingdom.api.maintenance.delete({ id: 777 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The maintenance window id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Deletion result |

***

### deleteMulti

`maintenance.deleteMulti`

Delete several maintenance windows at once

**Risk:** `destructive`

```ts theme={null}
await corsair.pingdom.api.maintenance.deleteMulti({ windowIds: [1, 2] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `windowIds` | `number[]` | Yes | Ids of the windows to delete |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Deletion result |

***

### get

`maintenance.get`

Read one maintenance window

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.maintenance.get({ id: 777 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The maintenance window id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `maintenance` | `object \| null` | No | The window |

> [accordion] maintenance full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   description?: string | null,
>   from?: number | null,
>   to?: number | null,
>   duration?: number | null,
>   durationunit?: string | null,
>   recurrencetype?: string | null,
>   repeatevery?: number | null,
>   effectiveto?: number | null,
>   checks?: {
>     uptime?: number[] | null,
>     tms?: number[] | null
>   } | null
> } | null
> ```

***

### list

`maintenance.list`

List the maintenance windows

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.maintenance.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Maximum windows returned |
| `offset` | `number` | No | Offset for pagination |
| `orderBy` | `string` | No | Ordering column |
| `order` | `asc \| desc` | No | Ordering direction |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `maintenance` | `object[]` | Yes | — |

> [accordion] maintenance full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   description?: string | null,
>   from?: number | null,
>   to?: number | null,
>   duration?: number | null,
>   durationunit?: string | null,
>   recurrencetype?: string | null,
>   repeatevery?: number | null,
>   effectiveto?: number | null,
>   checks?: {
>     uptime?: number[] | null,
>     tms?: number[] | null
>   } | null
> }[]
> ```

***

### update

`maintenance.update`

Modify a maintenance window

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.maintenance.update({ id: 777, description: "Changed" });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The maintenance window id |
| `description` | `string` | No | Description |
| `from` | `number` | No | Window start, UNIX time (future only) |
| `to` | `number` | No | Window end, UNIX time (future only) |
| `recurrenceType` | `none \| day \| week \| month` | No | Recurrence (sent as recurrencetype); default none |
| `repeatEvery` | `number` | No | Repeat every N recurrence units (sent as repeatevery) |
| `effectiveTo` | `number` | No | When the recurrence stops, UNIX time (sent as effectiveto) |
| `uptimeIds` | `number[]` | No | Uptime check ids the window covers (sent as uptimeids) |
| `tmsIds` | `number[]` | No | Transaction check ids the window covers (sent as tmsids) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Modification result |

***

## Occurrences

### delete

`occurrences.delete`

Delete a maintenance occurrence

**Risk:** `destructive`

```ts theme={null}
await corsair.pingdom.api.occurrences.delete({ id: 3 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The occurrence id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Deletion result |

***

### get

`occurrences.get`

Read one maintenance occurrence

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.occurrences.get({ id: 3 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The occurrence id |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `occurrence` | `object \| null` | No | The occurrence |

> [accordion] occurrence full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   maintenanceid?: number | null,
>   from?: number | null,
>   to?: number | null,
>   duration?: number | null,
>   durationunit?: string | null
> } | null
> ```

***

### list

`occurrences.list`

List maintenance occurrences

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.occurrences.list({ maintenanceId: 777 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `maintenanceId` | `number` | No | Only occurrences of this window |
| `from` | `number` | No | Start of the period, UNIX time |
| `to` | `number` | No | End of the period, UNIX time |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `occurrences` | `object[]` | Yes | — |

> [accordion] occurrences full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   maintenanceid?: number | null,
>   from?: number | null,
>   to?: number | null,
>   duration?: number | null,
>   durationunit?: string | null
> }[]
> ```

***

### update

`occurrences.update`

Move a maintenance occurrence

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.occurrences.update({ id: 3, from: 2000000000, to: 2000003600 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | Yes | The occurrence id |
| `from` | `number` | No | New start, UNIX time (only future allowed) |
| `to` | `number` | No | New end, UNIX time (only future allowed) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `message` | `string \| null` | No | Deletion result |

***

## Results

### list

`results.list`

List the raw test results of a check

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.results.list({ checkId: 100, from: 1700000000, status: "down", limit: 50 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |
| `from` | `number` | No | Start of the period, UNIX time |
| `to` | `number` | No | End of the period, UNIX time |
| `probes` | `string` | No | Comma-separated probe ids to filter on |
| `status` | `up \| down \| unconfirmed \| unknown` | No | Result status filter |
| `limit` | `number` | No | Maximum results returned |
| `offset` | `number` | No | Offset for pagination |
| `includeAnalysis` | `boolean` | No | Include root cause analysis links |
| `maxResponse` | `number` | No | Maximum response time filter |
| `minResponse` | `number` | No | Minimum response time filter |

status filters to up, down, unconfirmed or unknown; probes takes a comma-separated probe id list.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `results` | `object[]` | Yes | — |

> [accordion] results full type
>
> ```ts theme={null}
> {
>   probeid?: number | null,
>   time?: number | null,
>   status?: string | null,
>   responsetime?: number | null,
>   probedesc?: string | null,
>   probeip?: string | null,
>   version?: string | null,
>   activelytested?: boolean | null,
>   checkid?: number | null,
>   checkname?: string | null,
>   hostname?: string | null
> }[]
> ```

***

## Summaries

### average

`summaries.average`

Read the average time and uptime summary of a check

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.summaries.average({ checkId: 100, byCountry: true, includeUptime: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |
| `from` | `number` | No | Start of the period, UNIX time |
| `to` | `number` | No | End of the period, UNIX time |
| `probes` | `string` | No | Comma-separated probe ids to filter on |
| `includeUptime` | `boolean` | No | Include uptime |
| `byCountry` | `boolean` | No | Group by country |
| `byProbe` | `boolean` | No | Group by probe |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `summary` | `object` | Yes | — |

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   responsetime?: any | null,
>   status?: any | null
> }
> ```

***

### hoursOfDay

`summaries.hoursOfDay`

Read the per-hour response time summary

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.summaries.hoursOfDay({ checkId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |
| `from` | `number` | No | Start of the period, UNIX time |
| `to` | `number` | No | End of the period, UNIX time |
| `probes` | `string` | No | Comma-separated probe ids to filter on |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `hoursofday` | `object[]` | Yes | Per-hour average response times |

> [accordion] hoursofday full type
>
> ```ts theme={null}
> {
>   hour?: number | null,
>   avgresponse?: number | null
> }[]
> ```

***

### outage

`summaries.outage`

Read the status change history of a check

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.summaries.outage({ checkId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |
| `from` | `number` | No | Start of the period, UNIX time |
| `to` | `number` | No | End of the period, UNIX time |
| `probes` | `string` | No | Comma-separated probe ids to filter on |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `summary` | `object` | Yes | — |

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   outages?: any[] | null
> }
> ```

***

### performance

`summaries.performance`

Read the per-interval performance summary

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.summaries.performance({ checkId: 100, resolution: "week" });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |
| `from` | `number` | No | Start of the period, UNIX time |
| `to` | `number` | No | End of the period, UNIX time |
| `resolution` | `hour \| day \| week` | No | Interval size: hour (default), day or week |
| `includeUptime` | `boolean` | No | Include uptime |
| `probes` | `string` | No | Comma-separated probe ids to filter on |
| `order` | `asc \| desc` | No | Interval order |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `summary` | `object` | Yes | — |

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   weeks?: any[] | null,
>   hours?: any[] | null,
>   days?: any[] | null
> }
> ```

***

### probes

`summaries.probes`

Read the per-probe test counts of a check

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.summaries.probes({ checkId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | Yes | The check id |
| `from` | `number` | No | Start of the period, UNIX time |
| `to` | `number` | No | End of the period, UNIX time |
| `probes` | `string` | No | Comma-separated probe ids to filter on |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `probes` | `number[]` | Yes | Ids of the probes that tested the check in the period |

***

## Tools

### getCredits

`tools.getCredits`

Read the account check slots and SMS credits

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.tools.getCredits({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `credits` | `object` | Yes | — |

> [accordion] credits full type
>
> ```ts theme={null}
> {
>   checklimit?: number | null,
>   availablechecks?: number | null,
>   useddefault?: number | null,
>   usedtransaction?: number | null,
>   availablesms?: number | null,
>   availablesmstests?: number | null
> }
> ```

***

### getReference

`tools.getReference`

Read region, timezone and format references

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.tools.getReference({});
```

**Input:** *empty object*

**Output:** *empty object*

***

### listActions

`tools.listActions`

List the alert actions across checks

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.tools.listActions({ checkId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `checkId` | `number` | No | Only actions for this check |
| `from` | `number` | No | Start of the period, UNIX time |
| `to` | `number` | No | End of the period, UNIX time |
| `limit` | `number` | No | Maximum actions returned |
| `offset` | `number` | No | Offset for pagination |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `actions` | `object` | Yes | — |

> [accordion] actions full type
>
> ```ts theme={null}
> {
>   alerts: {
>     username?: string | null,
>     userid?: number | null,
>     checkid?: number | null,
>     checkname?: string | null,
>     time?: number | null,
>     via?: string | null
>   }[]
> }
> ```

***

### listProbes

`tools.listProbes`

List the Pingdom probe servers

**Risk:** `read`

```ts theme={null}
await corsair.pingdom.api.tools.listProbes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | Probes to return |
| `offset` | `number` | No | Offset for paging |
| `onlyActive` | `boolean` | No | Only active probes (sent as onlyactive) |
| `includeDeleted` | `boolean` | No | Include deleted probes (sent as includedeleted) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `probes` | `object[]` | Yes | — |

> [accordion] probes full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   country?: string | null,
>   city?: string | null,
>   name?: string | null,
>   active?: boolean | null,
>   hostname?: string | null,
>   ip?: string | null,
>   ipv6?: string | null,
>   region?: string | null
> }[]
> ```

***

### runSingle

`tools.runSingle`

Run a one-off check against a host

**Risk:** `write`

```ts theme={null}
await corsair.pingdom.api.tools.runSingle({ host: "example.com", type: "http", typeSettings: { encryption: true, url: "/" } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `host` | `string` | Yes | Target host to test |
| `type` | `http \| httpcustom \| tcp \| ping \| dns \| udp \| smtp \| pop3 \| imap` | Yes | Type of test |
| `probeId` | `number` | No | Run from this probe (sent as probeid) |
| `ipv6` | `boolean` | No | Use IPv6 instead of IPv4 |
| `typeSettings` | `Record<string, string \| number \| boolean>` | No | Type-specific query fields, e.g. http: url, encryption, port, shouldcontain, verify\_certificate; dns: nameserver, expectedip |

Performs a single test without creating a check; the answer carries status, responsetime and the probe that ran it.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `result` | `object` | Yes | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   responsetime?: number | null,
>   statusdesc?: string | null,
>   statusdesclong?: string | null,
>   probeid?: number | null,
>   probedesc?: string | null
> }
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.