Skip to content
Start here

List BGP Filter Profiles

GET/accounts/{account_id}/magic/bgp/filter_profiles

Lists all BGP filter profiles 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
Path ParametersExpand Collapse
account_id: string

Identifier

maxLength32
ReturnsExpand Collapse
errors: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
result: array of object { id, description, match_action, 4 more }
id: string

Identifier

maxLength32
description: string

Description of the filter profile

maxLength1024
match_action: "allow" or "deny"

Action to take when a route matches one of the targets in this profile

One of the following:
"allow"
"deny"
name: string

Friendly name for the filter profile

maxLength255
minLength1
targets: array of string

List of CIDR prefixes. Each entry may carry an optional suffix that specifies which prefix lengths to match relative to the prefix length N: ‘{X,Y}’ matches prefix lengths in the inclusive range [X, Y] where N <= X <= Y <= max (max is 32 for IPv4, 128 for IPv6), ‘{X}’ matches exactly length X (equivalent to {X,X}), ’+’ is shorthand for {N, max} (the prefix and all more-specific subnets, including at length N itself; valid even when N is the maximum length). Omit the suffix to match the prefix exactly at length N.

created_on: optional string
formatdate-time
modified_on: optional string
formatdate-time
success: true

Whether the API call was successful

List BGP Filter Profiles

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/magic/bgp/filter_profiles \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "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": "c4a7362d577a6c3019a474fd6f485821",
      "description": "Allowed corporate subnets from on-premises",
      "match_action": "allow",
      "name": "Allowed On-Prem Imports",
      "targets": [
        "10.0.0.0/8{8,32}"
      ],
      "created_on": "2019-12-27T18:11:19.117Z",
      "modified_on": "2019-12-27T18:11:19.117Z"
    }
  ],
  "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": "c4a7362d577a6c3019a474fd6f485821",
      "description": "Allowed corporate subnets from on-premises",
      "match_action": "allow",
      "name": "Allowed On-Prem Imports",
      "targets": [
        "10.0.0.0/8{8,32}"
      ],
      "created_on": "2019-12-27T18:11:19.117Z",
      "modified_on": "2019-12-27T18:11:19.117Z"
    }
  ],
  "success": true
}