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 Minimum: 20 Maximum: 64 |
Parameter | Mandatory | Type | Description |
---|---|---|---|
enterprise_project_id | No | String | Enterprise project ID. The value 0 indicates the default enterprise project. To query all enterprise projects, set this parameter to all_granted_eps. Default: 0 Minimum: 0 Maximum: 64 |
host_name | No | String | Server name Minimum: 0 Maximum: 256 |
host_ip | No | String | Server IP address Minimum: 0 Maximum: 256 |
user_name | No | String | Name of the account using a weak password Minimum: 0 Maximum: 32 |
host_id | No | String | Host ID. If this parameter is not specified, all hosts of a user are queried. Minimum: 0 Maximum: 64 |
limit | No | Integer | Number of records displayed on each page. Minimum: 0 Maximum: 200 Default: 10 |
offset | No | Integer | Offset, which specifies the start position of the record to be returned. Minimum: 0 Maximum: 2000000 Default: 0 |
Request Parameters¶
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token. Minimum: 32 Maximum: 2097152 |
Response Parameters¶
Status code: 200
Parameter | Type | Description |
---|---|---|
total_num | Long | Total number of weak passwords Minimum: 0 Maximum: 2147483647 |
data_list | Array of WeakPwdListInfoResponseInfo objects | Weak password list Array Length: 0 - 2147483647 |
Parameter | Type | Description |
---|---|---|
host_id | String | Host ID Minimum: 0 Maximum: 64 |
host_name | String | Server name Minimum: 0 Maximum: 256 |
host_ip | String | Server IP address (private IP address) Minimum: 0 Maximum: 256 |
weak_pwd_accounts | Array of WeakPwdAccountInfoResponseInfo objects | List of accounts with weak passwords Array Length: 0 - 2147483647 |
Parameter | Type | Description |
---|---|---|
user_name | String | Name of accounts with weak passwords Minimum: 0 Maximum: 32 |
service_type | String | Account type. The options are as follows:
|
duration | Integer | Validity period of a weak password, in days. Minimum: 0 Maximum: 2147483647 |
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
weak password check result
{
"total_num" : 2,
"data_list" : [ {
"host_id" : "caa958adxxxxxxa481",
"host_name" : "ubuntu1",
"host_ip" : "192.168.0.8",
"weak_pwd_accounts" : [ {
"user_name" : "localhost1",
"service_type" : "system",
"duration" : 2147483647
} ]
}, {
"host_id" : "caa958adxxxxxxa482",
"host_name" : "ubuntu2",
"host_ip" : "192.168.0.9",
"weak_pwd_accounts" : [ {
"user_name" : "localhost2",
"service_type" : "system",
"duration" : 2147483647
} ]
} ]
}
Status Codes¶
Status Code | Description |
---|---|
200 | weak password check result |
Error Codes¶
See Error Codes.