get
https://{app-url}{}/api/v2/metrics/cardinality
Retrieve metrics cardinality per dimension
Use this API to retrieve metric cardinality per dimension. The response returns dimensions sorted by the cardinality of their values, along with example metrics.
Request Arguments
| Name | Description |
|---|---|
| startTime | Required. Fetch metrics starting from this time (Unix timestamp in seconds). Maximum: 90 days in the past. |
| endTime | Required. Fetch metrics up to this time (Unix timestamp in seconds). |
| size | Number of dimensions to return. |
| dims | Comma-separated list of dimensions to include in the results. |
| stream | Name of the stream to retrieve results for. |
| from | Starting index for pagination (0-based integer). |
Response Fields
If successful, the API returns an array of cardinality objects (as described below), along with high-level metadata.
| Parameter | Description |
|---|---|
| totalMetrics | Number of metrics that match the criteria. |
| startIndex | Starting index for this result set. |
| nextIndex | Index of the next batch of metrics (used for pagination). |
| cardinality | Cardinality of the metric (number of unique values). |
| examples | Array of example metrics. |
| what | The measure to which the metric belongs. |
