Skip to content

Latest commit

 

History

History
129 lines (82 loc) · 6.38 KB

DownloadsApi.md

File metadata and controls

129 lines (82 loc) · 6.38 KB

{{classname}}

All URIs are relative to https://api.bitbucket.org/2.0

Method HTTP request Description
RepositoriesWorkspaceRepoSlugDownloadsFilenameDelete Delete /repositories/{workspace}/{repo_slug}/downloads/{filename} Delete a download artifact
RepositoriesWorkspaceRepoSlugDownloadsFilenameGet Get /repositories/{workspace}/{repo_slug}/downloads/{filename} Get a download artifact link
RepositoriesWorkspaceRepoSlugDownloadsGet Get /repositories/{workspace}/{repo_slug}/downloads List download artifacts
RepositoriesWorkspaceRepoSlugDownloadsPost Post /repositories/{workspace}/{repo_slug}/downloads Upload a download artifact

RepositoriesWorkspaceRepoSlugDownloadsFilenameDelete

RepositoriesWorkspaceRepoSlugDownloadsFilenameDelete(ctx, filename, repoSlug, workspace) Delete a download artifact

Deletes the specified download artifact from the repository.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
filename string Name of the file.
repoSlug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.

Return type

(empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesWorkspaceRepoSlugDownloadsFilenameGet

RepositoriesWorkspaceRepoSlugDownloadsFilenameGet(ctx, filename, repoSlug, workspace) Get a download artifact link

Return a redirect to the contents of a download artifact. This endpoint returns the actual file contents and not the artifact's metadata. $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt Hello World

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
filename string Name of the file.
repoSlug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.

Return type

(empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesWorkspaceRepoSlugDownloadsGet

RepositoriesWorkspaceRepoSlugDownloadsGet(ctx, repoSlug, workspace) List download artifacts

Returns a list of download links associated with the repository.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
repoSlug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.

Return type

(empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RepositoriesWorkspaceRepoSlugDownloadsPost

RepositoriesWorkspaceRepoSlugDownloadsPost(ctx, repoSlug, workspace) Upload a download artifact

Upload new download artifacts. To upload files, perform a multipart/form-data POST containing one or more files fields: $ echo Hello World > hello.txt $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F [email protected] When a file is uploaded with the same name as an existing artifact, then the existing file will be replaced.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
repoSlug string This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: `{repository UUID}`.
workspace string This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: `{workspace UUID}`.

Return type

(empty response body)

Authorization

api_key, basic, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]