Uploaded image for project: 'Statuspage'
  1. Statuspage
  2. STATUS-730

API endpoints that use the "limit" parameter - Link header in the response not working correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • API - Manage
    • None
    • 1
    • Severity 2 - Major

      Issue Summary

      Some of the paginated endpoints in the Manage API, such as Incidents and Subscribers, use the "limit" parameter instead of "per_page". Currently,  for the subscribers endpoint, the "Link" response header is returning the current page instead of pointing to the next page.

      The incidents endpoint is not returning any kind of "Link" header.

      Steps to Reproduce

      1. Make a query such as 
        https://api.statuspage.io/v1/pages/ {page_id}/subscribers?limit=1
        # Make sure the queried page has more than 1 subscriber

        h3. Expected Results

        The "Link" header in the response should be:
        <https://api.statuspage.io/v1/pages/{page_id}

        /subscribers/limit=1&page=2>
        rel='next'

        Actual Results

      For the Subscribers endpoint, the "Link" header is pointing to the same page:

      <https://api.statuspage.io/v1/pages/{page_id}/subscribers/limit=1&page=1>
      rel='next' 

      And the Incidents endpoint is not returning any "Link" header in the response.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            Unassigned Unassigned
            99e0d6abe301 Alan Violada
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: