QueryUserUsageReport
Queries the connection status, last connection time, cumulative usage duration, and session persistence duration of users.
Operation description
Queries user usage reports. ProductType, StartDate, and EndDate are all required. The interval between the start and end times calculated by full months must not exceed 60 months.
The query aggregates data within the closed interval of calendar days between the start and end dates. Statistics for the same user under the same app instance group are merged. The results are paginated in descending order of cumulative usage duration, with a maximum of 1,500 records per page. You can combine ConnectionStatus, UserId, BizRegionId, and AppInstanceGroupId for filtering.
Response handling
A successful response may not contain Code and Message. Do not require these two fields to be 200 and success respectively. When no matching records are found, the response can normally return Count=0 and an empty UserUsageReportDataModel list. This does not indicate a request failure.
Example of a successful response when no matching records are found (HTTP status code: 200):
{
"RequestId": "01A1F2C3-572F-544E-880D-B0E347E3DCB3",
"PageSize": 1,
"PageNumber": 1,
"Count": 0,
"UserUsageReportDataModel": []
}
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:QueryUserUsageReport |
none |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppInstanceGroupId |
string |
No |
The ID of the app instance group, which is used to filter data for a specified app instance group. You can call the ListAppInstanceGroup operation to obtain the ID. If you do not specify this parameter, data is not filtered by app instance group. To skip this filter, omit the parameter. An empty string is different from an omitted parameter and is used as a filter value in the query. |
aig-9ciijz60n4xsv**** |
| PageSize |
integer |
No |
The number of records per page. Default value: |
100 |
| PageNumber |
integer |
No |
The page number to query. Specify a value starting from |
1 |
| BizRegionId |
string |
No |
The ID of the business region, which is used to filter report data. You can call the ListRegions operation to obtain the ID. To skip this filter, omit the parameter. An empty string is different from an omitted parameter and is used as a filter value in the query. |
cn-hangzhou |
| StartDate |
string |
No |
The start time of the statistics. This parameter is required. You must specify both The interval between the start and end times calculated by full months must not exceed 60 months. Make sure that If either time parameter is missing, the format is incorrect, or the range exceeds the limit, |
2026-09-01 00:00:00 |
| EndDate |
string |
No |
The end time of the statistics. This parameter is required. You must specify both The interval between the start and end times calculated by full months must not exceed 60 months. Make sure that If either time parameter is missing, the format is incorrect, or the range exceeds the limit, |
2026-09-02 00:00:00 |
| ProductType |
string |
No |
The product type. This parameter must be explicitly specified. The value is not case-sensitive. If this parameter is not provided or an unrecognized type is specified, Valid values:
The query returns only existing statistical records for the current account within the specified product and time range. Specifying a recognized type does not necessarily mean that report data is available. |
CloudApp |
| UserId |
string |
No |
The ID of the end user, which is used to precisely filter users. If you do not specify this parameter, data is not filtered by user. To skip this filter, omit the parameter. An empty string is different from an omitted parameter and is used as a filter value in the query. |
user01 |
| ConnectionStatus |
string |
No |
The filter condition for the user connection status. The value is not case-sensitive. An unrecognized value is equivalent to not filtering by connection status. Valid values:
|
Connected |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The operation response. |
||
| Code |
string |
The business processing status code. A successful response may not contain this field. Do not use |
200 |
| Count |
integer |
The total number of records that meet the query conditions. |
3 |
| Message |
string |
The description of the business processing result. A successful response may not contain this field. Do not rely on the fixed |
success |
| PageNumber |
integer |
The page number corresponding to the current response. |
1 |
| PageSize |
integer |
The number of records per page in the request. If this parameter is not specified, the default value |
200 |
| RequestId |
string |
The unique identifier of the request, which can be used to troubleshoot the request. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| UserUsageReportDataModel |
array<object> |
The list of user usage data, sorted in descending order of cumulative usage duration. |
|
|
object |
The user usage data object. |
||
| AppInstanceGroupId |
string |
The ID of the app instance group to which the user usage record belongs. |
aig-9ciijz60n4xsv**** |
| AppInstanceGroupName |
string |
The name of the app instance group to which the user usage record belongs. |
R&D workstation group |
| ConnectionStatus |
string |
The current connection status of the user. Valid values:
|
Connected |
| LastConnectedTime |
string |
The last connection time. Format: The time is in Beijing time (UTC+8). The returned string does not carry |
2026-09-01 10:00:00 |
| RegionId |
string |
The current version does not return a valid region ID. Callers should not rely on this field. To filter by business region, use the |
null |
| SessionsHoldDuration |
number |
The cumulative session persistence duration within the query range, which is the duration that the user occupies the session from attach to session release. Multiple sessions under the same app instance group are accumulated. Unit: hours. |
3.5 |
| UsageDuration |
number |
The cumulative user usage duration within the query range. The usage duration of the same user under the same app instance group is aggregated by day. Unit: hours. |
2 |
| UserId |
string |
The ID of the end user. |
user01 |
Examples
Success response
JSON format
{
"Code": "200",
"Count": 3,
"Message": "success",
"PageNumber": 1,
"PageSize": 200,
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"UserUsageReportDataModel": [
{
"AppInstanceGroupId": "aig-9ciijz60n4xsv****",
"AppInstanceGroupName": "R&D workstation group",
"ConnectionStatus": "Connected",
"LastConnectedTime": "2026-09-01 10:00:00",
"RegionId": "null",
"SessionsHoldDuration": 3.5,
"UsageDuration": 2,
"UserId": "user01"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.