Search for IP ACLs

Request#

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#

nameStringoptional

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*.

numberOfResultsIntegeroptionalDefaults to 25

The number of results to return from the search.

orderByStringoptionalDefaults 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 when the IP ACL was created
  • lastUpdateInstant - the last instant 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.

startRowIntegeroptionalDefaults 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
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.nameStringoptional

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.numberOfResultsIntegeroptionalDefaults to 25

The number of results to return from the search.

search.orderByStringoptionalDefaults 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 when the IP ACL was created
  • lastUpdateInstant - the last instant 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.startRowIntegeroptionalDefaults 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
CodeDescription
200The request was successful. The response will contain a JSON body.
400The request was invalid and/or malformed. The response will contain an Errors JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present.
401You 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.
404The object you requested doesn't exist. The response will be empty.
500There 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].entriesArray

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].actionString

The action to take for this IP Range.

ipAccessControlLists[x].entries[y].endIPAddressString

The ending IP (IPv4) for this range.

ipAccessControlLists[x].entries[y].startIPAddressString

The starting IP (IPv4) for this range.

ipAccessControlLists[x].nameString

The unique name of this IP ACL.

Example IP ACL response 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
    }
  ]
}