dots.v2.insights.notificationChannels.get()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.insights.notificationChannels.get(requestConfiguration?: RequestConfiguration<NotificationChannelsRequestBuilderGetQueryParameters>): Promise<undefined | NotificationChannelsGetResponse>

Description

To list all notification channels for your account, send a GET request to /v2/insights/notification-channels. Results are paginated with page and per_page (default 20, maximum 200).

Parameters

page integer optional

Example: 1

Which 'page' of paginated results to return.

Default: 1

Min: 1

perPage integer optional

Example: 2

Number of items returned per page

Default: 20

Min: 1

Max: 200

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.notificationChannels.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.notificationChannels.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.notificationChannels.get({
        queryParameters: {
            page,
        },
    });
    pages = response?.links?.pages;
}

Response Example

Show Response Example
{
  "notification_channels": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "On-call email",
      "channel_type": "CHANNEL_TYPE_EMAIL",
      "email": {
        "to": "[email protected]"
      },
      "usage": {
        "rule_count": 2
      },
      "created_at": "2026-09-03T10:15:00Z",
      "updated_at": "2026-09-03T10:15:00Z"
    }
  ],
  "links": {
    "pages": {
      "first": "https://api.digitalocean.com/v2/insights/notification-channels?page=1",
      "last": "https://api.digitalocean.com/v2/insights/notification-channels?page=1"
    }
  },
  "meta": {
    "total": 1
  }
}

More Information

See /v2/insights/notification-channels 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.