---
title: "Get a listener"
---

> 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/{listener}`

## Authentication

Requires one of the following:

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

## Path parameters

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

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://lb-api.ezghcloud.com/v1/organizations/string/projects/string/load-balancers/string/listeners/string';
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/string"

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

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

print(response.text)
```

## Responses

### 200

The listener.

#### Example

```json
{
  "additionalCertificates": [
    "string"
  ],
  "allowedSourceCidrs": [
    "string"
  ],
  "certificate": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "defaultAction": {
    "fixedResponse": {
      "body": "string",
      "contentType": "text/plain",
      "statusCode": 200
    },
    "forward": {
      "requestHeaderModifier": {
        "add": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "remove": [
          "string"
        ],
        "set": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "responseHeaderModifier": {
        "add": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "remove": [
          "string"
        ],
        "set": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "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": [
              "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"
      },
      "match": {
        "headers": [
          {
            "name": "string",
            "value": "string"
          }
        ],
        "hosts": [
          "string"
        ],
        "methods": [
          "string"
        ],
        "paths": [
          {
            "type": "exact",
            "value": "string"
          }
        ],
        "queryParams": [
          {
            "name": "string",
            "value": "string"
          }
        ]
      },
      "name": "string"
    }
  ],
  "targetGroup": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}
```

- `GetListener.response.200.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.
- `GetListener.response.200.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.
- `GetListener.response.200.certificate` (string | null, required)
- `GetListener.response.200.createdAt` (string, required)
  - format `date-time`
- `GetListener.response.200.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`
- `GetListener.response.200.id` (string, required)
- `GetListener.response.200.idleTimeoutSeconds` (integer, required)
- `GetListener.response.200.loadBalancer` (string, required)
- `GetListener.response.200.port` (integer, required)
- `GetListener.response.200.protocol` (unknown, required)
  - one of `"tcp"`, `"tls"`, `"http"`, `"https"`
- `GetListener.response.200.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.
  - `GetListener.response.200.rules.action` (object, required) — type names the one of forward, redirect and fixedResponse that is set; the others are null.
    - `GetListener.response.200.rules.action.fixedResponse` (one of, required)
      - one of: [FixedResponse](/lb-api/schemas/FixedResponse/), `null`
    - `GetListener.response.200.rules.action.forward` (one of, required)
      - one of: [Forward](/lb-api/schemas/Forward/), `null`
    - `GetListener.response.200.rules.action.redirect` (one of, required)
      - one of: [Redirect](/lb-api/schemas/Redirect/), `null`
    - `GetListener.response.200.rules.action.type` (unknown, required)
      - one of `"forward"`, `"redirect"`, `"fixedResponse"`
  - `GetListener.response.200.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.
    - `GetListener.response.200.rules.match.headers` (array<object>, required)
      - `GetListener.response.200.rules.match.headers.name` (string, required) — An HTTP token; header names match case-insensitively.
        - maxLength 128
      - `GetListener.response.200.rules.match.headers.value` (string, required) — Printable ASCII, matched exactly.
        - minLength 1; maxLength 256
    - `GetListener.response.200.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
    - `GetListener.response.200.rules.match.methods` (array<string>, required) — Uppercase.
      - maxLength 32
    - `GetListener.response.200.rules.match.paths` (array<object>, required)
      - `GetListener.response.200.rules.match.paths.type` (unknown, required) — prefix matches on segment boundaries: /api matches /api and /api/x, not /apix.
        - one of `"exact"`, `"prefix"`
      - `GetListener.response.200.rules.match.paths.value` (string, required) — Starts with /; printable ASCII without space, # or ?.
        - minLength 1; maxLength 1024
    - `GetListener.response.200.rules.match.queryParams` (array<object>, required)
      - `GetListener.response.200.rules.match.queryParams.name` (string, required) — An HTTP token; header names match case-insensitively.
        - maxLength 128
      - `GetListener.response.200.rules.match.queryParams.value` (string, required) — Printable ASCII, matched exactly.
        - minLength 1; maxLength 256
  - `GetListener.response.200.rules.name` (string | null, required)
    - maxLength 64
- `GetListener.response.200.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.
- `GetListener.response.200.updatedAt` (string, required)
  - format `date-time`

### 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"
    }
  }
}
```

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

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

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

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

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

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

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


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