Load JSON file to particular space and environment

Is there any way to load JSON file to Contentful’s space?

Hi @sumati.jain ,

Depending how many JSON files you would need to upload, you have two ways:

Thanks Alma for response! It’s very helpful.

When I’m using CLI to load Json data into Contentful, then command went through but no entries going to contentful.

I think, content type is not mentioned in the command, could be the problem. I’m new to Contentful So, not sure what could be the reason.

Please let me know if there is any issue with command.

Command

Here is the output of command.

This is the data format type.

Hi @sumati.jain ,

Sorry to hear it didn’t work. The reason is probably because the data structure in import has to match the same as in the export. I would recommend to:

  • Export the data of a Contentful test-space using the CLI export
  • Inspect the created JSON:
  1. You should have the Content-types for entries you will create
  2. The JSON of your content should match the Contentful one
  • Then you could try to use the importing tool

If this is too complicated, maybe it would be better to use a simple script (using our Management API) that:

  • reads your JSON
  • creates the content-type in Contentful
  • create the entry in Contentful

Hi mam,Very useful for this document mam,I’ll have one doubt how to convert contentful content to JSON file