Download a file from the "Downloads" section of a repository
Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.
Summary
The Bitbucket Cloud REST API 'Downloads' endpoint can be used to download a specific file from the "Downloads" section of a repository.
Solution
Authenticating with Access Token
Sample CURL command:
1
curl -s -L -O -H "Authorization: Bearer REPLACE-WITH-THE-ACCESS-TOKEN" https://api.bitbucket.org/2.0/repositories/WORKSPACEID/REPONAME/downloads/filename
Replace the placeholder values above with your access token, workspace ID, repository name and the name of the file you wish to download.
Authenticating with App Password
Sample CURL command:
1
curl -s -L -O -u username:apppassword https://api.bitbucket.org/2.0/repositories/WORKSPACEID/REPONAME/downloads/filename
Replace the placeholder values above with your username, app password, workspace ID, repository name and the name of the file you wish to download.
If the above instructions do not assist you with downloading the file, please raiseasupport ticketor raise acommunity support ticketfor further assistance with this.
Was this helpful?