Skip to main content

Get a list of all entries by content type

Log in to add to favourites

Requesting all entries for a content type can be achieved by using the search method on the client's entries property.

search(query: Query): Promise<PagedList<Entry>>

search(query: Query, linkDepth: number): Promise<PagedList<Entry>>

Returns

A Promise that will resolve with a Paged List of Entry

Example

JavaScript
const { Query, Op } = require("contensis-delivery-api");

const query = new Query(
    Op.equalTo("sys.contentTypeId", "<content_type_id>"),
    Op.equalTo("sys.versionStatus", "published")
);

ContensisClient.entries.search(query).then(function (entryList) {
    entryList.items.forEach(item => (
        console.log(item.entryTitle)
    ))
});

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request