Query User Authentication Volume
Query the total number of authentications, successful authentications, and failed authentications within a specified time range.
Request Description
Permissions
The Identity Management API is authorized at the application level. Before calling the API, you need to set API permissions for different applications. For details, see API Permissions.
| Permission Code | Description |
|---|---|
| operation_log_read | Read permission for log audit APIs |
| all | Read/Write permission for all APIs |
| read | Read permission for all read APIs |
Request Headers
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| Authorization | Authorization | Yes | String | Format: Bearer {access_token} |
| Content-Type | Content Type | Yes | String | Fixed value: application/json; charset=utf-8 |
Request Parameters
| Parameter Name | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| start_time | Start time | Yes | String | Format: yyyy-MM-dd HH:mm:ss |
| end_time | End time | Yes | String | Format: yyyy-MM-dd HH:mm:ss |
| offset | Page number | Yes | Int | Starting from page 0 |
| target_type | Target type | No | String | — |
| target_name | Target name | No | String | — |
Request Example
bash
GET https://{your_domain}/api/v2/tenant/logs/auth-num?start_time=2022-03-25%2000:00:00&end_time=2022-04-19%2010:50:59&offset=0&target_type=&target_name=Response Example
Success Example
json
{
"auth_total": 35,
"auth_failed_total": 10,
"auth_succeed_total": 25
}Error Example
json
{
"error_code": "1003",
"error_msg": "The parameter limit is 10-100."
}Response Parameters
| Parameter Name | Chinese Name | Type | Description |
|---|---|---|---|
| auth_total | Total authentications | Int | — |
| auth_failed_total | Failed authentications | Int | — |
| auth_succeed_total | Successful authentications | Int | — |