Get Metric Details in Bulk
API Description
Use this API to query metric details in bulk.
API URL
GET Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/metrics/batchDetail
For how to obtain anymetrics_host:anymetrics_port, see Calling APIs.
Request Parameters
Common Request Parameters (HEADERS)
| Parameter | Type | Required | Description |
|---|---|---|---|
| tenant-id | String | Yes | The tenant ID for the tenant that contains the metric query content. |
| auth-type | String | Yes | Authentication method. Supported values: UID, TOKEN, ACCOUNT, APIKEY. |
| auth-value | String | Yes | Authentication value that corresponds to auth-type. |
How to Obtain Common Parameters
To obtain tenant-id, select the metric application from the top navigation bar in Aloudata CAN, choose API Integration from the left navigation menu, and copy it from the API Integration page. Set auth-value based on the selected auth-type.

Request Parameters
| Parameter | Type | Required | Maximum Length | Description |
|---|---|---|---|---|
| metricNames | Array[String] | Yes | Metric name list. |
Response Parameters
Response Parameter Description
| Parameter | Type | Required | Maximum Length | Description |
|---|---|---|---|---|
| code | String | Yes | 64 | API response code. |
| message | String | Yes | 512 | Message body. |
| traceId | String | Yes | 128 | Trace ID. |
| data | Array[Object] | Yes | Response result data. For details, see "data Parameter Description". |
data Parameter Description
| Parameter | Type | Required | Maximum Length | Description | |
|---|---|---|---|---|---|
| code | String | No | Unique metric identifier generated by the system. | ||
| metricName | String | Yes | 128 | Metric name. | |
| version | Int | No | Metric version. | ||
| metricCode | String | Yes | Metric code. | ||
| type | String | Yes | Metric type. | ||
| metricDisplayName | String | Yes | Metric display name. | ||
| businessCaliber | String | No | Metric business definition. | ||
| caliber | String | Metric calculation definition. | |||
| owner | String | Metric owner. | |||
| businessOwner | String | Metric business owner. | |||
| unit | String | Metric unit. | |||
| metricCategoryId | String | Metric category ID. | |||
| basicAttributes | Map |
No | Basic attributes. | ||
| businessAttributes | Map |
No | Business attributes. | ||
| technicalAttributes | Map |
No | Technical attributes. | ||
| managementAttributes | Map |
No | Management attributes. | ||
| metricViewCount | Integer | Yes | Number of metric queries. | ||
| status | String | Yes | Final metric status. Enum values: ONLINE: online; OFFLINE: offline. |
||
| publishStatus | String | Yes | Publishing status. Enum values: DRAFT: draft; PUBLISHED: published. |
||
| displayStatus | String | No | Current metric status. Enum values: UNPUBLISHED: unpublished; PUBLISHED: published; SAVED_NOT_PUBLISHED: saved but not published; OFFLINE: offline; PENDING_PUBLISH: publishing; PENDING_OFFLINE: taking offline; PENDING_DELETE: pending deletion. |
Request Example
Response Example
{
"data": [
{
"basicAttributes": {},
"businessAttributes": {},
"technicalAttributes": {},
"managementAttributes": {},
"code": "35a5346569054e8e8099ad7ad2c176db",
"metricName": "open_order_count_3",
"metricDisplayName": "Order Count_Custom Aggregate Function 3",
"businessCaliber": "Metric 1 created through OpenAPI.",
"owner": "correctness_test_qq",
"businessOwner": "correctness_test_qq",
"type": "ATOMIC",
"caliber": {
"datasetName": "can_order",
"expr": "count(['can_order'/'order_id'])",
"formula": null,
"filters": [],
"metricTime": "order_date",
"enableNonAdditiveDimensions": null,
"nonAdditiveDimensions": null,
"fingerPrint": null
},
"unit": "OTHER",
"metricCategoryId": "-1",
"metricViewCount": 0,
"publishStatus": null,
"status": "ONLINE"
},
{
"basicAttributes": {},
"businessAttributes": {},
"technicalAttributes": {},
"managementAttributes": {},
"code": "1d45e0191f9348dd9a242fa0839d13a9",
"metricName": "ordercount_12",
"metricDisplayName": "Order Count_Custom Aggregate Function 4",
"businessCaliber": "Metric 1 created through OpenAPI.",
"owner": "correctness_test_qq",
"businessOwner": "correctness_test_qq",
"type": "ATOMIC",
"caliber": {
"datasetName": "can_order",
"expr": "count(['can_order'/'order_id'])",
"formula": null,
"filters": [
{
"type": "EXPR",
"expr": "IN(['can_product'/'brand_name'],\"Huawei\")"
}
],
"metricTime": "order_date",
"enableNonAdditiveDimensions": null,
"nonAdditiveDimensions": null,
"fingerPrint": null
},
"unit": "OTHER",
"metricCategoryId": "-1",
"metricViewCount": 0,
"publishStatus": null,
"status": "ONLINE"
}
],
"success": true,
"code": "200",
"errorMsg": null,
"detailErrorMsg": null,
"traceId": "f6e656798ed241c789f7132823c46c6b.140.17194021322700363"
}