---
title: "POST /api/database/export/table/{table_id}/"
method: POST
path: "/api/database/export/table/{table_id}/"
tags: ["Database table export"]
---

# POST /api/database/export/table/{table_id}/

`POST /api/database/export/table/{table_id}/`

Creates and starts a new export job for a table given some exporter options. Returns an error if the requesting user does not have permissionsto view the table.

## Path parameters

- `table_id` integer, required

## Request body

- union
  - CsvExporterOptions
    - `view_id` integer, nullable — Optional: The view for this table to export using its filters, sorts and other view specific settings.
    - `exporter_type` 'csv' | 'json' | 'xml' | 'excel' | 'file', required — * `csv` - csv * `json` - json * `xml` - xml * `excel` - excel * `file` - file
    - `export_charset` 'utf-8' | 'iso-8859-6' | 'windows-1256' | 'iso-8859-4' | 'windows-1257' | 'iso-8859-14' | 'iso-8859-2' | 'windows-1250' | 'gbk' | 'gb18030' | 'big5' | 'koi8-r' | 'koi8-u' | 'iso-8859-5' | 'windows-1251' | 'x-mac-cyrillic' | 'iso-8859-7' | 'windows-1253' | 'iso-8859-8' | 'windows-1255' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'macintosh' | 'iso-8859-10' | 'iso-8859-16' | 'windows-874' | 'windows-1254' | 'windows-1258' | 'iso-8859-1' | 'windows-1252' | 'iso-8859-3' — * `utf-8` - utf-8 * `iso-8859-6` - iso-8859-6 * `windows-1256` - windows-1256 * `iso-8859-4` - iso-8859-4 * `windows-1257` - windows-1257 * `iso-8859-14` - iso-8859-14 * `iso-8859-2` - iso-8859-2 * `windows-1250` - windows-1250 * `gbk` - gbk * `gb18030` - gb18030 * `big5` - big5 * `koi8-r` - koi8-r * `koi8-u` - koi8-u * `iso-8859-5` - iso-8859-5 * `windows-1251` - windows-1251 * `x-mac-cyrillic` - mac-cyrillic * `iso-8859-7` - iso-8859-7 * `windows-1253` - windows-1253 * `iso-8859-8` - iso-8859-8 * `windows-1255` - windows-1255 * `euc-jp` - euc-jp * `iso-2022-jp` - iso-2022-jp * `shift-jis` - shift-jis * `euc-kr` - euc-kr * `macintosh` - macintosh * `iso-8859-10` - iso-8859-10 * `iso-8859-16` - iso-8859-16 * `windows-874` - cp874 * `windows-1254` - windows-1254 * `windows-1258` - windows-1258 * `iso-8859-1` - iso-8859-1 * `windows-1252` - windows-1252 * `iso-8859-3` - iso-8859-3
    - `filters` PublicViewFilters
      - `filter_type` 'AND' | 'OR', required — * `AND` - AND * `OR` - OR
      - `filters` PublicViewFilter[] — The list of filters that should be applied in this group/public view.
        - `field` integer, required — The id of the field to filter on.
        - `type` string, required — The filter type.
        - `value` string, required — The filter value.
    - `order_by` string, nullable — Optionally the rows can be ordered by provided field ids separated by comma. By default a field is ordered in ascending (A-Z) order, but by prepending the field with a '-' it can be ordered descending (Z-A).
    - `fields` integer[], nullable — List of field IDs that must be included in the export, in the desired order.
    - `include_row_id` boolean — Whether or not to include the row id column in the export.
    - `include_primary_field` boolean — Whether or not to include the primary field column in the export.
    - `csv_column_separator` ',' | ';' | '|' | 'tab' | 'record_separator' | 'unit_separator' — * `,` - , * `;` - ; * `|` - | * `tab` - * `record_separator` -  * `unit_separator` - 
    - `csv_include_header` boolean — Whether or not to generate a header row at the top of the csv file.
  - BaseExporterOptions
    - `view_id` integer, nullable — Optional: The view for this table to export using its filters, sorts and other view specific settings.
    - `exporter_type` 'csv' | 'json' | 'xml' | 'excel' | 'file', required — * `csv` - csv * `json` - json * `xml` - xml * `excel` - excel * `file` - file
    - `export_charset` 'utf-8' | 'iso-8859-6' | 'windows-1256' | 'iso-8859-4' | 'windows-1257' | 'iso-8859-14' | 'iso-8859-2' | 'windows-1250' | 'gbk' | 'gb18030' | 'big5' | 'koi8-r' | 'koi8-u' | 'iso-8859-5' | 'windows-1251' | 'x-mac-cyrillic' | 'iso-8859-7' | 'windows-1253' | 'iso-8859-8' | 'windows-1255' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'macintosh' | 'iso-8859-10' | 'iso-8859-16' | 'windows-874' | 'windows-1254' | 'windows-1258' | 'iso-8859-1' | 'windows-1252' | 'iso-8859-3' — * `utf-8` - utf-8 * `iso-8859-6` - iso-8859-6 * `windows-1256` - windows-1256 * `iso-8859-4` - iso-8859-4 * `windows-1257` - windows-1257 * `iso-8859-14` - iso-8859-14 * `iso-8859-2` - iso-8859-2 * `windows-1250` - windows-1250 * `gbk` - gbk * `gb18030` - gb18030 * `big5` - big5 * `koi8-r` - koi8-r * `koi8-u` - koi8-u * `iso-8859-5` - iso-8859-5 * `windows-1251` - windows-1251 * `x-mac-cyrillic` - mac-cyrillic * `iso-8859-7` - iso-8859-7 * `windows-1253` - windows-1253 * `iso-8859-8` - iso-8859-8 * `windows-1255` - windows-1255 * `euc-jp` - euc-jp * `iso-2022-jp` - iso-2022-jp * `shift-jis` - shift-jis * `euc-kr` - euc-kr * `macintosh` - macintosh * `iso-8859-10` - iso-8859-10 * `iso-8859-16` - iso-8859-16 * `windows-874` - cp874 * `windows-1254` - windows-1254 * `windows-1258` - windows-1258 * `iso-8859-1` - iso-8859-1 * `windows-1252` - windows-1252 * `iso-8859-3` - iso-8859-3
    - `filters` PublicViewFilters
      - `filter_type` 'AND' | 'OR', required — * `AND` - AND * `OR` - OR
      - `filters` PublicViewFilter[] — The list of filters that should be applied in this group/public view.
        - `field` integer, required — The id of the field to filter on.
        - `type` string, required — The filter type.
        - `value` string, required — The filter value.
    - `order_by` string, nullable — Optionally the rows can be ordered by provided field ids separated by comma. By default a field is ordered in ascending (A-Z) order, but by prepending the field with a '-' it can be ordered descending (Z-A).
    - `fields` integer[], nullable — List of field IDs that must be included in the export, in the desired order.
    - `include_row_id` boolean — Whether or not to include the row id column in the export.
    - `include_primary_field` boolean — Whether or not to include the primary field column in the export.
  - BaseExporterOptions
    - `view_id` integer, nullable — Optional: The view for this table to export using its filters, sorts and other view specific settings.
    - `exporter_type` 'csv' | 'json' | 'xml' | 'excel' | 'file', required — * `csv` - csv * `json` - json * `xml` - xml * `excel` - excel * `file` - file
    - `export_charset` 'utf-8' | 'iso-8859-6' | 'windows-1256' | 'iso-8859-4' | 'windows-1257' | 'iso-8859-14' | 'iso-8859-2' | 'windows-1250' | 'gbk' | 'gb18030' | 'big5' | 'koi8-r' | 'koi8-u' | 'iso-8859-5' | 'windows-1251' | 'x-mac-cyrillic' | 'iso-8859-7' | 'windows-1253' | 'iso-8859-8' | 'windows-1255' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'macintosh' | 'iso-8859-10' | 'iso-8859-16' | 'windows-874' | 'windows-1254' | 'windows-1258' | 'iso-8859-1' | 'windows-1252' | 'iso-8859-3' — * `utf-8` - utf-8 * `iso-8859-6` - iso-8859-6 * `windows-1256` - windows-1256 * `iso-8859-4` - iso-8859-4 * `windows-1257` - windows-1257 * `iso-8859-14` - iso-8859-14 * `iso-8859-2` - iso-8859-2 * `windows-1250` - windows-1250 * `gbk` - gbk * `gb18030` - gb18030 * `big5` - big5 * `koi8-r` - koi8-r * `koi8-u` - koi8-u * `iso-8859-5` - iso-8859-5 * `windows-1251` - windows-1251 * `x-mac-cyrillic` - mac-cyrillic * `iso-8859-7` - iso-8859-7 * `windows-1253` - windows-1253 * `iso-8859-8` - iso-8859-8 * `windows-1255` - windows-1255 * `euc-jp` - euc-jp * `iso-2022-jp` - iso-2022-jp * `shift-jis` - shift-jis * `euc-kr` - euc-kr * `macintosh` - macintosh * `iso-8859-10` - iso-8859-10 * `iso-8859-16` - iso-8859-16 * `windows-874` - cp874 * `windows-1254` - windows-1254 * `windows-1258` - windows-1258 * `iso-8859-1` - iso-8859-1 * `windows-1252` - windows-1252 * `iso-8859-3` - iso-8859-3
    - `filters` PublicViewFilters
      - `filter_type` 'AND' | 'OR', required — * `AND` - AND * `OR` - OR
      - `filters` PublicViewFilter[] — The list of filters that should be applied in this group/public view.
        - `field` integer, required — The id of the field to filter on.
        - `type` string, required — The filter type.
        - `value` string, required — The filter value.
    - `order_by` string, nullable — Optionally the rows can be ordered by provided field ids separated by comma. By default a field is ordered in ascending (A-Z) order, but by prepending the field with a '-' it can be ordered descending (Z-A).
    - `fields` integer[], nullable — List of field IDs that must be included in the export, in the desired order.
    - `include_row_id` boolean — Whether or not to include the row id column in the export.
    - `include_primary_field` boolean — Whether or not to include the primary field column in the export.
  - ExcelExporterOptions
    - `view_id` integer, nullable — Optional: The view for this table to export using its filters, sorts and other view specific settings.
    - `exporter_type` 'csv' | 'json' | 'xml' | 'excel' | 'file', required — * `csv` - csv * `json` - json * `xml` - xml * `excel` - excel * `file` - file
    - `export_charset` 'utf-8' | 'iso-8859-6' | 'windows-1256' | 'iso-8859-4' | 'windows-1257' | 'iso-8859-14' | 'iso-8859-2' | 'windows-1250' | 'gbk' | 'gb18030' | 'big5' | 'koi8-r' | 'koi8-u' | 'iso-8859-5' | 'windows-1251' | 'x-mac-cyrillic' | 'iso-8859-7' | 'windows-1253' | 'iso-8859-8' | 'windows-1255' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'macintosh' | 'iso-8859-10' | 'iso-8859-16' | 'windows-874' | 'windows-1254' | 'windows-1258' | 'iso-8859-1' | 'windows-1252' | 'iso-8859-3' — * `utf-8` - utf-8 * `iso-8859-6` - iso-8859-6 * `windows-1256` - windows-1256 * `iso-8859-4` - iso-8859-4 * `windows-1257` - windows-1257 * `iso-8859-14` - iso-8859-14 * `iso-8859-2` - iso-8859-2 * `windows-1250` - windows-1250 * `gbk` - gbk * `gb18030` - gb18030 * `big5` - big5 * `koi8-r` - koi8-r * `koi8-u` - koi8-u * `iso-8859-5` - iso-8859-5 * `windows-1251` - windows-1251 * `x-mac-cyrillic` - mac-cyrillic * `iso-8859-7` - iso-8859-7 * `windows-1253` - windows-1253 * `iso-8859-8` - iso-8859-8 * `windows-1255` - windows-1255 * `euc-jp` - euc-jp * `iso-2022-jp` - iso-2022-jp * `shift-jis` - shift-jis * `euc-kr` - euc-kr * `macintosh` - macintosh * `iso-8859-10` - iso-8859-10 * `iso-8859-16` - iso-8859-16 * `windows-874` - cp874 * `windows-1254` - windows-1254 * `windows-1258` - windows-1258 * `iso-8859-1` - iso-8859-1 * `windows-1252` - windows-1252 * `iso-8859-3` - iso-8859-3
    - `filters` PublicViewFilters
      - `filter_type` 'AND' | 'OR', required — * `AND` - AND * `OR` - OR
      - `filters` PublicViewFilter[] — The list of filters that should be applied in this group/public view.
        - `field` integer, required — The id of the field to filter on.
        - `type` string, required — The filter type.
        - `value` string, required — The filter value.
    - `order_by` string, nullable — Optionally the rows can be ordered by provided field ids separated by comma. By default a field is ordered in ascending (A-Z) order, but by prepending the field with a '-' it can be ordered descending (Z-A).
    - `fields` integer[], nullable — List of field IDs that must be included in the export, in the desired order.
    - `include_row_id` boolean — Whether or not to include the row id column in the export.
    - `include_primary_field` boolean — Whether or not to include the primary field column in the export.
    - `excel_include_header` boolean — Whether or not to generate the field names as header row at the top of the Excel file.
  - FileExporterOptions
    - `view_id` integer, nullable — Optional: The view for this table to export using its filters, sorts and other view specific settings.
    - `exporter_type` 'csv' | 'json' | 'xml' | 'excel' | 'file', required — * `csv` - csv * `json` - json * `xml` - xml * `excel` - excel * `file` - file
    - `export_charset` 'utf-8' | 'iso-8859-6' | 'windows-1256' | 'iso-8859-4' | 'windows-1257' | 'iso-8859-14' | 'iso-8859-2' | 'windows-1250' | 'gbk' | 'gb18030' | 'big5' | 'koi8-r' | 'koi8-u' | 'iso-8859-5' | 'windows-1251' | 'x-mac-cyrillic' | 'iso-8859-7' | 'windows-1253' | 'iso-8859-8' | 'windows-1255' | 'euc-jp' | 'iso-2022-jp' | 'shift-jis' | 'euc-kr' | 'macintosh' | 'iso-8859-10' | 'iso-8859-16' | 'windows-874' | 'windows-1254' | 'windows-1258' | 'iso-8859-1' | 'windows-1252' | 'iso-8859-3' — * `utf-8` - utf-8 * `iso-8859-6` - iso-8859-6 * `windows-1256` - windows-1256 * `iso-8859-4` - iso-8859-4 * `windows-1257` - windows-1257 * `iso-8859-14` - iso-8859-14 * `iso-8859-2` - iso-8859-2 * `windows-1250` - windows-1250 * `gbk` - gbk * `gb18030` - gb18030 * `big5` - big5 * `koi8-r` - koi8-r * `koi8-u` - koi8-u * `iso-8859-5` - iso-8859-5 * `windows-1251` - windows-1251 * `x-mac-cyrillic` - mac-cyrillic * `iso-8859-7` - iso-8859-7 * `windows-1253` - windows-1253 * `iso-8859-8` - iso-8859-8 * `windows-1255` - windows-1255 * `euc-jp` - euc-jp * `iso-2022-jp` - iso-2022-jp * `shift-jis` - shift-jis * `euc-kr` - euc-kr * `macintosh` - macintosh * `iso-8859-10` - iso-8859-10 * `iso-8859-16` - iso-8859-16 * `windows-874` - cp874 * `windows-1254` - windows-1254 * `windows-1258` - windows-1258 * `iso-8859-1` - iso-8859-1 * `windows-1252` - windows-1252 * `iso-8859-3` - iso-8859-3
    - `filters` PublicViewFilters
      - `filter_type` 'AND' | 'OR', required — * `AND` - AND * `OR` - OR
      - `filters` PublicViewFilter[] — The list of filters that should be applied in this group/public view.
        - `field` integer, required — The id of the field to filter on.
        - `type` string, required — The filter type.
        - `value` string, required — The filter value.
    - `order_by` string, nullable — Optionally the rows can be ordered by provided field ids separated by comma. By default a field is ordered in ascending (A-Z) order, but by prepending the field with a '-' it can be ordered descending (Z-A).
    - `fields` integer[], nullable — List of field IDs that must be included in the export, in the desired order.
    - `include_row_id` boolean — Whether or not to include the row id column in the export.
    - `include_primary_field` boolean — Whether or not to include the primary field column in the export.
    - `organize_files` boolean — Whether or not to group files by row id in the export.

## Response `200`

- ExportJob — When mixed in to a model serializer for an ExportJob this will add an url field with the actual usable url of the export job's file (if it has one).
  - `id` integer, required
  - `table` integer, nullable
  - `view` integer, nullable
  - `exporter_type` string, required
  - `state` 'pending' | 'exporting' | 'cancelled' | 'finished' | 'failed' | 'expired', required — * `pending` - pending * `exporting` - exporting * `cancelled` - cancelled * `finished` - finished * `failed` - failed * `expired` - expired
  - `status` string, required — DEPRECATED: Use state instead
  - `exported_file_name` string, nullable
  - `created_at` string, date-time, required
  - `progress_percentage` number, double
  - `url` string, uri, required

## Other responses

- `400`
- `404`

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/revisions/0c490e5b0c7f/schema)
