Help Center/ Workspace/ API Reference/ Workspace APIs/ AI Function/ Querying User Usage Frequency Statistics
Updated on 2026-05-21 GMT+08:00

Querying User Usage Frequency Statistics

Function

Queries the user usage frequency statistics.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    workspace:users:getAiAssistantUsageFrequency

    Read

    -

    -

    -

    -

URI

GET /v3/users/ai-assistant/statistics/usage-frequency

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

count

No

Integer

Number of users to return. By default, the statistics of the first 10 users are returned.

start_time

Yes

String

Start time. The value is in UTC format, for example, 2021-05-11T11:45:42Z.

end_time

Yes

String

End time. The value is in UTC format, for example, 2021-05-11T11:45:42Z.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

users

Array of UserUsageFrequencyInfo objects

List of user usage frequency statistics.

Table 3 UserUsageFrequencyInfo

Parameter

Type

Description

user_name

String

Desktop username.

use_count

Integer

Number of usage counts.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error Details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error Details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error Details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error Details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 405

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error Details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 500

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error Details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Status code: 503

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

error_detail

String

Error Details.

encoded_authorization_message

String

Encrypted detailed reason for rejection. You can call the API decode-authorization-message of STS to decrypt the reason.

Example Requests

POST /v3/users/ai-assistant/statistics/usage-frequency?count=10

Example Responses

None

Status Codes

Status Code

Description

200

OK.

400

The request cannot be understood by the server due to malformed syntax.

401

Authorization failed.

403

No permissions.

404

Resources not found.

405

The method specified in the request is not allowed.

500

An internal service error occurred. For details, see the error code description.

503

Service unavailable.

Error Codes

See Error Codes.