All Products
Search
Document Center

Application Real-Time Monitoring Service:QueryCommercialUsage

Last Updated:Aug 28, 2026

Queries observability usage data for Application Monitoring, Managed Service for OpenTelemetry, Managed Service for Prometheus, and Real User Monitoring (RUM).

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

IntervalInSec

integer

No

The time interval for data slicing, in seconds. Minimum: 3600.

Valid values:

  • 3600: 1 hour

  • 86400: 1 day

Valid values:

  • 3600 :
  • 86400 :

3600

StartTime

integer

Yes

The start of the time range to query, in milliseconds.

1699200000000

EndTime

integer

Yes

The end of the time range to query, in milliseconds.

1699286400000

OrderBy

string

No

The sort dimension. Valid value:

  • dataType

Valid values:

  • dataType :

    dataType

dataType

Metric

string

Yes

The metric name. Valid value: USAGEFEE.STAT.

Valid values:

  • USAGEFEE.STAT :

    USAGEFEE.STAT

USAGEFEE.STAT

Order

string

No

The sort order. Valid values:

  • ASC: ascending order

  • DESC: descending order

ASC

AdvancedFilters

array<object>

No

The filter conditions.

object

No

Key

string

No

The key of the filter condition.

regionId

Value

string

No

The value of the filter condition.

cn-hangzhou

OpType

string

No

The operator. Valid values: eq and in.

Valid values:

  • in :

    in

  • eq :

    eq

eq

Dimensions

array

No

The metric dimensions to query. Valid values:

  • dataType: data type

  • productType: product type

  • instanceId: instance ID

  • instanceName: instance name

  • instanceType: instance type

string

No

The metric dimension.

dataType

Measures

array

No

The metric measures to query.

string

No

The metric measure. Valid value: byte_sum.

Valid values:

  • byte_sum :

    byte_sum

byte_sum

QueryType

string

Yes

The data type. Valid values:

  • instantQuery: non-time series

  • timeSeriesQuery: time series

Valid values:

  • timeSeriesQuery :

    timeSeriesQuery

  • instantQuery :

    instantQuery

instantQuery

Response elements

Element

Type

Description

Example

object

Code

integer

The response code. 2XX indicates success, 3XX a redirect, 4XX a client error, and 5XX a server error.

200

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The error message returned on failure.

success

RequestId

string

The request ID.

99A663CB-8D7B-4B0D-A006-03C8EE38E7BB

Success

boolean

Whether the request succeeded. Valid values:

  • true

  • false

true

Data

object

The response data.

Complete

boolean

Whether the multi-region query is complete. Valid values:

  • true

  • false

true

Items

array<object>

The usage data entries.

object

The queried data.

{ "date": "1697108400", "dataType": "metrics", "byte_sum": 9497922 }

Examples

Success response

JSON format

{
  "Code": 200,
  "HttpStatusCode": 200,
  "Message": "success",
  "RequestId": "99A663CB-8D7B-4B0D-A006-03C8EE38E7BB",
  "Success": true,
  "Data": {
    "Complete": true,
    "Items": [
      {
        "date": "1697108400",
        "dataType": "metrics",
        "byte_sum": 9497922
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 ParameterMetricIllegal The specified metric is invalid. The specified metric is invalid.
400 ParameterMeasuresIllegal The specified Measures is invalid. The specified Measures is invalid.
400 ParameterTimeStampIllegal The specified timeStamp is invalid. The specified timeStamp is invalid.
400 ParameterOrderIllegal The specified order is invalid. The specified order is invalid.
400 ParameterPageSizeIllegal The specified PageSize is invalid. The specified PageSize is invalid.
400 ParameterIntervalIllegal The specified interval is invalid. The specified interval is invalid.
400 ParameterMeasuresMissing You must specify measures. You must specify measures.
400 ParameterDimensionsIllegal The specified dimensions is invalid. The specified dimensions is invalid.
400 ParameterRegionIdIllegal The specified RegionId is invalid. The specified RegionId is invalid.
400 InternalError Internal error. Please try again. Contact the DingTalk service account if the issue persists after multiple retries.
403 APINotAuthorize The current user is not authorized to access the interface. The current user is not authorized to access the interface.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.