The pagination of the public API endpoint https://archive.softwareheritage.org/api/1/revision/log is currently broken.
The Link header returned does not include a context element allowing the BFS to be resumed from that link.
The pagination of the public API endpoint https://archive.softwareheritage.org/api/1/revision/log is currently broken.
The Link header returned does not include a context element allowing the BFS to be resumed from that link.
rDWAPPS Web applications | |||
D3291 | rDWAPPSab6de4ee8376 api: Update /revision/(sha1_git)/log/ endpoint |
As discussed on IRC, a possible fix for is to clearly document the "limitations" of the current implementation.
I'll reiterate my suggestions in this task, if we want to keep this endpoint stateless:
Another option is to simply drop this method from the public Web API, and keep the revision graph visit logic only in swh-web (the UI). If users want to do a full visit of the revision graph they can use /revision and implement the visit policy they want. (I've suggested this design consideration for API v2 in T1805.)
Clarifying documentation for the v1 API method would be a good thing nonetheless.
I agree with the proposed changes of @olasd. I will got for the removal of the next link response header and documentation update.
I also proposed to remove the prev_sha1s optional URL argument as it does not bring any particular interesting feature (it just adds extra revision data at the beginning of the returned revisions list).