Bitbucket Rest API - keshavbaweja-git/guides GitHub Wiki

Repo download as archive

At a commit id

https://<bitbucket_server>/plugins/servlet/archive/projects/<bitbucket_project>/repos/<repo_name>?at=<commit_id>

At HEAD of a branch

https://<bitbucket_server>/plugins/servlet/archive/projects/<bitbucket_project>/repos/<repo_name>?at=refs/heads/<branch_name>

At a tag

https://<bitbucket_server>/plugins/servlet/archive/projects/<bitbucket_project>/repos/<repo_name>?at=refs/tags/<tag_name>

Retrieve commit id

At HEAD of a branch

https://<bitbucket_server>/rest/api/1.0/projects/<bitbucket_project>/repos/<repo_name>/commits/<branch_name>

if <branch_name> includes a "/", use below https://<bitbucket_server>/rest/api/1.0/projects/<bitbucket_project>/repos/<repo_name>/commits?until=<branch_name>&limit=0&start=0

At a tag

https://<bitbucket_server>/rest/api/1.0/projects/<bitbucket_project>/repos/<repo_name>/commits/<tag_name>

List branches

https://<bitbucket_server>/rest/api/1.0/projects/<bitbucket_project>/repos/<repo_name>/branches

List commit ids

Until a commit id

https://<bitbucket_server>/rest/api/1.0/projects/<bitbucket_project>/repos/<repo_name>/commits?until=<commit_id>

Until a tag

https://<bitbucket_server>/rest/api/1.0/projects/<bitbucket_project>/repos/<repo_name>/commits?until=<tag_name>

⚠️ **GitHub.com Fallback** ⚠️