I’m receiving a deprecation header on ?page=2 requests to the 2019-04 REST admin API, for metafields, products, events, collects, and customer saved searches.
An illustrative request:
curl -I -H "x-shopify-access-token: xxx" https://example.myshopify.com/admin/api/2019-04/products.json\?limit\=1\&page\=2
The deprecation header looks like so:
x-shopify-api-deprecated-reason: https://help.shopify.com/api/guides/paginated-rest-results
Requests for the first page of resources (i.e. omitting the page param) do not receive a “link” header, giving me nothing to do with the deprecation notice, while cluttering the bit of our monitoring that watches for deprecations.
I’m titling this post as a bug report because, from what I understand, (a) cursor-based pagination isn’t even partially available until 2019-07, (b) 2019-07 doesn’t return the deprecation header for ?page=2 (though the “link” header is present, as documented, for the first page), and (c) the shopify_api gem doesn’t yet have support for cursor-based pagination at all (and when it lands, it looks like it’s only going to initially be available for unstable).