---
title: "List a load balancer's listeners, newest first"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Load Balancers API

`GET /v1/organizations/{orgId}/projects/{projectId}/load-balancers/{loadBalancer}/listeners`

## Authentication

Requires one of the following:

- `apiKey`, http, header `Authorization`
- `oauth`, http, header `Authorization`
- `sessionCookie`, apiKey, in cookie

## Path parameters

- `ListListeners.path.orgId` (string, required) — UUID or prefixed ID (org_…)
- `ListListeners.path.projectId` (string, required) — UUID or prefixed ID (prj_…)
- `ListListeners.path.loadBalancer` (string, required)

## Query parameters

- `ListListeners.query.limit` (integer, optional) — The page size. Out of range is 400, never a clamp.
  - min 1; max 100; default `20`
- `ListListeners.query.cursor` (string, optional) — The previous page's nextCursor. Bound to the organization, the list and its filters.

## Code samples

### cURL

```curl
curl --request GET \
  --url https://lb-api.ezghcloud.com/v1/organizations/string/projects/string/load-balancers/string/listeners \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://lb-api.ezghcloud.com/v1/organizations/string/projects/string/load-balancers/string/listeners';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://lb-api.ezghcloud.com/v1/organizations/string/projects/string/load-balancers/string/listeners"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

A page of listeners.

#### Example

```json
{
  "listeners": [
    {
      "additionalCertificates": [
        "string"
      ],
      "allowedSourceCidrs": [
        "string"
      ],
      "certificate": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "defaultAction": {
        "fixedResponse": {
          "body": "string",
          "contentType": "text/plain",
          "statusCode": 200
        },
        "forward": {
          "requestHeaderModifier": {
            "add": [
              {}
            ],
            "remove": [
              "string"
            ],
            "set": [
              {}
            ]
          },
          "responseHeaderModifier": {
            "add": [
              {}
            ],
            "remove": [
              "string"
            ],
            "set": [
              {}
            ]
          },
          "targetGroups": [
            {
              "targetGroup": "string",
              "weight": 999
            }
          ]
        },
        "redirect": {
          "host": "string",
          "path": "string",
          "port": 1,
          "scheme": "http",
          "statusCode": 301
        },
        "type": "forward"
      },
      "id": "string",
      "idleTimeoutSeconds": 0,
      "loadBalancer": "string",
      "port": 0,
      "protocol": "tcp",
      "rules": [
        {
          "action": {
            "fixedResponse": {
              "body": "string",
              "contentType": "text/plain",
              "statusCode": 200
            },
            "forward": {
              "requestHeaderModifier": {
                "add": [],
                "remove": [],
                "set": []
              },
              "responseHeaderModifier": {
                "add": [],
                "remove": [],
                "set": []
              },
              "targetGroups": [
                {}
              ]
            },
            "redirect": {
              "host": "string",
              "path": "string",
              "port": 1,
              "scheme": "http",
              "statusCode": 301
            },
            "type": "forward"
          },
          "match": {
            "headers": [
              {}
            ],
            "hosts": [
              "string"
            ],
            "methods": [
              "string"
            ],
            "paths": [
              {}
            ],
            "queryParams": [
              {}
            ]
          },
          "name": "string"
        }
      ],
      "targetGroup": "string",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "nextCursor": "string"
}
```

- `ListListeners.response.200.listeners` (array<object>, required)
  - `ListListeners.response.200.listeners.additionalCertificates` (array<string>, required) — SNI certificates beyond the default, at most 24: a client whose SNI one of them covers gets it, and any other client the default certificate. Each renews on its own. Empty on tcp and http.
  - `ListListeners.response.200.listeners.allowedSourceCidrs` (array<string>, required) — CIDRs allowed to connect: IPv4, and IPv6 where IPv6 is available. Each family admits only the clients its own ranges cover: a list with no IPv6 range admits no IPv6 client. Defaults to everyone: ["0.0.0.0/0"], with "::/0" where IPv6 is available.
  - `ListListeners.response.200.listeners.certificate` (string | null, required)
  - `ListListeners.response.200.listeners.createdAt` (string, required)
    - format `date-time`
  - `ListListeners.response.200.listeners.defaultAction` (one of, required) — An http or https listener's action for a request no rule matches. Null on tcp and tls.
    - one of: [Action](/lb-api/schemas/Action/), `null`
  - `ListListeners.response.200.listeners.id` (string, required)
  - `ListListeners.response.200.listeners.idleTimeoutSeconds` (integer, required)
  - `ListListeners.response.200.listeners.loadBalancer` (string, required)
  - `ListListeners.response.200.listeners.port` (integer, required)
  - `ListListeners.response.200.listeners.protocol` (unknown, required)
    - one of `"tcp"`, `"tls"`, `"http"`, `"https"`
  - `ListListeners.response.200.listeners.rules` (array<object>, required) — Ordered: the first rule that matches a request acts on it, and the default action takes the rest. At most 100. Sent, it replaces the whole list. Empty on tcp and tls.
    - `ListListeners.response.200.listeners.rules.action` (object, required) — type names the one of forward, redirect and fixedResponse that is set; the others are null.
      - `ListListeners.response.200.listeners.rules.action.fixedResponse` (one of, required)
        - one of: [FixedResponse](/lb-api/schemas/FixedResponse/), `null`
      - `ListListeners.response.200.listeners.rules.action.forward` (one of, required)
        - one of: [Forward](/lb-api/schemas/Forward/), `null`
      - `ListListeners.response.200.listeners.rules.action.redirect` (one of, required)
        - one of: [Redirect](/lb-api/schemas/Redirect/), `null`
      - `ListListeners.response.200.listeners.rules.action.type` (unknown, required)
        - one of `"forward"`, `"redirect"`, `"fixedResponse"`
    - `ListListeners.response.200.listeners.rules.match` (object, required) — Fields AND together. Entries OR within hosts, paths and methods, and AND within headers and queryParams. An empty field matches anything.
      - `ListListeners.response.200.listeners.rules.match.headers` (array<object>, required)
        - `ListListeners.response.200.listeners.rules.match.headers.name` (string, required) — An HTTP token; header names match case-insensitively.
          - maxLength 128
        - `ListListeners.response.200.listeners.rules.match.headers.value` (string, required) — Printable ASCII, matched exactly.
          - minLength 1; maxLength 256
      - `ListListeners.response.200.listeners.rules.match.hosts` (array<string>, required) — Exact names, or *.example.com for any name ending in .example.com. Lowercase; the port is ignored.
        - maxLength 253
      - `ListListeners.response.200.listeners.rules.match.methods` (array<string>, required) — Uppercase.
        - maxLength 32
      - `ListListeners.response.200.listeners.rules.match.paths` (array<object>, required)
        - `ListListeners.response.200.listeners.rules.match.paths.type` (unknown, required) — prefix matches on segment boundaries: /api matches /api and /api/x, not /apix.
          - one of `"exact"`, `"prefix"`
        - `ListListeners.response.200.listeners.rules.match.paths.value` (string, required) — Starts with /; printable ASCII without space, # or ?.
          - minLength 1; maxLength 1024
      - `ListListeners.response.200.listeners.rules.match.queryParams` (array<object>, required)
        - `ListListeners.response.200.listeners.rules.match.queryParams.name` (string, required) — An HTTP token; header names match case-insensitively.
          - maxLength 128
        - `ListListeners.response.200.listeners.rules.match.queryParams.value` (string, required) — Printable ASCII, matched exactly.
          - minLength 1; maxLength 256
    - `ListListeners.response.200.listeners.rules.name` (string | null, required)
      - maxLength 64
  - `ListListeners.response.200.listeners.targetGroup` (string | null, required) — A tcp or tls listener's target group, and an http or https listener's when its default action forwards to exactly one; else null.
  - `ListListeners.response.200.listeners.updatedAt` (string, required)
    - format `date-time`
- `ListListeners.response.200.nextCursor` (string | null, required)

### 400

invalid_request (with issues), invalid_cursor, or the endpoint's own 400 codes.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `ListListeners.response.400.error` (object, required)
  - `ListListeners.response.400.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `ListListeners.response.400.error.message` (string, required)
    - maxLength 1024
  - `ListListeners.response.400.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `ListListeners.response.400.error.issues.message` (string, required)
    - `ListListeners.response.400.error.issues.path` (string, required)
  - `ListListeners.response.400.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `ListListeners.response.400.error.quota.id` (string, required)
    - `ListListeners.response.400.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `ListListeners.response.400.error.quota.limit` (integer, required)
      - min 0
    - `ListListeners.response.400.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `ListListeners.response.400.error.quota.inFlight` (integer, optional)
      - min 0
    - `ListListeners.response.400.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `ListListeners.response.400.error.quota.region` (string, optional)
    - `ListListeners.response.400.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `ListListeners.response.400.error.quota.scopeResourceName` (string, optional)
    - `ListListeners.response.400.error.quota.used` (integer, optional)
      - min 0
    - `ListListeners.response.400.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 401

unauthenticated: no credential, or one that doesn't check out.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `ListListeners.response.401.error` (object, required)
  - `ListListeners.response.401.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `ListListeners.response.401.error.message` (string, required)
    - maxLength 1024
  - `ListListeners.response.401.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `ListListeners.response.401.error.issues.message` (string, required)
    - `ListListeners.response.401.error.issues.path` (string, required)
  - `ListListeners.response.401.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `ListListeners.response.401.error.quota.id` (string, required)
    - `ListListeners.response.401.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `ListListeners.response.401.error.quota.limit` (integer, required)
      - min 0
    - `ListListeners.response.401.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `ListListeners.response.401.error.quota.inFlight` (integer, optional)
      - min 0
    - `ListListeners.response.401.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `ListListeners.response.401.error.quota.region` (string, optional)
    - `ListListeners.response.401.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `ListListeners.response.401.error.quota.scopeResourceName` (string, optional)
    - `ListListeners.response.401.error.quota.used` (integer, optional)
      - min 0
    - `ListListeners.response.401.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 403

access_denied: the caller's policies don't allow the action; forbidden_origin: a cookie-authenticated write from an origin that isn't allowed; spend_limit_reached.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `ListListeners.response.403.error` (object, required)
  - `ListListeners.response.403.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `ListListeners.response.403.error.message` (string, required)
    - maxLength 1024
  - `ListListeners.response.403.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `ListListeners.response.403.error.issues.message` (string, required)
    - `ListListeners.response.403.error.issues.path` (string, required)
  - `ListListeners.response.403.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `ListListeners.response.403.error.quota.id` (string, required)
    - `ListListeners.response.403.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `ListListeners.response.403.error.quota.limit` (integer, required)
      - min 0
    - `ListListeners.response.403.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `ListListeners.response.403.error.quota.inFlight` (integer, optional)
      - min 0
    - `ListListeners.response.403.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `ListListeners.response.403.error.quota.region` (string, optional)
    - `ListListeners.response.403.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `ListListeners.response.403.error.quota.scopeResourceName` (string, optional)
    - `ListListeners.response.403.error.quota.used` (integer, optional)
      - min 0
    - `ListListeners.response.403.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 404

not_found: unknown, malformed, or in an organization the caller isn't in.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `ListListeners.response.404.error` (object, required)
  - `ListListeners.response.404.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `ListListeners.response.404.error.message` (string, required)
    - maxLength 1024
  - `ListListeners.response.404.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `ListListeners.response.404.error.issues.message` (string, required)
    - `ListListeners.response.404.error.issues.path` (string, required)
  - `ListListeners.response.404.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `ListListeners.response.404.error.quota.id` (string, required)
    - `ListListeners.response.404.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `ListListeners.response.404.error.quota.limit` (integer, required)
      - min 0
    - `ListListeners.response.404.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `ListListeners.response.404.error.quota.inFlight` (integer, optional)
      - min 0
    - `ListListeners.response.404.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `ListListeners.response.404.error.quota.region` (string, optional)
    - `ListListeners.response.404.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `ListListeners.response.404.error.quota.scopeResourceName` (string, optional)
    - `ListListeners.response.404.error.quota.used` (integer, optional)
      - min 0
    - `ListListeners.response.404.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 429

too_many_requests, with Retry-After; or quota_exceeded (a rate, usage or concurrency quota, with quota), never with Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `ListListeners.response.429.error` (object, required)
  - `ListListeners.response.429.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `ListListeners.response.429.error.message` (string, required)
    - maxLength 1024
  - `ListListeners.response.429.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `ListListeners.response.429.error.issues.message` (string, required)
    - `ListListeners.response.429.error.issues.path` (string, required)
  - `ListListeners.response.429.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `ListListeners.response.429.error.quota.id` (string, required)
    - `ListListeners.response.429.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `ListListeners.response.429.error.quota.limit` (integer, required)
      - min 0
    - `ListListeners.response.429.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `ListListeners.response.429.error.quota.inFlight` (integer, optional)
      - min 0
    - `ListListeners.response.429.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `ListListeners.response.429.error.quota.region` (string, optional)
    - `ListListeners.response.429.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `ListListeners.response.429.error.quota.scopeResourceName` (string, optional)
    - `ListListeners.response.429.error.quota.used` (integer, optional)
      - min 0
    - `ListListeners.response.429.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 500

internal_error: a bug; the details are in the logs, under the request ID.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `ListListeners.response.500.error` (object, required)
  - `ListListeners.response.500.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `ListListeners.response.500.error.message` (string, required)
    - maxLength 1024
  - `ListListeners.response.500.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `ListListeners.response.500.error.issues.message` (string, required)
    - `ListListeners.response.500.error.issues.path` (string, required)
  - `ListListeners.response.500.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `ListListeners.response.500.error.quota.id` (string, required)
    - `ListListeners.response.500.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `ListListeners.response.500.error.quota.limit` (integer, required)
      - min 0
    - `ListListeners.response.500.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `ListListeners.response.500.error.quota.inFlight` (integer, optional)
      - min 0
    - `ListListeners.response.500.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `ListListeners.response.500.error.quota.region` (string, optional)
    - `ListListeners.response.500.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `ListListeners.response.500.error.quota.scopeResourceName` (string, optional)
    - `ListListeners.response.500.error.quota.used` (integer, optional)
      - min 0
    - `ListListeners.response.500.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.

### 503

unavailable: a dependency the request needs is down. Retry after Retry-After.

#### Example

```json
{
  "error": {
    "code": "string",
    "issues": [
      {
        "message": "string",
        "path": "string"
      }
    ],
    "message": "string",
    "quota": {
      "id": "string",
      "inFlight": 0,
      "kind": "allocation",
      "limit": 0,
      "periodStart": "2019-08-24T14:15:22Z",
      "region": "string",
      "resetsAt": "2019-08-24T14:15:22Z",
      "scope": "organization",
      "scopeResourceName": "string",
      "used": 0,
      "window": "string"
    }
  }
}
```

- `ListListeners.response.503.error` (object, required)
  - `ListListeners.response.503.error.code` (string, required)
    - maxLength 64; pattern `^[a-z][a-z0-9_]*$`
  - `ListListeners.response.503.error.message` (string, required)
    - maxLength 1024
  - `ListListeners.response.503.error.issues` (array<object>, optional) — invalid_request: one entry per problem, at a dotted path.
    - `ListListeners.response.503.error.issues.message` (string, required)
    - `ListListeners.response.503.error.issues.path` (string, required)
  - `ListListeners.response.503.error.quota` (object, optional) — quota_exceeded: the quota that refused the request. Never with Retry-After.
    - `ListListeners.response.503.error.quota.id` (string, required)
    - `ListListeners.response.503.error.quota.kind` (unknown, required)
      - one of `"allocation"`, `"rate"`, `"usage"`, `"concurrency"`
    - `ListListeners.response.503.error.quota.limit` (integer, required)
      - min 0
    - `ListListeners.response.503.error.quota.scope` (unknown, required)
      - one of `"organization"`, `"project"`, `"resource"`
    - `ListListeners.response.503.error.quota.inFlight` (integer, optional)
      - min 0
    - `ListListeners.response.503.error.quota.periodStart` (string, optional)
      - format `date-time`
    - `ListListeners.response.503.error.quota.region` (string, optional)
    - `ListListeners.response.503.error.quota.resetsAt` (string, optional)
      - format `date-time`
    - `ListListeners.response.503.error.quota.scopeResourceName` (string, optional)
    - `ListListeners.response.503.error.quota.used` (integer, optional)
      - min 0
    - `ListListeners.response.503.error.quota.window` (string, optional) — rate only: an ISO 8601 duration, PT1S to PT1H.


Source: https://docs.ezghcloud.com/lb-api/ListListeners/index.md
