Skip to main content

A paged list is a structure that is used to describe paging details for listing and search results.

Properties

Name Type Format Description
pageIndex number int The index of the result set to return.
pageSize number int The size of the result set to return. The default is 25.
totalCount number int The total number of results available.
pageCount number int The calculated page count based on the totalCount and pageSize.
items object […]   A container for the items being returned.

Example

The paged list properties provide the information required to implement paging.

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) {
    // Items
    entryList.items.forEach(item => (
        console.log(item.entryTitle)
    ))
    // Page details
    console.log(entryList.pageIndex)
    console.log(entryList.pageSize)
    console.log(entryList.totalCount)
    console.log(entryList.pageCount)
});

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