List Categories
API Description
Use this API to list categories of a specified type. By specifying a category type, the system returns details for all child categories under the matching category.
API URL
GET Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/category/list?categoryType=xxx
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 | 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 |
|---|---|---|---|---|
| categoryType | String | Yes | 32 | Category type.Metric category: CATEGORY_METRICDimension category: CATEGORY_DIMENSIONDataset category: CATEGORY_DATASET |
Response Parameters
Response Parameter Description
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| code | String | Yes | 32 | Response status code. |
| message | String | Yes | 512 | Message body. |
| traceId | String | Yes | 128 | Trace ID for troubleshooting. |
| data | List | Yes | Data structure returned in the response. For details, see the data parameter description. |
data Parameter Description
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| id | String | Yes | 64 | Category ID. |
| name | String | Yes | 32 | Category name. |
| parentId | String | Yes | 64 | Parent category ID. |
| frontId | String | Yes | 64 | Previous category ID. |
| categoryType | String | Yes | 32 | Category type, corresponding to categoryType in the request parameters. |
| type | String | Yes | 32 | Type. System categories are marked as SYSTEM. |
Request Example
Response Example
{
"data": [
{
"id": "ec2f703e-e44d-4961-be71-522c46720976",
"name": "API-created Category 01",
"parentId": null,
"frontId": "113d93da-e265-479d-830e-2d253be7d1c2",
"categoryType": "CATEGORY_METRIC",
"type": null
},
{
"id": "113d93da-e265-479d-830e-2d253be7d1c2",
"name": "API-created Category 02",
"parentId": null,
"frontId": null,
"categoryType": "CATEGORY_METRIC",
"type": null
},
{
"id": "6b7d79ae-065c-4d84-910c-555fbde685ba",
"name": "API-created Child Category 03",
"parentId": "ec2f703e-e44d-4961-be71-522c46720976",
"frontId": null,
"categoryType": "CATEGORY_METRIC",
"type": null
},
{
"id": "-1",
"name": "uncategorized",
"parentId": null,
"frontId": null,
"categoryType": "CATEGORY_METRIC",
"type": "SYSTEM"
}
],
"success": true,
"code": "200",
"errorMsg": null,
"detailErrorMsg": null,
"traceId": "202baf375f5d4791a9f9555ba33afe43.149.17193065125610157"
}