Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to import (422)

See original GitHub issue

Expected Behavior

I would like to export an entry ‘testtitre_aq’ from ‘developmentSA’ env :


The entry is exported in the JSON generated file :


The import into another env ‘devtest’ should work.

Actual Behavior


Possible Solution

Bug ??

Steps to Reproduce

  1. contentful login (OAuth via browser token)
  2. contentful space export --environment-id ‘developmentSA’ --query-entries ‘’
  3. contentful space import --environment-id ‘devtest’ --content-file contentful-export-<space_id>-developmentSA-2019-08-21T11-15-89.json



Node : v10.16.3 Npm : 6.9.0 OS : Windows 10 - 64 bits

Contentful-CLI : 0.36.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:28 (13 by maintainers)

github_iconTop GitHub Comments

baumarscommented, Aug 27, 2019

Hi @phoebeschmidt ,

Finally …

So here is my scenario. In my sandbox devtest, I created a new entry associated with an existing content type(CT), then exported using the export CLI :

contentful space export --environment-id 'devtest' --query-entries '[in]=2ZzuXC4ZDC0udbn6Fijbgp' --content-only

It is important to specify content-only. This will export just one entry, but will a bunch of Assets.


When importing, it is important to note that the CT MUST exists in the importing sandbox.

You can close this ticket, but I have other question in another ticket.

Thanks @Khaledgarbaya & @phoebeschmidt

phoebeschmidtcommented, Aug 27, 2019

Hi Baumars,

My understanding is the following:

your goal is to export and re-import only entry

  1. contentful space export --environment-id 'devtest' --query-entries '[in]=xxxx' This command will create a JSON file with the following format:
  "contentTypes": [],
  "entries": [],
  "assets": [],
  "locales": [],
  "webhooks": [],
  "roles": [],
  "editorInterfaces": []

(this information is in our README, btw).

You can check this exported json file for which of your contents were actually exported. Specifically, check the entries array to see if your --query-entries flag successfully found just a single entry to import.

If you don’t want to import assets, content_types, webhooks, roles, etc, you can remove those arrays from the JSON file.

  1. Then you call import with the modified file. This will attempt to run an import of only that data.

Important If you want to only import one entry, the space must already have the relevant content type (that is, the content type of the entry you want to import).

I hope this clears up some of your misunderstanding. I would also like to point you to some helpful resources:

guide for import/export using cli: contentful import contentful export

Read more comments on GitHub >

github_iconTop Results From Across the Web

422 when importing from GitHub (logs: Username needs to ...
An error message appears, "An error occurred while importing project: Error: Request failed with status code 422". What is the expected correct ...
Read more >
Unable to import Apple ProRes 422 HQ into Resolve - Reddit
Hi all, im trying to import a batch of ProRes files into Resolve for grading but have had no luck. Ive tried converting...
Read more >
Error 422 When Exporting Contact From Clio Grow to Clio ...
Unable to export contact to Clio Manage; Error: Request failed with status code 401. Environment: Clio Grow. Additional Information:.
Read more >
Python: FastAPI error 422 with POST request when sending ...
from fastapi import FastAPI from pydantic import BaseModel app ... if a post fails there, it's likely a syntax/logic error and not related ......
Read more >
Can't import ProRes 422 files at
Regular Crew. Join Date: Jul 2010. Location: Long Beach, CA. Posts: 150. Can't import ProRes 422 files. Another cross-platform problem.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found