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/3b3fddefbdb463d5ecd98bf68d6aea57ab1709de/

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-08-16T16:00:06-04:00",
    "date": "2022-08-16T16:00:06-04:00",
    "directory": "d334483ddd226add6b14fdde36338e21f7b158eb",
    "directory_url": "https://archive.softwareheritage.org/api/1/directory/d334483ddd226add6b14fdde36338e21f7b158eb/",
    "extra_headers": [
        [
            "gpgsig",
            "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEsh1f45drUp44iGlLQzUkdRtx1IoFAmL790YACgkQQzUkdRtx\n1IqdYwf/fi1pRQyIok24PrFgLPqjy30lo40PJRkLeaK08RlbHqHItUfLdQiPTpTr\nzSE0mFsvRCk8acBgfgio0BvDQ7Nogdh7xh7MKzCNm/fO7UmEEmlPkOEupe9N1lVT\nZFAzTk1UUSBhnQUGiD9NnBk4uLABsm/VF4V2ZHXhtvpbY9BHbyJ0lUa33VMxZyaz\nzB8qASy5EMCBEHmtg5qAVY/Iq4Kn8Rt+faDKLYcrTmz9Dh9AUcnSQTLP+KCM5jJo\nM9Ho/Oa7V3umf0s+Wp2C6NPrMRX0GIgpfNxR1cLJ9nrVLaAmGu8bk+rem1TCjyPa\nE5ioQmtaBu7tQ+JYwWmAPHlITUiElA==\n=ikB8\n-----END PGP SIGNATURE-----"
        ]
    ],
    "history_url": "https://archive.softwareheritage.org/api/1/revision/3b3fddefbdb463d5ecd98bf68d6aea57ab1709de/log/",
    "id": "3b3fddefbdb463d5ecd98bf68d6aea57ab1709de",
    "merge": false,
    "message": "0.3\n",
    "metadata": {},
    "parents": [
        {
            "id": "4233165391e388a33a6e25677c66c57e47f9ff9c",
            "url": "https://archive.softwareheritage.org/api/1/revision/4233165391e388a33a6e25677c66c57e47f9ff9c/"
        }
    ],
    "synthetic": false,
    "type": "git",
    "url": "https://archive.softwareheritage.org/api/1/revision/3b3fddefbdb463d5ecd98bf68d6aea57ab1709de/"
}

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