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/e6cbafc0e70cf88900619dd9f4ebebef76513bd0/

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": "2022-09-10T11:32:59-04:00",
    "date": "2022-09-10T11:32:59-04:00",
    "directory": "8808502dec79b29d3759a41ea425ec273484b1d4",
    "directory_url": "https://archive.softwareheritage.org/api/1/directory/8808502dec79b29d3759a41ea425ec273484b1d4/",
    "extra_headers": [
        [
            "gpgsig",
            "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEsh1f45drUp44iGlLQzUkdRtx1IoFAmMcrisACgkQQzUkdRtx\n1IqpfAgAinE6aOlR3MUPb8o8DQIxFmXA6EWiUT2hqcVAfDyyalyJk6PYd0DjOE1X\n9K1+gXvZTYGX4/42Uf05xrRUG98pcb2/S/w7cssDDv0+EJ+AWU8u1h0ynglHMTzK\nfmE9n16W6NTZTzR6AF3xJWfHSXK8nbL3GatrOjpNQDl494Swffdqp/LJg7MzoT3f\nmCrX5+FLf3YgZeZ10ZgkpaSbsXrjGzQV6qS3T06or9VUjp1h+Yyv0hRWEzcGLeP1\nswLyMpOIKrvM6EjRMbpMW9G9zWY7b8IoDu44WNGJpe3JyDThbnIUZv/ImnLv7D2y\nAZZUYq1lWY3oepkAajAMhSrKcMV73A==\n=Z2G4\n-----END PGP SIGNATURE-----"
        ]
    ],
    "history_url": "https://archive.softwareheritage.org/api/1/revision/e6cbafc0e70cf88900619dd9f4ebebef76513bd0/log/",
    "id": "e6cbafc0e70cf88900619dd9f4ebebef76513bd0",
    "merge": false,
    "message": "0.2\n",
    "metadata": {},
    "parents": [
        {
            "id": "0672acc7e2dbd55bfaf3e71bf36babea8cc14666",
            "url": "https://archive.softwareheritage.org/api/1/revision/0672acc7e2dbd55bfaf3e71bf36babea8cc14666/"
        }
    ],
    "synthetic": false,
    "type": "git",
    "url": "https://archive.softwareheritage.org/api/1/revision/e6cbafc0e70cf88900619dd9f4ebebef76513bd0/"
}

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