Pagination

Responses which contain a collection of resources have pagination links in a top-level page element. The API will also provide links to next and previous pages (when relevant) under the _links key.

{
  "page": {
    "records": 123,
    "pages": 3,
    "current_page": 2,
    "next_page": 3,
    "prev_page": 1,
    "limit": 50
  },
  "_links": {
    "self": {
      "resource-type": "game",
      "href": "https://app.assignr.com/api/v1/games/123.json"
    }
  },
  "_embedded": {
    "games": [
      {
        "id": 123,
        "start_time": "2020-11-17T20:00:00.000-05:00",
        "end_time": "2020-11-17T21:30:00.000-05:00",
        "localized_date": "Nov 17 2020",

        ...
        
        "created": "2020-10-21T16:37:11.000-04:00",
        "updated": "2020-10-21T16:37:11.000-04:00",
        "_links": {
          "self": {
            "resource-type": "game",
            "href": "https://api.assignr.com/api/v2/games/123.json"
          }
        },
      }
    ]
  },     
  "_links": {
        "self": {
            "href": "https://api.assignr.com/v2/sites/7/games.json?page=2"
        },
        "next": {
            "href": "https://api.assignr.com/v2/sites/7/games.json?page=3"
        },
        "prev": {
            "href": "https://api.assignr.com/v2/sites/7/games.json?page=1"
        }
    }
    
}