Skip to content

Return full URIS in next links of web API responses

Some endpoints of the web API (for instance: /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.


Migrated from T2138 (view on Phabricator)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information