Skip to main content

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.

OptionRequiredDescription
--appYesThe ID of the app
--attachments-dirAttachment file directory
--condition, -cThe query string
--order-byThe sort order as a query
--fieldsThe fields to be exported in comma-separated
--encoding Character encoding
Default to utf8
Encodings: utf8 and sjis

Notes

  • A field within a Table cannot be specified to the fields option.

--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 files with the same name in the same Attachment field, the files will be renamed to <filename> (<index>).<ext>.