All Products
Search
Document Center

Elastic Desktop Service:QueryHistoryUsageDurationRank

Last Updated:May 25, 2026

Queries and ranks historical usage duration by end user or desktop.

Operation description

Usage notes

  • Date range: You can query data within the last 90 days.

  • Pagination: This operation uses theNextToken parameter for pagination. To retrieve the next page of results, use the NextToken value from the previous response.

  • Default and maximum limits: This operation returns 5 records by default, with a maximum of 200 records per page.

  • Authentication: This operation uses an AccessKey for authentication.

  • Caller account information: You do not need to specify an Alibaba Cloud account ID (AliUid). The system automatically resolves it.

  • Billing: This API operation is free of charge.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

StartDate

string

No

The start date of the query in YYYY-MM-DD format. You can query data within the last 90 days.

2026-05-07

EndDate

string

No

The end date of the query in YYYY-MM-DD format. You can query data within the last 90 days.

2026-04-19

Limit

integer

No

The number of entries to return. The default value is 5, and the maximum value is 200.

8

NextToken

string

No

The token that is used to retrieve the next page of results. You can obtain this token from the response to the previous request.

caeba0bbb2be03f84eb48b699f0a4883

BizType

integer

No

The business type.

1

Response elements

Element

Type

Description

Example

object

RequestId

string

The unique ID of the request.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

TotalCount

integer

The total number of matching entries.

94

NextToken

string

The token used to retrieve the next page of results. If this parameter is not returned, there are no more results.

AAAAAWvmfbFWy0uSlxZ6pIAKAnuwt1ezsRqxI6hPibm27fMH

UsageDurationList

array<object>

A list of usage duration metrics.

object

The usage duration metric object.

EndUserId

string

The end user ID.

endUserId

DesktopId

string

The ID of the cloud desktop.

ecd-8cndajrdrd424sb99

DesktopName

string

The name of the cloud desktop.

TestName

ChargeType

string

The charge type. Valid values: POST_PAID (post-paid), PRE_PAID (pre-paid), MONTH_PACKAGE (monthly subscription), and DURATION (duration package).

PrePaid

UsageDuration

integer

The usage duration, in seconds. Note: This is a Long value. Ensure your client can handle the precision.

20000

RegionId

string

The region ID.

cn-shanghai

Examples

Success response

JSON format

{
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "TotalCount": 94,
  "NextToken": "AAAAAWvmfbFWy0uSlxZ6pIAKAnuwt1ezsRqxI6hPibm27fMH",
  "UsageDurationList": [
    {
      "EndUserId": "endUserId",
      "DesktopId": "ecd-8cndajrdrd424sb99",
      "DesktopName": "TestName",
      "ChargeType": "PrePaid",
      "UsageDuration": 20000,
      "RegionId": "cn-shanghai"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.