Description

Get information about a revision in the archive. Revisions are identified by sha1 checksums, compatible with Git commit identifiers. See swh.model.git_objects.revision_git_object in our data model module for details about how they are computed.

Request

GET https://archive.softwareheritage.org/api/1/revision/87615b0b3a398df1e262843a411d7d964c15658d/

Response

Body
{
    "author": {
        "email": "castedo@castedo.com",
        "fullname": "Castedo Ellerman <castedo@castedo.com>",
        "name": "Castedo Ellerman"
    },
    "committer": {
        "email": "castedo@castedo.com",
        "fullname": "Castedo Ellerman <castedo@castedo.com>",
        "name": "Castedo Ellerman"
    },
    "committer_date": "2023-08-25T17:47:08+00:00",
    "date": "2023-08-25T17:47:08+00:00",
    "directory": "a4fe74d30773245b63ae72307a9dd66981a93252",
    "directory_url": "https://archive.softwareheritage.org/api/1/directory/a4fe74d30773245b63ae72307a9dd66981a93252/",
    "extra_headers": [
        [
            "gpgsig",
            "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEsh1f45drUp44iGlLQzUkdRtx1IoFAmTo6RwACgkQQzUkdRtx\n1IrN9Qf/ZN+gjyj8DA2CpIXrcDm7brb/fiRp6bAGjV1ap5wqEforXSi/XvACa/mu\nA2zXcqO9aA/wxr7TR0YxbNuezHZlnOWj70yK5xB5DT4IfV7sN31ZryXOVrOcgaAE\nutR9UYP1+rDqxfxghhx2q2FIkJR6h6CIV1k435dkGWEgJTIPVBYEm0IGUpeWBfEm\nwvxiPFBobEpE3mHTZd2tcohEAiSy93HwDRYLEMisG4ADiRitnD/LFcIWs0OLHqPq\nEAF9N3Yv6yftM6NZdYGf36MFxlQ/FMrUZJ1wxaaHQBy5YdcvWBmLf+hHIXRRVQjA\nvhBNnkrZhjOrCD6DDGTNd9SkZ9UF2g==\n=C9YD\n-----END PGP SIGNATURE-----"
        ]
    ],
    "history_url": "https://archive.softwareheritage.org/api/1/revision/87615b0b3a398df1e262843a411d7d964c15658d/log/",
    "id": "87615b0b3a398df1e262843a411d7d964c15658d",
    "merge": false,
    "message": "1.1\n",
    "metadata": {},
    "parents": [
        {
            "id": "3b3fddefbdb463d5ecd98bf68d6aea57ab1709de",
            "url": "https://archive.softwareheritage.org/api/1/revision/3b3fddefbdb463d5ecd98bf68d6aea57ab1709de/"
        }
    ],
    "synthetic": false,
    "type": "git",
    "url": "https://archive.softwareheritage.org/api/1/revision/87615b0b3a398df1e262843a411d7d964c15658d/"
}

URL Allowed Methods

https://archive.softwareheritage.org/api/1/revision/ (sha1_git) /

GET, HEAD, OPTIONS

Arguments

sha1_git (string)

hexadecimal representation of the revision sha1_git identifier


Request headers

Accept

the requested response content type, either application/json (default) or application/yaml


Response headers

Content-Type

this depends on Accept header of request


Returns

object

an object containing the following keys:

  • author (object): information about the author of the revision

  • committer (object): information about the committer of the revision

  • committer_date (string): RFC3339 representation of the commit date

  • date (string): RFC3339 representation of the revision date

  • directory (string): the unique identifier that revision points to

  • directory_url (string): link to /api/1/directory/ to get information about the directory associated to the revision

  • id (string): the revision unique identifier

  • merge (boolean): whether or not the revision corresponds to a merge commit

  • message (string): the message associated to the revision

  • parents (array): the parents of the revision, i.e. the previous revisions that head directly to it, each entry of that array contains an unique parent revision identifier but also a link to /api/1/revision/ to get more information about it

  • type (string): the type of the revision


HTTP status codes

200

no error

400

an invalid sha1_git value has been provided

404

requested revision cannot be found in the archive


Examples

/api/1/revision/aafb16d69fd30ff58afdd69036a26047f3aebdc6/
back to top