Requests to paginated REST Admin API endpoints return a blank link?

Excursionist
27 1 0

Hi,

Have anyone meet this case . I try to change to Cursor-based pagination but no luck

 

string(18949) "HTTP/2 200 
date: Fri, 20 Sep 2019 02:11:24 GMT
content-type: application/json; charset=utf-8
set-cookie: __cfduid=de4e3f32d47050adadae399a85e22dc491568945484; expires=Sat, 19-Sep-20 02:11:24 GMT; path=/; domain=.myshopify.com; HttpOnly
x-sorting-hat-podid: 47
x-sorting-hat-shopid: 15636398128
vary: Accept-Encoding
referrer-policy: origin-when-cross-origin
x-frame-options: DENY
x-shopid: 15636398128
x-shardid: 47
x-stats-userid: 
x-stats-apiclientid: 2986379
x-stats-apipermissionid: 193326546992
http_x_shopify_shop_api_call_limit: 1/40
x-shopify-shop-api-call-limit: 1/40
x-shopify-api-version: 2019-07
link: ; rel="next"
strict-transport-security: max-age=7889238
x-request-id: 7c32bc05-779b-48f2-a0c3-fba414bb9728
x-shopify-stage: canary
content-security-policy: default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' https://* shopify-pos://*; block-all-mixed-content; child-src 'self' https://* shopify-pos://*; connect-src 'self' wss://* https://*; frame-ancestors 'none'; img-src 'self' data: blob: https:; script-src https://cdn.shopify.com https://cdn.shopify.cn https://checkout.shopifycs.com https://js-agent.newrelic.com https://bam.nr-data.net https://dme0ih8comzn4.cloudfront.net https://api.stripe.com https://mpsnare.iesnare.com https://appcenter.intuit.com https://www.paypal.com https://js.braintreegateway.com https://c.paypal.com https://maps.googleapis.com https://www.google-analytics.com https://v.shopify.com https://widget.intercom.io https://js.intercomcdn.com 'self' 'unsafe-inline' 'unsafe-eval'; upgrade-insecure-requests; report-uri /csp-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fproducts&source%5Bsection%5D=admin_api&source%5Buuid%5D=7c32bc05-779b-48f2-a0c3-fba414bb9728
x-content-type-options: nosniff
x-download-options: noopen
x-permitted-cross-domain-policies: none
x-xss-protection: 1; mode=block; report=/xss-report?source%5Baction%5D=index&source%5Bapp%5D=Shopify&source%5Bcontroller%5D=admin%2Fproducts&source%5Bsection%5D=admin_api&source%5Buuid%5D=7c32bc05-779b-48f2-a0c3-fba414bb9728
x-dc: gcp-us-east1,gcp-us-east1
nel: {"report_to":"network-errors","max_age":2592000,"failure_fraction":0.01,"success_fraction":0.0001}
report-to: {"group":"network-errors","max_age":2592000,"endpoints":[{"url":"https://monorail-edge.shopifycloud.com/v1/reports/nel/20190325/shopify"}]}
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 519044bc9dd23377-HKG

The call look like :  GET https://mystore.myshopify.com/admin/api/2019-07/products.json?limit=3 (I have 15 test products)

The response header I get was:

link: ; rel="next"

So I dont know how to get a proper link like in this guide

Can anyone help me?

0 Likes

Hello 

https://community.shopify.com/c/Shopify-APIs-SDKs/API-call-to-Get-Products-Unable-to-Get-page-2/m-p/...

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Custom Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Digital Marketing | Site Speed Optimization | Web Development
0 Likes
Highlighted
Shopify Staff
Shopify Staff
4 0 0

I checked and the link header was sent properly. Make sure you are not using any library that deletes the `url` in the LINK header. 

 

Ignacio 

0 Likes