Page MenuHomeSoftware Heritage

Web API: add a /known endpoint to check if a list of PIDs exist in the archive
Open, NormalPublic


Input: a list of SWH PIDs.
Output: a list of booleans determining whether each input PID exists in the archive or not.

The endpoint should be effectively usable in batch, supporting looking many (thousands?) PIDs at once.

The actual input/output formats are still being discussed. Initial proposal:

  • input: a JSON list of PIDs sent via POST
  • output: a list of JSON booleans (which are spelled as true/false)

The above would be a most compact representation for output. Alternatively we can return a JSON dictionary with input PIDs as keys and associated booleans. It would be less compact, but would allow in the future to add additional optional attributes to the return value.