{ "opencollection": "1.0.0", "info": { "name": "Bitbucket Addon Downloads API", "version": "2.0" }, "items": [ { "info": { "name": "Downloads", "type": "folder" }, "items": [ { "info": { "name": "List download artifacts", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/downloads", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Returns a list of download links associated with the repository." }, { "info": { "name": "Upload a download artifact", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/downloads", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Upload new download artifacts.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more `files` fields:\n\n $ echo Hello World > hello.txt\n $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt\n\nWhen a file is uploaded with the same name as an existing artifact,\nthen the existing file will be replaced." }, { "info": { "name": "Get a download artifact link", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/downloads/:filename", "params": [ { "name": "filename", "value": "", "type": "path", "description": "Name of the file." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Return a redirect to the contents of a download artifact.\n\nThis endpoint returns the actual file contents and not the artifact's\nmetadata.\n\n $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt\n Hello World" }, { "info": { "name": "Delete a download artifact", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/downloads/:filename", "params": [ { "name": "filename", "value": "", "type": "path", "description": "Name of the file." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ] }, "docs": "Deletes the specified download artifact from the repository." } ] } ], "bundled": true }