webflow / js-webflow-api

Node.js SDK for the Webflow Data API
https://www.npmjs.com/package/webflow-api
285 stars 92 forks source link

How to use pagination in `pages.list` endpoint? #123

Closed AdityaBorkar closed 4 months ago

AdityaBorkar commented 4 months ago

API Documentation: https://developers.webflow.com/data/reference/list-pages

As per the docs, the API endpoint returns:

{
   ...,
   "pagination": {
       "limit": 20,
       "offset": 0,
       "total": 2
    }
}

How to use the offset / pagination information to get the next "n" pages?

dsinghvi commented 4 months ago

@AdityaBorkar this is a good question, I'll mention this to the webflow team and see if I can get an answer!

dsinghvi commented 4 months ago

@AdityaBorkar The OpenAPI has been fixed and Fern has regenerated the SDK. You should be able to pass the limit and offset as query parameters in the request using v2.1.1 of the SDK.