Update Dimension
API Description
Use this API to update metadata for a specified dimension. The system identifies the dimension by dimName and tenantId, and supports updating multiple attributes except the dimension name.
API URL
POST Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/dimension/update
To obtain anymetrics_host:anymetrics_port, see Calling APIs.
Request Method
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. |
| queryBy | String | No | Identifier type used for the query. UUID: use the system internal UUID. If omitted, enName is used by default. |
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
All attributes except dimName can be modified.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | String | No | Required when queryBy=UUID. |
| dimName | String | Yes | Dimension name. - Unique within the tenant and cannot be modified. - Supports only letters, digits, and underscores. Two consecutive underscores are not supported. |
| datasetName | String | No | Dataset name. |
| dimDisplayName | String | Yes | Dimension display name. Supports any characters, up to 150 characters. |
| dimCategoryId | String | No | Dimension category ID. Use the fixed value -1 for Uncategorized. If omitted, the dimension is Uncategorized by default. |
| dimDescription | String | No | Dimension description. Supports any characters, up to 300 characters. |
| config | object | Yes | Dimension source. See config Parameters. |
| valueList | object | Yes | Dimension value list. |
| basicAttributes | Map |
No | Basic attributes. |
| businessAttributes | Map |
No | Business attributes. |
| technicalAttributes | Map |
No | Technical attributes. |
| managementAttributes | Map |
No | Management attributes. |
config Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | Dimension type, which indicates the source type. Enumerated values: - COLUMN_BIND: column binding- CUSTOM: custom type |
| value | String | Yes | For a column-bound dimension, set value to the column name.For a custom dimension, set value to an expression. The expression is equivalent to adding a calculated column to the dataset. |
valuesList Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| value | String | No | Original dimension value. Cannot be an empty string or null. |
| name | String | No | Mapped name. Cannot be an empty string or null. |
| description | String | No | Description. |
Response Parameters
| 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 | Boolean | Yes | Whether the update succeeded. |
Request Example
{
"name":"dm74d6344548cbf3509c6146e76a015c"
"dimName": "tb_click_1",
"dimDisplayName": "tb_click_1",
"dimCategoryId": "-1",
"dimDescription": "tb_click_1 dimension update",
"datasetName": "tb_click",
"config": {
"type": "COLUMN_BIND",
"value": "user_id"
},
"valueList": [
{
"value": "Dimension value 03",
"name": "Dimension value 03",
"description": "Dimension value 03"
},
{
"value": "Dimension value 04",
"name": "Dimension value 04",
"description": "Dimension value 04"
}
]
}