Page MenuHomeSoftware Heritage

Return full URIS in next links of web API responses
Closed, MigratedEdits Locked

Description

Some endpoints of the web API (for instance: [[ https://archive.softwareheritage.org/api/1/origin/search/ | /api/1/origin/search/ ]]) return an URI pointing to the next results in a Link HTTP header.

15:17 $ curl -i https://archive.softwareheritage.org/api/1/origin/search/python/?limit=2
HTTP/1.1 200 OK
Date: Wed, 04 Dec 2019 14:20:29 GMT
Server: gunicorn/19.9.0
Content-Type: application/json
Link: </api/1/origin/search/python/?limit=2&offset=2&regexp=false>; rel="next"
...

Currently the returned URI does not include protocol and domain. These should be added for commodity of use.

Event Timeline

anlambert triaged this task as Normal priority.Dec 4 2019, 3:29 PM
anlambert created this task.

Darn, sorry, I've looked for a dupe before submitting, but I obviously failed at that. Thanks for closing the duplicate.