Deployments 8 endpoints

POST /repositories/{workspace}/{repo_slug}/environments

Create an environment.

operationId: Deployments_createEnvironment

Parameters

Name In Required Type Description
workspace path required string

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

repo_slug path required string

The repository.

Request Body

required

The environment to create.

application/json
schema deployment_environment
Property Type Required
type string required
name string optional
uuid string optional

Responses

201

The environment was created.

404

The account or repository does not exist.

409

An environment host with the provided name already exists.

POST /repositories/{workspace}/{repo_slug}/environments
DELETE /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}

Delete an environment

operationId: Deployments_deleteEnvironment

Parameters

Name In Required Type Description
workspace path required string

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

repo_slug path required string

The repository.

environment_uuid path required string

The environment UUID.

Responses

204

The environment was deleted.

404

No account or repository with the UUID provided exists.

DELETE /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}
GET /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}

Retrieve an environment

operationId: Deployments_getEnvironment

Parameters

Name In Required Type Description
workspace path required string

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

repo_slug path required string

The repository.

environment_uuid path required string

The environment UUID.

Responses

200

The environment.

404

No account, repository or environment with the UUID provided exists.

GET /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}
POST /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes

Update an environment

operationId: Deployments_updateEnvironment

Parameters

Name In Required Type Description
workspace path required string

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

repo_slug path required string

The repository.

environment_uuid path required string

The environment UUID.

Responses

202

The environment update request was accepted.

404

No account, repository or environment with the UUID provided exists.

POST /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes
GET /workspaces/{workspace}/projects/{project_key}/deploy-keys

Returns all deploy keys belonging to a project.

operationId: Deployments_listProjectDeployKeys

Parameters

Name In Required Type Description
project_key path required string

The project in question. This is the actual key assigned
to the project.

workspace path required string

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

Responses

200

Deploy keys matching the project

403

If the specified workspace or project is not accessible to the current user

404

If the specified workspace or project does not exist

GET /workspaces/{workspace}/projects/{project_key}/deploy-keys
POST /workspaces/{workspace}/projects/{project_key}/deploy-keys

Create a new deploy key in a project.

Example:

$ curl -X POST \
-H "Authorization <auth header>" \
-H "Content-type: application/json" \
https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/ -d \
'{
    "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8",
    "label": "mydeploykey"
}'
operationId: Deployments_createProjectDeployKey

Parameters

Name In Required Type Description
project_key path required string

The project in question. This is the actual key assigned
to the project.

workspace path required string

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

Responses

200

The project deploy key that was created

400

Invalid deploy key inputs

403

If the specified workspace or project is not accessible to the current user

404

If the specified workspace or project does not exist

POST /workspaces/{workspace}/projects/{project_key}/deploy-keys
DELETE /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}

This deletes a deploy key from a project.

operationId: Deployments_deleteDeployKeyFromProject

Parameters

Name In Required Type Description
key_id path required string

The key ID matching the project deploy key.

project_key path required string

The project in question. This is the actual key assigned
to the project.

workspace path required string

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

Responses

204

The project deploy key has been deleted

403

If the current user does not have permission to delete a key for the specified project

404

If the specified workspace, project, or project deploy key does not exist

DELETE /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}
GET /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}

Returns the deploy key belonging to a specific key ID.

operationId: Deployments_getDeployKeyById

Parameters

Name In Required Type Description
key_id path required string

The key ID matching the project deploy key.

project_key path required string

The project in question. This is the actual key assigned
to the project.

workspace path required string

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

Responses

200

Project deploy key matching the key ID

403

If the specified workspace or project is not accessible to the current user

404

If the specified workspace or project does not exist

GET /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}

Downloads 4 endpoints

GET /repositories/{workspace}/{repo_slug}/downloads

Returns a list of download links associated with the repository.

operationId: Downloads_listArtifacts

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

Returns a paginated list of the downloads associated with the repository.

403

User is not authorized to read from the repository.

GET /repositories/{workspace}/{repo_slug}/downloads
POST /repositories/{workspace}/{repo_slug}/downloads

Upload new download artifacts.

To upload files, perform a multipart/form-data POST containing one
or more files fields:

$ echo Hello World > hello.txt
$ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt

When a file is uploaded with the same name as an existing artifact,
then the existing file will be replaced.

operationId: Downloads_uploadArtifact

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

201

The artifact was uploaded sucessfully.

400

Bad Request.

403

User is not authorized to write to the repository.

406

Unsupported Content-Type. Use multiplart/form-data.

POST /repositories/{workspace}/{repo_slug}/downloads
DELETE /repositories/{workspace}/{repo_slug}/downloads/{filename}

Deletes the specified download artifact from the repository.

operationId: Downloads_deleteArtifact

Parameters

Name In Required Type Description
filename path required string

Name of the file.

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

204

The specified download artifact was deleted.

403

User is not authorized to write to the repository.

404

The specified download does not exist.

DELETE /repositories/{workspace}/{repo_slug}/downloads/{filename}
GET /repositories/{workspace}/{repo_slug}/downloads/{filename}

Return a redirect to the contents of a download artifact.

This endpoint returns the actual file contents and not the artifact’s
metadata.

$ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt
Hello World
operationId: Downloads_artifactLinkGet

Parameters

Name In Required Type Description
filename path required string

Name of the file.

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

OK

302

Redirects to the url of the specified download artifact.

403

User is not authorized to read from the repository.

404

The specified download artifact does not exist.

GET /repositories/{workspace}/{repo_slug}/downloads/{filename}

Issuetracker 33 endpoints

GET /repositories/{workspace}/{repo_slug}/components

Returns the components that have been defined in the issue tracker.

This resource is only available on repositories that have the issue
tracker enabled.

operationId: IssueTracker_listComponents

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The components that have been defined in the issue tracker.

404

The specified repository does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/components
GET /repositories/{workspace}/{repo_slug}/components/{component_id}

Returns the specified issue tracker component object.

operationId: IssueTracker_getComponent

Parameters

Name In Required Type Description
component_id path required integer

The component’s id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The specified component object.

404

The specified repository or component does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/components/{component_id}
GET /repositories/{workspace}/{repo_slug}/issues

Returns the issues in the issue tracker.

operationId: IssueTracker_listIssuesInWorkspace

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

A paginated list of the issues matching any filter criteria that were provided.

404

The specified repository does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/issues
POST /repositories/{workspace}/{repo_slug}/issues

Creates a new issue.

This call requires authentication. Private repositories or private
issue trackers require the caller to authenticate with an account that
has appropriate authorization.

The authenticated user is used for the issue’s reporter field.

operationId: IssueTracker_createNewIssue

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Request Body

required

The new issue. The only required element is title. All other elements can be omitted from the body.

application/json
schema issue
Property Type Required
type string required
id integer optional
kind string optional
links object optional
html object optional
href string optional
name string optional
self object optional
href string optional
name string optional
vote object optional
href string optional
name string optional
watch object optional
href string optional
name string optional
comments object optional
href string optional
name string optional
attachments object optional
href string optional
name string optional
state string optional
title string optional
votes integer optional
content object optional
raw string optional
html string optional
markup string optional
version object optional
type string required
id integer optional
name string optional
links object optional
self object optional
href string optional
name string optional
assignee object optional
type string required
uuid string optional
links object optional
avatar object optional
href string optional
name string optional
username string optional
created_on string optional
display_name string optional
priority string optional
reporter object optional
type string required
uuid string optional
links object optional
avatar object optional
href string optional
name string optional
username string optional
created_on string optional
display_name string optional
component object optional
type string required
id integer optional
name string optional
links object optional
self object optional
href string optional
name string optional
edited_on string optional
milestone object optional
type string required
id integer optional
name string optional
links object optional
self object optional
href string optional
name string optional
created_on string optional
repository object optional
type string required
scm string optional
name string optional
size integer optional
uuid string optional
links object optional
html object optional
href string optional
name string optional
self object optional
href string optional
name string optional
clone array optional
href string optional
name string optional
forks object optional
href string optional
name string optional
hooks object optional
href string optional
name string optional
avatar object optional
href string optional
name string optional
commits object optional
href string optional
name string optional
watchers object optional
href string optional
name string optional
downloads object optional
href string optional
name string optional
pullrequests object optional
href string optional
name string optional
owner object optional
type string required
uuid string optional
links object optional
avatar object optional
username string optional
created_on string optional
display_name string optional
parent object optional
project object optional
type string required
key string optional
name string optional
uuid string optional
links object optional
html object optional
avatar object optional
owner object optional
type string required
uuid string optional
links object optional
username string optional
created_on string optional
display_name string optional
created_on string optional
is_private boolean optional
updated_on string optional
description string optional
has_publicly_visible_repos boolean optional
has_wiki boolean optional
language string optional
full_name string optional
created_on string optional
has_issues boolean optional
is_private boolean optional
mainbranch object optional
name string optional
type string required
links object optional
html object optional
self object optional
commits object optional
target object optional
type string required
date string optional
hash string optional
author object optional
message string optional
parents array optional
summary object optional
repository object optional
participants array optional
merge_strategies array optional
default_merge_strategy string optional
updated_on string optional
description string optional
fork_policy string optional
updated_on string optional

Responses

201

The newly created issue.

401

When the request wasn’t authenticated.

403

When the authenticated user isn’t authorized to create the issue.

404

The specified repository does not exist or does not have the issue tracker enabled.

POST /repositories/{workspace}/{repo_slug}/issues
POST /repositories/{workspace}/{repo_slug}/issues/export

A POST request to this endpoint initiates a new background celery task that archives the repo’s issues.

When the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the
‘Location’ response header. This url is the endpoint for where the user can obtain their zip files.”

operationId: IssueTracker_initiateJob

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Request Body

The options to apply to the export. Available options include project_key and project_name which, if specified, are used as the project key and name in the exported Jira json format. Option send_email specifies whether an email should be sent upon export result. Option include_attachments specifies whether attachments are included in the export.

application/json
schema export_options
Property Type Required
type string required
send_email boolean optional
project_key string optional
project_name string optional
include_attachments boolean optional

Responses

202

The export job has been accepted

401

The request wasn’t authenticated properly

403

When the authenticated user does not have admin permission on the repo

404

The repo does not exist or does not have an issue tracker

POST /repositories/{workspace}/{repo_slug}/issues/export
GET /repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zip

This endpoint is used to poll for the progress of an issue export
job and return the zip file after the job is complete.
As long as the job is running, this will return a 202 response
with in the response body a description of the current status.

After the job has been scheduled, but before it starts executing, the endpoint
returns a 202 response with status ACCEPTED.

Once it starts running, it is a 202 response with status STARTED and progress filled.

After it is finished, it becomes a 200 response with status SUCCESS or FAILURE.

operationId: IssueTracker_checkExportStatus

Parameters

Name In Required Type Description
repo_name path required string

The name of the repo

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

task_id path required string

The ID of the export task

workspace path required string

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

Responses

202

Export job accepted

401

The request wasn’t authenticated properly

403

When the authenticated user does not have admin permission on the repo

404

No export job has begun

GET /repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zip
GET /repositories/{workspace}/{repo_slug}/issues/import

When using GET, this endpoint reports the status of the current import task.

After the job has been scheduled, but before it starts executing, the endpoint
returns a 202 response with status ACCEPTED.

Once it starts running, it is a 202 response with status STARTED and progress filled.

After it is finished, it becomes a 200 response with status SUCCESS or FAILURE.

operationId: IssueTracker_checkImportStatus

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

Import job complete with either FAILURE or SUCCESS status

202

Import job started

401

The request wasn’t authenticated properly

403

When the authenticated user does not have admin permission on the repo

404

No export job has begun

GET /repositories/{workspace}/{repo_slug}/issues/import
POST /repositories/{workspace}/{repo_slug}/issues/import

A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All
existing issues will be deleted and replaced by the contents of the imported zip file.

Imports are done through a multipart/form-data POST. There is one valid and required form field, with the name
“archive,” which needs to be a file field:

$ curl -u <username> -X POST -F archive=@/path/to/file.zip https://api.bitbucket.org/2.0/repositories/<owner_username>/<repo_slug>/issues/import
operationId: IssueTracker_importIssuesFromZip

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

202

Import job accepted

401

The request wasn’t authenticated properly

403

When the authenticated user does not have admin permission on the repo

404

No export job has begun

409

Import already running

POST /repositories/{workspace}/{repo_slug}/issues/import
DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}

Deletes the specified issue. This requires write access to the
repository.

operationId: IssueTracker_deleteIssue

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The issue object.

403

When the authenticated user isn’t authorized to delete the issue.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}
GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}

Returns the specified issue.

operationId: IssueTracker_getIssueById

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The issue object.

403

When the authenticated user isn’t authorized to access the issue.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

410

The specified issue is unavailable.

GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}
PUT /repositories/{workspace}/{repo_slug}/issues/{issue_id}

Modifies the issue.

$ curl https://api.bitbucket.org/2.0/repostories/evzijst/dogslow/issues/123 \
  -u evzijst -s -X PUT -H 'Content-Type: application/json' \
  -d '{
  "title": "Updated title",
  "assignee": {
    "account_id": "5d5355e8c6b9320d9ea5b28d"
  },
  "priority": "minor",
  "version": {
    "name": "1.0"
  },
  "component": null
}'

This example changes the title, assignee, priority and the
version. It also removes the value of the component from the issue
by setting the field to null. Any field not present keeps its existing
value.

Each time an issue is edited in the UI or through the API, an immutable
change record is created under the /issues/123/changes endpoint. It
also has a comment associated with the change.

operationId: IssueTracker_updateIssue

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The updated issue object.

403

When the authenticated user isn’t authorized to access the issue.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

PUT /repositories/{workspace}/{repo_slug}/issues/{issue_id}
GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments

Returns all attachments for this issue.

This returns the files’ meta data. This does not return the files’
actual contents.

The files are always ordered by their upload date.

operationId: IssueTracker_listAttachmentsForIssue

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

A paginated list of all attachments for this issue.

401

If the issue tracker is private and the request was not authenticated.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments
POST /repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments

Upload new issue attachments.

To upload files, perform a multipart/form-data POST containing one
or more file fields.

When a file is uploaded with the same name as an existing attachment,
then the existing file will be replaced.

operationId: IssueTracker_uploadAttachment

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

201

An empty response document.

400

If no files were uploaded, or if the wrong Content-Type was used.

401

If the issue tracker is private and the request was not authenticated.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

POST /repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments
DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}

Deletes an attachment.

operationId: IssueTracker_deleteAttachment

Parameters

Name In Required Type Description
issue_id path required string

The issue id

path path required string

Path to the file.

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

204

Indicates that the deletion was successful

401

If the issue tracker is private and the request was not authenticated.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}
GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}

Returns the contents of the specified file attachment.

Note that this endpoint does not return a JSON response, but instead
returns a redirect pointing to the actual file that in turn will return
the raw contents.

The redirect URL contains a one-time token that has a limited lifetime.
As a result, the link should not be persisted, stored, or shared.

operationId: IssueTracker_getAttachmentContents

Parameters

Name In Required Type Description
issue_id path required string

The issue id

path path required string

Path to the file.

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

OK

302

A redirect to the file’s contents

401

If the issue tracker is private and the request was not authenticated.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}
GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes

Returns the list of all changes that have been made to the specified
issue. Changes are returned in chronological order with the oldest
change first.

Each time an issue is edited in the UI or through the API, an immutable
change record is created under the /issues/123/changes endpoint. It
also has a comment associated with the change.

Note that this operation is changing significantly, due to privacy changes.
See the announcement
for details.

Changes support filtering and sorting that
can be used to search for specific changes. For instance, to see
when an issue transitioned to “resolved”:

$ curl -s https://api.bitbucket.org/2.0/repositories/site/master/issues/1/changes \
   -G --data-urlencode='q=changes.state.new = "resolved"'

This resource is only available on repositories that have the issue
tracker enabled.

N.B.

The changes.assignee and changes.assignee_account_id fields are not
a user object. Instead, they contain the raw username and
account_id of the user. This is to protect the integrity of the audit
log even after a user account gets deleted.

The changes.assignee field is deprecated will disappear in the
future. Use changes.assignee_account_id instead.

operationId: IssueTracker_listIssueChanges

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

q query optional string

Query string to narrow down the response. See
filtering and sorting for details.

sort query optional string

Name of a response property to sort results. See
filtering and sorting
for details.

Responses

200

Returns all the issue changes that were made on the specified issue.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes
POST /repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes

Makes a change to the specified issue.

For example, to change an issue’s state and assignee, create a new
change object that modifies these fields:

curl https://api.bitbucket.org/2.0/site/master/issues/1234/changes \
  -s -u evzijst -X POST -H "Content-Type: application/json" \
  -d '{
    "changes": {
      "assignee_account_id": {
        "new": "557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443"
      },
      "state": {
        "new": 'resolved"
      }
    }
    "message": {
      "raw": "This is now resolved."
    }
  }'

The above example also includes a custom comment to go alongside the
change. This comment will also be visible on the issue page in the UI.

The fields of the changes object are strings, not objects. This
allows for immutable change log records, even after user accounts,
milestones, or other objects recorded in a change entry, get renamed or
deleted.

The assignee_account_id field stores the account id. When POSTing a
new change and changing the assignee, the client should therefore use
the user’s account_id in the changes.assignee_account_id.new field.

This call requires authentication. Private repositories or private
issue trackers require the caller to authenticate with an account that
has appropriate authorization.

operationId: IssueTracker_modifyIssueState

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Request Body

required

The new issue state change. The only required elements are changes.[].new. All other elements can be omitted from the body.

application/json
schema issue_change
Property Type Required
name string optional
type string required
user object optional
type string required
uuid string optional
links object optional
avatar object optional
href string optional
name string optional
username string optional
created_on string optional
display_name string optional
issue object optional
type string required
id integer optional
kind string optional
links object optional
html object optional
href string optional
name string optional
self object optional
href string optional
name string optional
vote object optional
href string optional
name string optional
watch object optional
href string optional
name string optional
comments object optional
href string optional
name string optional
attachments object optional
href string optional
name string optional
state string optional
title string optional
votes integer optional
content object optional
raw string optional
html string optional
markup string optional
version object optional
type string required
id integer optional
name string optional
links object optional
self object optional
assignee object optional
type string required
uuid string optional
links object optional
avatar object optional
username string optional
created_on string optional
display_name string optional
priority string optional
reporter object optional
type string required
uuid string optional
links object optional
avatar object optional
username string optional
created_on string optional
display_name string optional
component object optional
type string required
id integer optional
name string optional
links object optional
self object optional
edited_on string optional
milestone object optional
type string required
id integer optional
name string optional
links object optional
self object optional
created_on string optional
repository object optional
type string required
scm string optional
name string optional
size integer optional
uuid string optional
links object optional
html object optional
self object optional
clone array optional
forks object optional
hooks object optional
avatar object optional
commits object optional
watchers object optional
downloads object optional
pullrequests object optional
owner object optional
type string required
uuid string optional
links object optional
username string optional
created_on string optional
display_name string optional
parent object optional
project object optional
type string required
key string optional
name string optional
uuid string optional
links object optional
owner object optional
created_on string optional
is_private boolean optional
updated_on string optional
description string optional
has_publicly_visible_repos boolean optional
has_wiki boolean optional
language string optional
full_name string optional
created_on string optional
has_issues boolean optional
is_private boolean optional
mainbranch object optional
name string optional
type string required
links object optional
target object optional
merge_strategies array optional
default_merge_strategy string optional
updated_on string optional
description string optional
fork_policy string optional
updated_on string optional
links object optional
self object optional
href string optional
name string optional
issue object optional
href string optional
name string optional
changes object optional
kind object optional
new string optional
old string optional
state object optional
new string optional
old string optional
title object optional
new string optional
old string optional
content object optional
new string optional
old string optional
version object optional
new string optional
old string optional
assignee object optional
new string optional
old string optional
priority object optional
new string optional
old string optional
component object optional
new string optional
old string optional
milestone object optional
new string optional
old string optional
message object optional
raw string optional
html string optional
markup string optional
created_on string optional

Responses

201

The newly created issue change.

401

When the request wasn’t authenticated.

403

When the authenticated user isn’t authorized to modify the issue.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

POST /repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes
GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes/{change_id}

Returns the specified issue change object.

This resource is only available on repositories that have the issue
tracker enabled.

operationId: IssueTracker_getIssueChange

Parameters

Name In Required Type Description
change_id path required string

The issue change id

issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The specified issue change object.

404

The specified repository or issue change does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes/{change_id}
GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments

Returns a paginated list of all comments that were made on the
specified issue.

The default sorting is oldest to newest and can be overridden with
the sort query parameter.

This endpoint also supports filtering and sorting of the results. See
filtering and sorting for more details.

operationId: IssueTracker_listCommentsOnIssue

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

q query optional string

Query string to narrow down the response as per
filtering and sorting.

Responses

200

A paginated list of issue comments.

GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments
POST /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments

Creates a new issue comment.

$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/ \
  -X POST -u evzijst \
  -H 'Content-Type: application/json' \
  -d '{"content": {"raw": "Lorem ipsum."}}'
operationId: IssueTracker_createCommentOnIssue

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Request Body

required

The new issue comment object.

application/json
schema issue_comment
Property Type Required
type string required
id integer optional
user object optional
type string required
uuid string optional
links object optional
avatar object optional
href string optional
name string optional
username string optional
created_on string optional
display_name string optional
links object optional
code object optional
href string optional
name string optional
html object optional
href string optional
name string optional
self object optional
href string optional
name string optional
inline object optional
to integer optional
from integer optional
path string required
parent object optional
content object optional
raw string optional
html string optional
markup string optional
deleted boolean optional
created_on string optional
updated_on string optional
issue object optional
type string required
id integer optional
kind string optional
links object optional
html object optional
href string optional
name string optional
self object optional
href string optional
name string optional
vote object optional
href string optional
name string optional
watch object optional
href string optional
name string optional
comments object optional
href string optional
name string optional
attachments object optional
href string optional
name string optional
state string optional
title string optional
votes integer optional
content object optional
raw string optional
html string optional
markup string optional
version object optional
type string required
id integer optional
name string optional
links object optional
self object optional
assignee object optional
type string required
uuid string optional
links object optional
avatar object optional
username string optional
created_on string optional
display_name string optional
priority string optional
reporter object optional
type string required
uuid string optional
links object optional
avatar object optional
username string optional
created_on string optional
display_name string optional
component object optional
type string required
id integer optional
name string optional
links object optional
self object optional
edited_on string optional
milestone object optional
type string required
id integer optional
name string optional
links object optional
self object optional
created_on string optional
repository object optional
type string required
scm string optional
name string optional
size integer optional
uuid string optional
links object optional
html object optional
self object optional
clone array optional
forks object optional
hooks object optional
avatar object optional
commits object optional
watchers object optional
downloads object optional
pullrequests object optional
owner object optional
type string required
uuid string optional
links object optional
username string optional
created_on string optional
display_name string optional
parent object optional
project object optional
type string required
key string optional
name string optional
uuid string optional
links object optional
owner object optional
created_on string optional
is_private boolean optional
updated_on string optional
description string optional
has_publicly_visible_repos boolean optional
has_wiki boolean optional
language string optional
full_name string optional
created_on string optional
has_issues boolean optional
is_private boolean optional
mainbranch object optional
name string optional
type string required
links object optional
target object optional
merge_strategies array optional
default_merge_strategy string optional
updated_on string optional
description string optional
fork_policy string optional
updated_on string optional

Responses

201

The newly created comment.

400

If the input was invalid, or if the comment being created is detected as spam

POST /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments
DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}

Deletes the specified comment.

operationId: IssueTracker_deleteComment

Parameters

Name In Required Type Description
comment_id path required integer

The id of the comment.

issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

204

Indicates successful deletion.

DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}
GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}

Returns the specified issue comment object.

operationId: IssueTracker_getComment

Parameters

Name In Required Type Description
comment_id path required integer

The id of the comment.

issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The issue comment.

GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}
PUT /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}

Updates the content of the specified issue comment. Note that only
the content.raw field can be modified.

$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/5728901 \
  -X PUT -u evzijst \
  -H 'Content-Type: application/json' \
  -d '{"content": {"raw": "Lorem ipsum."}'
operationId: IssueTracker_updateIssueCommentContent

Parameters

Name In Required Type Description
comment_id path required integer

The id of the comment.

issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Request Body

required

The updated comment.

application/json
schema issue_comment
Property Type Required
type string required
id integer optional
user object optional
type string required
uuid string optional
links object optional
avatar object optional
href string optional
name string optional
username string optional
created_on string optional
display_name string optional
links object optional
code object optional
href string optional
name string optional
html object optional
href string optional
name string optional
self object optional
href string optional
name string optional
inline object optional
to integer optional
from integer optional
path string required
parent object optional
content object optional
raw string optional
html string optional
markup string optional
deleted boolean optional
created_on string optional
updated_on string optional
issue object optional
type string required
id integer optional
kind string optional
links object optional
html object optional
href string optional
name string optional
self object optional
href string optional
name string optional
vote object optional
href string optional
name string optional
watch object optional
href string optional
name string optional
comments object optional
href string optional
name string optional
attachments object optional
href string optional
name string optional
state string optional
title string optional
votes integer optional
content object optional
raw string optional
html string optional
markup string optional
version object optional
type string required
id integer optional
name string optional
links object optional
self object optional
assignee object optional
type string required
uuid string optional
links object optional
avatar object optional
username string optional
created_on string optional
display_name string optional
priority string optional
reporter object optional
type string required
uuid string optional
links object optional
avatar object optional
username string optional
created_on string optional
display_name string optional
component object optional
type string required
id integer optional
name string optional
links object optional
self object optional
edited_on string optional
milestone object optional
type string required
id integer optional
name string optional
links object optional
self object optional
created_on string optional
repository object optional
type string required
scm string optional
name string optional
size integer optional
uuid string optional
links object optional
html object optional
self object optional
clone array optional
forks object optional
hooks object optional
avatar object optional
commits object optional
watchers object optional
downloads object optional
pullrequests object optional
owner object optional
type string required
uuid string optional
links object optional
username string optional
created_on string optional
display_name string optional
parent object optional
project object optional
type string required
key string optional
name string optional
uuid string optional
links object optional
owner object optional
created_on string optional
is_private boolean optional
updated_on string optional
description string optional
has_publicly_visible_repos boolean optional
has_wiki boolean optional
language string optional
full_name string optional
created_on string optional
has_issues boolean optional
is_private boolean optional
mainbranch object optional
name string optional
type string required
links object optional
target object optional
merge_strategies array optional
default_merge_strategy string optional
updated_on string optional
description string optional
fork_policy string optional
updated_on string optional

Responses

200

The updated issue comment.

400

If the input was invalid, or if the update to the comment is detected as spam

PUT /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}
DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote

Retract your vote.

operationId: IssueTracker_removeVote

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

default

Unexpected error.

DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote
GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote

Check whether the authenticated user has voted for this issue.
A 204 status code indicates that the user has voted, while a 404
implies they haven’t.

operationId: IssueTracker_checkUserVoted

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

204

If the authenticated user has not voted for this issue.

401

When the request wasn’t authenticated.

404

If the authenticated user has not voted for this issue, or when the repo does not exist, or does not have an issue tracker.

GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote
PUT /repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote

Vote for this issue.

To cast your vote, do an empty PUT. The 204 status code indicates that
the operation was successful.

operationId: IssueTracker_voteForIssue

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

204

Indicating the authenticated user has cast their vote successfully.

401

When the request wasn’t authenticated.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

PUT /repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote
DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch

Stop watching this issue.

operationId: IssueTracker_stopWatchingIssue

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

204

Indicates that the authenticated user successfully stopped watching this issue.

401

When the request wasn’t authenticated.

404

The specified repository or issue does not exist or does not have the issue tracker enabled.

DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch
GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch

Indicated whether or not the authenticated user is watching this
issue.

operationId: IssueTracker_checkIfWatchingIssue

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

204

If the authenticated user is watching this issue.

401

When the request wasn’t authenticated.

404

If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.

GET /repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch
PUT /repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch

Start watching this issue.

To start watching this issue, do an empty PUT. The 204 status code
indicates that the operation was successful.

operationId: IssueTracker_watchIssue

Parameters

Name In Required Type Description
issue_id path required string

The issue id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

204

Indicates that the authenticated user successfully started watching this issue.

401

When the request wasn’t authenticated.

404

If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.

PUT /repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch
GET /repositories/{workspace}/{repo_slug}/milestones

Returns the milestones that have been defined in the issue tracker.

This resource is only available on repositories that have the issue
tracker enabled.

operationId: IssueTracker_listMilestones

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The milestones that have been defined in the issue tracker.

404

The specified repository does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/milestones
GET /repositories/{workspace}/{repo_slug}/milestones/{milestone_id}

Returns the specified issue tracker milestone object.

operationId: IssueTracker_getMilestone

Parameters

Name In Required Type Description
milestone_id path required integer

The milestone’s id

repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The specified milestone object.

404

The specified repository or milestone does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/milestones/{milestone_id}
GET /repositories/{workspace}/{repo_slug}/versions

Returns the versions that have been defined in the issue tracker.

This resource is only available on repositories that have the issue
tracker enabled.

operationId: IssueTracker_listDefinedVersions

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

workspace path required string

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

Responses

200

The versions that have been defined in the issue tracker.

404

The specified repository does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/versions
GET /repositories/{workspace}/{repo_slug}/versions/{version_id}

Returns the specified issue tracker version object.

operationId: IssueTracker_getDefinedVersionForIssues

Parameters

Name In Required Type Description
repo_slug path required string

This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: {repository UUID}.

version_id path required integer

The version’s id

workspace path required string

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

Responses

200

The specified version object.

404

The specified repository or version does not exist or does not have the issue tracker enabled.

GET /repositories/{workspace}/{repo_slug}/versions/{version_id}

Pipelines 5 endpoints

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

Find deployment environment level variables.

operationId: Pipelines_listEnvironmentVariables

Parameters

Name In Required Type Description
workspace path required string

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

repo_slug path required string

The repository.

environment_uuid path required string

The environment.

Responses

200

The retrieved deployment variables.

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

Create a deployment environment level variable.

operationId: Pipelines_createDeploymentEnvironmentVariable

Parameters

Name In Required Type Description
workspace path required string

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

repo_slug path required string

The repository.

environment_uuid path required string

The environment.

Request Body

required

The variable to create

application/json
schema deployment_variable
Property Type Required
type string required
key string optional
uuid string optional
value string optional
secured boolean optional

Responses

201

The variable was created.

404

The account, repository, environment or variable with the given UUID was not found.

409

A variable with the provided key already exists.

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

Delete a deployment environment level variable.

operationId: Pipelines_deleteVariableForEnvironment

Parameters

Name In Required Type Description
workspace path required string

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

repo_slug path required string

The repository.

environment_uuid path required string

The environment.

variable_uuid path required string

The UUID of the variable to delete.

Responses

204

The variable was deleted.

404

The account, repository, environment or variable with given UUID was not found.

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

Update a deployment environment level variable.

operationId: Pipelines_updateEnvironmentVariable

Parameters

Name In Required Type Description
workspace path required string

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

repo_slug path required string

The repository.

environment_uuid path required string

The environment.

variable_uuid path required string

The UUID of the variable to update.

Request Body

required

The updated deployment variable.

application/json
schema deployment_variable
Property Type Required
type string required
key string optional
uuid string optional
value string optional
secured boolean optional

Responses

200

The deployment variable was updated.

404

The account, repository, environment or variable with the given UUID was not found.

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

Find pipelines

operationId: Pipelines_list

Parameters

Name In Required Type Description
workspace path required string

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

repo_slug path required string

The repository.

Responses

200

The matching pipelines.

GET /repositories/{workspace}/{repo_slug}/pipelines
Load more endpoints