Skip to content
EN

Import / Export

Last updated

Import and export are the features that bring a model’s item data or schema definition in from a file and write them out to a file.

There are two kinds of import, content import and schema import.

From the Content screen, you import items into a model in bulk. An import from the screen does not update existing items; it only adds new ones.

The file is in JSON, CSV, or GeoJSON, and the following rules are shared by all of them.

  • The column names and key names in the file must match the field key, not the field’s display name.
  • Columns and keys that are not in the model’s schema are ignored on import. A field that is not in the file takes its default value if one is set.
  • One import can hold up to 50,000 records and a file size of up to 100 MB.
  • If even one value does not match the format, the whole import is not performed. The errors can be downloaded as a log.
  • Progress is shown during an import, and it can be canceled partway. A failed import can be retried.

The values for each field type are written with the following data types.

Field typeData type
Text / TextArea / Markdown textString
Int / FloatNumber
BooleanBoolean. true or false
DateString in RFC3339 format. For example, 2025-12-01T00:00:00+09:00
OptionString. The value of the option
URLString. An http or https URL
AssetString. The ID of the asset
Geometry Object / Geometry EditorObject. A GeoJSON geometry. For example, {"type":"Point","coordinates":[139.69,35.69]}. It can be specified in JSON and GeoJSON only, and cannot be handled in CSV
Fields that hold multiple valuesArray. It can be specified in JSON and GeoJSON, and cannot be handled in CSV

Reference and Group fields are out of scope for import.

The structure of each format is as follows.

  • CSV: the first row is the header row, and each column is a field key. An id column can be placed first, but an import from the screen adds new items, so it is not used. It suits simple fields and cannot handle geometry or multiple values.
  • JSON: an array of item objects. The keys of each object are field keys.
  • GeoJSON: a FeatureCollection. The geometry of each Feature goes into the model’s geometry field. When there is more than one geometry field, the first one is used. Each key under properties becomes a field key.

A file template for each format can be downloaded from the import screen.

From the Schema screen, you import a model’s schema in JSON. Only a model’s empty schema can be imported. Groups and metadata are out of scope for import.

The JSON you import is in JSON Schema format, with each field listed under properties. The property name under properties becomes the field key. Each field requires title, which is the name shown on screen, and x-fieldType, which is the field type. Depending on the field type, you also specify the following.

  • x-required: whether the field is required
  • x-multiple: whether the field holds multiple values
  • x-unique: whether the field is unique
  • maxLength: the maximum length
  • x-options: the options
  • maximum / minimum: the maximum and minimum value
  • x-defaultValue: the default value

A file template can be downloaded from the import screen.

An export downloads the file at the moment you choose it. There are two kinds of export, content export and schema definition export.

From the Content screen, you write out a model’s items. You choose the export format from JSON, CSV, and GeoJSON. A model with no items cannot be exported.

Only published items are exported. Items whose status is DRAFT or REVIEW are not included in the file even though they appear in the list. For items whose status is Published & DRAFT or Published & REVIEW, the published content is written out.

The file name uses the model’s ID rather than the model name: <model ID>-data.json, -data.csv, or -data.geojson.

  • JSON: writes out every field. In addition to the field values, each item carries its ID, created at, updated at, created by, and updated by.
  • CSV: the first column is the ID, and the columns after it are field keys. What is exported are single-value simple fields such as Text, TextArea, Markdown text, Option, Tag, URL, Int, Float, Boolean, Check Box, and Date. Fields that hold multiple values, and Asset, Reference, Group, and geometry fields, are not included.
  • GeoJSON: available only for a model that has a geometry field. It is written out as a FeatureCollection, with the geometry field in each Feature’s geometry and the other fields in its properties. When there is more than one geometry field, the first one is used.

From the Schema screen, you write out a model’s schema definition in JSON. The format is the same JSON Schema format as schema import, including x-fieldType and the rest. A model with no fields cannot be exported. The file name is <model ID>-schema.json.

A model’s data can also be imported and exported through the API. For details, see the CMS Developer Docs.