---
title: "List IP restriction entries"
method: GET
path: "/organizations/{organization}/databases/{database}/cidrs"
tags: ["Database Postgres IP restrictions"]
---

# List IP restriction entries

`GET /organizations/{organization}/databases/{database}/cidrs`

### Authorization
A   OAuth token must have at least one of the following   scopes in order to use this API endpoint:

**OAuth Scopes**

 | Resource | Scopes |
| :------- | :---------- |
| Organization | `read_databases` |
| Database | `read_database` |

## Path parameters

- `organization` string, required
- `database` string, required

## Query parameters

- `page` number
- `per_page` number

## Response `200`

Returns IP restriction entries for the database

- object
  - `current_page` integer, required — The current page number
  - `next_page` integer, required — The next page number
  - `next_page_url` string, required — The next page of results
  - `prev_page` integer, required — The previous page number
  - `prev_page_url` string, required — The previous page of results
  - `data` object[], required
    - `id` string, required — The ID of the IP allowlist entry
    - `schema` string, required — The schema name to restrict access to (optional)
    - `role` string, required — The role to restrict access to (optional)
    - `cidrs` string[], required — List of CIDR ranges
    - `created_at` string, required — When the entry was created
    - `updated_at` string, required — When the entry was updated
    - `deleted_at` string, required — When the entry was deleted
    - `actor` object, required
      - `id` string, required — The ID of the actor
      - `display_name` string, required — The name of the actor
      - `avatar_url` string, required — The URL of the actor's avatar

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity - Invalid parameters or validation errors
- `500` — Internal Server Error

---

[API](https://skmtc.dev/planetscale/apis/planetscale-api.md) · [All operations](https://skmtc.dev/planetscale/apis/planetscale-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/planetscale/planetscale-api/revisions/477c6ebdabdf/schema)
