Skip to content
Start here

Get ASN Subnets

client.intel.asn.subnets.get(ASNasn, SubnetGetParams { account_id } params, RequestOptionsoptions?): SubnetGetResponse { asn, count, ip_count_total, 3 more }
GET/accounts/{account_id}/intel/asn/{asn}/subnets

Get ASN Subnets.

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
Accepted Permissions (at least one required)
Intel WriteIntel Read
ParametersExpand Collapse
asn: ASN
params: SubnetGetParams { account_id }
account_id: string

Identifier.

maxLength32
ReturnsExpand Collapse
SubnetGetResponse { asn, count, ip_count_total, 3 more }
asn?: ASN
count?: number

Total results returned based on your search parameters.

ip_count_total?: number
page?: number

Current page within paginated list of results.

per_page?: number

Number of results per page of results.

subnets?: Array<string>

Get ASN Subnets

import Cloudflare from 'cloudflare';

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

const subnet = await client.intel.asn.subnets.get(0, {
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(subnet.asn);
{
  "asn": 0,
  "count": 1,
  "ip_count_total": 0,
  "page": 1,
  "per_page": 20,
  "subnets": [
    "192.0.2.0/24",
    "2001:DB8::/32"
  ]
}
Returns Examples
{
  "asn": 0,
  "count": 1,
  "ip_count_total": 0,
  "page": 1,
  "per_page": 20,
  "subnets": [
    "192.0.2.0/24",
    "2001:DB8::/32"
  ]
}