Update an IP ACL
This API is used to update an existing IP ACL.
You must specify all of the properties of the IP ACL when calling this API with the PUT HTTP method. When used with PUT, this API doesn't merge the existing IP ACL and your new data. It replaces the existing IP ACL with your new data.
Utilize the PATCH HTTP method to send specific changes to merge into an existing IP ACL.
Request#
OpenAPI Spec
OpenAPI Spec
For backward compatibility, the PATCH method accepts the same media type (specified by a Content-Type of application/json) and body as the PUT request. You can also use the following media types for different behavior:
- JSON Patch/RFC 6902:
application/json-patch+json - JSON Merge Patch/RFC 7396:
merge-patch+json
For details, see the PATCH documentation.
Using a media type of application/json merges the provided request parameters into the existing object. As a result, all parameters are optional with PATCH: only provide the values you want to change. To remove a value, provide a null value. Patching an Array appends all values in the new list to the old list.
Request Parameters#
ipAccessControlListId UUID required The Id of the IP ACL to update.
Request Body#
ipAccessControlList.entries Array required A list of IP ranges and the action to apply for each. One and only one entry must have a startIPAddress of * to indicate the default action of the IP ACL.
ipAccessControlList.entries[x].action String required The action to take for this IP Range. The possible values are:
Allow- allow all IPs in the rangeBlock- block all IPs in the range
ipAccessControlList.entries[x].endIPAddress String required The ending IP (IPv4) for this range. The only time this is not required is when startIPAddress is equal to *, in which case this field is ignored. This value must be greater than or equal to the startIPAddress. To define a range of a single IP address, set this field equal to the value for startIPAddress.
ipAccessControlList.entries[x].startIPAddress String required The starting IP (IPv4) for this range.
ipAccessControlList.name String required The unique name of this IP ACL.
Response#
The response for this API contains the IP ACL that was updated.
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 are trying to update 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 Array The list of all IP ACLs
ipAccessControlList.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.
ipAccessControlList.entries[x].action String The action to take for this IP Range.
ipAccessControlList.entries[x].endIPAddress String The ending IP (IPv4) for this range.
ipAccessControlList.entries[x].startIPAddress String The starting IP (IPv4) for this range.
ipAccessControlList.name String The unique name of this IP ACL.
Example IP ACL response JSON
{
"ipAccessControlList": {
"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
}
}