Search for IP ACLs
Request#
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#
nameStringoptionalThe 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 25The number of results to return from the search.
orderByStringoptionalDefaults to name ASCThe database column to order the search results on plus the order direction.
The possible values are:
id- the id of the IP ACLinsertInstant- the instant when the IP ACL was createdlastUpdateInstant- the last instant that the IP ACL was updatedname- 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 0The offset row to return results from. If the search has 200 records in it and this is 50, it starts with row 50.
OpenAPI Spec
When calling the API using a POST request you will send the search criteria in a JSON request body.
Request Body#
search.nameStringoptionalThe 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 25The number of results to return from the search.
search.orderByStringoptionalDefaults to insertInstant DESCThe database column to order the search results on plus the order direction.
The possible values are:
id- the id of the IP ACLinsertInstant- the instant when the IP ACL was createdlastUpdateInstant- the last instant that the IP ACL was updatedname- 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 0The 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 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. |
| 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].entriesArrayA 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].actionStringThe action to take for this IP Range.
ipAccessControlLists[x].entries[y].endIPAddressStringThe ending IP (IPv4) for this range.
ipAccessControlLists[x].entries[y].startIPAddressStringThe starting IP (IPv4) for this range.
ipAccessControlLists[x].nameStringThe 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
}
]
}