On this page

query-table-rows

Read rows from a Data Table with paging, sorting, free-text search and structured filtering. 'page' is 1-based. 'search_filters' filters over the table's columns with the operators eq, gt, gte, in, lt, lte, ne, nin.

What it is called on each surface

The wire name is query-table-rows everywhere: it is what the Wexa MCP server advertises, the REST path is POST /v1/query-table-rows, and each SDK exposes it under its own language's naming convention.

SurfaceName
Wexa MCP serverquery-table-rows
REST APIPOST /v1/query-table-rows
TypeScript SDKfabric.queryTableRows()
Python SDKfabric.query_table_rows()

Arguments

1 of the 7 arguments is required. Omitting a required one is refused before the tool runs, at the validation stage, so it costs nothing and changes nothing.

ArgumentTypeRequiredNotes
pageintegerOptional1-based page number (default 1).
page_sizeintegerOptionalRows per page (default 50).
searchstringOptionalFree-text search across the table.
search_filtersarrayOptionalStructured filter over the table's columns. Each entry is {column, operator, value, type}; operator is one of eq, gt, gte, in, lt, lte, ne, nin.
sortintegerOptional1 ascending, -1 descending.
sort_keystringOptionalColumn to sort by.
table_idstringRequiredTable id from list-tables.

project_id, projectID, organization_id and executed_by are not arguments you pass: the platform binds all four from the credential you authenticated with, and both SDKs refuse them before the request leaves your process — see server-bound arguments.

What it returns

The three surfaces wrap this differently, and code written against one will not read another correctly — see return shape.

A real response, captured from a live call to query-table-rows:

{
  "lifecycle_id": "qlc_000196",
  "result": {
    "page": 1,
    "page_size": 3,
    "rows": [
      {
        "6ab1944e12917e3705beb0b9": true,
        "6ab1944e56ac670306c8deed": 120,
        "6ab1944eb6557622b2632872": "Acme",
        "_id": "6ab1945e7566f41b5c28e301",
        "coworker_user_id": "6a79a770b6c128ccc24bfca7",
        "row_id": 1
      },
      {
        "6ab1944e12917e3705beb0b9": false,
        "6ab1944e56ac670306c8deed": 75,
        "6ab1944eb6557622b2632872": "Globex",
        "_id": "6ab1945e7566f41b5c28e302",
        "coworker_user_id": "6a79a770b6c128ccc24bfca7",
        "row_id": 2
      }
    ],
    "table_id": "6ab1944e7566f41b5c28e2eb",
    "total_count": 2
  }
}

Keeping the lifecycle_id is what lets you ask later why a call was allowed, refused or held.

Calling it

The same call on all four surfaces. Pick a tab once and every code block in the documentation follows it.

The ids in this example are real: they resolve against the project the documentation is written against, so the call runs as written once you point it at your own deployment. Swap them for the ids of your own objects.

curl -sS https://fabric.wexa.ai/v1/query-table-rows \
  -H "authorization: Bearer $FABRIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"table_id":"6ab1944e7566f41b5c28e2eb"}'

Errors

Both SDKs raise the same typed errors, chosen from the gateway's own error string first and its HTTP status second. query-table-rows checks the fabric:table.read grant, and reaches the seven classes every tool reaches — listed under the common set. These are the ones specific to it:

ErrorStatusRaised when
NotFound404table_id matches no table in this project.
ConfigurationError5xxquery-table-rows is not available to you. Retrying will not help.

Governance

Every call to query-table-rows runs through the same ten-stage lifecycle as every other Wexa tool: the credential is resolved to a scope, the fabric:table.read grant is checked, quota is drawn down, the arguments are validated, policy rules are evaluated, the call is executed, the result is shaped and redacted, and an audit record is written. The lifecycle_id in the response is the handle to that record.

query-table-rows only reads, so it is not marked consequential: it is audited lightly and is never held for approval. It still consumes quota and is still refused by policy like anything else.

See also

The tool index, errors, and which identifier goes where.