Page MenuHomeSoftware Heritage

Public API v2
Open, NormalPublic

Description

Motivation: We want to stop encoding arguments in the request path, and use query parameters instead. This makes more sense for HTTP (and the various proxy layers we have), and is the only way to properly give an origin URL as argument to the API (%2F and / are indistinguishable in Django's request routing). And this will require changing the whole structure of the API.

This meta task lists all other breaking changes we want to include in version 2 of the public API.

  1. Use query parameters instead of encoding arguments in the request path
  2. No leak of the origin id (use only origin URLs)
  3. Use SWH PIDs whenever possible
  4. Compatibility with at least one well-known API specification format (OpenAPI, SPARQL, ...)
  5. Consistent pagination used across all endpoints
  6. Authentication
  7. Standardize "batch invocation" of endpoints on multiple objects
  8. Consistent results for the same object accessed via different endpoints (e.g. /revision/<rev>/directory and /directory/<dir_id> do not return the same type of result; one is a superset of the other).
  9. Future-proofing, wrt. changes of hash algorithms (currently sha1_git)

Event Timeline

vlorentz triaged this task as Normal priority.Jun 14 2019, 12:06 PM
vlorentz created this task.
vlorentz updated the task description. (Show Details)Jun 17 2019, 12:31 PM
vlorentz updated the task description. (Show Details)Jun 17 2019, 1:12 PM
zack updated the task description. (Show Details)Jun 21 2019, 5:41 PM
zack updated the task description. (Show Details)Jun 22 2019, 11:21 PM
vlorentz claimed this task.Jun 24 2019, 2:34 PM
vlorentz removed vlorentz as the assignee of this task.Jul 3 2019, 3:35 PM
douardda updated the task description. (Show Details)Jan 17 2020, 10:21 AM
douardda updated the task description. (Show Details)
vlorentz renamed this task from Public API v2 (meta task) to Public API v2.Jan 22 2020, 4:23 PM
vlorentz added a project: meta-task.
vlorentz updated the task description. (Show Details)Jan 29 2020, 3:43 PM
vlorentz updated the task description. (Show Details)Feb 18 2020, 4:54 PM