How can we improve Base API's?

API response should display the total number of pages

When a user queries for deals, the system responds with 20 results per "page", but the user has no idea how many total pages exist in the result set. The user has to keep sending requests until the system responds with less than 20 results in a "page".

Because Base chose not to use a hypermedia-enabled media type (application/json is not hypermedia aware), including the number of pages in the response body will be difficult. A temporary solution might be to include the number of pages in a response header (e.g., X-Base-Pages). A long-term solution would be to switch to a hypermedia-aware media type such as HAL+JSON.

11 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Larry Staton Jr. shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base