Skip to main content

updatePasswordSettings

PasswordSettingsWrapper updatePasswordSettings(PasswordSettingsRequestDto)

PUT /api/2.0/settings/security/password

Update password settings

Replaces the password policy of the whole portal with the four values sent: minLength and the three flags that demand an uppercase letter, a digit and a special symbol. There is no partial update - a flag left out of the body is stored as false - so read the current policy with GET api/2.0/settings/security/password and send it back with your change applied. The caller needs the portal-settings right of a DocSpace administrator, otherwise the call is refused. minLength has to sit between the floor the installation is configured with, 8 characters unless it was changed, and the ceiling of 30; anything outside is rejected as an invalid request. The new policy applies to passwords set from now on: existing passwords keep working until their owners change them, and nobody is asked to renew. The change is portal-wide, recorded in the audit trail, and sending the same body twice changes nothing further. The answer is the stored policy with its regular expressions.

Parameters​

NameInTypeDescriptionNotes
PasswordSettingsRequestDtobodyPasswordSettingsRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The password policy as it was stored, including the regular expressions a client can validate againstPasswordSettingsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no minLength, or the minimum length is outside the range the installation allows--
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​

PasswordSettingsWrapper

Authorization​

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

HTTP request headers​

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