Access the list of download links associated with the repository.
Returns a list of download links associated with the repository.
repository
read:repository:bitbucket
string
Requiredstring
RequiredReturns a paginated list of the downloads associated with the repository.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads' \
--header 'Authorization: Bearer <access_token>'
Upload new download artifacts.
To upload files, perform a multipart/form-data
POST containing one
or more files
fields:
1 2
$ echo Hello World > hello.txt $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt
When a file is uploaded with the same name as an existing artifact, then the existing file will be replaced.
repository:write
string
Requiredstring
RequiredThe artifact was uploaded sucessfully.
1
2
3
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads' \
--header 'Authorization: Bearer <access_token>'
Return a redirect to the contents of a download artifact.
This endpoint returns the actual file contents and not the artifact's metadata.
1 2
$ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt Hello World
repository
string
Requiredstring
Requiredstring
RequiredRedirects to the url of the specified download artifact.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads/{filename}' \
--header 'Authorization: Bearer <access_token>'
Deletes the specified download artifact from the repository.
repository:write
write:repository:bitbucket
string
Requiredstring
Requiredstring
RequiredThe specified download artifact was deleted.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads/{filename}' \
--header 'Authorization: Bearer <access_token>'
Rate this page: