DoDCIO / eads

Enterprise APIs for Data Sharing (EADS)
https://dodcio.github.io/eads
Other
7 stars 2 forks source link

Pagination Link Header Construction #85

Closed ostranme closed 7 years ago

ostranme commented 7 years ago

Should the handbook be more explicit about Link Header construction?

If an additional URL parameters such sort, filters, or fields are requested, should the Link header include the URL param as part of the pre-constructed links.

Example: GET /artists?sort=-name

Response Link Header: <https://dev.api.jukebox.540.co/v1/artists?&sort=-name&limit=10&offset=0>; rel="first",<https://dev.api.jukebox.540.co/v1/artists?&sort=-name&limit=10&offset=110>; rel="last",<https://dev.api.jukebox.540.co/v1/artists?&sort=-name&limit=10&offset=10>; rel="next"

killerbgt commented 7 years ago

@ostranme, yes the generated link headers should include all provided query params. We'll make a note in the handbook. Thanks!

ostranme commented 7 years ago

Sounds good. Thanks!