---
type: api
title: List traffic filters
description: Lists the organization's traffic filters. Up to 1000 filters are returned per call; use the X-Elastic-Page-Size header to request a smaller page. When more results remain, the response carries a next_page token to send back in the X-Elastic-Next-Page header. Keep paging until next_page is absent: a page filled exactly to the page size still returns a token, and the page that follows it may be empty.
url: https://www.elastic.co/docs/api/doc/cloud-serverless/operation/operation-listtrafficfilters
resource: https://www.elastic.co/docs/api/doc/cloud-serverless/operation/operation-listtrafficfilters
products:
  - Elastic Cloud Serverless
---

# List traffic filters

Authentication: required

- Server: `https://api.elastic-cloud.com`

## Paths

- `GET` `/api/v1/serverless/traffic-filters`

## Description

Lists the organization's traffic filters. Up to 1000 filters are returned per call; use the X-Elastic-Page-Size header to request a smaller page. When more results remain, the response carries a next_page token to send back in the X-Elastic-Next-Page header. Keep paging until next_page is absent: a page filled exactly to the page size still returns a token, and the page that follows it may be empty.

## Query string parameters

- `include_by_default` (boolean · default: false) — optional
  Retrieves a list of resources that have include_by_default set or not set
- `region` (string) — optional
  If provided limits the traffic filters to that region only.

## Header parameters

- `X-Elastic-Page-Size` (integer · min: 1 · max: 1000) — optional
  Maximum number of traffic filters returned in the response. Defaults to 1000.
- `X-Elastic-Next-Page` (string) — optional
  The next_page token from a previous response, to fetch the page that follows it.
  Example: `YyMzY1MDQiLCJtYXgiOiJGRiJ9fV0=`

## Responses

#### `200`

The collection of traffic filters were successfully returned.

`application/json`

- `next_page` (string) — nullable
  A token to fetch the next page, to be sent back in the X-Elastic-Next-Page header. Absent when there are no further pages. When present it does not guarantee the next page is non-empty, so keep paging until it is absent.
- `items` (object[])
  List of traffic filters
  - `id` (string · min length: 32 · max length: 32)
    The traffic filter ID
  - `name` (string · min length: 1 · max length: 128)
    Name of the traffic filter
  - `description` (string · min length: 0 · max length: 512)
    Description of the traffic filter
  - `type` (enum · min length: 1 · max length: 32)
    Type of the traffic filter. Determines which rule fields are valid:
- `ip` — IP/CIDR allowlist (`source`)
- `vpce` — AWS PrivateLink VPC endpoint (`source`)
- `private_endpoint` — Azure Private Link (`azure_endpoint_name`, `azure_endpoint_guid`)
- `psc_endpoint` — GCP Private Service Connect endpoint (`source`)
    Values: `ip`, `vpce`, `private_endpoint`, `psc_endpoint`
  - `include_by_default` (boolean)
    Should the traffic filter be automatically included in the new projects
  - `region` (string · min length: 1 · max length: 32)
    The traffic filter can be attached only to projects in the specific region
  - `rules` (object[])
    List of rules
    - `description` (string)
      Optional human-readable description of the rule.
    - `source` (string)
      Allowed source for `ip`, `vpce`, or `psc_endpoint` filters: an IP address, CIDR
mask, AWS VPC endpoint ID (`vpce-` followed by 17 lowercase hex characters), or
GCP PSC connection ID.
Must not be set for `private_endpoint` filters.
    - `azure_endpoint_name` (string · min length: 2 · max length: 80 · pattern: ^[a-zA-Z0-9][-\w.]{0,78}[\w]$)
      Azure Private Endpoint resource name. Required for `private_endpoint` filters;
not applicable to `ip`, `vpce`, or `psc_endpoint` filters.
Must be 2–80 characters, start with an alphanumeric character, and end with an
alphanumeric character or underscore. May contain alphanumerics, underscores,
periods, and hyphens.
    - `azure_endpoint_guid` (string · pattern: ^[a-f0-9]{8}-([a-f0-9]{4}-){3}[a-f0-9]{12}$)
      Azure Private Endpoint **resource GUID** (`properties.resourceGuid` from the Azure
resource). Required for `private_endpoint` filters. Must be a lowercase UUID.
This is not the ARM resource ID.
#### `400`

Bad request

`application/json`

- `errors` (object[])
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
#### `401`

Unauthorized

`application/json`

- `errors` (object[])
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
#### `500`

Internal server error

`application/json`

- `errors` (object[])
  - `message` (string)
    A human-readable message of the error.
  - `code` (string)
    An identifier for this type of error.
## Code examples

#### curl

```curl
curl -X GET "https://api.elastic-cloud.com/api/v1/serverless/traffic-filters" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "next_page": "YyMzY1MDQiLCJtYXgiOiJGRiJ9fV0=",
  "items": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "type": "ip",
      "include_by_default": false,
      "region": "string",
      "rules": [
        {
          "description": "string",
          "source": "vpce-0123456789abcdef0",
          "azure_endpoint_name": "my-private-endpoint",
          "azure_endpoint_guid": "7c0f05e4-e32b-4b10-a246-7b77f7dcc63c"
        }
      ]
    }
  ]
}
```

#### 400

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}
```

#### 401

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}
```

#### 500

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "errors": [
    {
      "message": "Explicative error message",
      "code": "code.error"
    }
  ]
}
```

