Preview Dimension Values
API Description
Use this API to preview values for a specified dimension. It supports keyword-based fuzzy matching and pagination, and is useful for metric data queries within a tenant where dimension values need to be matched exactly or by keyword.
API URL
POST Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/dimension/values
To obtain anymetrics_host:anymetrics_port, see Calling APIs.
Request Parameters
Common Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| tenant-id | String | Yes | The tenant ID of the tenant that contains the metric query assets. |
| auth-type | String | Yes | Authentication type. Supported values: UID, TOKEN, ACCOUNT, APIKEY. |
| auth-value | String | Yes | Authentication value corresponding to auth-type. |
How to Obtain Common Parameters
In Aloudata CAN, select the metric application from the top navigation bar, then choose API Integration from the left navigation menu. You can obtain tenant-id on the API Integration page. Set auth-value to the authentication value required by the selected auth-type.

Request Body
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| dimName | String | Yes | Dimension name. |
| dimValueKeyword | String | No | Keyword for dimension values. If specified, fuzzy matching uses the LIKE '%keyword%' pattern. This option applies only to string dimensions; other dimension types ignore it automatically. |
| pageNumber | Integer | No | Page number, starting from 1. Defaults to 1 if omitted. |
| pageSize | Integer | No | Number of records per page. Defaults to 200 if omitted. |
Response Parameters
Response Parameter Overview
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | String | Yes | API response code. |
| success | boolean | Yes | Whether the request succeeded. |
| errorMsg | String | Yes | Error message. |
| detailErrorMsg | String | Yes | Detailed error message. |
| traceId | String | Yes | Trace ID for troubleshooting. |
| data | object | Yes | Result data. See metas Parameters and tables Parameters. |
metas Parameters
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| name | String | Yes | 32 | Field name. |
| dataTypeName | String | Yes | 32 | Field type name. |
| schemaName | String | Yes | 128 | Schema name. |
| tableName | String | Yes | 128 | Table name. |
tables Parameters
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| values | String | Yes | Queried data value. | |
| order_date | String | Yes | Marker for the value. | |
| count | String | Yes | Number of occurrences for the value. Currently always 1. |
Example
Response Example
{
"data": {
"queryId": "4e06378a84af4f0f98333ff31ed6ad1c",
"warning": null,
"sql": "SELECT `tn_597771_correctness_test_qq_datasource__default__can_shop`.`shop_id`\nFROM `default_catalog`.`aloudatacan`.`tn_597771_correctness_test_qq_datasource__default__can_shop` AS `tn_597771_correctness_test_qq_datasource__default__can_shop`\nGROUP BY `tn_597771_correctness_test_qq_datasource__default__can_shop`.`shop_id`\nORDER BY (`tn_597771_correctness_test_qq_datasource__default__can_shop`.`shop_id`) IS NULL, `tn_597771_correctness_test_qq_datasource__default__can_shop`.`shop_id`\nLIMIT 200",
"metas": [
{
"id": null,
"name": "shop_id",
"type": "INT",
"displayName": null,
"format": null,
"description": null,
"sourceType": null,
"dataType": null,
"columnFormat": null
}
],
"table": {
"shop_id": [
[
1,
1,
null
],
[
2,
1,
null
],
[
3,
1,
null
],
[
4,
1,
null
],
[
5,
1,
null
],
[
6,
1,
null
],
[
7,
1,
null
],
[
8,
1,
null
]
]
}
},
"success": true,
"code": "200",
"errorMsg": null,
"detailErrorMsg": null,
"traceId": "ad3cd6c9fd5849b6a271f02f89edc93e.145.17193921246800027"
}