ackDB

Get segment results

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.

get/api/v1/ackdb/observe/segments/{id}/results

Request

  • Base URL
    http://localhost:3009
  • Auth
    HTTP bearer

Path parameters

idstring required

Query parameters

grain'company' | 'contact' | 'person'

Render grain. Omit for the segment's home grain (response is byte-identical to the pre-pivot shape). Set to ANOTHER grain to pivot the saved filter (company/contact membership travels via entity_id; the person grain bridges through contacts - a contact IS the person-company edge); the response then includes renderedGrain + isPivot. Every home-render pair among the three grains is supported.

extraFilterstring

URL-encoded JSON FilterGroup, authored in the RENDER (target) grain's vocabulary, ANDed on top of the pivoted set ('filter on top' - e.g. title contains VP on a company→contacts pivot, or a name/domain quick-find). Honored on a cross-grain pivot (grain present and ≠ the segment's home grain) AND on a derived segment (where it is ANDed with the derived segment's stored filter); passing it on the home-grain path is a 400 (use the filter editor / POST /query there). Unknown target-grain fields ⇒ 400.

columnsstring

URL-encoded JSON array of column projections ([{ field, frozen?, width? }, …]) in the RENDER (target) grain's vocabulary, used to project the pivot rows instead of the target grain's default columns (the pivot column editor). Echoed back as renderedColumns. Honored ONLY on a cross-grain pivot; passing it on a derived segment or the home-grain path is a 400 (a derived segment renders its own stored columns; on the home grain use POST /query). Unknown target-grain fields ⇒ 400. The entity_id/name/domain base columns are always projected regardless, so row-click navigation is never dropped.

sortstring

URL-encoded JSON array of sort entries ([{ field, dir: 'asc'|'desc' }, …]) in the RENDER (target) grain's vocabulary — a TRANSIENT sort override (header-click sorting on a pivoted view). Honored on a cross-grain pivot (echoed back as renderedSort) AND on a derived segment (overrides the stored sort for this read only — edit + save to persist); passing it on the home-grain path is a 400. Unknown/unsortable target-grain fields ⇒ 400.

limitinteger
offsetinteger

Response

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.

renderedGrain'company' | 'contact' | 'person'

The grain the rows belong to. Present only when grain was supplied.

isPivotboolean

True when renderedGrain differs from the segment's home grain.

Example response

{
  "pagination": {
    "total": 150,
    "limit": 50,
    "totalIsLowerBound": true
  },
  "renderedColumns": [
    {
      "field": "name",
      "frozen": true,
      "width": 200
    }
  ],
  "renderedSort": [
    {
      "field": "event_count"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.