contentful/contentful-export

Need to port selected content types with all it's entries

GauravKaushik01 opened this issue · 6 comments

I have been trying to export one single content_type out of 100s of content types in one particular space.
I want to port from one environment to another (like Dev to QA) within same space.
For the same, I am using the below-mentioned node query to get the export. However, every time getting the all data in this, need to understand the way to export selected content type

const contentfulExport = require('contentful-export')

const options = {
spaceId: 'xxxxxxxxxxx',
environmentId: 'master',
managementToken: 'CFPAT...589204e453',
queryEntries: [ 'content_type=category' ]
}

contentfulExport(options)

W.r.t. issue #109

Hey @AAGJKPRT the query is only applied to the entries, that's why it is called queryEntries, you will still get all the content types exported.

Hey @AAGJKPRT the query is only applied to the entries, that's why it is called queryEntries, you will still get all the content types exported.

Any way to get specific type like the selected content type?
@Khaledgarbaya Can you please help me out to understand the way, how can we export the selected content types or any other content.
I don't want to use the skip thing for 98 records if I want to get 2 records out of 100.

@Khaledgarbaya
Any update on this?

Hi @AAGJKPRT ,

Unfortunately we don't have a "queryContentTypes" flag in the contentful-export tool, so you will always get all content types returned.

Our apologies, we don't have any plans at this moment to implement this feature.

I have another issue
let queryEntrie= [
'content_type='+config.rootTranslationNodes,
'sys.id='+entries
]
const exportOptions = { ...config.exportOptions, contentFile,queryEntrie }
but export function export all those entries present in space, QueryEntries not workingas expected

@C275543 I have having the same issue! I setting my queryEntries to content_type=**** but I am getting all content types and not just the one I am requesting...