contentful-cli: Unable to import (422)

Expected Behavior

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

Capture1

The entry is exported in the JSON generated file :

Capture

The import into another env ‘devtest’ should work.

Actual Behavior

Capture2

Possible Solution

Bug ??

Steps to Reproduce

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

Context

Environment

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

Contentful-CLI : 0.36.2

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 28 (13 by maintainers)

Most upvoted comments

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 'sys.id[in]=2ZzuXC4ZDC0udbn6Fijbgp' --content-only

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

image

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