{"push_id":2739201551,"size":1,"distinct_size":1,"ref":"refs/heads/fix-pagation-to-avoid-link-header","head":"447675ec68aded7f03178a164964e54ade793b64","before":"efb3f2c80814a77322ca0e0e001f9e0d2017b4d8","commits":[{"sha":"447675ec68aded7f03178a164964e54ade793b64","author":{"name":"Ben Thorner","email":"4c56f2471c3f009dfc25118719e857ed54c9af50@digital.cabinet-office.gov.uk"},"message":"Avoid using 'Link' header to unroll API pagination\n\nThe 'Link' header originally exposed by Whitehall is no longer reliable\n- we think this is due to a Fastly issue. Currently this header is used\nto compact a set of paginated API responses into a single array result,\nusing the \"next\" and \"previous\" links contained within the header.\n\nPagination is an issue for the /organisations and /world-locations APIs,\nboth of which also have pagination fields in the body, as well as in the\nspecial 'Link' header. Using the 'next_page_url' and 'previous_page_url'\nfields to control the compaction process fixes the 'Link' header bug.\n\nIn trying to make this change, the API helps for organisations and world\nlocations needed updating to include the additional fields. In order to\nmake this change easier, I've refactored the code by combining similar\ninline conditionals into discrete blocks of code. The 'Link' header is\nno longer in the stub response, to reflect that it's not reliable.","distinct":true,"url":"https://api.github.com/repos/alphagov/gds-api-adapters/commits/447675ec68aded7f03178a164964e54ade793b64"}]}
{"actor":{"display_login":"benthorner"}}