Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Improve API pagination support #285

Open
JGAntunes opened this issue Jan 22, 2021 · 4 comments
Open

Improve API pagination support #285

JGAntunes opened this issue Jan 22, 2021 · 4 comments
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@JGAntunes
Copy link
Contributor

Currently pagination is dictated via the open-api spec support and, for the list endpoints that support it, users will need to rely on the per_page and page params to iteratively fetch new data. The fact that we're not exposing the response headers also means users will have no way to know when further data is available or not.

We should figure a user friendly API mechanism to deal with this - e.g. #39 (comment) 👍

@JGAntunes JGAntunes added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jan 22, 2021
@IanVS
Copy link

IanVS commented Oct 15, 2021

I think it could also be valuable to mention pagination in the README. I had to dig a little to determine how to use page and per_page.

@erezrokah
Copy link
Contributor

Linking https://github.com/netlify/cli/blob/0eea04d7d0cb65f4ca1c90dbc95ccc7116cee159/src/lib/api.js#L87 as an example also in case someone would like to add it to the README as a contribution.

@GonzaloHirschToptal
Copy link

Bumping this because we need to retrieve paginated results and we are missing pagination information the API returns.

@mfanuzzi
Copy link

Just updating this for anyone else who might come across it. A further complication is that the maximum per_page is 100.

https://answers.netlify.com/t/upper-limit-on-per-page-within-api-calls/53859/2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

5 participants