Skip to main content

updateIpRestrictionsSettings

IpRestrictionsWrapper updateIpRestrictionsSettings(IpRestrictionsDto)

PUT /api/2.0/settings/iprestrictions/settings

Update IP restriction settings

Stores the enforcement flag of the IP restrictions of the current portal together with the whole address list, replacing the addresses saved before; this operation and PUT api/2.0/settings/iprestrictions are two routes to the same handler and behave identically. The caller needs the portal-settings right of a DocSpace administrator, otherwise the call is refused. Every entry must be a single IPv4 or IPv6 address: from-to ranges and CIDR blocks are matched by the portal but cannot be stored here and are rejected as an invalid request, as is enable: true with an empty list. An omitted enable follows the list - on when addresses are sent, off when the list is empty - so the flag cannot be moved without resending the addresses that stay in force. The new state applies to new requests without a restart, is recorded in the audit trail, and sending the same body twice changes nothing further. Enforcement spares the portal owner and the installation's own networks only, so a list without the caller's own address locks the remaining administrators out. The answer echoes the request, so read the stored entries and their IDs with GET api/2.0/settings/iprestrictions.

Parameters​

NameInTypeDescriptionNotes
IpRestrictionsDtobodyIpRestrictionsDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The stored enforcement flag and addresses echoed back exactly as sent, without the IDs of the stored entriesIpRestrictionsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no ipRestrictions, an entry is not a single IPv4 or IPv6 address, or enable is true with an empty list--
403The caller has no portal-settings right--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

IpRestrictionsWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json