Addon
Branch restrictions
Branching model
Commit statuses
Commits
Deployments
Downloads
Issue tracker
Pipelines
Projects
Pullrequests
Refs
Reports
Repositories
Snippets
Source
Ssh
Users
Webhooks
Workspaces
Other operations

Rate this page:

Pipelines

Bitbucket Pipelines brings continuous delivery to Bitbucket Cloud, empowering teams with full branching to deployment visibility and faster feedback loops.

List variables for an environment

GET /2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables

Find deployment environment level variables.

Request

Path parameters
workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

repo_slug Required

string

The repository.

environment_uuid Required

string

The environment.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables' \
  --header 'Accept: application/json'

Responses

The retrieved deployment variables.

Content typeValue
application/json

Paginated Deployment Variables

Create a variable for an environment

POST /2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables

Create a deployment environment level variable.

Request

Path parameters
workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

repo_slug Required

string

The repository.

environment_uuid Required

string

The environment.

Body parameters
Content typeValue
application/json

allOf [object, Deployment Variable]

Example

1
2
3
4
5
6
7
8
9
10
11
curl --request POST \
  --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "<string>",
  "uuid": "<string>",
  "key": "<string>",
  "value": "<string>",
  "secured": true
}'

Responses

The variable was created.

Content typeValue
application/json

allOf [object, Deployment Variable]

Header Parameters
Location

string

The URL of the newly created variable.

Update a variable for an environment

PUT /2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}

Update a deployment environment level variable.

Request

Path parameters
workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

repo_slug Required

string

The repository.

environment_uuid Required

string

The environment.

variable_uuid Required

string

The UUID of the variable to update.

Body parameters
Content typeValue
application/json

allOf [object, Deployment Variable]

Example

1
2
3
4
5
6
7
8
9
10
11
curl --request PUT \
  --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "<string>",
  "uuid": "<string>",
  "key": "<string>",
  "value": "<string>",
  "secured": true
}'

Responses

The deployment variable was updated.

Content typeValue
application/json

allOf [object, Deployment Variable]

Delete a variable for an environment

DELETE /2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}

Delete a deployment environment level variable.

Request

Path parameters
workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example {workspace UUID}.

repo_slug Required

string

The repository.

environment_uuid Required

string

The environment.

variable_uuid Required

string

The UUID of the variable to delete.

Example

1
2
curl --request DELETE \
  --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}'

Responses

The variable was deleted.

List caches

GET /2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches/

Retrieve the repository pipelines caches.

Request

Path parameters
workspace Required

string

The account.

repo_slug Required

string

The repository.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches/' \
  --header 'Accept: application/json'

Responses

The list of caches for the given repository.

Content typeValue
application/json

Paginated Pipeline Cache

Delete a cache

DELETE /2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}

Delete a repository cache.

Request

Path parameters
workspace Required

string

The account.

repo_slug Required

string

The repository.

cache_uuid Required

string

The UUID of the cache to delete.

Example

1
2
curl --request DELETE \
  --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}'

Responses

The cache was deleted.

Get cache content URI

GET /2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri

Retrieve the URI of the content of the specified cache.

Request

Path parameters
workspace Required

string

The account.

repo_slug Required

string

The repository.

cache_uuid Required

string

The UUID of the cache.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri' \
  --header 'Accept: application/json'

Responses