LogoFreestyle
API Reference/Git

Get a commit object

Get a commit from the Git database with detailed information.

GET/git/v1/repo/{repo}/git/commits/{hash}

Path Parameters

repoRequiredstring

The repository id

Format: "uuid"
hashRequiredstring

The object's hash

Response Body

200

Commit retrieved successfully

authorRequiredobject

The author of the commit

committerRequiredobject

The committer

messageRequiredstring

The commit message

treeRequiredobject

The ID of the tree pointed to by this commit

parentsRequiredarray<object>

Parent commit(s) of this commit

shaRequiredstring

The commit's hash ID

400

Invalid request

messageRequiredstring

403

Forbidden

messageRequiredstring

404

Commit not found

messageRequiredstring

500

Internal server error

messageRequiredstring
curl -X GET "https://api.freestyle.sh/git/v1/repo/497f6eca-6276-4993-bfeb-53cbbbba6f08/git/commits/<string>"

Commit retrieved successfully

{
  "author": {
    "date": "2019-08-24T14:15:22Z",
    "name": "string",
    "email": "string"
  },
  "committer": {
    "date": "2019-08-24T14:15:22Z",
    "name": "string",
    "email": "string"
  },
  "message": "string",
  "tree": {
    "sha": "string"
  },
  "parents": [
    {
      "sha": "string"
    }
  ],
  "sha": "string"
}