Create an IP ACL
This API is used to create a new IP ACL.
Request#
OpenAPI Spec
Request Parameters#
ipAccessControlListIdUUIDoptionalDefaults to secure random UUIDThe Id to use for the new IP ACL. If not specified a secure random UUID will be generated.
Request Body#
ipAccessControlList.entriesArrayrequiredA 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].actionStringrequiredThe 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].endIPAddressStringrequiredThe 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].startIPAddressStringrequiredThe starting IP (IPv4) for this range.
ipAccessControlList.nameStringrequiredThe unique name of this IP ACL.
Response#
The response for this API contains the IP ACL that was created.
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. |
| 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#
ipAccessControlListsArrayThe list of all IP ACLs
ipAccessControlList.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.
ipAccessControlList.entries[x].actionStringThe action to take for this IP Range.
ipAccessControlList.entries[x].endIPAddressStringThe ending IP (IPv4) for this range.
ipAccessControlList.entries[x].startIPAddressStringThe starting IP (IPv4) for this range.
ipAccessControlList.nameStringThe 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
}
}