---
title: "Return aggregate count/sum rows, optionally grouped."
method: POST
path: "/metric-details-v7"
---

# Return aggregate count/sum rows, optionally grouped.

`POST /metric-details-v7`

## Request

- Base URL: `https://rpt-2.trellus.ai`
- URL: `https://rpt-2.trellus.ai/metric-details-v7`
- Auth: HTTP bearer

## Request body

- MetricRequest
  - `start` integer, required: Unix microseconds, inclusive.
  - `end` integer: Unix microseconds, exclusive; defaults to now.
  - `team_id` string
  - `cnf` array[]: Filters applied to every aggregate.
    - Filter[]
      - `column_name` string, required
      - `operator` 'EQ' | 'NEQ' | 'GT' | 'GE' | 'LT' | 'LE' | 'REGEX' | 'IN' | 'NIN', required
      - `value_safe` unknown, required
      - `reducer` 'ANY' | 'ALL'
  - `selects` union[], required: Count with cnf or sum with column_name; both may be supplied.
    - union
      - object
        - `cnf` unknown[], required
          - unknown
      - object
        - `column_name` string, required
        - `cnf` unknown[]
          - unknown
  - `group_by` object: Use exact grouping for strings, booleans, bytes and enums. Do not supply step parameters for these types. Floating-point and started_at grouping require step_size_safe and step_start_safe. Integer grouping can use exact values or steps. step_size_safe is the bin width; step_start_safe is its origin; optional step_modulus_safe is a repeat period. Values use the grouped column’s units: started_at uses seconds. For stepped groups, the key is floor(((value - origin) modulo period, when supplied) / width). It is a bin index, not a date. Compatibility exception: the current metric-details-v7 endpoint scales a started_at group key by 1,000,000. Divide by 1,000,000 to recover the bin index before converting it to a time range.
    - `column_name` string, required
    - `step_size_safe` unknown
    - `step_start_safe` unknown
    - `step_modulus_safe` unknown

## Response `200`

JSON arrays in selects order; a group value is prepended when grouped.

- array[]
  - unknown[]
    - unknown

## Other responses

- `default`: Read the HTTP status and response text; on 429 honor Retry-After seconds.

---

[API](https://skmtc.dev/trellus/apis/trellus-call-data-api.md) - [All operations](https://skmtc.dev/trellus/apis/trellus-call-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trellus/apis/trellus-call-data-api/revisions/42af321e8f40?raw)
