Content

Import & Export

Learn to import and export multiple items stored as files using Directus.

The content module allows importing and exporting of multiple items from and to files respectively.

Import Items

Import items

You can import JSON or CSV files into your collection as items.

To import Items from a file, navigate to the collection and click "Import / Export" in the sidebar. Click into the import search box. A file browser will open. Once a file has been selected, click on "Start Import" to import the items.

The items will now be in the collection, and the file itself will not be stored in the Directus project.

The field headers in the imported file must match the field keys of the collection you're importing into. Otherwise, the column will be skipped.
Importing Relational Files
It is possible to import relational field values as well. For this task, the user performing the import will need access permissions for the related collection.

Export Items

Export items

When exporting items, the export items menu provides granular control over exactly which items and fields are exported, how they are exported, and where they are exported.

To export items, follow the steps below, navigate to the desired collection and select "Import / Export" from the sidebar. Click on "Export Items" and the export items menu will appear. Select the desired format from CSV, JSON, XML, or YAML and click to download the file.

Export Items Menu

This menu provides granular control over exactly which items and fields are exported, how they are exported, and where they are exported.

ItemDescription
FormatChoose to export items as CSV, JSON, XML, or YAML.
LimitSet the maximum number of items to be exported.
Export LocationDownload the export file directly to your machine or to the file library.
FolderChoose the Folder to download to (if export location is the folder library).
Sort FieldChoose field to sort items by.
Sort DirectionChoose to sort items in ascending or descending order.
Full-Text SearchLimit exported Items to ones which matched as search results.
FilterLimit exported items with a filter.
FieldsAdd, remove, and re-order the item fields that will be exported.