List Metric Views
API Description
Use this API to list metric views and optionally search them by keyword using fuzzy matching.
API URL
GET Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/analysisview/list
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 | The tenant ID that identifies the tenant where the metric views belong |
| auth-type | String | Yes | Authentication type. Supported values: UID, TOKEN, ACCOUNT, and APIKEY |
| auth-value | String | Yes | The authentication value that corresponds to auth-type |
How to Obtain Common Parameters
To obtain tenant-id, select a metric application in the top navigation bar of Aloudata CAN, choose API Integration from the left-side menu, and copy it from the API Integration page. Set auth-value to the authentication value that corresponds to the selected auth-type.

Request Parameters
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| keyword | String | No | 32 | Keyword for the metric view name. If omitted, all results are returned. |
| pageNumber | Integer | No | Page number to request. Starts from 1; defaults to the first page. |
|
| pageSize | Integer | No | Number of records per page. Defaults to 20. |
Response Parameters
Response Parameter Description
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| code | String | Yes | 32 | API response code |
| message | String | Yes | 512 | Message body |
| traceId | String | Yes | 128 | Trace ID for troubleshooting |
| data | object | Yes | Result data. For details, see the data parameters. |
data Parameters
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| pageNumber | Integer | Yes | Current page number | |
| pageSize | Integer | Yes | Number of records per page | |
| totalPageSize | Integer | Yes | Total number of records | |
| data | Array[Object] | Yes | Data for the current page. For details, see the data object parameters. |
data Object Parameters
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| id | Integer | Yes | Metric view ID | |
| viewName | String | Yes | 50 | Metric view name |
| displayName | String | Yes | Metric view display name | |
| description | String | No | 300 | Metric view description |
| metrics | Array[String] | Yes | Metric list | |
| dimensions | Array[String] | No | Dimension list | |
| filters | Array[String] | No | Filters | |
| time_constraint | String | No | Date range | |
| orders | Array[String] | No | Query sort rules. Referenced dimensions must be included in dimensions. |
Request Example
Response Example
{
"code": "200",
"message": "Request succeeded",
"traceId": "fdde6861bd554805998343f9ff2dcd70.292.16857691758642861",
"data": {
"pageNumber": 1,
"pageSize": 20,
"total": 50,
"data": [
{
"id": 1,
"viewName": "OrderAnalysisView2",
"description": "Order metric view 2",
"metrics": [
"orderCount"
],
"dimensions": [
"stories/category"
],
"filters": [
{
"name": "stories/isDraft",
"operator": "=",
"values": [
"No"
]
}
],
"time_constraint":"BETWEEN 2023-01-01 AND 2023-01-10",
"orders": [
{
"stories/time": "asc"
},
{
"stories/count": "desc"
}
]
}
]
}
}