Hi people.
I need some help with the contentful-export CLI.
How can I export data from contentful (to be used as further seed data by multiple users) but query the entries and assets. I see in the docs that I can set the export config JSON like so and pass the query in an array:
{
"spaceId": "source space id",
"environmentId": "master",
"managementToken": "destination space management token",
"deliveryToken": "token to export both entries and assets from the Contentful Delivery API",
"exportDir": "/data",
"saveFile": true,
"contentFile": "export.json",
"skipRoles": true,
"skipWebhooks": true,
"downloadAssets": true,
"queryEntries": ["content_type=<content_type_id>", "sys.id=<entry_id>"],
"queryAssets": ["fields.title=Example"]
}
However it’s unclear what the structure of the array should be giving the "content_type=<content_type_id>", "sys.id=<entry_id>"
items. Should I just list the content type ID and entry ID of all the parent entries I want to export and how do I pair those together for all the entries giving that both ID’s are required. I may have understood this wrongly, please let me know.
My goal is to export all content models (which are all nested) but select certain entries starting from a parent entry. This way all nested entries in the queried entries should be exported only. Any ideas or tips or examples of how my queryEntries
and/or queryAssets
should be structured?
Thank you.