Querying Application Usage Records
Function
Queries application usage records.
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:session:listAppConnection
Write
-
-
-
-
URI
POST /v1/{project_id}/session/app-connection
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | Integer | The number of records for each query ranges from 1 to 100. The default value is 10. |
| offset | No | Integer | Query offset. The default value is 0. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | No | String | User token It 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. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| id | No | String | Primary key. |
| sid | No | String | Application server SID. |
| machine_name | No | String | Application server name. |
| user_name | No | String | Current login user. Fuzzy query is supported. |
| app_group_name | No | String | Application group name. |
| app_group_id | No | String | Application group ID. |
| app_name | No | String | Application name. Fuzzy match is supported. |
| failed_code | No | String | Connection failure status code. |
| connection_failure_reason | No | String | Connection failure cause. |
| client_name | No | String | Client name. |
| client_version | No | String | Client version. |
| client_type | No | String | Client OS type. |
| agent_version | No | String | APS HDA version. |
| vm_ip | No | String | Application server IP address. |
| wi_ip | No | String | Connection IP address. |
| public_ip | No | String | Egress IP address of the client. |
| tenant_id | No | String | Tenant ID. |
| brokering_start_time | No | String | Start time of application login. The format is 2022-10-31 08:07:39. |
| brokering_end_time | No | String | End time of application login. The format is 2022-10-31 08:07:39. |
| virtual_ip | No | String | Virtual IP address of a session. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| count | Integer | Total. |
| items | Array of AppConnectionInfo objects | Application usage record list. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Unique ID of an application connection. |
| sid | String | Application server SID. |
| app_id | String | Application ID. |
| machine_name | String | Application server name. |
| user_name | String | Login account. |
| app_group_name | String | Application group name. |
| app_group_id | String | Application group ID. |
| app_name | String | Application name. |
| brokering_time | String | Application login time. |
| failed_code | String | Connection failure status code. |
| connection_failure_reason | String | Connection failure cause. |
| client_mac | String | Client MAC address. |
| client_name | String | Client name. |
| client_ip | String | Client IP address. |
| client_version | String | Client version. |
| client_type | String | Client OS type. |
| agent_version | String | APS HDA version. |
| vm_ip | String | IP address of an application server. |
| wi_ip | String | Connection IP address. |
| tenant_id | String | Tenant ID. |
| virtual_ip | String | Virtual IP address of a session. |
| public_ip | String | Egress IP address of the client. |
| transaction_id | String | Transaction ID. |
| end_time | String | End time of application login. |
| aps_instance_id | String | Application streaming server ID. |
| aps_instance_name | String | Application streaming server name. |
| aps_host_id | String | Workspace dedicated host ID. |
| primary_server_group_id | String | Primary server group ID. |
| secondary_server_group_id | String | Primary server group ID. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 405
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 415
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Status code: 503
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code, which is returned upon failure. |
| error_msg | String | Error message. |
Example Requests
POST /v1/a4da8115c9d8464ead3a38309130523f/session/app-connection?limit=10&offset=0
{
"brokering_start_time" : "2025-04-24T16:00:00Z",
"brokering_end_time" : "2025-05-24T10:22:55Z"
} Example Responses
Status code: 200
Response to a successful request.
{
"count" : 2,
"items" : [ {
"id" : "5af4a8c1047411ee9f75fa163e289e5a",
"sid" : "S-1-5-21-1213649063-4191095369-2401105760-1418",
"machine_name" : "APS-XS1QJ3TA7T",
"user_name" : "user001@wksapp***.huawei.com",
"app_group_name" : "Cloud storage",
"app_group_id" : "573743978327834675",
"app_name" : "Cloud storage-Notepad++",
"brokering_time" : "2023-06-06T14:13:48Z",
"failed_code" : "",
"connection_failure_reason" : "",
"client_mac" : "00-e0-***-58-08-33",
"client_name" : "DESKTOP-KDB5TN1",
"client_ip" : "10.*73.109.160",
"client_version" : "23.5.0.0",
"client_type" : "Windows 10",
"agent_version" : "23.5.0.0529",
"vm_ip" : "10.*.248.130",
"wi_ip" : "192.**.10.*00\\#192.**.10.23",
"tenant_id" : "a4da8115c9d8464ead3a38309130523f",
"virtual_ip" : ""
}, {
"id" : "b5442cb1047211ee9f75fa163e289e5a",
"sid" : "S-1-5-21-1213649063-4191095369-2401105760-1418",
"machine_name" : "APS-XS1QJ3TA7T",
"user_name" : "user001@wksapp***.huawei.com",
"app_group_name" : "Cloud storage",
"app_group_id" : "573743978327834675",
"app_name" : "Cloud storage-Notepad++",
"brokering_time" : "2023-06-06T14:02:00Z",
"failed_code" : "",
"connection_failure_reason" : "",
"client_mac" : "00-e0-**-58-08-33",
"client_name" : "DESKTOP-KDB5TN1",
"client_ip" : "10.*73.109.160",
"client_version" : "23.5.0.0",
"client_type" : "Windows 10",
"agent_version" : "23.5.0.0529",
"vm_ip" : "10.*.248.130",
"wi_ip" : "192.**.10.*00\\#192.**.10.23",
"tenant_id" : "a4da8115c9d8464ead3a38309130523f",
"virtual_ip" : ""
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Response to a successful request. |
| 400 | The request cannot be understood by the server due to malformed syntax. |
| 401 | Authentication failed. |
| 403 | Permissions required. |
| 404 | No resources found. |
| 405 | The request method is not allowed. |
| 415 | The requested resource format is not supported. |
| 500 | An internal service error occurred. For details, see the error code description. |
| 503 | Service unavailable. |
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