paginationstrapipopulate

Pagination on populated data in strapi


I've a news-category and news category content types. I've been able to call the APIs to populate the news entries from the news-category find all API. but I need to paginate or restrict the number of news returned per category. https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.html#combining-population-with-other-operators from this docs it's mentioned we can combine pagination with populate but my results are not being paginated

    {
      populate : {
       news: {
        fields: [ 'id' ],
        populate: { thumbnail: [Object] },
        sort: [ 'news_date:desc' ],
        pagination: { start: '0', limit: '2' }
       }
     }
   }

This is the query iam using


Solution

  • Looks like it won't work...

    We will not be able to add this as from a technical perspective it's simply not possible.

    https://github.com/strapi/documentation/issues/752#issuecomment-1043491952