Validating Password Strength (a V3 API)
Function
This API is used to check whether an instance password is a weak password.
URI
POST /v3/{project_id}/weak-password-verification
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID of a tenant in a region To obtain this value, see Obtaining a Project ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| x-auth-token | Yes | String | User token You can obtain the token by calling the IAM API used to obtain a user token. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| password | Yes | String | Character string to be validated |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| is_weak_password | Boolean | Whether the password is a weak password. The value can be: true: indicating that the password is a weak password. Such a password is not recommended. false: indicating that the password is not a weak password. Such a password is recommended. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Example Request
Verifying password strength
POST https://{endpoint}/v3/{project_id}/weak-password-verification
{
"password" : "xxx"
} Example Response
Status code: 200
OK
{
"is_weak_password" : true
} Status code: 400
Bad request
{
"error_msg" : "Parameter error.",
"error_code" : "DBS.280001"
} Status code: 500
Server error
{
"error_msg" : "Parameter error.",
"error_code" : "DBS.280001"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK |
| 400 | Bad request |
| 500 | Server error |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot