Atlassian BitBucket Cloud
the atlassian bitbucket cloud connector allows for automated management of repository artifacts, facilitating seamless integration with security workflows atlassian bitbucket cloud is a popular platform for hosting git repositories, enabling teams to collaborate on code efficiently this connector allows swimlane turbine users to automate the management of repository artifacts, including uploading, downloading, listing, and deleting files by integrating with atlassian bitbucket cloud, users can streamline their development workflows, enhance collaboration, and ensure efficient artifact management directly within their security automation processes prerequisites before you can use the atlassian bitbucket cloud connector for turbine, you'll need access to the bitbucket cloud api this requires the following access token authentication using bearer token such as a jwt, etc with the following parameters url the endpoint url for accessing bitbucket cloud api token a valid bearer token for authenticating api requests 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 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 ) additional documentation https //docs swimlane com/connectors/atlassian bitbucket cloud https //developer atlassian com/cloud/bitbucket/rest/intro/ 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 delete a specified download artifact from an atlassian bitbucket cloud repository using workspace, repo slug, and filename as path parameters endpoint url /2 0/repositories/{{workspace}}/{{repo slug}}/downloads/{{filename}} method delete input argument name type required description path parameters workspace string required parameters for the delete download artifact action path parameters repo slug string required parameters for the delete download artifact action path parameters filename string required parameters for the delete download artifact action input example {"path parameters" {"workspace" "{23bad0dd 8e8c 4990 8679 0914c76e8edb}","repo slug" "{bc6ba91b ba02 4abb 9a15 5e5634f82c22}","filename" "recorded future get feed lists txt"}} 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 output 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 get download artifact link retrieve the actual file contents from atlassian bitbucket cloud using filename, repo slug, and workspace path parameters endpoint url /2 0/repositories/{{workspace}}/{{repo slug}}/downloads/{{filename}} method get input argument name type required description path parameters workspace string required this can either be the workspace id (slug) or the workspace uuid surrounded by curly braces path parameters repo slug string required this can either be the repository slug or the uuid of the repository, surrounded by curly braces path parameters filename string required name of the file input example {"path parameters" {"workspace" "{23bad0dd 8e8c 4990 8679 0914c76e8edb}","repo slug" "{bc6ba91b ba02 4abb 9a15 5e5634f82c22}","filename" "auto mitigation txt"}} output parameter type description status code number http status code of the response reason string response reason phrase file object output field file file filename string name of the resource file file string output field file file output 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 list download artifacts return a list of download links for artifacts in a specified atlassian bitbucket cloud repository using workspace and repo slug as path parameters endpoint url /2 0/repositories/{{workspace}}/{{repo slug}}/downloads method get input argument name type required description path parameters workspace string required this can either be the workspace id (slug) or the workspace uuid surrounded by curly braces path parameters repo slug string required this can either be the repository slug or the uuid of the repository, surrounded by curly braces input example {"path parameters" {"workspace" "{23bad0dd 8e8c 4990 8679 0914c76e8edb}","repo slug" "{bc6ba91b ba02 4abb 9a15 5e5634f82c22}"}} output parameter type description status code number http status code of the response reason string response reason phrase values array value for the parameter values name string name of the resource values size number value for the parameter values created on string value for the parameter values user object value for the parameter values user type string type of the resource values user links object value for the parameter values user links avatar object value for the parameter values user links avatar href string value for the parameter values user created on string value for the parameter values user display name string name of the resource values user uuid string unique identifier values user account id string unique identifier values user account status string status value values user kind string value for the parameter values downloads number value for the parameter values links object value for the parameter values links self object value for the parameter values links self href string value for the parameter values type string type of the resource pagelen number output field pagelen size number output field size page number output field page output 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","dat upload download artifact upload new download artifacts to atlassian bitbucket cloud using specified workspace and repository slug endpoint url /2 0/repositories/{{workspace}}/{{repo slug}}/downloads method post input argument name type required description path parameters workspace string required this can either be the workspace id (slug) or the workspace uuid surrounded by curly braces path parameters 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 form body file array required request body data form body file file name string required request body data form body file file string required request body data input example {"path parameters" {"workspace" "{23bad0dd 8e8c 4990 8679 0914c76e8edb}","repo slug" "{bc6ba91b ba02 4abb 9a15 5e5634f82c22}"}} output parameter type description status code number http status code of the response reason string response reason phrase output 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, 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 application/json; charset=utf 8 date the date and time at which the message was originated mon, 30 oct 2023 10 31 02 gmt etag an identifier for a specific version of a resource "1f27ed2ab4e972fd047c71ae9bc22edd 2" expires the date/time after which the response is considered stale wed, 25 oct 2023 12 16 18 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 envoy 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 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 208eb54a02232338 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 x dc location http response header x dc location micros 3 x envoy upstream service time http response header x envoy upstream service time 115 x frame options http response header x frame options sameorigin x oauth scopes http response header x oauth scopes repository \ delete , runner \ write , pullrequest \ write , webhook, pipeline \ variable , repository \ admin x render time http response header x render time 0 1073920726776123 x request count http response header x request count 3599 x request id a unique identifier for the request d20373631c06d3c3 x served by http response header x served by 369c9c1360a2 x static version http response header x static version f0f0c49e2345 x trace id http response header x trace id 2b6c9e7bd5f5e48d x usage input ops http response header x usage input ops 0 x usage output ops http response header x usage output ops 0 x usage system time http response header x usage system time 0 000089 x usage user time http response header x usage user time 0 074324 x used mesh http response header x used mesh false x version http response header x version 064769cf7355 x view name http response header x view name bitbucket apps downloads api v20 handlers downloadshandler x xss protection http response header x xss protection 1; mode=block