dots.v2.insights.alertInstances.get()

Generated on 13 Nov 2026 from DoTs version v1.24.0

Usage

client.v2.insights.alertInstances.get(requestConfiguration?: RequestConfiguration<AlertInstancesRequestBuilderGetQueryParameters>): Promise<undefined | AlertInstancesGetResponse>

Description

To list alert instances for your account, send a GET request to /v2/insights/alert-instances. Alert instances are read-only records of alert rule firings against your resources.

Results can optionally be filtered by status, rule_id, or resource_urn.

Results are ordered by triggered_at descending (newest first). Because the list is append-only and continuously growing, offset-based pagination is best-effort: newly triggered instances may shift older rows onto subsequent pages between fetches. For stable pagination, filter by rule_id or a fixed time window on the client side.

Parameters

perPage integer optional

Example: 2

Number of items returned per page

Default: 20

Min: 1

Max: 200

page integer optional

Example: 1

Which 'page' of paginated results to return.

Default: 1

Min: 1

status string optional

Optional filter. When set, only alert instances with this status are
returned.

One of: active, resolved

ruleId string optional

Example: 8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c

Optional filter. When set, only alert instances fired by the alert rule
with this ID are returned.

resourceUrn string optional

Example: do:droplet:12345

Optional filter. When set, only resources associated with this resource URN
are returned.

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.insights.alertInstances.get();

Pagination

This method returns paginated results. The response includes a links.pages object with URLs for navigating between pages. To retrieve the next page, parse the next URL and pass the page query parameter:

let response = await client.v2.insights.alertInstances.get();
let pages = response?.links?.pages;

while (pages && "next" in pages && typeof pages.next === "string") {
    const page = Number(new URL(pages.next).searchParams.get("page"));
    response = await client.v2.insights.alertInstances.get({
        queryParameters: {
            page,
        },
    });
    pages = response?.links?.pages;
}

Response Example

Show Response Example
{
  "alert_instances": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "rule_id": "8f3a2b1c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "severity": "warning",
      "status": "active",
      "resource_urn": "do:droplet:12345",
      "value": 87.5,
      "triggered_at": "2026-09-03T10:15:00Z",
      "last_triggered_at": "2026-09-03T10:45:00Z",
      "last_notified_at": "2026-09-03T10:15:00Z"
    }
  ],
  "links": {
    "pages": {}
  },
  "meta": {
    "total": 1
  }
}

More Information

See /v2/insights/alert-instances in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.