Export Table as CSV
POST/workspace/{workspaceId}/tooljet-db/tables/{tableName}/export
Fetches rows from a ToolJet Database table and returns them as a downloadable CSV file. Supports column selection, multi-condition filtering, multi-column sorting, and offset-based pagination. Maximum 1,000 rows per request.
Path Parameters
The unique identifier of the workspace that owns the table. Must be a valid UUID.
Exact name of the ToolJet Database table to export. Case-sensitive.
Request Body
Array of filter conditions. All conditions are combined with AND logic.
Array of sort conditions applied in order.
Column names to include in the CSV output, in the order listed. Defaults to all columns.
Maximum rows to return. Must be between 1 and 1,000 inclusive. Defaults to 1,000.
Number of rows to skip before returning results. Must be ≥ 0. Defaults to 0. Use with limit to paginate.
FilterCondition
Column name to filter on.
Filter operator. One of: equals, not equal, greater than, greater than or equal, less than, less than or equal, like, ilike, match, imatch, in, is.
Filter value. The in operator requires a non-empty array. The is operator accepts null, true, false, or "notNull". All other operators accept a string, number, or boolean.
SortCondition
Column name to sort on.
Sort direction. Must be "Ascending" or "Descending" (case-sensitive).
Error Responses
CSV file returned. The first row is the header. An empty result set (no matching rows) returns the header row only — not an error.
workspaceId is not a valid UUID.
limit is not a positive integer, or exceeds 1,000.
offset is negative or not an integer.
operator is not a recognised value.
in operator — value is empty or not an array.
is operator — value is not null, true, false, or "notNull".
Other operators — value is not a string, number, or boolean.
direction is not "Ascending" or "Descending".
Missing or invalid Authorization: Basic <token> header.
ENABLE_EXTERNAL_API is not set to true, or workspace does not have an active EXTERNAL_API license.
Table not found in the workspace, or endpoint not available on Community Edition.
Request
curl -X POST "https://{your-domain}/api/ext/workspace/{workspaceId}/tooljet-db/tables/orders/export" \
-H "Authorization: Basic <access_token>" \
-H "Content-Type: application/json" \
-d '{
"select": ["id", "customer_name", "status", "total"],
"filters": [
{
"column": "status",
"operator": "equals",
"value": "shipped"
},
{
"column": "total",
"operator": "greater than",
"value": 100
}
],
"sort": [
{
"column": "total",
"direction": "Descending"
}
],
"limit": 500,
"offset": 0
}' \
--output orders.csvResponse: 200
Content-Type: text/csv
Content-Disposition: attachment; filename="orders.csv"
id,customer_name,status,total
42,Jane Smith,shipped,320.00
17,John Doe,shipped,210.50