Rate this page:
Access the list of download links associated with the repository.
GET /2.0/repositories/{workspace}/{repo_slug}/downloads
Returns a list of download links associated with the repository.
repository
string
This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}
.
string
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}
.
1 2 3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads' \
--header 'Authorization: Bearer <access_token>'
Returns a paginated list of the downloads associated with the repository.
A schema has not been defined for this response code.
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.
repository:write
string
This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}
.
string
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}
.
1 2 3
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads' \
--header 'Authorization: Bearer <access_token>'
The artifact was uploaded sucessfully.
A schema has not been defined for this response code.
GET /2.0/repositories/{workspace}/{repo_slug}/downloads/{filename}
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
Name of the file.
string
This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}
.
string
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}
.
1 2 3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads/{filename}' \
--header 'Authorization: Bearer <access_token>'
Redirects to the url of the specified download artifact.
A schema has not been defined for this response code.
DELETE /2.0/repositories/{workspace}/{repo_slug}/downloads/{filename}
Deletes the specified download artifact from the repository.
repository:write
string
Name of the file.
string
This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}
.
string
This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: {workspace UUID}
.
1 2 3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads/{filename}' \
--header 'Authorization: Bearer <access_token>'
The specified download artifact was deleted.
Rate this page: