Skip to content
Start here

List DLS prefix bindings for an account

client.dls.regionalServices.prefixBindings.list(PrefixBindingListParams { account_id, cursor, per_page } params, RequestOptionsoptions?): CursorPagination<PrefixBindingListResponse { id, cidr, prefix_id, region_key } >
GET/accounts/{account_id}/dls/regional_services/prefix_bindings

List DLS prefix bindings for an account

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
params: PrefixBindingListParams { account_id, cursor, per_page }
account_id: string

Path param: Identifier of a Cloudflare account.

maxLength32
minLength32
cursor?: string

Query param: Opaque token for cursor-based pagination. Omit for the first page. Pass the value from a previous response to fetch the next page.

per_page?: number

Query param

maximum100
minimum1
ReturnsExpand Collapse
PrefixBindingListResponse { id, cidr, prefix_id, region_key }
id: string

The ID of the binding.

cidr: string

The CIDR that is bound.

prefix_id: string

The ID of the parent prefix.

region_key: string

The region key used for the binding.

maxLength128
minLength1

List DLS prefix bindings for an account

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const prefixBindingListResponse of client.dls.regionalServices.prefixBindings.list({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
})) {
  console.log(prefixBindingListResponse.id);
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "id",
      "cidr": "cidr",
      "prefix_id": "prefix_id",
      "region_key": "x"
    }
  ],
  "result_info": {
    "count": 0,
    "cursor": "cursor",
    "per_page": 0
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "id",
      "cidr": "cidr",
      "prefix_id": "prefix_id",
      "region_key": "x"
    }
  ],
  "result_info": {
    "count": 0,
    "cursor": "cursor",
    "per_page": 0
  },
  "success": true
}