Page MenuHomeSoftware Heritage

swh-graph: add /last endpoint variants to the REST API
Closed, MigratedEdits Locked

Description

In some cases we only want to return the last node ID of a given API response, e.g., for random walks when looking for the origin of some node.
We should add corresponding /last endpoint variants, as we did for /count.

Event Timeline

zack triaged this task as Normal priority.Nov 13 2019, 5:12 PM
zack created this task.
zack changed the task status from Open to Work in Progress.Nov 16 2019, 3:15 PM

upon review, /last only makes sense for /walk and /randomwalk endpoints, for other endpoints it doesn't, as it will return arbitrary results (e.g., what's the point of knowing the last neighbor of one node, given they're in arbitrary order?)