Skip to content

Query All Available Dimensions

API Description

Use this API to query the complete set of available dimensions for one or more metrics.

API URL

GET Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/metrics/dimensionAll

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 The tenant ID for the tenant that contains the metric query content.
auth-type String Yes Authentication method. Supported values: UID, TOKEN, ACCOUNT, APIKEY.
auth-value String Yes Authentication value that corresponds to auth-type.

How to Obtain Common Parameters

To obtain tenant-id, select the metric application from the top navigation bar in Aloudata CAN, choose API Integration from the left navigation menu, and copy it from the API Integration page. Set auth-value based on the selected auth-type.

Request Parameters

Parameter Type Required Maximum Length Description
metricNames Array[String] Yes Metric name list. When multiple metrics are passed, the API retrieves all available dimensions for each metric separately.

Response Parameters

Response Parameter Description

Parameter Type Required Maximum Length Description
code String Yes 32 API response code.
message String Yes 512 Message body.
traceId String Yes 128 Trace ID.
data Array[Object] Response data. For details, see "data Parameter Description".

data Parameter Description

Parameter Type Required Maximum Length Description
basicAttributes Map No Basic attributes.
businessAttributes Map No Business attributes.
technicalAttributes Map No Technical attributes.
managementAttributes Map No Management attributes.
name String Yes Dimension name.
dimName String Yes English dimension name.
dimCode String No Dimension code.
dimDisplayName String Yes Dimension display name.
dimCategoryId String Category ID of the dimension.
dimDescription String Dimension description.
datasetName String Name of the dataset bound to the dimension.
originDataType String Dimension type.
config array Dimension source description. For details, see "config Parameter Description".

config Parameter Description

Parameter Type Required Description
type String Yes Dimension type, indicating the source of the dimension. Enum values:

- COLUMN_BIND: column binding

- CUSTOM: custom type
value String Yes If the dimension is a column-binding dimension, value is the column name.

If the dimension is a custom dimension, specify an expression. The expression is equivalent to adding a calculated column to the dataset.

Request Example

curl --location --request GET 'https://127.0.0.1/anymetrics/api/v1/metrics/dimensionAll?metricNames=addtid,1c_RANK' \
--header 'auth-type: UID' \
--header 'tenant-id: tn_19487697' \
--header 'auth-value: 463663891121963008' 

Response Example

{
    "data": {
        "addtid": [
            {
                "basicAttributes": null,
                "businessAttributes": null,
                "technicalAttributes": null,
                "managementAttributes": null,
                "name": "metric_time",
                "dimName": "metric_time",
                "dimCode": null,
                "dimDisplayName": "metric_time",
                "dimCategoryId": null,
                "dimDescription": "metric time",
                "datasetName": null,
                "originDataType": "DATE",
                "config": null,
                "displayStatus": null
            }
        ],
        "1c_RANK": [
            {
                "basicAttributes": null,
                "businessAttributes": null,
                "technicalAttributes": null,
                "managementAttributes": null,
                "name": "dmd02724b1da08d1fb9007b16572563c",
                "dimName": "Unitss",
                "dimCode": "",
                "dimDisplayName": "Unitss",
                "dimCategoryId": "-1",
                "dimDescription": "Units",
                "datasetName": "TransactionDetails",
                "originDataType": "DECIMAL",
                "config": {
                    "type": "COLUMN_BIND",
                    "value": "Units"
                },
                "displayStatus": null
            },
            {
                "basicAttributes": null,
                "businessAttributes": null,
                "technicalAttributes": null,
                "managementAttributes": null,
                "name": "dme36114b32b18abf2fbf2d63572b7ac",
                "dimName": "TransactionDates",
                "dimCode": "",
                "dimDisplayName": "TransactionDate",
                "dimCategoryId": "-1",
                "dimDescription": "TransactionDate",
                "datasetName": "TransactionDetails",
                "originDataType": "DATETIME",
                "config": {
                    "type": "COLUMN_BIND",
                    "value": "TransactionDate"
                },
                "displayStatus": null
            },
            {
                "basicAttributes": null,
                "businessAttributes": null,
                "technicalAttributes": null,
                "managementAttributes": null,
                "name": "dmddd974b52803e7c3a89fe35f82effc",
                "dimName": "dtr1",
                "dimCode": null,
                "dimDisplayName": "Partition Date",
                "dimCategoryId": "-1",
                "dimDescription": "This is a partition dimension.",
                "datasetName": "TransactionDetails",
                "originDataType": "INT",
                "config": {
                    "type": "COLUMN_BIND",
                    "value": "dt"
                },
                "displayStatus": null
            },
            {
                "basicAttributes": null,
                "businessAttributes": null,
                "technicalAttributes": null,
                "managementAttributes": null,
                "name": "dmeda0d4fc2ae54735319c0f7013d276",
                "dimName": "TransactionID1",
                "dimCode": "",
                "dimDisplayName": "TransactionID",
                "dimCategoryId": "-1",
                "dimDescription": "TransactionID",
                "datasetName": "TransactionDetails",
                "originDataType": "BIGINT",
                "config": {
                    "type": "CUSTOM",
                    "value": "if((DaysOfMonth(['TransactionDetails'/'TransactionDate'])) = (TotalDaysOfMonth(['TransactionDetails'/'TransactionDate'])), 1, 0)"
                },
                "displayStatus": null
            },
            {
                "basicAttributes": null,
                "businessAttributes": null,
                "technicalAttributes": null,
                "managementAttributes": null,
                "name": "dm8e694432db67b6d8fc594c70b9fe2c",
                "dimName": "ten",
                "dimCode": "",
                "dimDisplayName": "times",
                "dimCategoryId": "-1",
                "dimDescription": "",
                "datasetName": "TransactionDetails",
                "originDataType": "DATETIME",
                "config": {
                    "type": "COLUMN_BIND",
                    "value": "ten"
                },
                "displayStatus": null
            },
            {
                "basicAttributes": null,
                "businessAttributes": null,
                "technicalAttributes": null,
                "managementAttributes": null,
                "name": "metric_time",
                "dimName": "metric_time",
                "dimCode": null,
                "dimDisplayName": "metric_time",
                "dimCategoryId": null,
                "dimDescription": "metric time",
                "datasetName": null,
                "originDataType": "DATE",
                "config": null,
                "displayStatus": null
            }
        ]
    },
    "success": true,
    "code": "200",
    "errorMsg": null,
    "detailErrorMsg": null,
    "traceId": "4b5d80fad0fc44d0937253362b4e9da5.79456.17490900608203107"
}