POST
/api/export

Export Results API

Export query result rows into downloadable CSV, Excel spreadsheet (.xlsx), or JSON files with custom file headers.

Supported Export Formats

CSV (Comma-Separated)
MIME: text/csv with automated RFC 4180 quote escaping.
Excel Spreadsheet
MIME: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
JSON Buffer
MIME: application/json formatted array of objects.

Sample Request

json
{
  "format": "csv",
  "filename": "quarterly_revenue_report",
  "columns": ["CustomerName", "TotalOrders", "GrossRevenue"],
  "rows": [
    { "CustomerName": "Acme Corp", "TotalOrders": 142, "GrossRevenue": 58400.00 },
    { "CustomerName": "Global Logistics", "TotalOrders": 89, "GrossRevenue": 32150.50 }
  ]
}