mirror of
https://github.com/directus/directus.git
synced 2026-01-14 23:37:55 -05:00
Add new export experience (#12201)
* Use script setup * Start on export dialog * Use new system field interface, replace limit with numeric input * Set placeholder * Add sort config * Use folder picker, correct layoutQuery use * Add local download button * Allow writing exports to file * Add notification after export * Fix sort config, use new export endpoint * Setup notification hints * Add information notice * Fix local limit, cancel button * Add (basic) docs for export functionality * Fix json export file format * Implement xml batch stitching * Resolve review points
This commit is contained in:
@@ -799,3 +799,4 @@ Allows you to configure hard technical limits, to prevent abuse and optimize for
|
||||
| Variable | Description | Default Value |
|
||||
| ----------------------- | ----------------------------------------------------------------------------------------- | ------------- |
|
||||
| `RELATIONAL_BATCH_SIZE` | How many rows are read into memory at a time when constructing nested relational datasets | 25000 |
|
||||
| `EXPORT_BATCH_SIZE` | How many rows are read into memory at a time when constructing exports | 5000 |
|
||||
|
||||
@@ -270,6 +270,75 @@ n/a
|
||||
|
||||
---
|
||||
|
||||
## Export Data to a File
|
||||
|
||||
Export a larger data set to a file in the File Library
|
||||
|
||||
<div class="two-up">
|
||||
<div class="left">
|
||||
|
||||
### Query Parameters
|
||||
|
||||
Doesn't use any query parameters.
|
||||
|
||||
### Request Body
|
||||
|
||||
<div class="definitions">
|
||||
|
||||
`format` **Required**\
|
||||
What file format to save the export to. One of `csv`, `xml`, `json`.
|
||||
|
||||
`query` **Required**\
|
||||
The query object to use for the export. Supports the [global query parameters](/reference/query).
|
||||
|
||||
`file` **File Object**\
|
||||
Partial file object to tweak where / how the export file is saved.
|
||||
|
||||
</div>
|
||||
|
||||
### Returns
|
||||
|
||||
Empty body
|
||||
|
||||
</div>
|
||||
<div class="right">
|
||||
|
||||
### REST API
|
||||
|
||||
```
|
||||
POST /utils/export/:collection
|
||||
```
|
||||
|
||||
##### Example
|
||||
|
||||
```
|
||||
POST /utils/export/articles
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"query": {
|
||||
"filter": {
|
||||
"status": {
|
||||
"_eq": "published"
|
||||
}
|
||||
}
|
||||
},
|
||||
"file": {
|
||||
"folder": "34e95c19-cc50-42f2-83c8-b97616ac2390"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### GraphQL
|
||||
|
||||
n/a
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## Clear the Internal Cache
|
||||
|
||||
Resets both the data and schema cache of Directus. This endpoint is only available to admin users.
|
||||
|
||||
Reference in New Issue
Block a user