Provenance#

GET /api/1/provenance/whereis/(target)/#

Given a core SWHID return a qualified SWHID with some provenance info:

  • the release or revision containing that content or directory

  • the url of the origin containing that content or directory

This can also be called for revision, release or snapshot to retrieve origin url information if any. When using a revision, the anchor will be an associated release if any.

Note

The quality of the result is not guaranteed whatsoever. Since the definition of “best” likely vary from one usage to the next, this API will evolve in the futur when this notion get better defined.

Warning

That endpoint is not publicly available and requires authentication and special user permission in order to request it.

Parameters:
  • target (string) – a core SWHID targeting an archived object

The response is a string containing a qualified SWHID with provenance info.

Request Headers:
  • Accept – the requested response content type, either application/json (default) or application/yaml

Response Headers:
Status Codes:

Example:

https://archive.softwareheritage.org/api/1/provenance/whereis/swh:1:cnt:dcb2d732994e615aab0777bfe625bd1f07e486ac/
POST /api/1/provenance/whereare/#

Given a list of core SWHIDs return qualified SWHIDs with some provenance info.

See GET /api/1/provenance/whereis/(target)/ documentation for more details.

Warning

That endpoint is not publicly available and requires authentication and special user permission in order to request it.

Request JSON Array of Objects:
  • - (string) – input array of core SWHIDs

The response is a JSON array of strings containing qualified SWHIDs with provenance info.

Request Headers:
  • Accept – the requested response content type, either application/json (default) or application/yaml

Response Headers:
Status Codes: