Querying the Weak Password Detection Result List
Function
This API is used to query the list of weak password detection results.
URI
GET /v5/{project_id}/baseline/weak-password-users
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| enterprise_project_id | No | String | Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. |
| host_name | No | String | Server name |
| host_ip | No | String | Server IP address |
| user_name | No | String | Name of the account using a weak password |
| host_id | No | String | Host ID. If this parameter is not specified, all hosts of a user are queried. |
| limit | No | Integer | Number of records on each page |
| offset | No | Integer | Offset, which specifies the start position of the record to be returned. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token, which can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| total_num | Long | Total weak passwords |
| data_list | Array of WeakPwdListInfoResponseInfo objects | Weak password list |
| Parameter | Type | Description |
|---|---|---|
| host_id | String | Host ID |
| host_name | String | Server name |
| host_ip | String | Server IP address (private IP address). This field is not deleted for compatibility with users. |
| private_ip | String | Server private IP address |
| public_ip | String | Server public IP address |
| weak_pwd_accounts | Array of WeakPwdAccountInfoResponseInfo objects | List of accounts with weak passwords |
Example Requests
Query the weak password of servers whose enterprise project ID is xxx. Data on the first page (the first 10 records) is returned by default.
GET https://{endpoint}/v5/{project_id}/baseline/weak-password-users?enterprise_project_id=xxx Example Responses
Status code: 200
Request succeeded.
{
"total_num" : 2,
"data_list" : [ {
"host_id" : "caa958adxxxxxxa481",
"host_name" : "ubuntu1",
"host_ip" : "192.168.0.8",
"private_ip" : "192.168.0.8",
"public_ip" : "100.85.85.85",
"weak_pwd_accounts" : [ {
"user_name" : "localhost1",
"service_type" : "system",
"duration" : 2147483647
} ]
}, {
"host_id" : "caa958adxxxxxxa482",
"host_name" : "ubuntu2",
"host_ip" : "192.168.0.9",
"private_ip" : "192.168.0.8",
"public_ip" : "",
"weak_pwd_accounts" : [ {
"user_name" : "localhost2",
"service_type" : "system",
"duration" : 2147483647
} ]
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
Error Codes
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