> For the complete documentation index, see [llms.txt](https://fusionauth.io/docs/llms.txt)

# Search for IP ACLs

API documentation for the FusionAuth Search for IP ACLs API.

# Search for IP ACLs

## Request

[!Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Searches the IP ACLs using the given search criteria

GET/api/ip-acl/search?name={name}

When calling the API using a `GET` request you will send the search criteria on the URL using request parameters. In order to simplify the example URL above, only the IP ACL specific parameter is shown, however you may add any of the documented request parameters to the URL.

### Request Parameters

`name`Stringoptional

The string to match all or part of the IP ACL name. This can contain wildcards using the asterisk character (`*`). If no wildcards are present, this parameter value will be interpreted as `*value*`.

`numberOfResults`IntegeroptionalDefaults to 25

The number of results to return from the search.

`orderBy`StringoptionalDefaults to name ASC

The database column to order the search results on plus the order direction.

The possible values are:

*   `id` - the id of the IP ACL
*   `insertInstant` - the [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when the IP ACL was created
*   `lastUpdateInstant` - the last [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the IP ACL was updated
*   `name` - the name of the IP ACL

For example, to order the results by the insert instant in descending order, the value would be provided as `insertInstant DESC`. The final string is optional, can be set to `ASC` or `DESC`, or omitted and will default to `ASC`.

`startRow`IntegeroptionalDefaults to 0

The offset row to return results from. If the search has 200 records in it and this is 50, it starts with row 50.

  

[!Global API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#global-api-key-authentication)

Searches the IP ACLs using the given search criteria

POST/api/ip-acl/search

OpenAPI Spec

When calling the API using a `POST` request you will send the search criteria in a JSON request body.

### Request Body

`search.name`Stringoptional

The string to match all or part of the IP ACL name. This can contain wildcards using the asterisk character (`*`). If no wildcards are present, this parameter value will be interpreted as `*value*`.

`search.numberOfResults`IntegeroptionalDefaults to 25

The number of results to return from the search.

`search.orderBy`StringoptionalDefaults to insertInstant DESC

The database column to order the search results on plus the order direction.

The possible values are:

*   `id` - the id of the IP ACL
*   `insertInstant` - the [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when the IP ACL was created
*   `lastUpdateInstant` - the last [instant](https://fusionauth.io/docs/reference/data-types.md#instants) that the IP ACL was updated
*   `name` - the name of the IP ACL

For example, to order the results by the insert instant in descending order, the value would be provided as `insertInstant DESC`. The final string is optional, can be set to `ASC` or `DESC`, or omitted and will default to `ASC`.

`search.startRow`IntegeroptionalDefaults to 0

The offset row to return results from. If the search has 200 records in it and this is 50, it starts with row 50.

## Response

The response for this API contains the IP ACLs matching the search criteria in paginated format.

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 404 | The object you requested doesn't exist. The response will be empty. |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |

#### Response Body

`ipAccessControlLists[x].entries`Array

A list of IP ranges and the action to apply for each. One and only one entry will have a **startIPAddress** of `*` to indicate the default action of the IP ACL.

`ipAccessControlLists[x].entries[y].action`String

The action to take for this IP Range.

`ipAccessControlLists[x].entries[y].endIPAddress`String

The ending IP (IPv4) for this range.

`ipAccessControlLists[x].entries[y].startIPAddress`String

The starting IP (IPv4) for this range.

`ipAccessControlLists[x].name`String

The unique name of this IP ACL.

*Example IP ACL response JSON*

```json
{
  "ipAccessControlLists": [
    {
      "name": "Block all except one range",
      "entries": [
        {
          "action": "Block",
          "startIPAddress": "*"
        },
        {
          "action": "Allow",
          "startIPAddress": "71.205.92.217",
          "endIPAddress": "76.104.251.50"
        }
      ],
      "id": "fba75c7b-8c27-4cdd-840e-694d808d0aab",
      "insertInstant": 1628887024740,
      "lastUpdateInstant": 1628887024740
    },
    {
      "name": "Block two specific ranges",
      "entries": [
        {
          "action": "Allow",
          "startIPAddress": "*"
        },
        {
          "action": "Block",
          "startIPAddress": "76.104.0.0",
          "endIPAddress": "76.104.255.255"
        },
        {
          "action": "Block",
          "startIPAddress": "71.205.0.0",
          "endIPAddress": "71.205.255.255"
        }
      ],
      "id": "2d9f1c45-725a-4718-b631-b40b7180dbf5",
      "insertInstant": 1628887035851,
      "lastUpdateInstant": 1628887035851
    }
  ]
}
```