Import JSON

For importing data into INSIDE data models must be consistent in name and structure to inside data model.

The current data model description is available in the CMS under "Admin" > "Management" > "Data Model"

JSON Format:

The overall data should have the following basic structure:

  • There must be a top level key "data" with an array containing the objects to be imported.
  • There can be a top level key "meta" with a hash of meta informations


{
  "data": [
    {...},
    {...},
    {...}
  ]
}


The individual objects must follow this structure:

  • There must be a top level key "type" with the type information for this object (see DataModel description)
  • There must be a top level key "id" with a unique string id for this object
  • There must be a top level key "attributes" containing a hash with at least the required attributes (see DataModel description for available attribute keys)
  • There can be a top level key "relationships" containing a hash with the association id either as string for ToOne associations or an array of ids for ToMany associations
  • Translated attributes can be given by nesting a Hash under the attributes key with the corresponding locale as key

Example:


{
  "type": "exhibitors",
  "id": "1234",
  "attributes": {
    "title": {
      "de": "Deutscher Titel",
      "en": "English title"
    },
    "content": "Bar"
  },
  "relationships": {
    "categories": ["1", "2"],
    "main_location": "TEST_LOCATION"
  }
}


IDs

Use field "id" for your ID.