swh.web.api.views.raw module#
- swh.web.api.views.raw.api_raw_object(request: Request, swhid: str)[source]#
- GET /api/1/raw/(swhid)/#
Get the object corresponding to the SWHID in raw form.
This endpoint exposes the internal representation (see the
*_git_object
functions inswh.model.git_objects
), and so can be used to fetch a binary blob which hashes to the same identifier.- Parameters:
swhid (string) – the object’s SWHID
- Response Headers:
Content-Type – application/octet-stream
- Status Codes:
200 OK – no error
404 Not Found – the requested object cannot be found in the archive
Example:
https://archive.softwareheritage.org/api/1/raw/swh:1:snp:6a3a2cf0b2b90ce7ae1cf0a221ed68035b686f5a