Description

Get the raw content of a content object (aka a "blob"), as a byte sequence.


URL Allowed Methods

https://archive.softwareheritage.org/api/1/content/[ (hash_type) :] (hash) /raw/

GET, HEAD, OPTIONS

Arguments

hash_type (string)

optional parameter specifying which hashing algorithm has been used to compute the content checksum. It can be either sha1, sha1_git, sha256 or blake2s256. If that parameter is not provided, it is assumed that the hashing algorithm used is sha1.

hash (string)

hexadecimal representation of the checksum value computed with the specified hashing algorithm.


Query parameters

filename (string)

if provided, the downloaded content will get that filename


Response headers

Content-Type

application/octet-stream


Returns

octet stream

raw data as an octet stream


HTTP status codes

200

no error

400

an invalid hash_type or hash has been provided

404

requested content cannot be found in the archive


Examples

/api/1/content/sha1:dc2830a9e72f23c1dfebef4413003221baa5fb62/raw/
back to top