Skip to content

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_METRIC
Dimension category: CATEGORY_DIMENSION
Dataset 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
}

Response Example

{
    "data": null,
    "success": true,
    "code": 200,
    "errorMsg": null,
    "traceId": "fe02923efe5540989f10119967853b87.227.17067709856570001"
}