Atlassian BitBucket Cloud
22 min
atlassian bitbucket cloud connector provides get, upload, delete and download files asset setup this connector supports the access token authentication access tokens are passwords (or tokens) that provide access to a single repository, project or workspace these tokens can authenticate with bitbucket apis for scripting, ci/cd tools, bitbucket cloud connected apps, and bitbucket cloud integrations access tokens are linked to a repository, project, or workspace, not a user account the level of access provided by the token is set when a repository, or workspace admin creates it, by setting permission scopes there are three types of access token repository access tokens can connect to a single repository, preventing them from accessing any other repositories or workspaces project access tokens can connect to a single project, providing access to any repositories within the project workspace access tokens can connect to a single workspace and have access to any projects and repositories within that workspace capabilities this connector provides the following capabilities delete download artifact get download artifact link list download artifacts upload download artifact api documentation link atlassian bitbucket cloud api documentation link https //developer atlassian com/cloud/bitbucket/rest/api group downloads/#api group downloads \[atlassian bitbucket cloud authentication link] ( https //developer atlassian com/cloud/bitbucket/rest/intro/#basic auth https //developer atlassian com/cloud/bitbucket/rest/intro/#basic auth ) configurations http bearer authentication access token authenticates using bearer token such as a jwt, etc configuration parameters parameter description type required url a url to the target host string required token token string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions delete download artifact this action deletes the specified download artifact from the repository endpoint url /2 0/repositories/{{workspace}}/{{repo slug}}/downloads/{{filename}} method delete input argument name type required description workspace string required parameter for delete download artifact repo slug string required parameter for delete download artifact filename string required name of the resource output parameter type description status code number http status code of the response reason string response reason phrase response text string output field response text example \[ { "status code" 204, "response headers" { "server" "envoy", "vary" "authorization, origin, cookie, user context", "cache control" "max age=0, no cache, no store, must revalidate", "content type" "text/html; charset=utf 8", "x oauth scopes" "repository\ delete, runner\ write, pullrequest\ write, webhook, pipeline\ variable, ", "x b3 traceid" "d20373631c06d3c3", "x usage output ops" "0", "x used mesh" "false", "x dc location" "micros 3", "strict transport security" "max age=31536000; includesubdomains; preload", "date" "wed, 25 oct 2023 12 16 18 gmt", "x request id" "d20373631c06d3c3", "x usage user time" "0 060013", "x usage system time" "0 005689", "x served by" "369c9c1360a2" }, "reason" "no content", "response text" "" } ] get download artifact link this action returns the actual file contents and not the artifact's metadata endpoint url /2 0/repositories/{{workspace}}/{{repo slug}}/downloads/{{filename}} method get input argument name type required description workspace string required this can either be the workspace id (slug) or the workspace uuid surrounded by curly braces repo slug string required this can either be the repository slug or the uuid of the repository, surrounded by curly braces filename string required name of the file output parameter type description status code number http status code of the response reason string response reason phrase file object output field file filename string name of the resource file string output field file example \[ { "status code" 200, "response headers" { "x amz id 2" "c1vjv+ttssiq9bwe8nkopmvhfzy/e/ugf3hbxkocudznb307r5glyea0m1jo2si90j24kl/ekj0=", "x amz request id" "qyace4xm1hqz845n", "date" "mon, 30 oct 2023 10 31 02 gmt", "last modified" "wed, 25 oct 2023 08 19 49 gmt", "etag" "\\"1f27ed2ab4e972fd047c71ae9bc22edd 2\\"", "x amz server side encryption" "aes256", "x amz version id" "xhhj68um8awo h6pocjxc3xajeldxsdg", "content disposition" "attachment; filename=\\"auto mitigation txt\\"", "accept ranges" "bytes", "content type" "text/plain", "server" "amazons3", "content length" "16003176" }, "reason" "ok", "file" { "filename" "auto mitigation txt", "file data" "" } } ] list download artifacts this action returns a list of download links associated with the repository endpoint url /2 0/repositories/{{workspace}}/{{repo slug}}/downloads method get input argument name type required description workspace string required this can either be the workspace id (slug) or the workspace uuid surrounded by curly braces repo slug string required this can either be the repository slug or the uuid of the repository, surrounded by curly braces output parameter type description status code number http status code of the response reason string response reason phrase values array value for the parameter name string name of the resource size number output field size created on string output field created on user object output field user type string type of the resource links object output field links avatar object output field avatar href string output field href created on string output field created on display name string name of the resource uuid string unique identifier account id string unique identifier account status string status value kind string output field kind downloads number output field downloads links object output field links self object output field self href string output field href type string type of the resource pagelen number output field pagelen size number output field size page number output field page example \[ { "status code" 200, "response headers" { "server" "envoy", "vary" "authorization, origin, cookie, user context", "cache control" "private", "content type" "application/json; charset=utf 8", "x oauth scopes" "webhook, repository\ delete, pullrequest\ write, runner\ write, pipeline\ variable, ", "x b3 traceid" "0a9bec6af5498666", "x usage output ops" "0", "content encoding" "gzip", "x used mesh" "false", "x dc location" "micros 3", "strict transport security" "max age=31536000; includesubdomains; preload", "date" "wed, 25 oct 2023 12 01 23 gmt", "x request id" "0a9bec6af5498666", "x usage user time" "0 074324", "x usage system time" "0 000089" }, "reason" "ok", "json body" { "values" \[], "pagelen" 10, "size" 2, "page" 1 } } ] upload download artifact this action uploads new download artifacts endpoint url /2 0/repositories/{{workspace}}/{{repo slug}}/downloads method post input argument name type required description workspace string required this can either be the workspace id (slug) or the workspace uuid surrounded by curly braces repo slug string required this can either be the repository slug or the uuid of the repository, surrounded by curly braces form body object required request body data file array required parameter for upload download artifact file name string required name of the resource file string required parameter for upload download artifact output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 201, "response headers" { "server" "envoy", "vary" "authorization, origin", "cache control" "max age=0, no cache, no store, must revalidate", "content type" "application/json; charset=utf 8", "x oauth scopes" "repository\ admin, runner\ write, repository\ delete, pipeline\ variable, pullreques ", "x b3 traceid" "2b6c9e7bd5f5e48d", "x usage output ops" "0", "x used mesh" "false", "x dc location" "micros 3", "strict transport security" "max age=31536000; includesubdomains; preload", "date" "mon, 30 oct 2023 10 51 36 gmt", "x request id" "2b6c9e7bd5f5e48d", "x usage user time" "0 033254", "x usage system time" "0 004899", "x served by" "0be7a1d1549b" }, "reason" "created" } ] response headers header description example accept ranges http response header accept ranges bytes cache control directives for caching mechanisms max age=0, no cache, no store, must revalidate connection http response header connection keep alive content disposition http response header content disposition attachment; filename="auto mitigation txt" content encoding http response header content encoding gzip content length the length of the response body in bytes 92 content type the media type of the resource text/html; charset=utf 8 date the date and time at which the message was originated wed, 25 oct 2023 12 01 23 gmt etag an identifier for a specific version of a resource "7d219b86589c7b828de5d1a864dce280" expires the date/time after which the response is considered stale mon, 30 oct 2023 10 51 36 gmt last modified the date and time at which the origin server believes the resource was last modified wed, 25 oct 2023 08 19 49 gmt server information about the software used by the origin server amazons3 strict transport security http response header strict transport security max age=31536000; includesubdomains; preload transfer encoding http response header transfer encoding chunked vary http response header vary authorization, origin, cookie, user context x accepted oauth scopes http response header x accepted oauth scopes repository \ write x amz id 2 http response header x amz id 2 c1vjv+ttssiq9bwe8nkopmvhfzy/e/ugf3hbxkocudznb307r5glyea0m1jo2si90j24kl/ekj0= x amz request id http response header x amz request id qyace4xm1hqz845n x amz server side encryption http response header x amz server side encryption aes256 x amz version id http response header x amz version id xhhj68um8awo h6pocjxc3xajeldxsdg x asap succeeded http response header x asap succeeded true x b3 spanid http response header x b3 spanid 42a2c58be8b42528 x b3 traceid http response header x b3 traceid d20373631c06d3c3 x content type options http response header x content type options nosniff x credential type http response header x credential type repo access token