Search code examples
javascriptcontentfulcontentful-management

Contentful getEntries by multiple content_types


Can we get all entries by providing multiple content_types:

I have the following code which can only get all entries by one content_type:

cf_space.getEntries({content_type: "contentTypeId"}).then(function(contentTypes){

});

But can we do like getting multiple entries by providing comma separated entryIds:

var entryIds = "id1,id2";
cf_space.getEntries({'sys.id[in]': entryIds}).then(function(entries) {              
});

I need to get all entries of each content_type.

Any help is appreciated.

Thanks


Solution

  • Nope, this is not possible. You'll have to do two separate requests.