Update a Category
API Description
Use this API to update metric category or dimension category information in the metric platform.
API URL
POST Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/category/update
For how to obtain anymetrics_host:anymetrics_port, see Calling APIs.
Request Method
Common Request Parameters (HEADERS)
| Parameter | Type | Required | Description |
|---|---|---|---|
| tenant-id | String | Yes | Tenant ID, which identifies the tenant that owns the metric query content. |
| auth-type | String | Yes | Authentication method. Supported values: UID, TOKEN, ACCOUNT, APIKEY. |
| auth-value | String | Yes | Authentication value corresponding to auth-type. |
How to Obtain Common Parameters
To obtain tenant-id, select Metric Application from the top navigation bar in Aloudata CAN, then select API Integration from the left menu. Enter auth-value according to the selected auth-type.

Request Parameters
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| id | String | Yes | 64 | Category ID. |
| name | String | Yes | 32 | Category name. |
| categoryType | String | Yes | 32 | Category type.Metric category: CATEGORY_METRICDimension category: CATEGORY_DIMENSIONDataset category: CATEGORY_DATASET |
| parentId | String | No | 64 | Parent category ID, used to build the hierarchy. |
| frontId | String | No | 64 | Previous category ID. |
Response Parameters
| Parameter | Type | Required | Max Length | Description | |
|---|---|---|---|---|---|
| code | String | Yes | 32 | API response code. | |
| errorMsg | String | Yes | 512 | Message body. | |
| traceId | String | Yes | 128 | Trace ID for troubleshooting. | |
| data | Void | Yes | null | ||
| success | boolean | Yes | Whether the request succeeded. |
Request Example
{
"id":"f88e7b90-bcff-4d48-85be-967ab77a2ed5",
"name":"api_create123",
"categoryType":"CATEGORY_METRIC",
"parentId":null,
"frontId":null
}