Skip to main content

Request

Shared request and response schema. Request: Ontology request accepted by the API: a definition (from and optional ops) plus exactly one terminal, such as rows, page, aggregate, update, or link. Response: Ontology request returned by the API as stored in a resource: a definition (from and optional ops) plus exactly one terminal.

versionVersion (integer)
Default value: 1
from objectrequired

Where a definition starts: one type (entity or relation) and, optionally, the rows to start from. anchors are {column: value} maps that name every key column of the type (compile checks); extra columns are only meaningful under upsert, where the anchor row is the row written.

entity object

EntityType id

anyOf
string
relation object

RelationType id

anyOf
string
anchors object

Start rows as {key column: value} maps

anyOf
  • Array [
  • property name*any
  • ]
  • ops object[]
  • Array [
  • where object
    anyOf
    object
    traverse object
    anyOf
    string
    direction object
    anyOf
    string

    Possible values: [out, in]

    depth object
    anyOf
    integer

    Possible values: >= 1

    to object
    anyOf
    string
    Constant value: link
    alias object
    anyOf
    string

    Possible values: non-empty

    union object
    anyOf
    from objectrequired

    Where a definition starts: one type (entity or relation) and, optionally, the rows to start from. anchors are {column: value} maps that name every key column of the type (compile checks); extra columns are only meaningful under upsert, where the anchor row is the row written.

    entity object

    EntityType id

    anyOf
    string
    relation object

    RelationType id

    anyOf
    string
    anchors object

    Start rows as {key column: value} maps

    anyOf
  • Array [
  • property name*any
  • ]
  • opsundefined[]
    caps object
    anyOf
    depth object
    anyOf
    integer

    Possible values: >= 1

    frontier_per_level object
    anyOf
    integer

    Possible values: >= 1

    max_nodes object
    anyOf
    integer

    Possible values: >= 1

    max_edges object
    anyOf
    integer

    Possible values: >= 1

    intermediate object
    anyOf
    integer

    Possible values: >= 1

    matching object
    anyOf
    integer

    Possible values: >= 1

    pin object
    anyOf
    txn objectrequired
    anyOf
    integer
    versions object
    anyOf
    object
    intersect object
    anyOf
    from objectrequired

    Where a definition starts: one type (entity or relation) and, optionally, the rows to start from. anchors are {column: value} maps that name every key column of the type (compile checks); extra columns are only meaningful under upsert, where the anchor row is the row written.

    entity object

    EntityType id

    anyOf
    string
    relation object

    RelationType id

    anyOf
    string
    anchors object

    Start rows as {key column: value} maps

    anyOf
  • Array [
  • property name*any
  • ]
  • opsundefined[]
    caps object
    anyOf
    depth object
    anyOf
    integer

    Possible values: >= 1

    frontier_per_level object
    anyOf
    integer

    Possible values: >= 1

    max_nodes object
    anyOf
    integer

    Possible values: >= 1

    max_edges object
    anyOf
    integer

    Possible values: >= 1

    intermediate object
    anyOf
    integer

    Possible values: >= 1

    matching object
    anyOf
    integer

    Possible values: >= 1

    pin object
    anyOf
    txn objectrequired
    anyOf
    integer
    versions object
    anyOf
    object
    subtract object
    anyOf
    from objectrequired

    Where a definition starts: one type (entity or relation) and, optionally, the rows to start from. anchors are {column: value} maps that name every key column of the type (compile checks); extra columns are only meaningful under upsert, where the anchor row is the row written.

    entity object

    EntityType id

    anyOf
    string
    relation object

    RelationType id

    anyOf
    string
    anchors object

    Start rows as {key column: value} maps

    anyOf
  • Array [
  • property name*any
  • ]
  • opsundefined[]
    caps object
    anyOf
    depth object
    anyOf
    integer

    Possible values: >= 1

    frontier_per_level object
    anyOf
    integer

    Possible values: >= 1

    max_nodes object
    anyOf
    integer

    Possible values: >= 1

    max_edges object
    anyOf
    integer

    Possible values: >= 1

    intermediate object
    anyOf
    integer

    Possible values: >= 1

    matching object
    anyOf
    integer

    Possible values: >= 1

    pin object
    anyOf
    txn objectrequired
    anyOf
    integer
    versions object
    anyOf
    object
    derive object
    anyOf
    object
  • ]
  • caps object
    anyOf
    depth object
    anyOf
    integer

    Possible values: >= 1

    frontier_per_level object
    anyOf
    integer

    Possible values: >= 1

    max_nodes object
    anyOf
    integer

    Possible values: >= 1

    max_edges object
    anyOf
    integer

    Possible values: >= 1

    intermediate object
    anyOf
    integer

    Possible values: >= 1

    matching object
    anyOf
    integer

    Possible values: >= 1

    pin object
    anyOf
    txn objectrequired
    anyOf
    integer
    versions object
    anyOf
    object
    page object
    anyOf
    now object
    anyOf
    string<date-time>
    columns object

    Terminal-type projection; key columns always ride

    anyOf
  • Array [
  • string
  • ]
  • order_by object
    anyOf
  • Array [
  • fieldField (string)required
    directionDirection (string)

    Possible values: [asc, desc]

    Default value: asc
  • ]
  • limitLimit (integer)

    Possible values: >= 1

    Default value: 100
    cursor object
    anyOf
    string
    rows object
    anyOf
    now object
    anyOf
    string<date-time>
    columns object

    Column names returned for this resource.

    anyOf
  • Array [
  • string
  • ]
  • order_by object
    anyOf
  • Array [
  • fieldField (string)required
    directionDirection (string)

    Possible values: [asc, desc]

    Default value: asc
  • ]
  • limit object
    anyOf
    integer

    Possible values: >= 1

    keys object
    anyOf
    now object
    anyOf
    string<date-time>
    aggregate object
    anyOf
    now object
    anyOf
    string<date-time>
    metrics object[]required

    Possible values: >= 1

  • Array [
  • fnFn (string)required

    Possible values: [count, count_distinct, sum, avg, min, max]

    column object

    Semantic column definition. Capability flags control filtering, sorting, grouping, and catalog visibility; values is exhaustive, samples is illustrative, and dictionary-backed columns suppress both value lists from semantic catalog output.

    anyOf
    string
  • ]
  • group_by object
    anyOf
  • Array [
  • string
  • ]
  • accuracyAccuracy (string)

    Possible values: [accurate, approximate]

    Default value: accurate
    limit object
    anyOf
    integer

    Possible values: >= 1

    paths object
    anyOf
    now object
    anyOf
    string<date-time>
    columns object
    anyOf
    object
    where object
    anyOf
    object
    update object
    anyOf
    values objectrequired
    property name*any
    delete object
    anyOf
    object
    upsert object
    anyOf
    object
    ensure object
    anyOf
    update objectrequired
    property name*any
    insert objectrequired
    property name*any
    link object
    anyOf
    source objectrequired
    property name*any
    target objectrequired
    property name*any
    attributes object
    anyOf
    object
    unlink object
    anyOf
    source object
    anyOf
    object
    target object
    anyOf
    object
    compile object
    anyOf
    object
    Request
    {
    "version": 1,
    "from": {
    "entity": "string",
    "relation": "string",
    "anchors": [
    {}
    ]
    },
    "ops": [
    {
    "where": {},
    "traverse": "string",
    "direction": "out",
    "depth": 0,
    "to": "link",
    "alias": "string",
    "union": {
    "from": {
    "entity": "string",
    "relation": "string",
    "anchors": [
    {}
    ]
    },
    "ops": [
    null
    ],
    "caps": {
    "depth": 0,
    "frontier_per_level": 0,
    "max_nodes": 0,
    "max_edges": 0,
    "intermediate": 0,
    "matching": 0
    },
    "pin": {
    "txn": 0,
    "versions": {}
    }
    },
    "intersect": {
    "from": {
    "entity": "string",
    "relation": "string",
    "anchors": [
    {}
    ]
    },
    "ops": [
    null
    ],
    "caps": {
    "depth": 0,
    "frontier_per_level": 0,
    "max_nodes": 0,
    "max_edges": 0,
    "intermediate": 0,
    "matching": 0
    },
    "pin": {
    "txn": 0,
    "versions": {}
    }
    },
    "subtract": {
    "from": {
    "entity": "string",
    "relation": "string",
    "anchors": [
    {}
    ]
    },
    "ops": [
    null
    ],
    "caps": {
    "depth": 0,
    "frontier_per_level": 0,
    "max_nodes": 0,
    "max_edges": 0,
    "intermediate": 0,
    "matching": 0
    },
    "pin": {
    "txn": 0,
    "versions": {}
    }
    },
    "derive": {}
    }
    ],
    "caps": {
    "depth": 0,
    "frontier_per_level": 0,
    "max_nodes": 0,
    "max_edges": 0,
    "intermediate": 0,
    "matching": 0
    },
    "pin": {
    "txn": 0,
    "versions": {}
    },
    "page": {
    "now": "2024-07-29T15:51:28.071Z",
    "columns": [
    "string"
    ],
    "order_by": [
    {
    "field": "string",
    "direction": "asc"
    }
    ],
    "limit": 100,
    "cursor": "string"
    },
    "rows": {
    "now": "2024-07-29T15:51:28.071Z",
    "columns": [
    "string"
    ],
    "order_by": [
    {
    "field": "string",
    "direction": "asc"
    }
    ],
    "limit": 0
    },
    "keys": {
    "now": "2024-07-29T15:51:28.071Z"
    },
    "aggregate": {
    "now": "2024-07-29T15:51:28.071Z",
    "metrics": [
    {
    "fn": "count",
    "column": "string"
    }
    ],
    "group_by": [
    "string"
    ],
    "accuracy": "accurate",
    "limit": 0
    },
    "paths": {
    "now": "2024-07-29T15:51:28.071Z",
    "columns": {},
    "where": {}
    },
    "update": {
    "values": {}
    },
    "delete": {},
    "upsert": {},
    "ensure": {
    "update": {},
    "insert": {}
    },
    "link": {
    "source": {},
    "target": {},
    "attributes": {}
    },
    "unlink": {
    "source": {},
    "target": {}
    },
    "compile": {}
    }