record export
The export command allows you to export record data from a specified Kintone app.
Example
cli-kintone record export \
--base-url https://${yourDomain} \
--api-token ${apiToken} \
--app ${kintoneAppId} \
> ${filepath}
Options
See Options page for common options.
| Option | Required | Description |
|---|---|---|
--app | Yes | The ID of the app |
--attachments-dir | Attachment file directory | |
--condition, -c | The query string | |
--order-by | The sort order as a query | |
--fields | The fields to be exported in comma-separated | |
--encoding | Character encoding Default to utf8Encodings: utf8 and sjis |
Notes
- A field within a Table cannot be specified to the
fieldsoption.
--condition and --order-by options
You can filter and reorder records with --condition and --order-by options.
These options are passed to getAllRecords() of @kintone/rest-api-client.
Refer to the getAllRecords() document for more information.
Download attachment files
If the --attachments-dir option is set, attachment files will be downloaded to the local directory.
- The file path is
<attachmentsDir>/<fieldCode>-<recordId>/<filename>.- For attachment fields in a Table, the file path is
<attachmentsDir>/<fieldCode>-<recordId>-<tableRowIndex>/<filename>.
- For attachment fields in a Table, the file path is
- For files with the same name in the same Attachment field, the files will be renamed to
<filename> (<index>).<ext>.