Bitbucket Pipelines brings continuous delivery to Bitbucket Cloud, empowering teams with full branching to deployment visibility and faster feedback loops.
Find deployment environment level variables.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe retrieved deployment variables.
A paged list of deployment variables.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Create a deployment environment level variable.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe variable to create
allOf [object, Deployment Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines deployment variable.
The variable was created.
string
allOf [object, Deployment Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines deployment variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Update a deployment environment level variable.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe updated deployment variable.
allOf [object, Deployment Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines deployment variable.
The deployment variable was updated.
allOf [object, Deployment Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines deployment variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Delete a deployment environment level variable.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe variable was deleted.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>'
Find pipelines
pipeline
read:pipeline:bitbucket
string
Requiredstring
RequiredThe matching pipelines.
A paged list of pipelines
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"build_number": 33,
"creator": {
"type": "<string>"
},
"repository": {
"type": "<string>"
},
"target": {
"type": "<string>"
},
"trigger": {
"type": "<string>"
},
"state": {
"type": "<string>"
},
"variables": [
{
"type": "<string>"
}
],
"created_on": "<string>",
"completed_on": "<string>",
"build_seconds_used": 50,
"configuration_sources": [
{
"source": "<string>",
"uri": "<string>"
}
],
"links": {
"type": "<string>"
}
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Endpoint to create and initiate a pipeline. There are a couple of different options to initiate a pipeline, where the payload of the request will determine which type of pipeline will be instantiated.
One way to trigger pipelines is by specifying the branch for which you want to trigger a pipeline.
The specified branch will be used to determine which pipeline definition from the bitbucket-pipelines.yml
file will be applied to initiate the pipeline. The pipeline will then do a clone of the repository and checkout the latest revision of the specified branch.
1 2 3 4 5 6 7 8 9 10 11
$ curl -X POST -is -u username:password \ -H 'Content-Type: application/json' \ https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \ -d ' { "target": { "ref_type": "branch", "type": "pipeline_ref_target", "ref_name": "master" } }'
You can initiate a pipeline for a specific commit and in the context of a specified reference (e.g. a branch, tag or bookmark). The specified reference will be used to determine which pipeline definition from the bitbucket-pipelines.yml file will be applied to initiate the pipeline. The pipeline will clone the repository and then do a checkout the specified reference.
The following reference types are supported:
branch
named_branch
bookmark
tag
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$ curl -X POST -is -u username:password \ -H 'Content-Type: application/json' \ https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \ -d ' { "target": { "commit": { "type": "commit", "hash": "ce5b7431602f7cbba007062eeb55225c6e18e956" }, "ref_type": "branch", "type": "pipeline_ref_target", "ref_name": "master" } }'
You can trigger a specific pipeline that is defined in your bitbucket-pipelines.yml
file for a specific commit.
In addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition. The resulting pipeline will then clone the repository and checkout the specified revision.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
$ curl -X POST -is -u username:password \ -H 'Content-Type: application/json' \ https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \ -d ' { "target": { "commit": { "hash":"a3c4e02c9a3755eccdc3764e6ea13facdf30f923", "type":"commit" }, "selector": { "type":"custom", "pattern":"Deploy to production" }, "type":"pipeline_commit_target" } }'
You can trigger a specific pipeline that is defined in your bitbucket-pipelines.yml
file for a specific commit in the context of a specified reference.
In addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition, as well as the reference information. The resulting pipeline will then clone the repository a checkout the specified reference.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
$ curl -X POST -is -u username:password \ -H 'Content-Type: application/json' \ https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \ -d ' { "target": { "commit": { "hash":"a3c4e02c9a3755eccdc3764e6ea13facdf30f923", "type":"commit" }, "selector": { "type": "custom", "pattern": "Deploy to production" }, "type": "pipeline_ref_target", "ref_name": "master", "ref_type": "branch" } }'
In addition to triggering a custom pipeline that is defined in your bitbucket-pipelines.yml
file as shown in the examples above, you can specify variables that will be available for your build. In the request, provide a list of variables, specifying the following for each variable: key, value, and whether it should be secured or not (this field is optional and defaults to not secured).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
$ curl -X POST -is -u username:password \ -H 'Content-Type: application/json' \ https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \ -d ' { "target": { "type": "pipeline_ref_target", "ref_type": "branch", "ref_name": "master", "selector": { "type": "custom", "pattern": "Deploy to production" } }, "variables": [ { "key": "var1key", "value": "var1value", "secured": true }, { "key": "var2key", "value": "var2value" } ] }'
You can also initiate a pipeline for a specific pull request.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
$ curl -X POST -is -u username:password \ -H 'Content-Type: application/json' \ https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \ -d ' { "target": { "type": "pipeline_pullrequest_target", "source": "pull-request-branch", "destination": "master", "destination_commit": { "hash": "9f848b7" }, "commit": { "hash": "1a372fc" }, "pullrequest": { "id": "3" }, "selector": { "type": "pull-requests", "pattern": "**" } } }'
pipeline
read:pipeline:bitbucket
, write:pipeline:bitbucket
string
Requiredstring
RequiredThe pipeline to initiate.
allOf [object, Pipeline]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Bitbucket Pipeline. This represents an actual pipeline result.
The initiated pipeline.
string
allOf [object, Pipeline]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Bitbucket Pipeline. This represents an actual pipeline result.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"build_number": 33,
"creator": {
"type": "<string>"
},
"repository": {
"type": "<string>"
},
"target": {
"type": "<string>"
},
"trigger": {
"type": "<string>"
},
"state": {
"type": "<string>"
},
"variables": [
{
"type": "<string>"
}
],
"created_on": "<string>",
"completed_on": "<string>",
"build_seconds_used": 50,
"configuration_sources": [
{
"source": "<string>",
"uri": "<string>"
}
],
"links": {
"type": "<string>"
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
"type": "<string>",
"uuid": "<string>",
"build_number": 33,
"creator": {
"type": "<string>"
},
"repository": {
"type": "<string>"
},
"target": {
"type": "<string>"
},
"trigger": {
"type": "<string>"
},
"state": {
"type": "<string>"
},
"variables": [
{
"type": "<string>"
}
],
"created_on": "<string>",
"completed_on": "<string>",
"build_seconds_used": 50,
"configuration_sources": [
{
"source": "<string>",
"uri": "<string>"
}
],
"links": {
"type": "<string>"
}
}
Retrieve the repository pipelines caches.
pipeline
read:pipeline:bitbucket
string
Requiredstring
RequiredThe list of caches for the given repository.
A paged list of pipeline caches
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"pipeline_uuid": "<string>",
"step_uuid": "<string>",
"name": "<string>",
"key_hash": "<string>",
"path": "<string>",
"file_size_bytes": 57,
"created_on": "<string>"
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Delete repository cache versions by name.
pipeline:write
write:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe caches were deleted.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches?name={name}' \
--header 'Authorization: Bearer <access_token>'
Delete a repository cache.
pipeline:write
write:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe cache was deleted.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}' \
--header 'Authorization: Bearer <access_token>'
Retrieve the URI of the content of the specified cache.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe cache content uri.
A representation of the location of pipeline cache content.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
{
"uri": "<string>"
}
Retrieve a specified pipeline
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe pipeline.
allOf [object, Pipeline]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Bitbucket Pipeline. This represents an actual pipeline result.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
"type": "<string>",
"uuid": "<string>",
"build_number": 33,
"creator": {
"type": "<string>"
},
"repository": {
"type": "<string>"
},
"target": {
"type": "<string>"
},
"trigger": {
"type": "<string>"
},
"state": {
"type": "<string>"
},
"variables": [
{
"type": "<string>"
}
],
"created_on": "<string>",
"completed_on": "<string>",
"build_seconds_used": 50,
"configuration_sources": [
{
"source": "<string>",
"uri": "<string>"
}
],
"links": {
"type": "<string>"
}
}
Find steps for the given pipeline.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe steps.
A paged list of pipeline steps.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"started_on": "<string>",
"completed_on": "<string>",
"state": {
"type": "<string>"
},
"image": {},
"setup_commands": [
{}
],
"script_commands": [
{}
]
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Retrieve a given step of a pipeline.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe step.
allOf [object, Pipeline Step]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A step of a Bitbucket pipeline. This represents the actual result of the step execution.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
"type": "<string>",
"uuid": "<string>",
"started_on": "<string>",
"completed_on": "<string>",
"state": {
"type": "<string>"
},
"image": {
"name": "<string>",
"username": "<string>",
"password": "<string>",
"email": "<string>"
},
"setup_commands": [
{
"name": "<string>",
"command": "<string>"
}
],
"script_commands": [
{
"name": "<string>",
"command": "<string>"
}
]
}
Retrieve the log file for a given step of a pipeline.
This endpoint supports (and encourages!) the use of HTTP Range requests to deal with potentially very large log files.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe raw log file for this pipeline step.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log' \
--header 'Authorization: Bearer <access_token>'
Retrieve the log file for a build container or service container.
This endpoint supports (and encourages!) the use of HTTP Range requests to deal with potentially very large log files.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
Requiredstring
Requiredstring
RequiredThe raw log file for the build container or service container.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}' \
--header 'Authorization: Bearer <access_token>'
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
Requiredstring
RequiredA summary of test reports for this pipeline step.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports' \
--header 'Authorization: Bearer <access_token>'
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
Requiredstring
RequiredTest cases for this pipeline step.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases' \
--header 'Authorization: Bearer <access_token>'
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
Requiredstring
Requiredstring
RequiredTest case reasons (output).
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons' \
--header 'Authorization: Bearer <access_token>'
Signal the stop of a pipeline and all of its steps that not have completed yet.
pipeline:write
write:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe pipeline has been signaled to stop.
1
2
3
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline' \
--header 'Authorization: Bearer <access_token>'
Retrieve the repository pipelines configuration.
repository:admin
admin:repository:bitbucket
string
Requiredstring
RequiredThe repository pipelines configuration.
allOf [object, Pipelines Configuration]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
The Pipelines configuration for a repository.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
{
"type": "<string>",
"enabled": true,
"repository": {
"type": "<string>"
}
}
Update the pipelines configuration for a repository.
repository:admin
admin:repository:bitbucket
string
Requiredstring
RequiredThe updated repository pipelines configuration.
allOf [object, Pipelines Configuration]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
The Pipelines configuration for a repository.
The repository pipelines configuration was updated.
allOf [object, Pipelines Configuration]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
The Pipelines configuration for a repository.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"enabled": true,
"repository": {
"type": "<string>"
}
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"enabled": true,
"repository": {
"type": "<string>"
}
}
Update the next build number that should be assigned to a pipeline. The next build number that will be configured has to be strictly higher than the current latest build number for this repository.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
RequiredThe build number to update.
allOf [object, Pipeline Build Number]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines build number.
The build number has been configured.
allOf [object, Pipeline Build Number]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines build number.
1
2
3
4
5
6
7
8
9
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/build_number' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"next": 50
}'
1
2
3
4
{
"type": "<string>",
"next": 50
}
Retrieve the configured schedules for the given repository.
pipeline
read:pipeline:bitbucket
string
Requiredstring
RequiredThe list of schedules.
A paged list of schedules
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/schedules' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"enabled": true,
"target": {
"type": "<string>"
},
"cron_pattern": "<string>",
"created_on": "<string>",
"updated_on": "<string>"
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Create a schedule for the given repository.
pipeline:write
read:pipeline:bitbucket
, write:pipeline:bitbucket
string
Requiredstring
RequiredThe schedule to create.
allOf [object, Request body for Pipeline Schedule POST request]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
The created schedule.
string
allOf [object, Pipeline Schedule]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines schedule.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/schedules' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"target": {
"selector": {
"type": "<string>"
},
"ref_name": "<string>",
"ref_type": "branch"
},
"enabled": true,
"cron_pattern": "<string>"
}'
1
2
3
4
5
6
7
8
9
10
11
{
"type": "<string>",
"uuid": "<string>",
"enabled": true,
"target": {
"type": "<string>"
},
"cron_pattern": "<string>",
"created_on": "<string>",
"updated_on": "<string>"
}
Retrieve a schedule by its UUID.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe requested schedule.
allOf [object, Pipeline Schedule]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines schedule.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
{
"type": "<string>",
"uuid": "<string>",
"enabled": true,
"target": {
"type": "<string>"
},
"cron_pattern": "<string>",
"created_on": "<string>",
"updated_on": "<string>"
}
Update a schedule.
pipeline:write
read:pipeline:bitbucket
, write:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe schedule to update.
allOf [object, Request body for Pipeline Schedule PUT request]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
The schedule is updated.
allOf [object, Pipeline Schedule]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines schedule.
1
2
3
4
5
6
7
8
9
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"enabled": true
}'
1
2
3
4
5
6
7
8
9
10
11
{
"type": "<string>",
"uuid": "<string>",
"enabled": true,
"target": {
"type": "<string>"
},
"cron_pattern": "<string>",
"created_on": "<string>",
"updated_on": "<string>"
}
Delete a schedule.
pipeline:write
write:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe schedule was deleted.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}' \
--header 'Authorization: Bearer <access_token>'
Retrieve the executions of a given schedule.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe list of executions of a schedule.
A paged list of the executions of a schedule.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
{
"page": 102,
"values": [
{
"type": "<string>"
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Retrieve the repository SSH key pair excluding the SSH private key. The private key is a write only field and will never be exposed in the logs or the REST API.
pipeline
read:pipeline:bitbucket
string
Requiredstring
RequiredThe SSH key pair.
allOf [object, Pipeline SSH Key Pair]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines SSH key pair.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
{
"type": "<string>",
"private_key": "<string>",
"public_key": "<string>"
}
Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
RequiredThe created or updated SSH key pair.
allOf [object, Pipeline SSH Key Pair]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines SSH key pair.
The SSH key pair was created or updated.
allOf [object, Pipeline SSH Key Pair]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines SSH key pair.
1
2
3
4
5
6
7
8
9
10
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"private_key": "<string>",
"public_key": "<string>"
}'
1
2
3
4
5
{
"type": "<string>",
"private_key": "<string>",
"public_key": "<string>"
}
Delete the repository SSH key pair.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
RequiredThe SSH key pair was deleted.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair' \
--header 'Authorization: Bearer <access_token>'
Find repository level known hosts.
pipeline
read:pipeline:bitbucket
string
Requiredstring
RequiredThe retrieved known hosts.
A paged list of known hosts.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"hostname": "<string>",
"public_key": {
"type": "<string>"
}
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Create a repository level known host.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
RequiredThe known host to create.
allOf [object, Pipeline Known Host]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines known host.
The known host was created.
string
allOf [object, Pipeline Known Host]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines known host.
1
2
3
4
5
6
7
8
9
10
11
12
13
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"hostname": "<string>",
"public_key": {
"type": "<string>"
}
}'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"uuid": "<string>",
"hostname": "<string>",
"public_key": {
"type": "<string>"
}
}
Retrieve a repository level known host.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe known host.
allOf [object, Pipeline Known Host]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines known host.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"uuid": "<string>",
"hostname": "<string>",
"public_key": {
"type": "<string>"
}
}
Update a repository level known host.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe updated known host.
allOf [object, Pipeline Known Host]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines known host.
The known host was updated.
allOf [object, Pipeline Known Host]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines known host.
1
2
3
4
5
6
7
8
9
10
11
12
13
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"hostname": "<string>",
"public_key": {
"type": "<string>"
}
}'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"uuid": "<string>",
"hostname": "<string>",
"public_key": {
"type": "<string>"
}
}
Delete a repository level known host.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe known host was deleted.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}' \
--header 'Authorization: Bearer <access_token>'
Find repository level variables.
pipeline
read:pipeline:bitbucket
string
Requiredstring
RequiredThe retrieved variables.
A paged list of variables.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Create a repository level variable.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
RequiredThe variable to create.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
The variable was created.
string
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Retrieve a repository level variable.
pipeline
read:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe variable.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Update a repository level variable.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe updated variable
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
The variable was updated.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Delete a repository level variable.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
Requiredstring
RequiredThe variable was deleted.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>'
Find account level variables. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline
string
RequiredThe found account level variables.
A paged list of variables.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/teams/{username}/pipelines_config/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Create an account level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline:variable
string
RequiredThe variable to create.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
The created variable.
string
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'https://api.bitbucket.org/2.0/teams/{username}/pipelines_config/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Retrieve a team level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline
string
Requiredstring
RequiredThe variable.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/teams/{username}/pipelines_config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Update a team level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline:variable
string
Requiredstring
RequiredThe updated variable.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
The variable was updated.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/teams/{username}/pipelines_config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Delete a team level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline:variable
string
Requiredstring
RequiredThe variable was deleted
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/teams/{username}/pipelines_config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>'
Find user level variables. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline
string
RequiredThe found user level variables.
A paged list of variables.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/users/{selected_user}/pipelines_config/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Create a user level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline:variable
string
RequiredThe variable to create.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
The created variable.
string
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'https://api.bitbucket.org/2.0/users/{selected_user}/pipelines_config/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Retrieve a user level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline
string
Requiredstring
RequiredThe variable.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/users/{selected_user}/pipelines_config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Update a user level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline:variable
string
Requiredstring
RequiredThe updated variable.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
The variable was updated.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/users/{selected_user}/pipelines_config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Delete an account level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see the announcement.
pipeline:variable
string
Requiredstring
RequiredThe variable was deleted
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/users/{selected_user}/pipelines_config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>'
This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/
string
RequiredThe OpenID configuration
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/pipelines-config/identity/oidc/.well-known/openid-configuration' \
--header 'Authorization: Bearer <access_token>'
This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/
string
RequiredThe keys in JSON web key format
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/pipelines-config/identity/oidc/keys.json' \
--header 'Authorization: Bearer <access_token>'
Find workspace level variables.
pipeline
read:pipeline:bitbucket
string
RequiredThe found workspace level variables.
A paged list of variables.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/pipelines-config/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"page": 102,
"values": [
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
],
"size": 142,
"pagelen": 159,
"next": "<string>",
"previous": "<string>"
}
Create a workspace level variable.
pipeline:variable
admin:pipeline:bitbucket
string
RequiredThe variable to create.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
The created variable.
string
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request POST \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/pipelines-config/variables' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Retrieve a workspace level variable.
pipeline
read:pipeline:bitbucket
string
Requiredstring
RequiredThe variable.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Update a workspace level variable.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
RequiredThe updated variable.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
The variable was updated.
allOf [object, Pipeline Variable]
Base type for most resource objects. It defines the common type
element that identifies an object's type. It also identifies the element as Swagger's discriminator
.
A Pipelines variable.
1
2
3
4
5
6
7
8
9
10
11
12
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}'
1
2
3
4
5
6
7
{
"type": "<string>",
"uuid": "<string>",
"key": "<string>",
"value": "<string>",
"secured": true
}
Delete a workspace level variable.
pipeline:variable
admin:pipeline:bitbucket
string
Requiredstring
RequiredThe variable was deleted
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}' \
--header 'Authorization: Bearer <access_token>'
Rate this page: