Skip to main content
POST
/
v1
/
tables
/
{table_id}
/
query
Query Table
curl --request POST \
  --url https://api.retab.com/v1/tables/{table_id}/query \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filters": [],
  "search": {
    "query": "<string>",
    "columns": [
      "<string>"
    ]
  },
  "case_sensitive": false,
  "select": [],
  "distinct": {
    "column": "<string>"
  },
  "group_by": [],
  "aggregations": [],
  "sort": [],
  "sample": {
    "size": 250
  },
  "tail": {
    "size": 250
  },
  "count_only": false,
  "include_explain": false,
  "sort_column": "<string>",
  "viewer_mode": "<string>",
  "offset": 0,
  "limit": 250
}
'
{
  "table_id": "<string>",
  "row_count": 123,
  "columns": [],
  "rows": [],
  "filtered_row_count": 123,
  "offset": 0,
  "limit": 123,
  "has_more": false,
  "next_cursor": "<string>",
  "previous_cursor": "<string>",
  "explain": {
    "table_id": "<string>",
    "snapshot_file_id": "",
    "selected_columns": [],
    "filters": [],
    "search": {
      "query": "<string>",
      "columns": [
        "<string>"
      ]
    },
    "sort": [],
    "offset": 0,
    "limit": 123,
    "distinct": {
      "column": "<string>"
    },
    "group_by": [],
    "aggregations": []
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

Use this file to discover all available pages before exploring further.

Read a filtered, sorted, or windowed preview of a CSV table. This route is read-only; table writes replace the whole CSV.
Python
rows = client.tables.query(
    table_id="workflow_table_123",
    limit=100,
)
TypeScript
const rows = await client.tables.query("workflow_table_123", {
  limit: 100,
});
Go
rows, err := client.Tables.Query(ctx, "workflow_table_123", &retab.TablesQueryParams{
  Body: map[string]any{"limit": 100},
})
Java
// Query table rows for read-only preview.
cURL
curl -X POST https://api.retab.com/v1/tables/workflow_table_123/query \
  -H "Api-Key: $RETAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":100}'

Authorizations

Api-Key
string
header
required

Path Parameters

table_id
string
required

Body

application/json
filters
WorkflowTableFilterRule · object[]
search
WorkflowTableSearchRequest · object
case_sensitive
boolean
default:false
select
string[]
distinct
WorkflowTableDistinctRequest · object
group_by
string[]
aggregations
WorkflowTableAggregationRequest · object[]
sort
WorkflowTableSortRule · object[]
sample
WorkflowTableSampleRequest · object
tail
WorkflowTableTailRequest · object
count_only
boolean
default:false
include_explain
boolean
default:false
sort_column
string | null
sort_direction
enum<string> | null
Available options:
asc,
desc
viewer_mode
string | null
Allowed value: "windowed"
offset
integer
default:0
Required range: x >= 0
limit
integer | null
Required range: 1 <= x <= 500

Response

Successful Response

table_id
string
required
row_count
integer
required
columns
WorkflowTableColumn · object[]
rows
WorkflowTableRow · object[]
filtered_row_count
integer | null
offset
integer
default:0
limit
integer | null
has_more
boolean
default:false
next_cursor
string | null
previous_cursor
string | null
explain
WorkflowTableExplain · object