> ## Documentation Index
> Fetch the complete documentation index at: https://docs.occtoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# metrics

> Reads the tenant's metrics, aggregated as `input` asks. Returns one `MetricValue` per result row. An invalid input fails with a top-level error.



**query** `metrics(input: MetricsQueryStringInput!): [MetricValue!]!`

## Arguments

**`input`**: `MetricsQueryStringInput!` (required)

What to read and how to aggregate it.

## Returns

`[MetricValue!]!`

**`value`**: `JSON!`

The row as a JSON object, with one key per aggregate and per `groupBy` column, plus `time` when `bin` is set. Example: `{"value": 42}`.

## Examples

```graphql Query
query Metrics($input: MetricsQueryStringInput!) {
  metrics(input: $input) {
    value
  }
}
```

```json Variables
{
  "input": {
    "name": "string"
  }
}
```

```json Response
{
  "data": {
    "metrics": [
      {
        "value": "value"
      }
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.