---
title: "Query Groups Join"
method: POST
path: "/insights/query-groups-join"
tags: ["Insights"]
---

# Query Groups Join

`POST /insights/query-groups-join`

## Request

- Base URL: `https://api.chift.eu`
- URL: `https://api.chift.eu/insights/query-groups-join`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/chift/apis/chift-api/docs/insights/query-groups-join/post.ts> (a function with typed inputs; its response is checked against the schema)

## Headers

- `x-chift-datalayer-max-staleness` string, nullable

## Request body

- CubeJoinQuery: Runs several single-group queries and merges them on shared, aligned dimensions. Each entry in ``queries`` is a standard load query for a single query group. Each entry in ``align`` is a positional list of dimensions to align (``cols[i]`` is the dimension of ``queries[i]``, or ``None`` if that query lacks the axis); the results are full-outer joined on the aligned dimension tuples. The dimensions in an align entry must share one declared ``align_axis``, and that axis names the resulting output column.
  - `queries` CubeLoadQuery[], required
    - `measures` string[]
    - `dimensions` string[]
    - `segments` string[]
    - `filters` union[]
      - union
        - CubeLeafFilter: Cube REST API leaf filter: member + operator + values.
          - `member` string, required
          - `operator` string, required
          - `values` string[], nullable
        - CubeAndFilter: Cube REST API logical AND filter.
          - `and` union[], required
            - union
              - …
        - CubeOrFilter: Cube REST API logical OR filter.
          - `or` union[], required
            - union
              - …
    - `timeDimensions` CubeTimeDimension[]
      - `dimension` string, required
      - `dateRange` union
        - string
        - string[]
      - `compareDateRange` array[], nullable
        - string[]
      - `granularity` string, nullable
    - `order` union
      - object
      - CubeOrderItem[]
        - `id` string, nullable
        - `member` string, nullable
        - `desc` boolean, nullable
        - `direction` 'asc' | 'desc', nullable
      - array[]
        - string[]
    - `limit` integer, nullable
    - `offset` integer, nullable
    - `timezone` string, nullable
    - `total` boolean, nullable
    - `renewQuery` boolean, nullable
    - `ungrouped` boolean, nullable
  - `align` array[]
    - string[]

## Response `200`

Successful Response

- QueryResponse
  - `results` ExecutionResult[], required
    - `column` string, required
    - `title` string, nullable
    - `data` unknown[], required
      - unknown
    - `type` string, required
  - `meta` QueryMeta
    - `currency` string[], nullable
    - `monetary_measures` string[], nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-03** `020884969534`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/chift/apis/chift-api/changes/insights/query-groups-join/post.md)

---

[API](https://skmtc.dev/chift/apis/chift-api.md) - [All operations](https://skmtc.dev/chift/apis/chift-api/llms.txt) - [OpenAPI document](https://skmtc.dev/chift/apis/chift-api/revisions/020884969534?raw)
