查詢寫入量資料,支援應用監控、可觀測鏈路OpenTelemetry版、Prometheus、使用者體驗監控四大產品用量資料。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| IntervalInSec |
integer |
否 |
資料片的時間間隔,單位為秒,最小值為 3600。 枚舉值:
|
3600 |
| StartTime |
integer |
是 |
起始時間的時間戳記,精確到毫秒。 |
1699200000000 |
| EndTime |
integer |
是 |
結束時間的時間戳記,精確到毫秒。 |
1699286400000 |
| OrderBy |
string |
否 |
排序依據,可設為任一 dimesion 枚舉值:
|
dataType |
| Metric |
string |
是 |
指標名稱,取值:USAGEFEE.STAT 枚舉值:
|
USAGEFEE.STAT |
| Order |
string |
否 |
排序標準。取值:
|
ASC |
| AdvancedFilters |
array<object> |
否 |
過濾條件數組 |
|
|
object |
否 |
|||
| Key |
string |
否 |
過濾條件的 key |
regionId |
| Value |
string |
否 |
過濾條件的 value |
cn-hangzhou |
| OpType |
string |
否 |
操作符,目前僅支援等於或者 in 枚舉值:
|
eq |
| Dimensions |
array |
否 |
指標對應的維度。
|
|
|
string |
否 |
指標對應的維度。 |
dataType |
|
| Measures |
array |
否 |
指標對應的測量資料。 |
|
|
string |
否 |
指標對應的測量資料。目前僅支援 byte_sum 枚舉值:
|
byte_sum |
|
| QueryType |
string |
是 |
查詢的資料傳回型別:
枚舉值:
|
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 |
| Data |
object |
返回結構體。 |
|
| Complete |
boolean |
涉及到多地區查詢是,整體是否執行完成:
|
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. | 目前使用者無許可權訪問該介面 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。