Insert, update or delete an allowed IP addresses.

PUT {{baseUrl}}/v1/allowlist/cidr

What

Insert, Update or Delete an allowed IPv4 or IPv6 addresses or CIDR. The allowed IP addresses or CIDRs are the ones submitted manually by the user from files or indidual items.

If the CIDR is already in the database, then the CIDR is updated with the new values. If the CIDR is not in the database, then it is inserted. If the field expiry is ealier than current time, then the CIDR is deleted (automatically expires).

Parameters

The endpoint accepts the a list of JSON objects with the following fields in the body of the PUT request: - cidr: (Mandatory) The public IPv4 or IPv6 addresses or CIDR to be upserted. Note: The CIDR must be in the format x.x.x.x/y or x:x:x:x:x:x:x:x/y. No need to escape the / in the body. - description: (Optional) A string with the description of the IP address or CIDR. - expiry: (Optional) Unix timestamp in milliseconds when the IP address or CIDR will expire and be removed. If not given, then the CIDR is not deleted. To delete the CIDR set the value to less than current time but not zero.

Result

An empty response with HTTP status code 200 OK is returned if the CIDR is inserted, updated or deleted.

Errors

  • a 422 Unprocessable Entity error if the CIDR is malformed.

It will also return the API Global errors described in the API description.

Request Body

{"0"=>{"cidr"=>"quis commodo dolor dolor", "description"=>"dolor tempor null", "expiry"=>-74478719}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{}