全部产品
Search
文档中心

应用实时监控服务ARMS:QueryCommercialUsage - 查询可观测用量数据

更新时间:Aug 28, 2026

查询写入量数据,支持应用监控、可观测链路OpenTelemetry版、Prometheus、用户体验监控四大产品用量数据。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

IntervalInSec

integer

否

数据片的时间间隔,单位为秒,最小值为 3600。

枚举值:

  • 3600 :

    小时

  • 86400 :

    天

3600

StartTime

integer

是

起始时间的时间戳,精确到毫秒。

1699200000000

EndTime

integer

是

结束时间的时间戳,精确到毫秒。

1699286400000

OrderBy

string

否

排序依据,可设为任一 dimesion

枚举值:

  • dataType :

    dataType

dataType

Metric

string

是

指标名称,取值:USAGEFEE.STAT

枚举值:

  • USAGEFEE.STAT :

    USAGEFEE.STAT

USAGEFEE.STAT

Order

string

否

排序标准。取值:

  • ASC:升序。

  • DESC:降序。

ASC

AdvancedFilters

array<object>

否

过滤条件数组

object

否

Key

string

否

过滤条件的 key

regionId

Value

string

否

过滤条件的 value

cn-hangzhou

OpType

string

否

操作符,目前仅支持等于或者 in

枚举值:

  • in :

    in

  • eq :

    eq

eq

Dimensions

array

否

指标对应的维度。

  • dataType 数据类型

  • productType 产品类型

  • instanceId 实例 ID

  • instanceName 实例名称

  • instanceType 实例类型

string

否

指标对应的维度。

dataType

Measures

array

否

指标对应的测量数据。

string

否

指标对应的测量数据。目前仅支持 byte_sum

枚举值:

  • byte_sum :

    byte_sum

byte_sum

QueryType

string

是

查询的数据返回类型:

  • instantQuery 非时序

  • timeSeriesQuery 时序

枚举值:

  • timeSeriesQuery :

    timeSeriesQuery

  • instantQuery :

    instantQuery

instantQuery

返回参数

名称

类型

描述

示例值

object

Code

integer

接口状态,取值说明如下:2XX:成功。3XX:重定向。4XX:请求错误。5XX:服务器错误。

200

HttpStatusCode

integer

HTTP 状态码

200

Message

string

调用失败时返回的信息。

success

RequestId

string

请求 ID。

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

Success

boolean

查询是否成功:

  • true:成功。

  • false:失败。

true

Data

object

返回结构体。

Complete

boolean

涉及到多区域查询是,整体是否执行完成:

  • true:是。

  • false:否。

true

Items

array<object>

返回数据的数据结构体列表。

object

数据项

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

示例

正常返回示例

JSON格式

{
  "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
      }
    ]
  }
}

错误码

HTTP status code

错误码

错误信息

描述

400 ParameterMetricIllegal The specified metric is invalid. 参数metric非法
400 ParameterMeasuresIllegal The specified Measures is invalid. Measures非法
400 ParameterTimeStampIllegal The specified timeStamp is invalid. 时间参数非法
400 ParameterOrderIllegal The specified order is invalid. 参数order非法
400 ParameterPageSizeIllegal The specified PageSize is invalid. PageSize非法
400 ParameterIntervalIllegal The specified interval is invalid. 参数Interval非法
400 ParameterMeasuresMissing You must specify measures. 参数measures缺失
400 ParameterDimensionsIllegal The specified dimensions is invalid. Dimensions非法
400 ParameterRegionIdIllegal The specified RegionId is invalid. RegionId非法
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. 当前用户无权限访问该接口

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情。