---
title: "Get segment results"
method: GET
path: "/api/v1/ackdb/observe/segments/{id}/results"
tags: ["ackDB"]
---

# Get segment results

`GET /api/v1/ackdb/observe/segments/{id}/results`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/ackdb/observe/segments/{id}/results`
- Auth: HTTP bearer

Runs the saved Segment through the same compiler as the ad-hoc query endpoints and returns a page of rows for the rendered grain. By default the rows are the segment's HOME grain (`entityKind`). Pass `grain` to render the OTHER grain: the saved filter is pivoted via entity_id ('contacts at those companies' / 'companies of those people') and rendered with the TARGET grain's default columns/sort. Rows are the rendered grain's shape (company rows or contact rows) - read `renderedGrain` to dispatch the renderer. DERIVED segments (baseSegmentId set) render in their OWN grain only: the base's filter pivoted into this grain AND this segment's filter, with this segment's own columns/sort; `grain` != the segment's grain → 400. A transient `extraFilter` (e.g. search) and a transient `sort` override (header-click sorting) ARE honored on a derived segment; a `columns` override is not.

## Path parameters

- `id` string, required

## Query parameters

- `grain` 'company' | 'contact' | 'person'
- `extraFilter` string
- `columns` string
- `sort` string
- `limit` integer
- `offset` integer

## Response `200`

A page of rows for the rendered grain. When `grain` is supplied, `renderedGrain` and `isPivot` are present (`isPivot` = renderedGrain differs from the segment's home grain). On a pivot, `renderedColumns` + `renderedSort` echo the target grain's default layout the rows were projected with.

- object: Response for the Observe company query. `data` rows always carry entityId, name, and domain plus the projected columns. `pagination.totalIsLowerBound` may be set when the count was clamped.
  - `data` object[], required
    - `entityId` string, required
    - `name` unknown
    - `domain` unknown
  - `pagination` AckdbPaginationMeta, required: Pagination metadata included in paginated responses.
    - `total` integer, required: Total number of records matching the query.
    - `limit` integer, required: Maximum number of records returned in this response.
    - `offset` integer, required: Number of records skipped.
    - `totalIsLowerBound` boolean: When true, `total` is a lower bound rather than an exact count. The Observe company query returns this when the count query was rejected or timed out and the result count was clamped (e.g. total=1000, totalIsLowerBound=true).
  - `renderedGrain` 'company' | 'contact' | 'person': The grain the rows belong to. Present only when `grain` was supplied.
  - `isPivot` boolean: True when renderedGrain differs from the segment's home grain.
  - `renderedColumns` AckdbSegmentColumn[]: On a pivot (isPivot=true), the TARGET grain's default columns the rows were projected with - echo this to render the right layout (the rows are NOT the segment's stored, home-grain columns). Present only on a pivot.
    - `field` string, required
    - `frozen` boolean
    - `width` number: Persisted column width in px (per-segment; presentation only).
  - `renderedSort` AckdbSegmentSort[]: On a pivot, the sort the rows were actually ordered by - the TARGET grain's default, or the `sort` override when one was passed.
    - `field` string, required
    - `dir` 'asc' | 'desc', required

## Other responses

- `403`: Caller cannot see the segment (#284).
- `404`: Segment not found.

---

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