Skip to main content
API reference sections

Schema

AttributeQueryResponse

What the query answers with.

Type object

Shape

FieldTypeDescription
rowsrequiredarray of AttributeRow

The matching nodes, one row each, in the requested order.

definitionsrequiredarray of AttributeDefinition

Every attribute definition in play: the system registry always, plus the scoped workspaces' custom definitions - so a filter UI builds its controls from types rather than guessing.

tagsrequiredarray of AttributeTag

The scoped workspaces' tag tables (live tags only, merge tombstones resolved away), so a koru.tag value - a TagId - resolves to a name and a chip color without another request.

groupsarray of AttributeGroup

Corpus-wide counts per tag, when the query asked for them with group_by. Empty otherwise.

Names are not repeated here: a group carries the TagId and the count, and tags above is where that id becomes a word and a color. Two spellings of one name in one response is a drift waiting to happen.

Default []

projectedrequiredboolean

Whether every workspace in scope has reached the read model at all. false is "still indexing" - the projector is debounced, so an attribute set a moment ago may not be a row yet.

updating_workspacesarray of WorkspaceId

The workspaces the answer may be behind on, by the same rule search uses: named rather than waited for.

Default []

limitrequiredinteger (uint, >= 0)

The page size actually applied, after the server's cap.

offsetrequiredinteger (uint, >= 0)

The offset actually applied.

Example
{
  "rows": [
    {
      "workspace": "00000000-0000-4000-8000-000000000000",
      "document": "00000000-0000-4000-8000-000000000000",
      "node": "string",
      "node_kind": "string",
      "excerpt": "string",
      "document_title": "string",
      "trashed": false,
      "attributes": [
        {
          "id": "string",
          "role": "string",
          "kind": "string",
          "value": "string",
          "zone": "string",
          "label": "string"
        }
      ]
    }
  ],
  "definitions": [
    {
      "id": "string",
      "key": "string",
      "label": "string",
      "value_type": "string",
      "cardinality": "string",
      "scope": "string",
      "system": false,
      "options": [],
      "filterable": false,
      "sortable": false,
      "groupable": false
    }
  ],
  "tags": [
    {
      "id": "string",
      "name": "string",
      "color": "string",
      "workspace": {}
    }
  ],
  "groups": [],
  "projected": false,
  "updating_workspaces": [],
  "limit": 0,
  "offset": 0
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Used by

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.