This API call updates a cluster password policy.
To execute this request, you need the Service Provider API (ServiceProviderAPI) permission assigned to your API token. Generate your API token via Cluster Management Console (CMC). To learn how to obtain and use it, see Cluster API - Authentication.
/api/v1.0/onpremise/passwordPolicy
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| body | Password | The JSON body of the request. Contains parameters of password policy configuration. | body | optional |
PasswordPolicy objectPassword policy configuration.
| Element | Type | Description | Required |
|---|---|---|---|
| minNumberOfDigits | integer | Minimum number of digits | required |
| minNumberOfLowercaseChars | integer | Minimum number of lowercase characters | required |
| minNumberOfNonAlphanumericChars | integer | Minimum number of non-alphanumeric characters | required |
| minNumberOfUppercaseChars | integer | Minimum number of uppercase characters | required |
| minPasswordLength | integer | Minimum password length | required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"minNumberOfDigits": 1,"minNumberOfLowercaseChars": 1,"minNumberOfNonAlphanumericChars": 1,"minNumberOfUppercaseChars": 1,"minPasswordLength": 1}
| Code | Type | Description |
|---|---|---|
| 204 | - | Successfully updated. Response doesn't have a body. |
| 400 | Error | Failed. The input is invalid. |
| 404 | - | Realm not found |
In this example, you update the password policy for your managed deployment (myManaged.cluster.com). You define:
In return you receive a response code 204 indicating that the password policy was updated successfully.
curl -X PUT "https://myManaged.cluster.com/api/v1.0/onpremise/passwordPolicy" -H "accept: */*" -H "Content-Type: application/json" -d "{\"realmId\":\"string\",\"minPasswordLength\":16,\"minNumberOfUppercaseChars\":2,\"minNumberOfLowercaseChars\":4,\"minNumberOfDigits\":2,\"minNumberOfNonAlphanumericChars\":4}"
https://myManaged.cluster.com/api/v1.0/onpremise/passwordPolicy
Successfully updated. Response doesn't have a body.
204