Import & Export
The content module allows importing and exporting of multiple items from and to files respectively.
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.
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
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.
Item | Description |
---|---|
Format | Choose to export items as CSV, JSON, XML, or YAML. |
Limit | Set the maximum number of items to be exported. |
Export Location | Download the export file directly to your machine or to the file library. |
Folder | Choose the Folder to download to (if export location is the folder library). |
Sort Field | Choose field to sort items by. |
Sort Direction | Choose to sort items in ascending or descending order. |
Full-Text Search | Limit exported Items to ones which matched as search results. |
Filter | Limit exported items with a filter. |
Fields | Add, remove, and re-order the item fields that will be exported. |