Addon
Branch restrictions
Branching model
Commit statuses
Commits
Deployments
Downloads
Issue tracker
Pipelines
Projects
Pullrequests
Refs
Reports
Repositories
Snippets
Source
Ssh
Teams
Users
Webhooks
Workspaces
Other operations

Rate this page:

Downloads

Access the list of download links associated with the repository.

List download artifacts

GET /2.0/repositories/{workspace}/{repo_slug}/downloads

Returns a list of download links associated with the repository.

OAuth scopes required
repository

Request

Path parameters
repo_slug Required

string

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads' \
  --header 'Authorization: Bearer <access_token>'

Responses

Returns a paginated list of the downloads associated with the repository.

A schema has not been defined for this response code.

Upload a download artifact

POST /2.0/repositories/{workspace}/{repo_slug}/downloads

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.

OAuth scopes required
repository:write

Request

Path parameters
repo_slug Required

string

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

workspace