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

Statuspage API throws 500 error when page=0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • API - Status
    • None
    • 1
    • Severity 3 - Minor

      Issue Summary

      When requesting the /subscribers/unsubscribed endpoint with 'page=0', we get a 500 error, yet on other endpoints 'page=0' works. This public release seems to indicate that pagination starts at 1, yet the API docs show that the default is 'page=0'

      From the public docs under 'query parameters' for 'page': 

      "Default: 0 The page offset of subscribers. The first page is page 0, the second page 1, etc. This skips page"

      This is reproducible on Data Center: yes

      Steps to Reproduce

       

      send request to https://api.statuspage.io/v1/pages/{page_id}/subscribers/unsubscribed?page=0
      send request to https://api.statuspage.io/v1/pages/{page_id}/subscribers/unsubscribed?page=1
      send request to https://api.statuspage.io/v1/pages/{page_id}/subscribers?page=0
      send request to https://api.statuspage.io/v1/pages/{page_id}/subscribers?page=1
      

      Expected Results

      All endpoints should function the same, but they do not. They should start at either 1 or 0, but there is inconsistency.

      Actual Results

      /subscribers/unsubscribed?page=0 throws 500 error while /subscribers?page=0 returns valid results for page 1. 

      Workaround

      start at index 1 for '/subscribers/unsubscribed' and start at index 0 for '/subscribers'

            Unassigned Unassigned
            a3e616cd17e8 John M
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: