Header

Fetch the latest remote revision

This method allows you to view the latest remote revision of your repository. By default will return the revision associated with the default branch on the project.

URL

/projects/<project>/repository/latest_revision

Replace <project> with the permalink of the project.

HTTP Method

GET

Supported Parameters

  • branch - The branch to return the latest revision for

Example cURL Request

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user adam@atechmedia.com:my-api-key \
-d { 
  "branch" : "master" \ 
} \
https://test.deployhq.com/projects/project/repository/latest_revision

Example Response

{
  "ref": "654d9d51d4fa89bd6500ee91324350aeae7e0c7d"
}