Bitbucket

Git code hosting and collaboration

developer.atlassian.com/cloud/bitbucket/rest ↗
Version
2.0
OpenAPI
3.0.0
Endpoints
318
Schemas
216
Updated
3 days ago
Developer tools git code-hosting developer-tools
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

https://api.bitbucket.org/2.0

Authentication

basic oauth2 apiKey

Endpoints

Addon 10 endpoints

DELETE /addon

Deletes the application for the user. This endpoint is intended to be used by Bitbucket Connect apps and only supports JWT authentication -- that is how Bitbucket identifies the particular installation of the app. Developers with applications registered in the "Develop Apps" section of Bitbucket Marketplace need not use this endpoint as updates for those applications can be sent out via the UI of that section. ``` $ curl -X DELETE https://api.bitbucket.org/2.0/addon \ -H "Authorization: JWT <JWT Token>" ```

operationId: Addon_deleteUserApp

Responses

204 Request has succeeded. The application has been deleted for the user.
401 No authorization.
403 Improper authentication.
DELETE /addon
PUT /addon

Updates the application installation for the user. This endpoint is intended to be used by Bitbucket Connect apps and only supports JWT authentication -- that is how Bitbucket identifies the particular installation of the app. Developers with applications registered in the "Develop Apps" section of Bitbucket need not use this endpoint as updates for those applications can be sent out via the UI of that section. Passing an empty body will update the installation using the existing descriptor URL. ``` $ curl -X PUT https://api.bitbucket.org/2.0/addon \ -H "Authorization: JWT <JWT Token>" \ --header "Content-Type: application/json" \ --data '{}' ``` The new `descriptor` for the installation can be also provided in the body directly. ``` $ curl -X PUT https://api.bitbucket.org/2.0/addon \ -H "Authorization: JWT <JWT Token>" \ --header "Content-Type: application/json" \ --data '{"descriptor": $NEW_DESCRIPTOR}' ``` In both these modes the URL of the descriptor cannot be changed. To change the descriptor location and upgrade an installation the request must be made exclusively with a `descriptor_url`. ``` $ curl -X PUT https://api.bitbucket.org/2.0/addon \ -H "Authorization: JWT <JWT Token>" \ --header "Content-Type: application/json" \ --data '{"descriptor_url": $NEW_URL}' ``` The `descriptor_url` must exactly match the marketplace registration that Atlassian has for the application. Contact your Atlassian developer advocate to update this registration. Once the registration has been updated you may call this resource for each installation. Note that the scopes of the application cannot be increased in the new descriptor nor reduced to none.

operationId: Addon_updateAppInstallation

Responses

204 Request has succeeded. The installation has been updated to the new descriptor.
400 Scopes have increased or decreased to none.
401 No authorization.
403 Improper authentication.
PUT /addon
GET /addon/linkers

Gets a list of all [linkers](https://dac-static.atlassian.com) for the authenticated application.

operationId: Addon_listLinkers

Responses

200 Successful.
401 Authentication must use app JWT
GET /addon/linkers
GET /addon/linkers/{linker_key}

Gets a [linker](https://dac-static.atlassian.com) specified by `linker_key` for the authenticated application.

operationId: Addon_getLinker

Responses

200 Successful.
401 Authentication must use app JWT
404 The linker does not exist.
GET /addon/linkers/{linker_key}
DELETE /addon/linkers/{linker_key}/values

Delete all [linker](https://dac-static.atlassian.com) values for the specified linker of the authenticated application.

operationId: Addon_deleteLinkerValues

Responses

204 Successfully deleted the linker values.
401 Authentication must use app JWT
404 The linker does not exist.
DELETE /addon/linkers/{linker_key}/values
GET /addon/linkers/{linker_key}/values

Gets a list of all [linker](https://dac-static.atlassian.com) values for the specified linker of the authenticated application. A linker value lets applications supply values to modify its regular expression. The base regular expression must use a Bitbucket-specific match group `(?K)` which will be translated to `([\w\-]+)`. A value must match this pattern. [Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)

operationId: Addon_listLinkerValues

Responses

200 Successful.
401 Authentication must use app JWT
404 The linker does not exist.
GET /addon/linkers/{linker_key}/values
POST /addon/linkers/{linker_key}/values

Creates a [linker](https://dac-static.atlassian.com) value for the specified linker of authenticated application. A linker value lets applications supply values to modify its regular expression. The base regular expression must use a Bitbucket-specific match group `(?K)` which will be translated to `([\w\-]+)`. A value must match this pattern. [Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)

operationId: Addon_createLinkerValue

Responses

201 Successfully created the linker value.
401 Authentication must use app JWT
404 The linker does not exist.
409 The linker already has the value being added.
POST /addon/linkers/{linker_key}/values
PUT /addon/linkers/{linker_key}/values

Bulk update [linker](https://dac-static.atlassian.com) values for the specified linker of the authenticated application. A linker value lets applications supply values to modify its regular expression. The base regular expression must use a Bitbucket-specific match group `(?K)` which will be translated to `([\w\-]+)`. A value must match this pattern. [Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)

operationId: Addon_updateLinkerValues

Responses

204 Successfully updated the linker values.
400 Invalid input.
401 Authentication must use app JWT
404 The linker does not exist.
PUT /addon/linkers/{linker_key}/values
DELETE /addon/linkers/{linker_key}/values/{value_id}

Delete a single [linker](https://dac-static.atlassian.com) value of the authenticated application.

operationId: Addon_deleteLinkerValue

Responses

204 Successfully deleted the linker value.
401 Authentication must use app JWT
404 The linker value does not exist.
DELETE /addon/linkers/{linker_key}/values/{value_id}
GET /addon/linkers/{linker_key}/values/{value_id}

Get a single [linker](https://dac-static.atlassian.com) value of the authenticated application.

operationId: Addon_getLinkerValue

Responses

200 Successful.
401 Authentication must use app JWT
404 The linker value does not exist.
GET /addon/linkers/{linker_key}/values/{value_id}

Branch restrictions 5 endpoints

GET /repositories/{workspace}/{repo_slug}/branch-restrictions

Returns a paginated list of all branch restrictions on the repository.

operationId: BranchRestrictions_listBranchRestrictions

Parameters

Name In Required Type Description
kind query optional string Branch restrictions of this type
pattern query optional string Branch restrictions applied to branches of this pattern

Responses

200 A paginated list of branch restrictions
401 If the request was not authenticated
403 If the authenticated user does not have admin access to the repository
404 If the repository does not exist
GET /repositories/{workspace}/{repo_slug}/branch-restrictions
POST /repositories/{workspace}/{repo_slug}/branch-restrictions

Creates a new branch restriction rule for a repository. `kind` describes what will be restricted. Allowed values include: `push`, `force`, `delete`, `restrict_merges`, `require_tasks_to_be_completed`, `require_approvals_to_merge`, `require_default_reviewer_approvals_to_merge`, `require_no_changes_requested`, `require_passing_builds_to_merge`, `require_commits_behind`, `reset_pullrequest_approvals_on_change`, `smart_reset_pullrequest_approvals`, `reset_pullrequest_changes_requested_on_change`, `require_all_dependencies_merged`, `enforce_merge_checks`, and `allow_auto_merge_when_builds_pass`. Different kinds of branch restrictions have different requirements: * `push` and `restrict_merges` require `users` and `groups` to be specified. Empty lists are allowed, in which case permission is denied for everybody. The restriction applies to all branches that match. There are two ways to match a branch. It is configured in `branch_match_kind`: 1. `glob`: Matches a branch against the `pattern`. A `'*'` in `pattern` will expand to match zero or more characters, and every other character matches itself. For example, `'foo*'` will match `'foo'` and `'foobar'`, but not `'barfoo'`. `'*'` will match all branches. 2. `branching_model`: Matches a branch against the repository's branching model. The `branch_type` controls the type of branch to match. Allowed values include: `production`, `development`, `bugfix`, `release`, `feature` and `hotfix`. The combination of `kind` and match must be unique. This means that two `glob` restrictions in a repository cannot have the same `kind` and `pattern`. Additionally, two `branching_model` restrictions in a repository cannot have the same `kind` and `branch_type`. `users` and `groups` are lists of users and groups that are except from the restriction. They can only be configured in `push` and `restrict_merges` restrictions. The `push` restriction stops a user pushing to matching branches unless that user is in `users` or is a member of a group in `groups`. The `restrict_merges` stops a user merging pull requests to matching branches unless that user is in `users` or is a member of a group in `groups`. Adding new users or groups to an existing restriction should be done via `PUT`. Note that branch restrictions with overlapping matchers is allowed, but the resulting behavior may be surprising.

operationId: BranchRestrictions_createRule

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/branchrestriction"
      }
    }
  },
  "required": true,
  "description": "The new rule"
}

Responses

201 A paginated list of branch restrictions
401 If the request was not authenticated
403 If the authenticated user does not have admin access to the repository
404 If the repository does not exist
POST /repositories/{workspace}/{repo_slug}/branch-restrictions
DELETE /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}

Deletes an existing branch restriction rule.

operationId: BranchRestrictions_deleteRule

Responses

204
401 If the request was not authenticated
403 If the authenticated user does not have admin access to the repository
404 If the repository or branch restriction id does not exist
DELETE /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}
GET /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}

Returns a specific branch restriction rule.

operationId: BranchRestrictions_getRule

Responses

200 The branch restriction rule
401 If the request was not authenticated
403 If the authenticated user does not have admin access to the repository
404 If the repository or branch restriction id does not exist
GET /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}
PUT /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}

Updates an existing branch restriction rule. Fields not present in the request body are ignored. See [`POST`](/cloud/bitbucket/rest/api-group-branch-restrictions/#api-repositories-workspace-repo-slug-branch-restrictions-post) for details.

operationId: BranchRestrictions_updateRule

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/branchrestriction"
      }
    }
  },
  "required": true,
  "description": "The new version of the existing rule"
}

Responses

200 The updated branch restriction rule
401 If the request was not authenticated
403 If the authenticated user does not have admin access to the repository
404 If the repository or branch restriction id does not exist
PUT /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}

Branching model 7 endpoints

GET /repositories/{workspace}/{repo_slug}/branching-model

Return the branching model as applied to the repository. This view is read-only. The branching model settings can be changed using the [settings](https://dac-static.atlassian.com) API. The returned object: 1. Always has a `development` property. `development.branch` contains the actual repository branch object that is considered to be the `development` branch. `development.branch` will not be present if it does not exist. 2. Might have a `production` property. `production` will not be present when `production` is disabled. `production.branch` contains the actual branch object that is considered to be the `production` branch. `production.branch` will not be present if it does not exist. 3. Always has a `branch_types` array which contains all enabled branch types.

operationId: BranchingModel_getBranchingModel

Responses

200 The branching model object
401 If the request was not authenticated
403 If the authenticated user does not have read access to the repository
404 If the repository does not exist
GET /repositories/{workspace}/{repo_slug}/branching-model
GET /repositories/{workspace}/{repo_slug}/branching-model/settings

Return the branching model configuration for a repository. The returned object: 1. Always has a `development` property for the development branch. 2. Always a `production` property for the production branch. The production branch can be disabled. 3. The `branch_types` contains all the branch types. This is the raw configuration for the branching model. A client wishing to see the branching model with its actual current branches may find the [active model API](/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-get) more useful.

operationId: BranchingModel_getRepositoryBranchingSettings

Responses

200 The branching model configuration
401 If the request was not authenticated
403 If the authenticated user does not have admin access to the repository
404 If the repository does not exist
GET /repositories/{workspace}/{repo_slug}/branching-model/settings
PUT /repositories/{workspace}/{repo_slug}/branching-model/settings

Update the branching model configuration for a repository. The `development` branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a `development` property will leave the development branch unchanged. It is possible for the `development` branch to be invalid. This happens when it points at a specific branch that has been deleted. This is indicated in the `is_valid` field for the branch. It is not possible to update the settings for `development` if that would leave the branch in an invalid state. Such a request will be rejected. The `production` branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The `enabled` property can be used to enable (`true`) or disable (`false`) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a `production` property will leave the production branch unchanged. It is possible for the `production` branch to be invalid. This happens when it points at a specific branch that has been deleted. This is indicated in the `is_valid` field for the branch. A request that would leave `production` enabled and invalid will be rejected. It is possible to update `production` and make it invalid if it would also be left disabled. The `branch_types` property contains the branch types to be updated. Only the branch types passed will be updated. All updates will be rejected if it would leave the branching model in an invalid state. For branch types this means that: 1. The prefixes for all enabled branch types are valid. For example, it is not possible to use '*' inside a Git prefix. 2. A prefix of an enabled branch type must not be a prefix of another enabled branch type. This is to ensure that a branch can be easily classified by its prefix unambiguously. It is possible to store an invalid prefix if that branch type would be left disabled. Only the passed properties will be updated. The properties not passed will be left unchanged. Each branch type must have a `kind` property to identify it. There is currently a side effect when using this API endpoint. If the repository is inheriting branching model settings from its project, updating the branching model for this repository will disable the project setting inheritance. We have deprecated this side effect and will remove it on 1 August 2022.

operationId: BranchingModel_updateConfig

Responses

200 The updated branching model configuration
400 If the request contains invalid branching model configuration
401 If the request was not authenticated
403 If the authenticated user does not have admin access to the repository
404 If the repository does not exist
PUT /repositories/{workspace}/{repo_slug}/branching-model/settings
GET /repositories/{workspace}/{repo_slug}/effective-branching-model
operationId: BranchingModel_getEffectiveBranchingModel

Responses

200 The effective branching model object
401 If the request was not authenticated
403 If the authenticated user does not have read access to the repository
404 If the repository does not exist
GET /repositories/{workspace}/{repo_slug}/effective-branching-model
GET /workspaces/{workspace}/projects/{project_key}/branching-model

Return the branching model set at the project level. This view is read-only. The branching model settings can be changed using the [settings](https://dac-static.atlassian.com) API. The returned object: 1. Always has a `development` property. `development.name` is the user-specified branch that can be inherited by an individual repository's branching model. 2. Might have a `production` property. `production` will not be present when `production` is disabled. `production.name` is the user-specified branch that can be inherited by an individual repository's branching model. 3. Always has a `branch_types` array which contains all enabled branch types.

operationId: BranchingModel_getBranchingModel

Responses

200 The branching model object
401 If the request was not authenticated
403 If the authenticated user does not have read access to the project
404 If the project does not exist
GET /workspaces/{workspace}/projects/{project_key}/branching-model
GET /workspaces/{workspace}/projects/{project_key}/branching-model/settings

Return the branching model configuration for a project. The returned object: 1. Always has a `development` property for the development branch. 2. Always a `production` property for the production branch. The production branch can be disabled. 3. The `branch_types` contains all the branch types. This is the raw configuration for the branching model. A client wishing to see the branching model with its actual current branches may find the [active model API](https://dac-static.atlassian.com) more useful.

operationId: BranchingModel_getConfig

Responses

200 The branching model configuration
401 If the request was not authenticated
403 If the authenticated user does not have admin access to the project
404 If the project does not exist
GET /workspaces/{workspace}/projects/{project_key}/branching-model/settings
PUT /workspaces/{workspace}/projects/{project_key}/branching-model/settings

Update the branching model configuration for a project. The `development` branch can be configured to a specific branch or to track the main branch. Any branch name can be supplied, but will only successfully be applied to a repository via inheritance if that branch exists for that repository. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a `development` property will leave the development branch unchanged. The `production` branch can be a specific branch, the main branch or disabled. Any branch name can be supplied, but will only successfully be applied to a repository via inheritance if that branch exists for that repository. The `enabled` property can be used to enable (`true`) or disable (`false`) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a `production` property will leave the production branch unchanged. The `branch_types` property contains the branch types to be updated. Only the branch types passed will be updated. All updates will be rejected if it would leave the branching model in an invalid state. For branch types this means that: 1. The prefixes for all enabled branch types are valid. For example, it is not possible to use '*' inside a Git prefix. 2. A prefix of an enabled branch type must not be a prefix of another enabled branch type. This is to ensure that a branch can be easily classified by its prefix unambiguously. It is possible to store an invalid prefix if that branch type would be left disabled. Only the passed properties will be updated. The properties not passed will be left unchanged. Each branch type must have a `kind` property to identify it.

operationId: BranchingModel_updateProjectBranchingModelSettings

Responses

200 The updated branching model configuration
400 If the request contains an invalid branching model configuration
401 If the request was not authenticated
403 If the authenticated user does not have admin access to the project
404 If the project does not exist
PUT /workspaces/{workspace}/projects/{project_key}/branching-model/settings

Commit statuses 4 endpoints

GET /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses

Returns all statuses (e.g. build results) for a specific commit.

operationId: CommitStatuses_listForCommit

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). Defaults to `created_on`.

Responses

200 A paginated list of all commit statuses for this commit.
401 If the repository is private and the request was not authenticated.
404 If the repository or commit does not exist
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses
POST /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build

Creates a new build status against the specified commit. If the specified key already exists, the existing status object will be overwritten. Example: ``` curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/ -X POST -u jdoe -H 'Content-Type: application/json' -d '{ "key": "MY-BUILD", "state": "SUCCESSFUL", "description": "42 tests passed", "url": "https://www.example.org/my-build-result" }' ``` When creating a new commit status, you can use a URI template for the URL. Templates are URLs that contain variable names that Bitbucket will evaluate at runtime whenever the URL is displayed anywhere similar to parameter substitution in [Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html). For example, one could use `https://foo.com/builds/{repository.full_name}` which Bitbucket will turn into `https://foo.com/builds/foo/bar` at render time. The context variables available are `repository` and `commit`.

operationId: CommitStatuses_createBuildStatus

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/commitstatus"
      }
    }
  },
  "description": "The new commit status object."
}

Responses

201 The newly created build status object.
401 If the repository is private and the request was not authenticated.
404 If the repository, commit, or build status key does not exist
POST /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key}

Returns the specified build status for a commit.

operationId: CommitStatuses_getBuildStatus

Responses

200 The build status object with the specified key.
401 If the repository is private and the request was not authenticated.
404 If the repository, commit, or build status key does not exist
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key}
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key}

Used to update the current status of a build status object on the specific commit. This operation can also be used to change other properties of the build status: * `state` * `name` * `description` * `url` * `refname` The `key` cannot be changed.

operationId: CommitStatuses_updateBuildStatus

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/commitstatus"
      }
    }
  },
  "description": "The updated build status object"
}

Responses

200 The updated build status object.
401 If the repository is private and the request was not authenticated.
404 If the repository or build does not exist
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key}

Commits 16 endpoints

GET /repositories/{workspace}/{repo_slug}/commit/{commit}

Returns the specified commit.

operationId: Commits_getCommitDetails

Responses

200 The commit object
404 If the specified commit or repository does not exist.
GET /repositories/{workspace}/{repo_slug}/commit/{commit}
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/approve

Redact the authenticated user's approval of the specified commit. This operation is only available to users that have explicit access to the repository. In contrast, just the fact that a repository is publicly accessible to users does not give them the ability to approve commits.

operationId: Commits_unapproveCommit

Responses

204 An empty response indicating the authenticated user's approval has been withdrawn.
404 If the specified commit, or the repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/approve
POST /repositories/{workspace}/{repo_slug}/commit/{commit}/approve

Approve the specified commit as the authenticated user. This operation is only available to users that have explicit access to the repository. In contrast, just the fact that a repository is publicly accessible to users does not give them the ability to approve commits.

operationId: Commits_approveCommit

Responses

200 The `participant` object recording that the authenticated user approved the commit.
404 If the specified commit, or the repository does not exist.
POST /repositories/{workspace}/{repo_slug}/commit/{commit}/approve
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/comments

Returns the commit's comments. This includes both global and inline comments. The default sorting is oldest to newest and can be overridden with the `sort` query parameter.

operationId: Commits_listComments

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).

Responses

200 A paginated list of commit comments.
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/comments
POST /repositories/{workspace}/{repo_slug}/commit/{commit}/comments

Creates new comment on the specified commit. To post a reply to an existing comment, include the `parent.id` field: ``` $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \ -X POST -u evzijst \ -H 'Content-Type: application/json' \ -d '{"content": {"raw": "One more thing!"}, "parent": {"id": 5728901}}' ```

operationId: Commits_createComment

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/commit_comment"
      }
    }
  },
  "required": true,
  "description": "The specified comment."
}

Responses

201 The newly created comment.
400 If the comment was detected as spam, or if the parent comment is not attached to the same node as the new comment
404 If a parent ID was passed in that cannot be found
POST /repositories/{workspace}/{repo_slug}/commit/{commit}/comments
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}

Deletes the specified commit comment. Note that deleting comments that have visible replies that point to them will not really delete the resource. This is to retain the integrity of the original comment tree. Instead, the `deleted` element is set to `true` and the content is blanked out. The comment will continue to be returned by the collections and self endpoints.

operationId: Commits_deleteComment

Responses

204 Indicates the comment was deleted by this action or a previous delete.
404 If the comment doesn't exist
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}

Returns the specified commit comment.

operationId: Commits_getCommitComment

Responses

200 The commit comment.
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}

Used to update the contents of a comment. Only the content of the comment can be updated. ``` $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/7f71b5/comments/5728901 \ -X PUT -u evzijst \ -H 'Content-Type: application/json' \ -d '{"content": {"raw": "One more thing!"}' ```

operationId: Commits_updateComment

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/commit_comment"
      }
    }
  },
  "required": true,
  "description": "The updated comment."
}

Responses

201 The newly updated comment.
400 If the comment update was detected as spam
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}
GET /repositories/{workspace}/{repo_slug}/commits

These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of `git log`. Like these tools, the DAG can be filtered. #### GET /repositories/{workspace}/{repo_slug}/commits/ Returns all commits in the repo in topological order (newest commit first). All branches and tags are included (similar to `git log --all`). #### GET /repositories/{workspace}/{repo_slug}/commits/?exclude=master Returns all commits in the repo that are not on master (similar to `git log --all ^master`). #### GET /repositories/{workspace}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar Returns all commits that are on refs `foo` or `bar`, but not on `fu` or `fubar` (similar to `git log foo bar ^fu ^fubar`). An optional `path` parameter can be specified that will limit the results to commits that affect that path. `path` can either be a file or a directory. If a directory is specified, commits are returned that have modified any file in the directory tree rooted by `path`. It is important to note that if the `path` parameter is specified, the commits returned by this endpoint may no longer be a DAG, parent commits that do not modify the path will be omitted from the response. #### GET /repositories/{workspace}/{repo_slug}/commits/?path=README.md&include=foo&include=bar&exclude=master Returns all commits that are on refs `foo` or `bar`, but not on `master` that changed the file README.md. #### GET /repositories/{workspace}/{repo_slug}/commits/?path=src/&include=foo&include=bar&exclude=master Returns all commits that are on refs `foo` or `bar`, but not on `master` that changed to a file in any file in the directory src or its children. Because the response could include a very large number of commits, it is paginated. Follow the 'next' link in the response to navigate to the next page of commits. As with other paginated resources, do not construct your own links. When the include and exclude parameters are more than can fit in a query string, clients can use a `x-www-form-urlencoded` POST instead.

operationId: Commits_list

Responses

200 A paginated list of commits
404 If the specified repository does not exist.
GET /repositories/{workspace}/{repo_slug}/commits
POST /repositories/{workspace}/{repo_slug}/commits

Identical to `GET /repositories/{workspace}/{repo_slug}/commits`, except that POST allows clients to place the include and exclude parameters in the request body to avoid URL length issues. **Note that this resource does NOT support new commit creation.**

operationId: Commits_listWithIncludeExclude

Responses

200 A paginated list of commits
404 If the specified repository does not exist.
POST /repositories/{workspace}/{repo_slug}/commits
GET /repositories/{workspace}/{repo_slug}/commits/{revision}

These are the repository's commits. They are paginated and returned in reverse chronological order, similar to the output of `git log`. Like these tools, the DAG can be filtered. #### GET /repositories/{workspace}/{repo_slug}/commits/master Returns all commits on ref `master` (similar to `git log master`). #### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master Returns all commits on ref `dev` or `foo`, except those that are reachable on `master` (similar to `git log dev foo ^master`). An optional `path` parameter can be specified that will limit the results to commits that affect that path. `path` can either be a file or a directory. If a directory is specified, commits are returned that have modified any file in the directory tree rooted by `path`. It is important to note that if the `path` parameter is specified, the commits returned by this endpoint may no longer be a DAG, parent commits that do not modify the path will be omitted from the response. #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=README.md&include=foo&include=bar&exclude=master Returns all commits that are on refs `dev` or `foo` or `bar`, but not on `master` that changed the file README.md. #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master Returns all commits that are on refs `dev` or `foo`, but not on `master` that changed to a file in any file in the directory src or its children. Because the response could include a very large number of commits, it is paginated. Follow the 'next' link in the response to navigate to the next page of commits. As with other paginated resources, do not construct your own links. When the include and exclude parameters are more than can fit in a query string, clients can use a `x-www-form-urlencoded` POST instead.

operationId: Commits_listForRevision

Responses

200 A paginated list of commits
404 If the specified revision does not exist.
GET /repositories/{workspace}/{repo_slug}/commits/{revision}
POST /repositories/{workspace}/{repo_slug}/commits/{revision}

Identical to `GET /repositories/{workspace}/{repo_slug}/commits/{revision}`, except that POST allows clients to place the include and exclude parameters in the request body to avoid URL length issues. **Note that this resource does NOT support new commit creation.**

operationId: Commits_listForRevision

Responses

200 A paginated list of commits
404 If the specified revision does not exist.
POST /repositories/{workspace}/{repo_slug}/commits/{revision}
GET /repositories/{workspace}/{repo_slug}/diff/{spec}

Produces a raw git-style diff. #### Single commit spec If the `spec` argument to this API is a single commit, the diff is produced against the first parent of the specified commit. #### Two commit spec Two commits separated by `..` may be provided as the `spec`, e.g., `3a8b42..9ff173`. When two commits are provided and the `topic` query parameter is true, this API produces a 2-way three dot diff. This is the diff between source commit and the merge base of the source commit and the destination commit. When the `topic` query param is false, a simple git-style diff is produced. The two commits are interpreted as follows: * First commit: the commit containing the changes we wish to preview * Second commit: the commit representing the state to which we want to compare the first commit * **Note**: This is the opposite of the order used in `git diff`. #### Comparison to patches While similar to patches, diffs: * Don't have a commit header (username, commit message, etc) * Support the optional `path=foo/bar.py` query param to filter the diff to just that one file diff #### Response The raw diff is returned as-is, in whatever encoding the files in the repository use. It is not decoded into unicode. As such, the content-type is `text/plain`.

operationId: Commits_compareTwoCommitsDiff

Parameters

Name In Required Type Description
context query optional integer Generate diffs with <n> lines of context instead of the usual three.
path query optional string Limit the diff to a particular file (this parameter can be repeated for multiple paths).
ignore_whitespace query optional boolean Generate diffs that ignore whitespace.
binary query optional boolean Generate diffs that include binary files, true if omitted.
renames query optional boolean Whether to perform rename detection, true if omitted.
merge query optional boolean This parameter is deprecated. The 'topic' parameter should be used instead. The 'merge' and 'topic' parameters cannot be both used at the same time. If true, the source commit is merged into the destination commit, and then a diff from the destination to the merge result is returned. If false, a simple 'two dot' diff between the source and destination is returned. True if omitted.
topic query optional boolean If true, returns 2-way 'three-dot' diff. This is a diff between the source commit and the merge base of the source commit and the destination commit. If false, a simple 'two dot' diff between the source and destination is returned.

Responses

200 The raw diff
555 If the diff was too large and timed out. Since this endpoint does not employ any form of pagination, but instead returns the diff as a single document, it can run into trouble on very large diffs. If Bitbucket times out in cases like these, a 555 status code is returned.
GET /repositories/{workspace}/{repo_slug}/diff/{spec}
GET /repositories/{workspace}/{repo_slug}/diffstat/{spec}

Produces a response in JSON format with a record for every path modified, including information on the type of the change and the number of lines added and removed. #### Single commit spec If the `spec` argument to this API is a single commit, the diff is produced against the first parent of the specified commit. #### Two commit spec Two commits separated by `..` may be provided as the `spec`, e.g., `3a8b42..9ff173`. When two commits are provided and the `topic` query parameter is true, this API produces a 2-way three dot diff. This is the diff between source commit and the merge base of the source commit and the destination commit. When the `topic` query param is false, a simple git-style diff is produced. The two commits are interpreted as follows: * First commit: the commit containing the changes we wish to preview * Second commit: the commit representing the state to which we want to compare the first commit * **Note**: This is the opposite of the order used in `git diff`.

operationId: Commits_compareDiffStats

Responses

200 The diff stats
555 If generating the diffstat timed out.
GET /repositories/{workspace}/{repo_slug}/diffstat/{spec}
GET /repositories/{workspace}/{repo_slug}/merge-base/{revspec}

Returns the best common ancestor between two commits, specified in a revspec of 2 commits (e.g. 3a8b42..9ff173). If more than one best common ancestor exists, only one will be returned. It is unspecified which will be returned.

operationId: Commits_getMergeBase

Responses

200 The merge base of the provided spec.
401 If the request was not authenticated.
403 If the authenticated user does not have access to any of the repositories specified.
404 If the repository or ref in the spec does not exist.
GET /repositories/{workspace}/{repo_slug}/merge-base/{revspec}
GET /repositories/{workspace}/{repo_slug}/patch/{spec}

Produces a raw patch for a single commit (diffed against its first parent), or a patch-series for a revspec of 2 commits (e.g. `3a8b42..9ff173` where the first commit represents the source and the second commit the destination). In case of the latter (diffing a revspec), a patch series is returned for the commits on the source branch (`3a8b42` and its ancestors in our example). While similar to diffs, patches: * Have a commit header (username, commit message, etc) * Do not support the `path=foo/bar.py` query parameter The raw patch is returned as-is, in whatever encoding the files in the repository use. It is not decoded into unicode. As such, the content-type is `text/plain`.

operationId: Commits_getPatchForCommits

Responses

200 The raw patches
555 If the diff was too large and timed out. Since this endpoint does not employ any form of pagination, but instead returns the diff as a single document, it can run into trouble on very large diffs. If Bitbucket times out in cases like these, a 555 status code is returned.
GET /repositories/{workspace}/{repo_slug}/patch/{spec}

Deployments 16 endpoints

GET /repositories/{workspace}/{repo_slug}/deploy-keys

Returns all deploy-keys belonging to a repository.

operationId: Deployments_listRepositoryDeployKeys

Responses

200 Deploy keys matching the repository
403 If the specified user or repository is not accessible to the current user
404 If the specified user or repository does not exist
GET /repositories/{workspace}/{repo_slug}/deploy-keys
POST /repositories/{workspace}/{repo_slug}/deploy-keys

Create a new deploy key in a repository. Note: If authenticating a deploy key with an OAuth consumer, any changes to the OAuth consumer will subsequently invalidate the deploy key. Example: ``` $ curl -X POST \ -H "Authorization <auth header>" \ -H "Content-type: application/json" \ https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys -d \ '{ "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8", "label": "mydeploykey" }' ```

operationId: Deployments_addRepositoryDeployKey

Responses

200 The deploy key that was created
400 Invalid deploy key inputs
403 If the specified user or repository is not accessible to the current user
404 If the specified user or repository does not exist
POST /repositories/{workspace}/{repo_slug}/deploy-keys
DELETE /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}

This deletes a deploy key from a repository.

operationId: Deployments_repositoryKeyDelete

Responses

204 The key has been deleted
403 If the current user does not have permission to delete a key for the specified user
404 If the specified user, repository, or deploy key does not exist
DELETE /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}
GET /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}

Returns the deploy key belonging to a specific key.

operationId: Deployments_getDeployKey

Responses

200 Deploy key matching the key ID
403 If the specified user or repository is not accessible to the current user
404 If the specified user or repository does not exist
GET /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}
PUT /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}

Create a new deploy key in a repository. The same key needs to be passed in but the comment and label can change. Example: ``` $ curl -X PUT \ -H "Authorization <auth header>" \ -H "Content-type: application/json" \ https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234 -d \ '{ "label": "newlabel", "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 newcomment", }' ```

operationId: Deployments_updateRepositoryDeployKey

Responses

200 The newly updated deploy key.
400 If the submitted key or related value is invalid
403 If the current user does not have permission to add a key for the specified user
404 If the specified user, repository, or deploy key does not exist
PUT /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}
GET /repositories/{workspace}/{repo_slug}/deployments

Find deployments

operationId: Deployments_listDeployments

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 deployments.
GET /repositories/{workspace}/{repo_slug}/deployments
GET /repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid}

Retrieve a deployment

operationId: Deployments_getSingleDeployment

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.
deployment_uuid path required string The deployment UUID.

Responses

200 The deployment.
404 No account, repository or deployment with the UUID provided exists.
GET /repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid}
GET /repositories/{workspace}/{repo_slug}/environments

Find environments

operationId: Deployments_listEnvironments

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 environments.
GET /repositories/{workspace}/{repo_slug}/environments
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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/deployment_environment"
      }
    }
  },
  "required": true,
  "description": "The environment to create."
}

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

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

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

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

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

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

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

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

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}

Issue tracker 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

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

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

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

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/issue"
      }
    }
  },
  "required": true,
  "description": "The new issue. The only required element is `title`. All other elements can be omitted from the body."
}

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

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/export_options"
      }
    }
  },
  "description": "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."
}

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

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

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

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

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

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

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

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

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

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

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](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-the-issue-changes-api) for details. Changes support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) 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
q query optional string Query string to narrow down the response. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.
sort query optional string Name of a response property to sort results. See [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results) 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

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/issue_change"
      }
    }
  },
  "required": true,
  "description": "The new issue state change. The only required elements are `changes.[].new`. All other elements can be omitted from the body."
}

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

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](/cloud/bitbucket/rest/intro/#filtering) for more details.

operationId: IssueTracker_listCommentsOnIssue

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).

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

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/issue_comment"
      }
    }
  },
  "required": true,
  "description": "The new issue comment object."
}

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

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

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

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/issue_comment"
      }
    }
  },
  "required": true,
  "description": "The updated comment."
}

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

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

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

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

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

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

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

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

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

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

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 48 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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/deployment_variable"
      }
    }
  },
  "required": true,
  "description": "The variable to create"
}

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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/deployment_variable"
      }
    }
  },
  "required": true,
  "description": "The updated deployment variable."
}

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
POST /repositories/{workspace}/{repo_slug}/pipelines

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. # Trigger a Pipeline for a branch 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. ### Example ``` $ 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" } }' ``` # Trigger a Pipeline for a commit on a branch or tag 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` ### Example ``` $ 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" } }' ``` # Trigger a specific pipeline definition for a commit 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. ### Example ``` $ 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" } }' ``` # Trigger a specific pipeline definition for a commit on a branch or tag 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. ### Example ``` $ 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" } }' ``` # Trigger a custom pipeline with variables 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). ### Example ``` $ 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" } ] }' ``` # Trigger a pull request pipeline You can also initiate a pipeline for a specific pull request. ### Example ``` $ 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": "**" } } }' ```

operationId: Pipelines_createPipeline

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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipeline"
      }
    }
  },
  "required": true,
  "description": "The pipeline to initiate."
}

Responses

201 The initiated pipeline.
400 The account or repository is not enabled, the yml file does not exist in the repository for the given revision, or the request body contained invalid properties.
404 The account or repository was not found.
POST /repositories/{workspace}/{repo_slug}/pipelines
DELETE /repositories/{workspace}/{repo_slug}/pipelines-config/caches

Delete repository cache versions by name.

operationId: Pipelines_deleteCacheVersionByName

Parameters

Name In Required Type Description
workspace path required string The account.
repo_slug path required string The repository.
name query required string The cache name.

Responses

204 The caches were deleted.
404 The workspace, repository or cache name was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines-config/caches
GET /repositories/{workspace}/{repo_slug}/pipelines-config/caches

Retrieve the repository pipelines caches.

operationId: Pipelines_getCaches

Parameters

Name In Required Type Description
workspace path required string The account.
repo_slug path required string The repository.

Responses

200 The list of caches for the given repository.
404 The account or repository was not found.
GET /repositories/{workspace}/{repo_slug}/pipelines-config/caches
DELETE /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}

Delete a repository cache.

operationId: Pipelines_deleteCacheById

Parameters

Name In Required Type Description
workspace path required string The account.
repo_slug path required string The repository.
cache_uuid path required string The UUID of the cache to delete.

Responses

204 The cache was deleted.
404 The workspace, repository or cache_uuid with given UUID was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}
GET /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri

Retrieve the URI of the content of the specified cache.

operationId: Pipelines_getCacheContentUri

Parameters

Name In Required Type Description
workspace path required string The account.
repo_slug path required string The repository.
cache_uuid path required string The UUID of the cache.

Responses

200 The cache content uri.
404 The workspace, repository or cache_uuid with given UUID was not found.
GET /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}

Retrieve a specified pipeline

operationId: Pipelines_getSpecifiedPipeline

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.
pipeline_uuid path required string The pipeline UUID.

Responses

200 The pipeline.
404 No account, repository or pipeline with the UUID provided exists.
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps

Find steps for the given pipeline.

operationId: Pipelines_getPipelineSteps

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.
pipeline_uuid path required string The UUID of the pipeline.

Responses

200 The steps.
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}

Retrieve a given step of a pipeline.

operationId: Pipelines_getStep

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.
pipeline_uuid path required string The UUID of the pipeline.
step_uuid path required string The UUID of the step.

Responses

200 The step.
404 No account, repository, pipeline or step with the UUID provided exists for the pipeline with the UUID provided.
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log

Retrieve the log file for a given step of a pipeline. This endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.

operationId: Pipelines_getStepLog

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.
pipeline_uuid path required string The UUID of the pipeline.
step_uuid path required string The UUID of the step.

Responses

200 The raw log file for this pipeline step.
304 The log has the same etag as the provided If-None-Match header.
404 A pipeline with the given UUID does not exist, a step with the given UUID does not exist in the pipeline or a log file does not exist for the given step.
416 The requested range does not exist for requests that specified the [HTTP Range header](https://tools.ietf.org/html/rfc7233#section-3.1).
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}

Retrieve the log file for a build container or service container. This endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.

operationId: Pipelines_getStepLogs

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.
pipeline_uuid path required string The UUID of the pipeline.
step_uuid path required string The UUID of the step.
log_uuid path required string For the main build container specify the step UUID; for a service container specify the service container UUID

Responses

200 The raw log file for the build container or service container.
404 No account, repository, pipeline, step or log exist for the provided path.
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports
operationId: Pipelines_getTestReportsForStep

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.
pipeline_uuid path required string The UUID of the pipeline.
step_uuid path required string The UUID of the step.

Responses

200 A summary of test reports for this pipeline step.
404 No account, repository, pipeline, step or test reports exist for the provided path.
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases
operationId: Pipelines_getTestCasesForStep

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.
pipeline_uuid path required string The UUID of the pipeline.
step_uuid path required string The UUID of the step.

Responses

200 Test cases for this pipeline step.
404 No account, repository, pipeline, step or test reports exist for the provided path.
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons
operationId: Pipelines_getTestCaseReasons

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.
pipeline_uuid path required string The UUID of the pipeline.
step_uuid path required string The UUID of the step.
test_case_uuid path required string The UUID of the test case.

Responses

200 Test case reasons (output).
404 No account, repository, pipeline, step or test case with the UUID provided exists for the pipeline with the UUID provided.
GET /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons
POST /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline

Signal the stop of a pipeline and all of its steps that not have completed yet.

operationId: Pipelines_stopPipeline

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.
pipeline_uuid path required string The UUID of the pipeline.

Responses

204 The pipeline has been signaled to stop.
400 The specified pipeline has already completed.
404 Either the account, repository or pipeline with the given UUID does not exist.
POST /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline
GET /repositories/{workspace}/{repo_slug}/pipelines_config

Retrieve the repository pipelines configuration.

operationId: Pipelines_getConfiguration

Parameters

Name In Required Type Description
workspace path required string The account.
repo_slug path required string The repository.

Responses

200 The repository pipelines configuration.
GET /repositories/{workspace}/{repo_slug}/pipelines_config
PUT /repositories/{workspace}/{repo_slug}/pipelines_config

Update the pipelines configuration for a repository.

operationId: Pipelines_updateConfiguration

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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipelines_config"
      }
    }
  },
  "required": true,
  "description": "The updated repository pipelines configuration."
}

Responses

200 The repository pipelines configuration was updated.
PUT /repositories/{workspace}/{repo_slug}/pipelines_config
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/build_number

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.

operationId: Pipelines_updateNextBuildNumber

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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipeline_build_number"
      }
    }
  },
  "required": true,
  "description": "The build number to update."
}

Responses

200 The build number has been configured.
400 The update failed because the next number was invalid (it should be higher than the current number).
404 The account or repository was not found.
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/build_number
GET /repositories/{workspace}/{repo_slug}/pipelines_config/schedules

Retrieve the configured schedules for the given repository.

operationId: Pipelines_listSchedules

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 list of schedules.
404 The account or repository was not found.
GET /repositories/{workspace}/{repo_slug}/pipelines_config/schedules
POST /repositories/{workspace}/{repo_slug}/pipelines_config/schedules

Create a schedule for the given repository.

operationId: Pipelines_createSchedule

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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipeline_schedule_post_request_body"
      }
    }
  },
  "required": true,
  "description": "The schedule to create."
}

Responses

201 The created schedule.
400 There were errors validating the request.
401 The maximum limit of schedules for this repository was reached.
404 The account or repository was not found.
POST /repositories/{workspace}/{repo_slug}/pipelines_config/schedules
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}

Delete a schedule.

operationId: Pipelines_deleteSchedule

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.
schedule_uuid path required string The uuid of the schedule.

Responses

204 The schedule was deleted.
404 The account, repository or schedule was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}
GET /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}

Retrieve a schedule by its UUID.

operationId: Pipelines_getConfigSchedule

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.
schedule_uuid path required string The uuid of the schedule.

Responses

200 The requested schedule.
404 The account, repository or schedule was not found.
GET /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}

Update a schedule.

operationId: Pipelines_updateSchedule

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.
schedule_uuid path required string The uuid of the schedule.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipeline_schedule_put_request_body"
      }
    }
  },
  "required": true,
  "description": "The schedule to update."
}

Responses

200 The schedule is updated.
404 The account, repository or schedule was not found.
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}
GET /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions

Retrieve the executions of a given schedule.

operationId: Pipelines_listScheduleExecutions

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.
schedule_uuid path required string The uuid of the schedule.

Responses

200 The list of executions of a schedule.
404 The account or repository was not found.
GET /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair

Delete the repository SSH key pair.

operationId: Pipelines_deleteSshKeyPair

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

204 The SSH key pair was deleted.
404 The account, repository or SSH key pair was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair
GET /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair

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.

operationId: Pipelines_getKeyPair

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 SSH key pair.
404 The account, repository or SSH key pair was not found.
GET /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair

Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container.

operationId: Pipelines_updateSshKeyPair

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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipeline_ssh_key_pair"
      }
    }
  },
  "required": true,
  "description": "The created or updated SSH key pair."
}

Responses

200 The SSH key pair was created or updated.
404 The account, repository or SSH key pair was not found.
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair
GET /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts

Find repository level known hosts.

operationId: Pipelines_listKnownHosts

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 retrieved known hosts.
GET /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts
POST /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts

Create a repository level known host.

operationId: Pipelines_createKnownHost

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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipeline_known_host"
      }
    }
  },
  "required": true,
  "description": "The known host to create."
}

Responses

201 The known host was created.
404 The account or repository does not exist.
409 A known host with the provided hostname already exists.
POST /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}

Delete a repository level known host.

operationId: Pipelines_deleteKnownHost

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.
known_host_uuid path required string The UUID of the known host to delete.

Responses

204 The known host was deleted.
404 The account, repository or known host with given UUID was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}
GET /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}

Retrieve a repository level known host.

operationId: Pipelines_getKnownHost

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.
known_host_uuid path required string The UUID of the known host to retrieve.

Responses

200 The known host.
404 The account, repository or known host with the specified UUID was not found.
GET /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}

Update a repository level known host.

operationId: Pipelines_updateKnownHost

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.
known_host_uuid path required string The UUID of the known host to update.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipeline_known_host"
      }
    }
  },
  "required": true,
  "description": "The updated known host."
}

Responses

200 The known host was updated.
404 The account, repository or known host with the given UUID was not found.
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}
GET /repositories/{workspace}/{repo_slug}/pipelines_config/variables

Find repository level variables.

operationId: Pipelines_listRepositoryVariables

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 retrieved variables.
GET /repositories/{workspace}/{repo_slug}/pipelines_config/variables
POST /repositories/{workspace}/{repo_slug}/pipelines_config/variables

Create a repository level variable.

operationId: Pipelines_createVariable

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

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipeline_variable"
      }
    }
  },
  "required": true,
  "description": "The variable to create."
}

Responses

201 The variable was created.
404 The account or repository does not exist.
409 A variable with the provided key already exists.
POST /repositories/{workspace}/{repo_slug}/pipelines_config/variables
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}

Delete a repository level variable.

operationId: Pipelines_deleteVariable

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.
variable_uuid path required string The UUID of the variable to delete.

Responses

204 The variable was deleted.
404 The account, repository or variable with given UUID was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}
GET /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}

Retrieve a repository level variable.

operationId: Pipelines_getRepositoryVariable

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.
variable_uuid path required string The UUID of the variable to retrieve.

Responses

200 The variable.
404 The account, repository or variable with the specified UUID was not found.
GET /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}

Update a repository level variable.

operationId: Pipelines_updateVariableForRepository

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.
variable_uuid path required string The UUID of the variable to update.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pipeline_variable"
      }
    }
  },
  "required": true,
  "description": "The updated variable"
}

Responses

200 The variable was updated.
404 The account, repository or variable with the given UUID was not found.
PUT /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}
GET /workspaces/{workspace}/pipelines-config/identity/oidc/.well-known/openid-configuration

This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/

operationId: Pipelines_getOpenIdConfiguration

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}`.

Responses

200 The OpenID configuration
404 The workspace was not found.
GET /workspaces/{workspace}/pipelines-config/identity/oidc/.well-known/openid-configuration
GET /workspaces/{workspace}/pipelines-config/identity/oidc/keys.json

This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/

operationId: Pipelines_getOidcKeys

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}`.

Responses

200 The keys in JSON web key format
404 The workspace was not found.
GET /workspaces/{workspace}/pipelines-config/identity/oidc/keys.json
GET /workspaces/{workspace}/pipelines-config/variables

Find workspace level variables.

operationId: Pipelines_listWorkspaceVariables

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}`.

Responses

200 The found workspace level variables.
GET /workspaces/{workspace}/pipelines-config/variables
POST /workspaces/{workspace}/pipelines-config/variables

Create a workspace level variable.

operationId: Pipelines_createWorkspaceVariable

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}`.

Request Body

{
  "$ref": "#/components/requestBodies/pipeline_variable2"
}

Responses

201 The created variable.
404 The workspace does not exist.
409 A variable with the provided key already exists.
POST /workspaces/{workspace}/pipelines-config/variables
DELETE /workspaces/{workspace}/pipelines-config/variables/{variable_uuid}

Delete a workspace level variable.

operationId: Pipelines_deleteWorkspaceVariable

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}`.
variable_uuid path required string The UUID of the variable to delete.

Responses

204 The variable was deleted
404 The workspace or the variable with the provided UUID does not exist.
DELETE /workspaces/{workspace}/pipelines-config/variables/{variable_uuid}
GET /workspaces/{workspace}/pipelines-config/variables/{variable_uuid}

Retrieve a workspace level variable.

operationId: Pipelines_getVariableForWorkspace

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}`.
variable_uuid path required string The UUID of the variable to retrieve.

Responses

200 The variable.
404 The workspace or variable with the given UUID was not found.
GET /workspaces/{workspace}/pipelines-config/variables/{variable_uuid}
PUT /workspaces/{workspace}/pipelines-config/variables/{variable_uuid}

Update a workspace level variable.

operationId: Pipelines_updateVariableWorkspace

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}`.
variable_uuid path required string The UUID of the variable.

Request Body

{
  "$ref": "#/components/requestBodies/pipeline_variable"
}

Responses

200 The variable was updated.
404 The workspace or the variable was not found.
PUT /workspaces/{workspace}/pipelines-config/variables/{variable_uuid}

Projects 16 endpoints

POST /workspaces/{workspace}/projects

Creates a new project. Note that the avatar has to be embedded as either a data-url or a URL to an external image as shown in the examples below: ``` $ body=$(cat << EOF { "name": "Mars Project", "key": "MARS", "description": "Software for colonizing mars.", "links": { "avatar": { "href": "data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/..." } }, "is_private": false } EOF ) $ curl -H "Content-Type: application/json" \ -X POST \ -d "$body" \ https://api.bitbucket.org/2.0/workspaces/teams-in-space/projects/ | jq . { // Serialized project document } ``` or even: ``` $ body=$(cat << EOF { "name": "Mars Project", "key": "MARS", "description": "Software for colonizing mars.", "links": { "avatar": { "href": "http://i.imgur.com/72tRx4w.gif" } }, "is_private": false } EOF ) $ curl -H "Content-Type: application/json" \ -X POST \ -d "$body" \ https://api.bitbucket.org/2.0/workspaces/teams-in-space/projects/ | jq . { // Serialized project document } ```

operationId: Projects_createProjectInWorkspace

Request Body

{
  "$ref": "#/components/requestBodies/project"
}

Responses

201 A new project has been created.
403 The requesting user isn't authorized to create the project.
404 A workspace doesn't exist at this location.
POST /workspaces/{workspace}/projects
DELETE /workspaces/{workspace}/projects/{project_key}

Deletes this project. This is an irreversible operation. You cannot delete a project that still contains repositories. To delete the project, [delete](/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-delete) or transfer the repositories first. Example: ``` $ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects/PROJ ```

operationId: Projects_deleteWorkspaceProject

Responses

204 Successful deletion.
403 The requesting user isn't authorized to delete the project or the project isn't empty.
404 A project isn't hosted at this location.
DELETE /workspaces/{workspace}/projects/{project_key}
PUT /workspaces/{workspace}/projects/{project_key}

Since this endpoint can be used to both update and to create a project, the request body depends on the intent. #### Creation See the POST documentation for the project collection for an example of the request body. Note: The `key` should not be specified in the body of request (since it is already present in the URL). The `name` is required, everything else is optional. #### Update See the POST documentation for the project collection for an example of the request body. Note: The key is not required in the body (since it is already in the URL). The key may be specified in the body, if the intent is to change the key itself. In such a scenario, the location of the project is changed and is returned in the `Location` header of the response.

operationId: Projects_updateProjectInWorkspace

Request Body

{
  "$ref": "#/components/requestBodies/project"
}

Responses

200 The existing project is has been updated.
201 A new project has been created.
403 The requesting user isn't authorized to update or create the project.
404 A workspace doesn't exist at the location. Note that the project's absence from this location doesn't raise a 404, since a PUT at a non-existent location can be used to create a new project.
PUT /workspaces/{workspace}/projects/{project_key}
GET /workspaces/{workspace}/projects/{project_key}/default-reviewers

Return a list of all default reviewers for a project. This is a list of users that will be added as default reviewers to pull requests for any repository within the project.

operationId: Projects_listDefaultReviewers

Responses

200 The list of project default reviewers
403 If the authenticated user does not have admin access to the project
404 If the workspace or project does not exist at this location
GET /workspaces/{workspace}/projects/{project_key}/default-reviewers
DELETE /workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}

Removes a default reviewer from the project. Example: ``` $ curl https://api.bitbucket.org/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D HTTP/1.1 204 ```

operationId: Projects_removeDefaultReviewer

Responses

204 The specified user was removed from the list of project default reviewers
400 If the specified user is not a default reviewer for the project
403 If the authenticated user does not have admin access to the project
404 If the specified user, project, or workspace does not exist
DELETE /workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}
GET /workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}

Returns the specified default reviewer.

operationId: Projects_getReviewer

Responses

200 The specified user that is a default reviewer
400 If the specified user is not a default reviewer for the project
403 If the authenticated user does not have admin access to the project
404 If the specified user, project, or workspace does not exist
GET /workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}
PUT /workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}

Adds the specified user to the project's list of default reviewers. The method is idempotent. Accepts an optional body containing the `uuid` of the user to be added.

operationId: Projects_addDefaultReviewer

Responses

200 The specified user was added as a project default reviewer
400 If the specified user cannot be added as a default reviewer for the project
403 If the authenticated user does not have admin access to the project
404 If the specified user, project, or workspace does not exist
PUT /workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}
GET /workspaces/{workspace}/projects/{project_key}/permissions-config/groups

Returns a paginated list of explicit group permissions for the given project. This endpoint does not support BBQL features.

operationId: Projects_listGroupPermissions

Responses

200 Paginated list of project group permissions
401 The user couldn't be authenticated.
403 The user doesn't have admin access to the project.
404 One or both of the workspace and project don't exist for the given identifiers or the requesting user is not authenticated
GET /workspaces/{workspace}/projects/{project_key}/permissions-config/groups
DELETE /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}

Deletes the project group permission between the requested project and group, if one exists. Only users with admin permission for the project may access this resource.

operationId: Projects_deleteExplicitGroupPermission

Responses

204 The project group permission was deleted and no content returned.
401 The user couldn't be authenticated.
403 The requesting user isn't an admin of the project, or the authentication method was not via app password.
404 One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated
DELETE /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}
GET /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}

Returns the group permission for a given group and project. Only users with admin permission for the project may access this resource. Permissions can be: * `admin` * `create-repo` * `write` * `read` * `none`

operationId: Projects_getGroupPermission

Responses

200 Project group permission
401 The user couldn't be authenticated.
403 The user doesn't have admin access to the project.
404 One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated
GET /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}
PUT /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}

Updates the group permission, or grants a new permission if one does not already exist. Only users with admin permission for the project may access this resource. Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions. Permissions can be: * `admin` * `create-repo` * `write` * `read`

operationId: Projects_updateGroupPermission

Request Body

{
  "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema"
}

Responses

200 Project group permission updated.
400 No permission value was provided or the value is invalid(not one of read, write, create-repo, or admin).
401 The user couldn't be authenticated.
402 You have reached your plan's user limit and must upgrade before giving access to additional users.
403 The requesting user isn't an admin of the project, or the authentication method was not via app password.
404 One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated
PUT /workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}
GET /workspaces/{workspace}/projects/{project_key}/permissions-config/users

Returns a paginated list of explicit user permissions for the given project. This endpoint does not support BBQL features.

operationId: Projects_listUserPermissions

Responses

200 Paginated list of explicit user permissions.
401 The user couldn't be authenticated.
403 The user doesn't have admin access to the project.
404 One or both of the workspace and project don't exist for the given identifiers or the requesting user is not authenticated
GET /workspaces/{workspace}/projects/{project_key}/permissions-config/users
DELETE /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}

Deletes the project user permission between the requested project and user, if one exists. Only users with admin permission for the project may access this resource. Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions.

operationId: Projects_deleteExplicitUserPermission

Responses

204 The project user permission was deleted and no content returned.
401 The user couldn't be authenticated.
403 The requesting user isn't an admin of the project, or the authentication method was not via app password.
404 One or more of the workspace, project, and selected user doesn't exist for the given identifiers or the requesting user is not authenticated
DELETE /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}
GET /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}

Returns the explicit user permission for a given user and project. Only users with admin permission for the project may access this resource. Permissions can be: * `admin` * `create-repo` * `write` * `read` * `none`

operationId: Projects_getUserPermission

Responses

200 Explicit user permission for user and project
401 The user couldn't be authenticated.
403 The requesting user isn't an admin of the project.
404 One or more of the workspace, project, and selected user doesn't exist for the given identifiers or the requesting user is not authenticated
GET /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}
PUT /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}

Updates the explicit user permission for a given user and project. The selected user must be a member of the workspace, and cannot be the workspace owner. Only users with admin permission for the project may access this resource. Due to security concerns, the JWT and OAuth authentication methods are unsupported. This is to ensure integrations and add-ons are not allowed to change permissions. Permissions can be: * `admin` * `create-repo` * `write` * `read`

operationId: Projects_updateUserPermission

Request Body

{
  "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema"
}

Responses

200 Explicit user permission updated
400 No permission value was provided or the value is invalid (not one of read, write, create-repo, or admin)
401 The user couldn't be authenticated.
402 You have reached your plan's user limit and must upgrade before giving access to additional users.
403 The requesting user isn't an admin of the project, or the authentication method was not via app password.
404 One or more of the workspace, project, and selected user doesn't exist for the given identifiers or the requesting user is not authenticated
PUT /workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}
GET /workspaces/{workspace}/projects/{project_key}

Returns the requested project.

operationId: Projects_getByWorkspace

Responses

200 The project that is part of a workspace.
401 The request wasn't authenticated.
403 The requesting user isn't authorized to access the project.
404 A project isn't hosted at this location.
GET /workspaces/{workspace}/projects/{project_key}

Pullrequests 37 endpoints

GET /pullrequests/{selected_user}

Returns all pull requests authored by the specified user. By default only open pull requests are returned. This can be controlled using the `state` query parameter. To retrieve pull requests that are in one of multiple states, repeat the `state` parameter for each individual state. This endpoint also supports filtering and sorting of the results. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.

operationId: Pullrequests_listForUser

Parameters

Name In Required Type Description
state query optional string Only return pull requests that are in this state. This parameter can be repeated.

Responses

200 All pull requests authored by the specified user.
404 If the specified user does not exist.
GET /pullrequests/{selected_user}
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests

Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.

operationId: Pullrequests_listContainingCommit

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
repo_slug path required string The repository; either the UUID in curly braces, or the slug
commit path required string The SHA1 of the commit
page query optional integer Which page to retrieve
pagelen query optional integer How many pull requests to retrieve per page

Responses

200 The paginated list of pull requests.
202 The repository's pull requests are still being indexed.
404 Either the repository does not exist, or pull request commit links have not yet been indexed.
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests
GET /repositories/{workspace}/{repo_slug}/default-reviewers

Returns the repository's default reviewers. These are the users that are automatically added as reviewers on every new pull request that is created. To obtain the repository's default reviewers as well as the default reviewers inherited from the project, use the [effective-default-reveiwers](https://dac-static.atlassian.com) endpoint.

operationId: Pullrequests_listDefaultReviewers

Responses

200 The paginated list of default reviewers
403 If the authenticated user does not have access to view the default reviewers
GET /repositories/{workspace}/{repo_slug}/default-reviewers
DELETE /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}

Removes a default reviewer from the repository.

operationId: Pullrequests_removeDefaultReviewer

Responses

204 The specified user successfully removed from the default reviewers
403 If the authenticated user does not have access modify the default reviewers
404 If the specified user does not exist
DELETE /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}
GET /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}

Returns the specified reviewer. This can be used to test whether a user is among the repository's default reviewers list. A 404 indicates that that specified user is not a default reviewer.

operationId: Pullrequests_getDefaultReviewer

Responses

200 The specified user is a default reviewer
403 If the authenticated user does not have access to check if the specified user is a default reviewer
404 If the specified user does not exist or is not a default reviewer
GET /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}
PUT /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}

Adds the specified user to the repository's list of default reviewers. This method is idempotent. Adding a user a second time has no effect.

operationId: Pullrequests_addUserToDefaultReviewers

Responses

200 The specified user was successfully added to the default reviewers
400 If the authenticated user tried to add a team, bot user, or user without access to the repository to the default reviewers
403 If the authenticated user does not have permission to modify the default reviewers
404 If the specified user does not exist
PUT /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}
GET /repositories/{workspace}/{repo_slug}/effective-default-reviewers

Returns the repository's effective default reviewers. This includes both default reviewers defined at the repository level as well as those inherited from its project. These are the users that are automatically added as reviewers on every new pull request that is created.

operationId: Pullrequests_listEffectiveDefaultReviewers

Responses

200 The paginated list of effective default reviewers
403 If the authenticated user does not have access to view the default reviewers
GET /repositories/{workspace}/{repo_slug}/effective-default-reviewers
GET /repositories/{workspace}/{repo_slug}/pullrequests

Returns all pull requests on the specified repository. By default only open pull requests are returned. This can be controlled using the `state` query parameter. To retrieve pull requests that are in one of multiple states, repeat the `state` parameter for each individual state. This endpoint also supports filtering and sorting of the results. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.

operationId: Pullrequests_list

Parameters

Name In Required Type Description
state query optional string Only return pull requests that are in this state. This parameter can be repeated.

Responses

200 All pull requests on the specified repository.
401 If the repository is private and the request was not authenticated.
404 If the specified repository does not exist.
GET /repositories/{workspace}/{repo_slug}/pullrequests
POST /repositories/{workspace}/{repo_slug}/pullrequests

Creates a new pull request where the destination repository is this repository and the author is the authenticated user. The minimum required fields to create a pull request are `title` and `source`, specified by a branch name. ``` curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repository/pullrequests \ -u my-username:my-password \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "title": "My Title", "source": { "branch": { "name": "staging" } } }' ``` If the pull request's `destination` is not specified, it will default to the `repository.mainbranch`. To open a pull request to a different branch, say from a feature branch to a staging branch, specify a `destination` (same format as the `source`): ``` { "title": "My Title", "source": { "branch": { "name": "my-feature-branch" } }, "destination": { "branch": { "name": "staging" } } } ``` Reviewers can be specified by adding an array of user objects as the `reviewers` property. ``` { "title": "My Title", "source": { "branch": { "name": "my-feature-branch" } }, "reviewers": [ { "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" } ] } ``` Other fields: * `description` - a string * `close_source_branch` - boolean that specifies if the source branch should be closed upon merging

operationId: Pullrequests_create

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pullrequest"
      }
    }
  },
  "description": "The new pull request.\n\nThe request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork).\n\nSince not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title."
}

Responses

201 The newly created pull request.
400 If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
401 If the request was not authenticated.
POST /repositories/{workspace}/{repo_slug}/pullrequests
GET /repositories/{workspace}/{repo_slug}/pullrequests/activity

Returns a paginated list of the pull request's activity log. This handler serves both a v20 and internal endpoint. The v20 endpoint returns reviewer comments, updates, approvals and request changes. The internal endpoint includes those plus tasks and attachments. Comments created on a file or a line of code have an inline property. Comment example: ``` { "pagelen": 20, "values": [ { "comment": { "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088" } }, "deleted": false, "pullrequest": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" }, "content": { "raw": "inline with to a dn from lines", "markup": "markdown", "html": "<p>inline with to a dn from lines</p>", "type": "rendered" }, "created_on": "2019-09-27T00:33:46.039178+00:00", "user": { "display_name": "Name Lastname", "uuid": "{}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B%7D" }, "html": { "href": "https://bitbucket.org/%7B%7D/" }, "avatar": { "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" } }, "type": "user", "nickname": "Name", "account_id": "" }, "created_on": "2019-09-27T00:33:46.039178+00:00", "user": { "display_name": "Name Lastname", "uuid": "{}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B%7D" }, "html": { "href": "https://bitbucket.org/%7B%7D/" }, "avatar": { "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" } }, "type": "user", "nickname": "Name", "account_id": "" }, "updated_on": "2019-09-27T00:33:46.055384+00:00", "inline": { "context_lines": "", "to": null, "path": "", "outdated": false, "from": 211 }, "type": "pullrequest_comment", "id": 118571088 }, "pull_request": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" } } ] } ``` Updates include a state property of OPEN, MERGED, or DECLINED. Update example: ``` { "pagelen": 20, "values": [ { "update": { "description": "", "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it", "destination": { "commit": { "type": "commit", "hash": "6a2c16e4a152", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152" } } }, "branch": { "name": "master" }, "repository": { "name": "Atlaskit-MK-2", "type": "repository", "full_name": "atlassian/atlaskit-mk-2", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js" } }, "uuid": "{}" } }, "reason": "", "source": { "commit": { "type": "commit", "hash": "728c8bad1813", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813" } } }, "branch": { "name": "username/NONE-add-onClick-prop-for-accessibility" }, "repository": { "name": "Atlaskit-MK-2", "type": "repository", "full_name": "atlassian/atlaskit-mk-2", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js" } }, "uuid": "{}" } }, "state": "OPEN", "author": { "display_name": "Name Lastname", "uuid": "{}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B%7D" }, "html": { "href": "https://bitbucket.org/%7B%7D/" }, "avatar": { "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" } }, "type": "user", "nickname": "Name", "account_id": "" }, "date": "2019-05-10T06:48:25.305565+00:00" }, "pull_request": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" } } ] } ``` Approval example: ``` { "pagelen": 20, "values": [ { "approval": { "date": "2019-09-27T00:37:19.849534+00:00", "pullrequest": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" }, "user": { "display_name": "Name Lastname", "uuid": "{}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B%7D" }, "html": { "href": "https://bitbucket.org/%7B%7D/" }, "avatar": { "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" } }, "type": "user", "nickname": "Name", "account_id": "" } }, "pull_request": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" } } ] } ```

operationId: Pullrequests_listActivityLog

Responses

200 The pull request activity log
401 If the repository is private and the request was not authenticated.
404 If the specified repository does not exist.
GET /repositories/{workspace}/{repo_slug}/pullrequests/activity
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}

Returns the specified pull request.

operationId: Pullrequests_getPullRequest

Responses

200 The pull request object
401 If the repository is private and the request was not authenticated.
404 If the repository or pull request does not exist
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}
PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}

Mutates the specified pull request. This can be used to change the pull request's branches or description. Only open pull requests can be mutated.

operationId: Pullrequests_updatePullRequest

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pullrequest"
      }
    }
  },
  "description": "The pull request that is to be updated."
}

Responses

200 The updated pull request
400 If the input document was invalid.
401 If the request was not authenticated.
404 If the repository or pull request id does not exist
PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity

Returns a paginated list of the pull request's activity log. This handler serves both a v20 and internal endpoint. The v20 endpoint returns reviewer comments, updates, approvals and request changes. The internal endpoint includes those plus tasks and attachments. Comments created on a file or a line of code have an inline property. Comment example: ``` { "pagelen": 20, "values": [ { "comment": { "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088" } }, "deleted": false, "pullrequest": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" }, "content": { "raw": "inline with to a dn from lines", "markup": "markdown", "html": "<p>inline with to a dn from lines</p>", "type": "rendered" }, "created_on": "2019-09-27T00:33:46.039178+00:00", "user": { "display_name": "Name Lastname", "uuid": "{}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B%7D" }, "html": { "href": "https://bitbucket.org/%7B%7D/" }, "avatar": { "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" } }, "type": "user", "nickname": "Name", "account_id": "" }, "created_on": "2019-09-27T00:33:46.039178+00:00", "user": { "display_name": "Name Lastname", "uuid": "{}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B%7D" }, "html": { "href": "https://bitbucket.org/%7B%7D/" }, "avatar": { "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" } }, "type": "user", "nickname": "Name", "account_id": "" }, "updated_on": "2019-09-27T00:33:46.055384+00:00", "inline": { "context_lines": "", "to": null, "path": "", "outdated": false, "from": 211 }, "type": "pullrequest_comment", "id": 118571088 }, "pull_request": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" } } ] } ``` Updates include a state property of OPEN, MERGED, or DECLINED. Update example: ``` { "pagelen": 20, "values": [ { "update": { "description": "", "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it", "destination": { "commit": { "type": "commit", "hash": "6a2c16e4a152", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152" } } }, "branch": { "name": "master" }, "repository": { "name": "Atlaskit-MK-2", "type": "repository", "full_name": "atlassian/atlaskit-mk-2", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js" } }, "uuid": "{}" } }, "reason": "", "source": { "commit": { "type": "commit", "hash": "728c8bad1813", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813" } } }, "branch": { "name": "username/NONE-add-onClick-prop-for-accessibility" }, "repository": { "name": "Atlaskit-MK-2", "type": "repository", "full_name": "atlassian/atlaskit-mk-2", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js" } }, "uuid": "{}" } }, "state": "OPEN", "author": { "display_name": "Name Lastname", "uuid": "{}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B%7D" }, "html": { "href": "https://bitbucket.org/%7B%7D/" }, "avatar": { "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" } }, "type": "user", "nickname": "Name", "account_id": "" }, "date": "2019-05-10T06:48:25.305565+00:00" }, "pull_request": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" } } ] } ``` Approval example: ``` { "pagelen": 20, "values": [ { "approval": { "date": "2019-09-27T00:37:19.849534+00:00", "pullrequest": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" }, "user": { "display_name": "Name Lastname", "uuid": "{}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B%7D" }, "html": { "href": "https://bitbucket.org/%7B%7D/" }, "avatar": { "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" } }, "type": "user", "nickname": "Name", "account_id": "" } }, "pull_request": { "type": "pullrequest", "id": 5695, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" }, "html": { "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" } }, "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" } } ] } ```

operationId: Pullrequests_listActivityLog

Responses

200 The pull request activity log
401 If the repository is private and the request was not authenticated.
404 If the specified repository does not exist.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve

Redact the authenticated user's approval of the specified pull request.

operationId: Pullrequests_unapprovePullRequest

Responses

204 An empty response indicating the authenticated user's approval has been withdrawn.
400 Pull request cannot be unapproved because the pull request has already been merged.
401 The request wasn't authenticated.
404 The specified pull request or the repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve

Approve the specified pull request as the authenticated user.

operationId: Pullrequests_approveRequest

Responses

200 The `participant` object recording that the authenticated user approved the pull request.
401 The request wasn't authenticated.
404 The specified pull request or the repository does not exist.
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments

Returns a paginated list of the pull request's comments. This includes both global, inline comments and replies. 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](/cloud/bitbucket/rest/intro/#filtering) for more details.

operationId: Pullrequests_listComments

Responses

200 A paginated list of comments made on the given pull request, in chronological order.
403 If the authenticated user does not have access to the pull request.
404 If the pull request does not exist.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments

Creates a new pull request comment. Returns the newly created pull request comment.

operationId: Pullrequests_createComment

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pullrequest_comment"
      }
    }
  },
  "required": true,
  "description": "The comment object."
}

Responses

201 The newly created comment.
403 If the authenticated user does not have access to the pull request.
404 If the pull request does not exist.
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}

Deletes a specific pull request comment.

operationId: Pullrequests_deleteComment

Responses

204 Successful deletion.
403 If the authenticated user does not have access to delete the comment.
404 If the comment does not exist.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}

Returns a specific pull request comment.

operationId: Pullrequests_getComment

Responses

200 The comment.
403 If the authenticated user does not have access to the pull request.
404 If the comment does not exist.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}

Updates a specific pull request comment.

operationId: Pullrequests_updateComment

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pullrequest_comment"
      }
    }
  },
  "required": true,
  "description": "The contents of the updated comment."
}

Responses

200 The updated comment.
403 If the authenticated user does not have access to the comment.
404 If the comment does not exist.
PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve
operationId: Pullrequests_reopenCommentThread

Responses

204 The comment is reopened.
403 If the authenticated user does not have access to the pull request, or if the provided comment is not a top-level comment.
404 If the comment does not exist, or if the comment has not been resolved
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve
operationId: Pullrequests_resolveCommentThread

Responses

200 The comment resolution details.
403 If the authenticated user does not have access to the pull request, if the provided comment is not a top-level comment, or if the comment is not on the diff.
404 If the comment does not exist.
409 If the comment has already been resolved.
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits

Returns a paginated list of the pull request's commits. These are the commits that are being merged into the destination branch when the pull requests gets accepted.

operationId: Pullrequests_listCommits

Responses

200 A paginated list of commits made on the given pull request, in chronological order. This list will be empty if the source branch no longer exists.
403 If the authenticated user does not have access to the pull request.
404 If the pull request does not exist or the source branch is from a forked repository which no longer exists.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline

Declines the pull request.

operationId: Pullrequests_declinePullRequest

Responses

200 The pull request was successfully declined.
555 If the decline took too long and timed out. In this case the caller should retry the request later.
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff

Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) with the revspec that corresponds to the pull request.

operationId: Pullrequests_listDiff

Responses

default Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) with the revspec that corresponds to the pull request.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat

Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get) with the revspec that corresponds to the pull request.

operationId: Pullrequests_getDiffstat

Responses

default Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get) with the revspec that corresponds to pull request.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge

Merges the pull request.

operationId: Pullrequests_mergePullRequest

Parameters

Name In Required Type Description
async query optional boolean Default value is false. When set to true, runs merge asynchronously and immediately returns a 202 with polling link to the task-status API in the Location header. When set to false, runs merge and waits for it to complete, returning 200 when it succeeds. If the duration of the merge exceeds a timeout threshold, the API returns a 202 with polling link to the task-status API in the Location header.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/pullrequest_merge_parameters"
      }
    }
  }
}

Responses

200 The pull request object.
202 In the Location header, the URL to poll for the pull request merge status
555 If the merge took too long and timed out. In this case the caller should retry the request later
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}

When merging a pull request takes too long, the client receives a task ID along with a 202 status code. The task ID can be used in a call to this endpoint to check the status of a merge task. ``` curl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id> ``` If the merge task is not yet finished, a PENDING status will be returned. ``` HTTP/2 200 { "task_status": "PENDING", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>" } } } ``` If the merge was successful, a SUCCESS status will be returned. ``` HTTP/2 200 { "task_status": "SUCCESS", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>" } }, "merge_result": <the merged pull request object> } ``` If the merge task failed, an error will be returned. ``` { "type": "error", "error": { "message": "<error message>" } } ```

operationId: Pullrequests_mergeTaskStatus

Responses

200 Returns a task status if the merge is either pending or successful, and if it is successful, a pull request
400 If the provided task ID does not relate to this pull request, or if something went wrong during the merge operation
403 The user making the request does not have permission to the repo and is different from the user who queued the task
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch

Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get) with the revspec that corresponds to pull request.

operationId: Pullrequests_getPatch

Responses

default Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get) with the revspec that corresponds to pull request.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes
operationId: Pullrequests_removeChangeRequest

Responses

204 An empty response indicating the authenticated user's request for change has been withdrawn.
400 Pull request requested changes cannot be removed because the pull request has already been merged.
401 The request wasn't authenticated.
404 The specified pull request or the repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes
operationId: Pullrequests_requestChanges

Responses

200 The `participant` object recording that the authenticated user requested changes on the pull request.
400 Pull request changes cannot be requested because the pull request has already been merged.
401 The request wasn't authenticated.
404 The specified pull request or the repository does not exist.
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks

Returns a paginated list of the pull request's tasks. This endpoint supports filtering and sorting of the results by the 'task' field. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.

operationId: Pullrequests_listTasksOnPullRequest

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). Defaults to `created_on`.
pagelen query optional integer Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.

Responses

200 A paginated list of pull request tasks for the given pull request.
400 If the user provides an invalid filter, sort, or fields query parameter.
403 If the authenticated user does not have access to the pull request.
404 If the pull request does not exist.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks

Creates a new pull request task. Returns the newly created pull request task. Tasks can optionally be created in relation to a comment specified by the comment's ID which will cause the task to appear below the comment on a pull request when viewed in Bitbucket.

operationId: Pullrequests_createTask

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/A_pullrequest_task_create"
      }
    }
  },
  "required": true,
  "description": "The contents of the task"
}

Responses

201 The newly created task.
400 There is a missing required field in the request or the task content is blank.
403 If the authenticated user does not have access to the pull request.
404 If the pull request does not exist.
POST /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}

Deletes a specific pull request task.

operationId: Pullrequests_deleteTask

Responses

204 Successful deletion.
403 If the authenticated user does not have access to delete the task.
404 If the task does not exist.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}

Returns a specific pull request task.

operationId: Pullrequests_getTask

Responses

200 The task.
403 If the authenticated user does not have access to the pull request.
404 If the task does not exist.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}
PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}

Updates a specific pull request task.

operationId: Pullrequests_updateTask

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/A_pullrequest_task_update"
      }
    }
  },
  "required": true,
  "description": "The updated state and content of the task."
}

Responses

200 The updated task.
400 There is a missing required field in the request or the task content is blank.
403 If the authenticated user does not have access to the pull request.
404 If the task does not exist.
PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses

Returns all statuses (e.g. build results) for the given pull request.

operationId: Pullrequests_listCommitStatuses

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). Defaults to `created_on`.

Responses

200 A paginated list of all commit statuses for this pull request.
401 If the repository is private and the request was not authenticated.
404 If the specified repository or pull request does not exist.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses

Refs 9 endpoints

GET /repositories/{workspace}/{repo_slug}/refs

Returns the branches and tags in the repository. By default, results will be in the order the underlying source control system returns them and identical to the ordering one sees when running "$ git show-ref". Note that this follows simple lexical ordering of the ref names. This can be undesirable as it does apply any natural sorting semantics, meaning for instance that refs are sorted ["branch1", "branch10", "branch2", "v10", "v11", "v9"] instead of ["branch1", "branch2", "branch10", "v9", "v10", "v11"]. Sorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name, Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.

operationId: Refs_listBranchesAndTags

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name` field is handled specially for refs in that, if specified as the sort field, it uses a natural sort order instead of the default lexicographical sort order. For example, it will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2'].

Responses

200 A paginated list of refs matching any filter criteria that were provided.
403 If the repository is private and the authenticated user does not have access to it.
404 The specified repository does not exist.
GET /repositories/{workspace}/{repo_slug}/refs
GET /repositories/{workspace}/{repo_slug}/refs/branches

Returns a list of all open branches within the specified repository. Results will be in the order the source control manager returns them. Branches support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) that can be used to search for specific branches. For instance, to find all branches that have "stab" in their name: ``` curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches -G --data-urlencode 'q=name ~ "stab"' ``` By default, results will be in the order the underlying source control system returns them and identical to the ordering one sees when running "$ git branch --list". Note that this follows simple lexical ordering of the ref names. This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are sorted ["v10", "v11", "v9"] instead of ["v9", "v10", "v11"]. Sorting can be changed using the ?q= query parameter. When using ?q=name to explicitly sort on ref name, Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.

operationId: Refs_listOpenBranches

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name` field is handled specially for branches in that, if specified as the sort field, it uses a natural sort order instead of the default lexicographical sort order. For example, it will return ['branch1', 'branch2', 'branch10'] instead of ['branch1', 'branch10', 'branch2'].

Responses

200 A paginated list of branches matching any filter criteria that were provided.
403 If the repository is private and the authenticated user does not have access to it.
404 The specified repository does not exist.
GET /repositories/{workspace}/{repo_slug}/refs/branches
POST /repositories/{workspace}/{repo_slug}/refs/branches

Creates a new branch in the specified repository. The payload of the POST should consist of a JSON document that contains the name of the tag and the target hash. ``` curl https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/branches \ -s -u seanfarley -X POST -H "Content-Type: application/json" \ -d '{ "name" : "smf/create-feature", "target" : { "hash" : "default", } }' ``` This call requires authentication. Private repositories require the caller to authenticate with an account that has appropriate authorization. The branch name should not include any prefixes (e.g. refs/heads). This endpoint does support using short hash prefixes for the commit hash, but it may return a 400 response if the provided prefix is ambiguous. Using a full commit hash is the preferred approach.

operationId: Refs_createBranch

Responses

201 The newly created branch object.
403 If the repository is private and the authenticated user does not have access to it.
404 The specified repository or branch does not exist.
POST /repositories/{workspace}/{repo_slug}/refs/branches
DELETE /repositories/{workspace}/{repo_slug}/refs/branches/{name}

Delete a branch in the specified repository. The main branch is not allowed to be deleted and will return a 400 response. The branch name should not include any prefixes (e.g. refs/heads).

operationId: Refs_deleteBranch

Responses

204 Indicates that the specified branch was successfully deleted.
403 If the repository is private and the authenticated user does not have access to it.
404 The specified repository or branch does not exist.
DELETE /repositories/{workspace}/{repo_slug}/refs/branches/{name}
GET /repositories/{workspace}/{repo_slug}/refs/branches/{name}

Returns a branch object within the specified repository. This call requires authentication. Private repositories require the caller to authenticate with an account that has appropriate authorization. For Git, the branch name should not include any prefixes (e.g. refs/heads).

operationId: Refs_getBranch

Responses

200 The branch object.
403 If the repository is private and the authenticated user does not have access to it.
404 The specified repository or branch does not exist.
GET /repositories/{workspace}/{repo_slug}/refs/branches/{name}
GET /repositories/{workspace}/{repo_slug}/refs/tags

Returns the tags in the repository. By default, results will be in the order the underlying source control system returns them and identical to the ordering one sees when running "$ git tag --list". Note that this follows simple lexical ordering of the ref names. This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are sorted ["v10", "v11", "v9"] instead of ["v9", "v10", "v11"]. Sorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name, Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.

operationId: Refs_listTags

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name` field is handled specially for tags in that, if specified as the sort field, it uses a natural sort order instead of the default lexicographical sort order. For example, it will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2'].

Responses

200 A paginated list of tags matching any filter criteria that were provided.
403 If the repository is private and the authenticated user does not have access to it.
404 The specified repository does not exist.
GET /repositories/{workspace}/{repo_slug}/refs/tags
POST /repositories/{workspace}/{repo_slug}/refs/tags

Creates a new tag in the specified repository. The payload of the POST should consist of a JSON document that contains the name of the tag and the target hash. ``` curl https://api.bitbucket.org/2.0/repositories/jdoe/myrepo/refs/tags \ -s -u jdoe -X POST -H "Content-Type: application/json" \ -d '{ "name" : "new-tag-name", "target" : { "hash" : "a1b2c3d4e5f6", } }' ``` This endpoint does support using short hash prefixes for the commit hash, but it may return a 400 response if the provided prefix is ambiguous. Using a full commit hash is the preferred approach.

operationId: Refs_createTag

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/tag"
      }
    }
  },
  "required": true
}

Responses

201 The newly created tag.
400 If the target hash is missing, ambiguous, or invalid, or if the name is not provided.
POST /repositories/{workspace}/{repo_slug}/refs/tags
DELETE /repositories/{workspace}/{repo_slug}/refs/tags/{name}

Delete a tag in the specified repository. The tag name should not include any prefixes (e.g. refs/tags).

operationId: Refs_deleteTag

Responses

204 Indicates the specified tag was successfully deleted.
403 If the repository is private and the authenticated user does not have access to it.
404 The specified repository or tag does not exist.
DELETE /repositories/{workspace}/{repo_slug}/refs/tags/{name}
GET /repositories/{workspace}/{repo_slug}/refs/tags/{name}

Returns the specified tag. ``` $ curl -s https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8 -G | jq . { "name": "3.8", "links": { "commits": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commits/3.8" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8" }, "html": { "href": "https://bitbucket.org/seanfarley/hg/commits/tag/3.8" } }, "tagger": { "raw": "Matt Mackall <mpm@selenic.com>", "type": "author", "user": { "username": "mpmselenic", "nickname": "mpmselenic", "display_name": "Matt Mackall", "type": "user", "uuid": "{a4934530-db4c-419c-a478-9ab4964c2ee7}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/mpmselenic" }, "html": { "href": "https://bitbucket.org/mpmselenic/" }, "avatar": { "href": "https://bitbucket.org/account/mpmselenic/avatar/32/" } } } }, "date": "2016-05-01T18:52:25+00:00", "message": "Added tag 3.8 for changeset f85de28eae32", "type": "tag", "target": { "hash": "f85de28eae32e7d3064b1a1321309071bbaaa069", "repository": { "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg" }, "html": { "href": "https://bitbucket.org/seanfarley/hg" }, "avatar": { "href": "https://bitbucket.org/seanfarley/hg/avatar/32/" } }, "type": "repository", "name": "hg", "full_name": "seanfarley/hg", "uuid": "{c75687fb-e99d-4579-9087-190dbd406d30}" }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/comments" }, "patch": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/patch/f85de28eae32e7d3064b1a1321309071bbaaa069" }, "html": { "href": "https://bitbucket.org/seanfarley/hg/commits/f85de28eae32e7d3064b1a1321309071bbaaa069" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/diff/f85de28eae32e7d3064b1a1321309071bbaaa069" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/statuses" } }, "author": { "raw": "Sean Farley <sean@farley.io>", "type": "author", "user": { "username": "seanfarley", "nickname": "seanfarley", "display_name": "Sean Farley", "type": "user", "uuid": "{a295f8a8-5876-4d43-89b5-3ad8c6c3c51d}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/seanfarley" }, "html": { "href": "https://bitbucket.org/seanfarley/" }, "avatar": { "href": "https://bitbucket.org/account/seanfarley/avatar/32/" } } } }, "parents": [ { "hash": "9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2", "type": "commit", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2" }, "html": { "href": "https://bitbucket.org/seanfarley/hg/commits/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2" } } } ], "date": "2016-05-01T04:21:17+00:00", "message": "debian: alphabetize build deps", "type": "commit" } } ```

operationId: Refs_tagsByNameGet

Responses

200 The tag object.
403 If the repository is private and the authenticated user does not have access to it.
404 The specified repository or tag does not exist.
GET /repositories/{workspace}/{repo_slug}/refs/tags/{name}

Reports 9 endpoints

GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports

Returns a paginated list of Reports linked to this commit.

operationId: Reports_listLinkedReports

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.
commit path required string The commit for which to retrieve reports.

Responses

200 OK
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}

Deletes a single Report matching the provided ID.

operationId: Reports_deleteReport

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.
commit path required string The commit the report belongs to.
reportId path required string Either the uuid or external-id of the report.

Responses

204 No content
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}

Returns a single Report matching the provided ID.

operationId: Reports_getSingleReport

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.
commit path required string The commit the report belongs to.
reportId path required string Either the uuid or external-id of the report.

Responses

200 OK
404 The report with the given ID was not found.
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}

Creates or updates a report for the specified commit. To upload a report, make sure to generate an ID that is unique across all reports for that commit. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-001. ### Sample cURL request: ``` curl --request PUT 'https://api.bitbucket.org/2.0/repositories/<username>/<reposity-name>/commit/<commit-hash>/reports/mysystem-001' \ --header 'Content-Type: application/json' \ --data-raw '{ "title": "Security scan report", "details": "This pull request introduces 10 new dependency vulnerabilities.", "report_type": "SECURITY", "reporter": "mySystem", "link": "http://www.mysystem.com/reports/001", "result": "FAILED", "data": [ { "title": "Duration (seconds)", "type": "DURATION", "value": 14 }, { "title": "Safe to merge?", "type": "BOOLEAN", "value": false } ] }' ``` ### Possible field values: report_type: SECURITY, COVERAGE, TEST, BUG result: PASSED, FAILED, PENDING data.type: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT #### Data field formats | Type Field | Value Field Type | Value Field Display | |:--------------|:------------------|:--------------------| | None/ Omitted | Number, String or Boolean (not an array or object) | Plain text | | BOOLEAN | Boolean | The value will be read as a JSON boolean and displayed as 'Yes' or 'No'. | | DATE | Number | The value will be read as a JSON number in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise it will be displayed as an absolute date. | | DURATION | Number | The value will be read as a JSON number in milliseconds and will be displayed in a human readable duration format. | | LINK | Object: `{"text": "Link text here", "href": "https://link.to.annotation/in/external/tool"}` | The value will be read as a JSON object containing the fields "text" and "href" and will be displayed as a clickable link on the report. | | NUMBER | Number | The value will be read as a JSON number and large numbers will be displayed in a human readable format (e.g. 14.3k). | | PERCENTAGE | Number (between 0 and 100) | The value will be read as a JSON number between 0 and 100 and will be displayed with a percentage sign. | | TEXT | String | The value will be read as a JSON string and will be displayed as-is | Please refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.

operationId: Reports_commitReportCreateOrUpdate

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.
commit path required string The commit the report belongs to.
reportId path required string Either the uuid or external-id of the report.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/report"
      }
    }
  },
  "required": true,
  "description": "The report to create or update"
}

Responses

200 OK
400 The provided Report object is malformed or incomplete.
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations

Returns a paginated list of Annotations for a specified report.

operationId: Reports_listAnnotations

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.
commit path required string The commit for which to retrieve reports.
reportId path required string Uuid or external-if of the report for which to get annotations for.

Responses

200 OK
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations
POST /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations

Bulk upload of annotations. Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations. Add the annotations you want to upload as objects in a JSON array and make sure each annotation has the external_id field set to a unique value. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. The external id can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). You can upload up to 100 annotations per POST request. ### Sample cURL request: ``` curl --location 'https://api.bitbucket.org/2.0/repositories/<username>/<reposity-name>/commit/<commit-hash>/reports/mysystem-001/annotations' \ --header 'Content-Type: application/json' \ --data-raw '[ { "external_id": "mysystem-annotation001", "title": "Security scan report", "annotation_type": "VULNERABILITY", "summary": "This line represents a security threat.", "severity": "HIGH", "path": "my-service/src/main/java/com/myCompany/mysystem/logic/Main.java", "line": 42 }, { "external_id": "mySystem-annotation002", "title": "Bug report", "annotation_type": "BUG", "result": "FAILED", "summary": "This line might introduce a bug.", "severity": "MEDIUM", "path": "my-service/src/main/java/com/myCompany/mysystem/logic/Helper.java", "line": 13 } ]' ``` ### Possible field values: annotation_type: VULNERABILITY, CODE_SMELL, BUG result: PASSED, FAILED, IGNORED, SKIPPED severity: HIGH, MEDIUM, LOW, CRITICAL Please refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.

operationId: Reports_bulkCreateOrUpdateAnnotations

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.
commit path required string The commit for which to retrieve reports.
reportId path required string Uuid or external-if of the report for which to get annotations for.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ReportsBulkCreateOrUpdateAnnotationsRequest"
      }
    }
  },
  "required": true,
  "description": "The annotations to create or update"
}

Responses

200 OK
POST /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}

Deletes a single Annotation matching the provided ID.

operationId: Reports_deleteAnnotation

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.
commit path required string The commit the annotation belongs to.
reportId path required string Either the uuid or external-id of the annotation.
annotationId path required string Either the uuid or external-id of the annotation.

Responses

204 No content
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}

Returns a single Annotation matching the provided ID.

operationId: Reports_getAnnotation

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.
commit path required string The commit the report belongs to.
reportId path required string Either the uuid or external-id of the report.
annotationId path required string Either the uuid or external-id of the annotation.

Responses

200 OK
404 The annotation with the given ID was not found.
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}

Creates or updates an individual annotation for the specified report. Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations. Just as reports, annotation needs to be uploaded with a unique ID that can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. ### Sample cURL request: ``` curl --request PUT 'https://api.bitbucket.org/2.0/repositories/<username>/<reposity-name>/commit/<commit-hash>/reports/mySystem-001/annotations/mysystem-annotation001' \ --header 'Content-Type: application/json' \ --data-raw '{ "title": "Security scan report", "annotation_type": "VULNERABILITY", "summary": "This line represents a security thread.", "severity": "HIGH", "path": "my-service/src/main/java/com/myCompany/mysystem/logic/Main.java", "line": 42 }' ``` ### Possible field values: annotation_type: VULNERABILITY, CODE_SMELL, BUG result: PASSED, FAILED, IGNORED, SKIPPED severity: HIGH, MEDIUM, LOW, CRITICAL Please refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.

operationId: Reports_commitAnnotations

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.
commit path required string The commit the report belongs to.
reportId path required string Either the uuid or external-id of the report.
annotationId path required string Either the uuid or external-id of the annotation.

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/report_annotation"
      }
    }
  },
  "required": true,
  "description": "The annotation to create or update"
}

Responses

200 OK
400 The provided Annotation object is malformed or incomplete.
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}

Repositories 25 endpoints

GET /repositories

Returns a paginated list of all public repositories. This endpoint also supports filtering and sorting of the results. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.

operationId: Repositories_listPublicRepositories

Parameters

Name In Required Type Description
after query optional string Filter the results to include only repositories created on or after this [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. Example: `YYYY-MM-DDTHH:mm:ss.sssZ`
role query optional string Filters the result based on the authenticated user's role on each repository. * **member**: returns repositories to which the user has explicit read access * **contributor**: returns repositories to which the user has explicit write access * **admin**: returns repositories to which the user has explicit administrator access * **owner**: returns all repositories owned by the current user
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). `role` parameter must also be specified.
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).

Responses

200 All public repositories.
GET /repositories
GET /repositories/{workspace}

Returns a paginated list of all repositories owned by the specified workspace. The result can be narrowed down based on the authenticated user's role. E.g. with `?role=contributor`, only those repositories that the authenticated user has write access to are returned (this includes any repo the user is an admin on, as that implies write access). This endpoint also supports filtering and sorting of the results. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.

operationId: Repositories_listInWorkspace

Parameters

Name In Required Type Description
role query optional string Filters the result based on the authenticated user's role on each repository. * **member**: returns repositories to which the user has explicit read access * **contributor**: returns repositories to which the user has explicit write access * **admin**: returns repositories to which the user has explicit administrator access * **owner**: returns all repositories owned by the current user
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).

Responses

200 The repositories owned by the specified account.
404 If the specified account does not exist.
410 If the specified account marked as spam.
GET /repositories/{workspace}
DELETE /repositories/{workspace}/{repo_slug}

Deletes the repository. This is an irreversible operation. This does not affect its forks.

operationId: Repositories_deleteRepository

Parameters

Name In Required Type Description
redirect_to query optional string If a repository has been moved to a new location, use this parameter to show users a friendly message in the Bitbucket UI that the repository has moved to a new location. However, a GET to this endpoint will still return a 404.

Responses

204 Indicates successful deletion.
403 If the caller either does not have admin access to the repository, or the repository is set to read-only.
404 If the repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}
GET /repositories/{workspace}/{repo_slug}

Returns the object describing this repository.

operationId: Repositories_getRepositoryDetails

Responses

200 The repository object.
403 If the repository is private and the authenticated user does not have access to it.
404 If no repository exists at this location.
GET /repositories/{workspace}/{repo_slug}
POST /repositories/{workspace}/{repo_slug}

Creates a new repository. Note: In order to set the project for the newly created repository, pass in either the project key or the project UUID as part of the request body as shown in the examples below: ``` $ curl -X POST -H "Content-Type: application/json" -d '{ "scm": "git", "project": { "key": "MARS" } }' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding ``` or ``` $ curl -X POST -H "Content-Type: application/json" -d '{ "scm": "git", "project": { "key": "{ba516952-992a-4c2d-acbd-17d502922f96}" } }' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding ``` The project must be assigned for all repositories. If the project is not provided, the repository is automatically assigned to the oldest project in the workspace. Note: In the examples above, the workspace ID `teamsinspace`, and/or the repository name `hablanding` can be replaced by UUIDs.

operationId: Repositories_createRepo

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/repository"
      }
    }
  },
  "description": "The repository that is to be created. Note that most object elements are optional. Elements \"owner\" and \"full_name\" are ignored as the URL implies them."
}

Responses

200 The newly created repository.
400 If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
401 If the request was not authenticated.
POST /repositories/{workspace}/{repo_slug}
PUT /repositories/{workspace}/{repo_slug}

Since this endpoint can be used to both update and to create a repository, the request body depends on the intent. #### Creation See the POST documentation for the repository endpoint for an example of the request body. #### Update Note: Changing the `name` of the repository will cause the location to be changed. This is because the URL of the repo is derived from the name (a process called slugification). In such a scenario, it is possible for the request to fail if the newly created slug conflicts with an existing repository's slug. But if there is no conflict, the new location will be returned in the `Location` header of the response.

operationId: Repositories_createOrUpdate

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/repository"
      }
    }
  },
  "description": "The repository that is to be updated.\n\nNote that the elements \"owner\" and \"full_name\" are ignored since the\nURL implies them.\n"
}

Responses

200 The existing repository has been updated
201 A new repository has been created
400 If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
401 If the request was not authenticated.
PUT /repositories/{workspace}/{repo_slug}
GET /repositories/{workspace}/{repo_slug}/forks

Returns a paginated list of all the forks of the specified repository.

operationId: Repositories_listForks

Parameters

Name In Required Type Description
role query optional string Filters the result based on the authenticated user's role on each repository. * **member**: returns repositories to which the user has explicit read access * **contributor**: returns repositories to which the user has explicit write access * **admin**: returns repositories to which the user has explicit administrator access * **owner**: returns all repositories owned by the current user
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).

Responses

200 All forks.
GET /repositories/{workspace}/{repo_slug}/forks
POST /repositories/{workspace}/{repo_slug}/forks

Creates a new fork of the specified repository. #### Forking a repository To create a fork, specify the workspace explicitly as part of the request body: ``` $ curl -X POST -u jdoe https://api.bitbucket.org/2.0/repositories/atlassian/bbql/forks \ -H 'Content-Type: application/json' -d '{ "name": "bbql_fork", "workspace": { "slug": "atlassian" } }' ``` To fork a repository into the same workspace, also specify a new `name`. When you specify a value for `name`, it will also affect the `slug`. The `slug` is reflected in the repository URL of the new fork. It is derived from `name` by substituting non-ASCII characters, removes whitespace, and changes characters to lower case. For example, `My repo` would turn into `my_repo`. You need contributor access to create new forks within a workspace. #### Change the properties of a new fork By default the fork inherits most of its properties from the parent. However, since the optional POST body document follows the normal `repository` JSON schema and you can override the new fork's properties. Properties that can be overridden include: * description * fork_policy * language * mainbranch * is_private (note that a private repo's fork_policy might prohibit the creation of public forks, in which `is_private=False` would fail) * has_issues (to initialize or disable the new repo's issue tracker -- note that the actual contents of the parent repository's issue tracker are not copied during forking) * has_wiki (to initialize or disable the new repo's wiki -- note that the actual contents of the parent repository's wiki are not copied during forking) * project (when forking into a private project, the fork's `is_private` must be `true`) Properties that cannot be modified include: * scm * parent * full_name

operationId: Repositories_forkRepository

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/repository"
      }
    }
  },
  "description": "A repository object. This can be left blank."
}

Responses

201 The newly created fork.
POST /repositories/{workspace}/{repo_slug}/forks
GET /repositories/{workspace}/{repo_slug}/override-settings
operationId: Repositories_inheritanceStateGet

Responses

200 The repository setting inheritance state
404 If no repository exists at this location
GET /repositories/{workspace}/{repo_slug}/override-settings
PUT /repositories/{workspace}/{repo_slug}/override-settings
operationId: Repositories_setInheritanceState

Responses

204 The repository setting inheritance state was set and no content returned
404 If no repository exists at this location
PUT /repositories/{workspace}/{repo_slug}/override-settings
GET /repositories/{workspace}/{repo_slug}/permissions-config/groups

Returns a paginated list of explicit group permissions for the given repository. This endpoint does not support BBQL features.

operationId: Repositories_listGroupPermissions

Responses

200 Paginated of explicit group permissions on the repository.
401 The user couldn't be authenticated.
403 The requesting user isn't an admin of the repository.
404 One or both of the workspace and repository doesn't exist for the given identifiers.
GET /repositories/{workspace}/{repo_slug}/permissions-config/groups
DELETE /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}

Deletes the repository group permission between the requested repository and group, if one exists. Only users with admin permission for the repository may access this resource.

operationId: Repositories_deleteGroupPermission

Responses

204 Group permission deleted
401 The user couldn't be authenticated.
403 The requesting user isn't an admin of the repository, or the authentication method was not via app password.
404 The workspace does not exist, the repository does not exist, or the group does not exist.
DELETE /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}
GET /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}

Returns the group permission for a given group slug and repository Only users with admin permission for the repository may access this resource. Permissions can be: * `admin` * `write` * `read` * `none`

operationId: Repositories_getGroupPermissions

Responses

200 Group permission for group slug and repository
401 The user couldn't be authenticated.
403 The requesting user isn't an admin of the repository.
404 The given user, workspace, and/or repository could not be found
GET /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}
PUT /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}

Updates the group permission, or grants a new permission if one does not already exist. Only users with admin permission for the repository may access this resource. The only authentication method supported for this endpoint is via app passwords. Permissions can be: * `admin` * `write` * `read`

operationId: Repositories_updateGroupPermission

Request Body

{
  "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema"
}

Responses

200 Group permission updated
400 No permission value was provided or the value is invalid(not one of read, write, or admin)
401 The user couldn't be authenticated.
402 You have reached your plan's user limit and must upgrade before giving access to additional users.
403 The requesting user isn't an admin of the repository, or the authentication method was not via app password.
404 The workspace does not exist, the repository does not exist, or the group does not exist.
PUT /repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}
GET /repositories/{workspace}/{repo_slug}/permissions-config/users

Returns a paginated list of explicit user permissions for the given repository. This endpoint does not support BBQL features.

operationId: Repositories_listUserPermissions

Responses

200 Paginated of explicit user permissions on the repository.
401 The user couldn't be authenticated.
403 The requesting user isn't an admin of the repository.
404 No repository exists for the given repository slug and workspace.
GET /repositories/{workspace}/{repo_slug}/permissions-config/users
DELETE /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}

Deletes the repository user permission between the requested repository and user, if one exists. Only users with admin permission for the repository may access this resource. The only authentication method for this endpoint is via app passwords.

operationId: Repositories_deleteUserPermission

Responses

204 The repository user permission was deleted and no content returned.
401 The user couldn't be authenticated.
403 The requesting user isn't an admin of the repository, or the authentication method was not via app password.
404 One or more of the workspace, repository, and user doesn't exist for the given identifiers.
DELETE /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}
GET /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}

Returns the explicit user permission for a given user and repository. Only users with admin permission for the repository may access this resource. Permissions can be: * `admin` * `write` * `read` * `none`

operationId: Repositories_explicitUserPermission

Responses

200 Explicit user permission for user and repository
401 The user couldn't be authenticated.
403 The requesting user isn't an admin of the repository.
404 One or both of the workspace and repository doesn't exist for the given identifiers.
GET /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}
PUT /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}

Updates the explicit user permission for a given user and repository. The selected user must be a member of the workspace, and cannot be the workspace owner. Only users with admin permission for the repository may access this resource. The only authentication method for this endpoint is via app passwords. Permissions can be: * `admin` * `write` * `read`

operationId: Repositories_updateUserPermission

Request Body

{
  "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema"
}

Responses

200 Explicit user permission updated
400 No permission value was provided or the value is invalid (not one of read, write, or admin), or the selected user is not a valid user to update.
401 The user couldn't be authenticated.
402 You have reached your plan's user limit and must upgrade before giving access to additional users.
403 The requesting user isn't an admin of the repository, or the authentication method was not via app password.
404 One or more of the workspace, repository, and selected user doesn't exist for the given identifiers.
PUT /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}
GET /repositories/{workspace}/{repo_slug}/watchers

Returns a paginated list of all the watchers on the specified repository.

operationId: Repositories_listWatchers

Responses

200 A paginated list of all the watchers on the specified repository.
GET /repositories/{workspace}/{repo_slug}/watchers
GET /user/permissions/repositories

Returns an object for each repository the caller has explicit access to and their effective permission — the highest level of permission the caller has. This does not return public repositories that the user was not granted any specific permission in, and does not distinguish between explicit and implicit privileges. Permissions can be: * `admin` * `write` * `read` Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by repository or permission by adding the following query string parameters: * `q=repository.name="geordi"` or `q=permission>"read"` * `sort=repository.name` Note that the query parameter values need to be URL escaped so that `=` would become `%3D`.

operationId: Repositories_listUserPermissions

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Name of a response property sort the result by as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).

Responses

200 Repository permissions for the repositories a caller has explicit access to.
GET /user/permissions/repositories
GET /repositories/{workspace}/{repo_slug}/hooks

Returns a paginated list of webhooks installed on this repository.

operationId: Repositories_listWebhooks

Responses

200 The paginated list of installed webhooks.
403 If the authenticated user does not have permission to access the webhooks.
404 If the repository does not exist.
GET /repositories/{workspace}/{repo_slug}/hooks
POST /repositories/{workspace}/{repo_slug}/hooks

Creates a new webhook on the specified repository. Example: ``` $ curl -X POST -u credentials -H 'Content-Type: application/json' https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo-slug/hooks -d ' { "description": "Webhook Description", "url": "https://example.com/", "active": true, "secret": "this is a really bad secret", "events": [ "repo:push", "issue:created", "issue:updated" ] }' ``` When the `secret` is provided it will be used as the key to generate a HMAC digest value sent in the `X-Hub-Signature` header at delivery time. Passing a `null` or empty `secret` or not passing a `secret` will leave the webhook's secret unset. Bitbucket only generates the `X-Hub-Signature` when the webhook's secret is set. Note that this call requires the webhook scope, as well as any scope that applies to the events that the webhook subscribes to. In the example above that means: `webhook`, `repository` and `issue`. Also note that the `url` must properly resolve and cannot be an internal, non-routed address.

operationId: Repositories_createWebhook

Responses

201 If the webhook was registered successfully.
403 If the authenticated user does not have permission to install webhooks on the specified repository.
404 If the repository does not exist.
POST /repositories/{workspace}/{repo_slug}/hooks
DELETE /repositories/{workspace}/{repo_slug}/hooks/{uid}

Deletes the specified webhook subscription from the given repository.

operationId: Repositories_deleteWebhook

Responses

204 When the webhook was deleted successfully
403 If the authenticated user does not have permission to delete the webhook.
404 If the webhook or repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}/hooks/{uid}
GET /repositories/{workspace}/{repo_slug}/hooks/{uid}

Returns the webhook with the specified id installed on the specified repository.

operationId: Repositories_getWebhookByUid

Responses

200 The webhook subscription object.
404 If the webhook or repository does not exist.
GET /repositories/{workspace}/{repo_slug}/hooks/{uid}
PUT /repositories/{workspace}/{repo_slug}/hooks/{uid}

Updates the specified webhook subscription. The following properties can be mutated: * `description` * `url` * `secret` * `active` * `events` The hook's secret is used as a key to generate the HMAC hex digest sent in the `X-Hub-Signature` header at delivery time. This signature is only generated when the hook has a secret. Set the hook's secret by passing the new value in the `secret` field. Passing a `null` value in the `secret` field will remove the secret from the hook. The hook's secret can be left unchanged by not passing the `secret` field in the request.

operationId: Repositories_updateWebhookSubscription

Responses

200 The webhook subscription object.
403 If the authenticated user does not have permission to update the webhook.
404 If the webhook or repository does not exist.
PUT /repositories/{workspace}/{repo_slug}/hooks/{uid}

Snippets 24 endpoints

GET /snippets

Returns all snippets. Like pull requests, repositories and workspaces, the full set of snippets is defined by what the current user has access to. This includes all snippets owned by any of the workspaces the user is a member of, or snippets by other users that the current user is either watching or has collaborated on (for instance by commenting on it). To limit the set of returned snippets, apply the `?role=[owner|contributor|member]` query parameter where the roles are defined as follows: * `owner`: all snippets owned by the current user * `contributor`: all snippets owned by, or watched by the current user * `member`: created in a workspaces or watched by the current user When no role is specified, all public snippets are returned, as well as all privately owned snippets watched or commented on. The returned response is a normal paginated JSON list. This endpoint only supports `application/json` responses and no `multipart/form-data` or `multipart/related`. As a result, it is not possible to include the file contents.

operationId: Snippets_list

Parameters

Name In Required Type Description
role query optional string Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).

Responses

200 A paginated list of snippets.
404 If the snippet does not exist.
GET /snippets
POST /snippets

Creates a new snippet under the authenticated user's account. Snippets can contain multiple files. Both text and binary files are supported. The simplest way to create a new snippet from a local file: $ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets -F file=@image.png Creating snippets through curl has a few limitations and so let's look at a more complicated scenario. Snippets are created with a multipart POST. Both `multipart/form-data` and `multipart/related` are supported. Both allow the creation of snippets with both meta data (title, etc), as well as multiple text and binary files. The main difference is that `multipart/related` can use rich encoding for the meta data (currently JSON). multipart/related (RFC-2387) ---------------------------- This is the most advanced and efficient way to create a paste. POST /2.0/snippets/evzijst HTTP/1.1 Content-Length: 1188 Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" MIME-Version: 1.0 --===============1438169132528273974== Content-Type: application/json; charset="utf-8" MIME-Version: 1.0 Content-ID: snippet { "title": "My snippet", "is_private": true, "scm": "git", "files": { "foo.txt": {}, "image.png": {} } } --===============1438169132528273974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-ID: "foo.txt" Content-Disposition: attachment; filename="foo.txt" foo --===============1438169132528273974== Content-Type: image/png MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-ID: "image.png" Content-Disposition: attachment; filename="image.png" iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5 EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg== --===============1438169132528273974==-- The request contains multiple parts and is structured as follows. The first part is the JSON document that describes the snippet's properties or meta data. It either has to be the first part, or the request's `Content-Type` header must contain the `start` parameter to point to it. The remaining parts are the files of which there can be zero or more. Each file part should contain the `Content-ID` MIME header through which the JSON meta data's `files` element addresses it. The value should be the name of the file. `Content-Disposition` is an optional MIME header. The header's optional `filename` parameter can be used to specify the file name that Bitbucket should use when writing the file to disk. When present, `filename` takes precedence over the value of `Content-ID`. When the JSON body omits the `files` element, the remaining parts are not ignored. Instead, each file is added to the new snippet as if its name was explicitly linked (the use of the `files` elements is mandatory for some operations like deleting or renaming files). multipart/form-data ------------------- The use of JSON for the snippet's meta data is optional. Meta data can also be supplied as regular form fields in a more conventional `multipart/form-data` request: $ curl -X POST -u credentials https://api.bitbucket.org/2.0/snippets -F title="My snippet" -F file=@foo.txt -F file=@image.png POST /2.0/snippets HTTP/1.1 Content-Length: 951 Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f ------------------------------63a4b224c59f Content-Disposition: form-data; name="file"; filename="foo.txt" Content-Type: text/plain foo ------------------------------63a4b224c59f Content-Disposition: form-data; name="file"; filename="image.png" Content-Type: application/octet-stream ?PNG IHDR?1??I..... ------------------------------63a4b224c59f Content-Disposition: form-data; name="title" My snippet ------------------------------63a4b224c59f-- Here the meta data properties are included as flat, top-level form fields. The file attachments use the `file` field name. To attach multiple files, simply repeat the field. The advantage of `multipart/form-data` over `multipart/related` is that it can be easier to build clients. Essentially all properties are optional, `title` and `files` included. Sharing and Visibility ---------------------- Snippets can be either public (visible to anyone on Bitbucket, as well as anonymous users), or private (visible only to members of the workspace). This is controlled through the snippet's `is_private` element: * **is_private=false** -- everyone, including anonymous users can view the snippet * **is_private=true** -- only workspace members can view the snippet To create the snippet under a workspace, just append the workspace ID to the URL. See [`/2.0/snippets/{workspace}`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-post).

operationId: Snippets_createSnippet

Request Body

{
  "$ref": "#/components/requestBodies/snippet"
}

Responses

201 The newly created snippet object.
401 If the request was not authenticated
POST /snippets
GET /snippets/{workspace}

Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-get), except that the result is further filtered by the snippet owner and only those that are owned by `{workspace}` are returned.

operationId: Snippets_listInWorkspace

Parameters

Name In Required Type Description
role query optional string Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).

Responses

200 A paginated list of snippets.
404 If the user does not exist.
GET /snippets/{workspace}
POST /snippets/{workspace}

Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-post), except that the new snippet will be created under the workspace specified in the path parameter `{workspace}`.

operationId: Snippets_createForWorkspace

Request Body

{
  "$ref": "#/components/requestBodies/snippet"
}

Responses

201 The newly created snippet object.
401 If the request was not authenticated
403 If the authenticated user does not have permission to create snippets in the specified workspace.
POST /snippets/{workspace}
DELETE /snippets/{workspace}/{encoded_id}

Deletes a snippet and returns an empty response.

operationId: Snippets_deleteSnippet

Responses

204 If the snippet was deleted successfully.
401 If the snippet is private and the request was not authenticated.
403 If authenticated user does not have permission to delete the private snippet.
404 If the snippet does not exist.
DELETE /snippets/{workspace}/{encoded_id}
GET /snippets/{workspace}/{encoded_id}

Retrieves a single snippet. Snippets support multiple content types: * application/json * multipart/related * multipart/form-data application/json ---------------- The default content type of the response is `application/json`. Since JSON is always `utf-8`, it cannot reliably contain file contents for files that are not text. Therefore, JSON snippet documents only contain the filename and links to the file contents. This means that in order to retrieve all parts of a snippet, N+1 requests need to be made (where N is the number of files in the snippet). multipart/related ----------------- To retrieve an entire snippet in a single response, use the `Accept: multipart/related` HTTP request header. $ curl -H "Accept: multipart/related" https://api.bitbucket.org/2.0/snippets/evzijst/1 Response: HTTP/1.1 200 OK Content-Length: 2214 Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" MIME-Version: 1.0 --===============1438169132528273974== Content-Type: application/json; charset="utf-8" MIME-Version: 1.0 Content-ID: snippet { "links": { "self": { "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj" }, "html": { "href": "https://bitbucket.org/snippets/evzijst/kypj" }, "comments": { "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/comments" }, "watchers": { "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/watchers" }, "commits": { "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/commits" } }, "id": kypj, "title": "My snippet", "created_on": "2014-12-29T22:22:04.790331+00:00", "updated_on": "2014-12-29T22:22:04.790331+00:00", "is_private": false, "files": { "foo.txt": { "links": { "self": { "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/foo.txt" }, "html": { "href": "https://bitbucket.org/snippets/evzijst/kypj#file-foo.txt" } } }, "image.png": { "links": { "self": { "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/image.png" }, "html": { "href": "https://bitbucket.org/snippets/evzijst/kypj#file-image.png" } } } ], "owner": { "username": "evzijst", "nickname": "evzijst", "display_name": "Erik van Zijst", "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/evzijst" }, "html": { "href": "https://bitbucket.org/evzijst" }, "avatar": { "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png" } } }, "creator": { "username": "evzijst", "nickname": "evzijst", "display_name": "Erik van Zijst", "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/evzijst" }, "html": { "href": "https://bitbucket.org/evzijst" }, "avatar": { "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png" } } } } --===============1438169132528273974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-ID: "foo.txt" Content-Disposition: attachment; filename="foo.txt" foo --===============1438169132528273974== Content-Type: image/png MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-ID: "image.png" Content-Disposition: attachment; filename="image.png" iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5 EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg== --===============1438169132528273974==-- multipart/form-data ------------------- As with creating new snippets, `multipart/form-data` can be used as an alternative to `multipart/related`. However, the inherently flat structure of form-data means that only basic, root-level properties can be returned, while nested elements like `links` are omitted: $ curl -H "Accept: multipart/form-data" https://api.bitbucket.org/2.0/snippets/evzijst/kypj Response: HTTP/1.1 200 OK Content-Length: 951 Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f ------------------------------63a4b224c59f Content-Disposition: form-data; name="title" Content-Type: text/plain; charset="utf-8" My snippet ------------------------------63a4b224c59f-- Content-Disposition: attachment; name="file"; filename="foo.txt" Content-Type: text/plain foo ------------------------------63a4b224c59f Content-Disposition: attachment; name="file"; filename="image.png" Content-Transfer-Encoding: base64 Content-Type: application/octet-stream iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5 EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg== ------------------------------5957323a6b76--

operationId: Snippets_getSingleSnippet

Responses

200 The snippet object.
401 If the snippet is private and the request was not authenticated.
403 If authenticated user does not have access to the private snippet.
404 If the snippet does not exist.
410 If the snippet marked as spam.
GET /snippets/{workspace}/{encoded_id}
PUT /snippets/{workspace}/{encoded_id}

Used to update a snippet. Use this to add and delete files and to change a snippet's title. To update a snippet, one can either PUT a full snapshot, or only the parts that need to be changed. The contract for PUT on this API is that properties missing from the request remain untouched so that snippets can be efficiently manipulated with differential payloads. To delete a property (e.g. the title, or a file), include its name in the request, but omit its value (use `null`). As in Git, explicit renaming of files is not supported. Instead, to rename a file, delete it and add it again under another name. This can be done atomically in a single request. Rename detection is left to the SCM. PUT supports three different content types for both request and response bodies: * `application/json` * `multipart/related` * `multipart/form-data` The content type used for the request body can be different than that used for the response. Content types are specified using standard HTTP headers. Use the `Content-Type` and `Accept` headers to select the desired request and response format. application/json ---------------- As with creation and retrieval, the content type determines what properties can be manipulated. `application/json` does not support file contents and is therefore limited to a snippet's meta data. To update the title, without changing any of its files: $ curl -X POST -H "Content-Type: application/json" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{"title": "Updated title"}' To delete the title: $ curl -X POST -H "Content-Type: application/json" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{"title": null}' Not all parts of a snippet can be manipulated. The owner and creator for instance are immutable. multipart/related ----------------- `multipart/related` can be used to manipulate all of a snippet's properties. The body is identical to a POST. properties omitted from the request are left unchanged. Since the `start` part contains JSON, the mechanism for manipulating the snippet's meta data is identical to `application/json` requests. To update one of a snippet's file contents, while also changing its title: PUT /2.0/snippets/evzijst/kypj HTTP/1.1 Content-Length: 288 Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" MIME-Version: 1.0 --===============1438169132528273974== Content-Type: application/json; charset="utf-8" MIME-Version: 1.0 Content-ID: snippet { "title": "My updated snippet", "files": { "foo.txt": {} } } --===============1438169132528273974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-ID: "foo.txt" Content-Disposition: attachment; filename="foo.txt" Updated file contents. --===============1438169132528273974==-- Here only the parts that are changed are included in the body. The other files remain untouched. Note the use of the `files` list in the JSON part. This list contains the files that are being manipulated. This list should have corresponding multiparts in the request that contain the new contents of these files. If a filename in the `files` list does not have a corresponding part, it will be deleted from the snippet, as shown below: PUT /2.0/snippets/evzijst/kypj HTTP/1.1 Content-Length: 188 Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" MIME-Version: 1.0 --===============1438169132528273974== Content-Type: application/json; charset="utf-8" MIME-Version: 1.0 Content-ID: snippet { "files": { "image.png": {} } } --===============1438169132528273974==-- To simulate a rename, delete a file and add the same file under another name: PUT /2.0/snippets/evzijst/kypj HTTP/1.1 Content-Length: 212 Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" MIME-Version: 1.0 --===============1438169132528273974== Content-Type: application/json; charset="utf-8" MIME-Version: 1.0 Content-ID: snippet { "files": { "foo.txt": {}, "bar.txt": {} } } --===============1438169132528273974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-ID: "bar.txt" Content-Disposition: attachment; filename="bar.txt" foo --===============1438169132528273974==-- multipart/form-data ----------------- Again, one can also use `multipart/form-data` to manipulate file contents and meta data atomically. $ curl -X PUT http://localhost:12345/2.0/snippets/evzijst/kypj -F title="My updated snippet" -F file=@foo.txt PUT /2.0/snippets/evzijst/kypj HTTP/1.1 Content-Length: 351 Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f ------------------------------63a4b224c59f Content-Disposition: form-data; name="file"; filename="foo.txt" Content-Type: text/plain foo ------------------------------63a4b224c59f Content-Disposition: form-data; name="title" My updated snippet ------------------------------63a4b224c59f To delete a file, omit its contents while including its name in the `files` field: $ curl -X PUT https://api.bitbucket.org/2.0/snippets/evzijst/kypj -F files=image.png PUT /2.0/snippets/evzijst/kypj HTTP/1.1 Content-Length: 149 Content-Type: multipart/form-data; boundary=----------------------------ef8871065a86 ------------------------------ef8871065a86 Content-Disposition: form-data; name="files" image.png ------------------------------ef8871065a86-- The explicit use of the `files` element in `multipart/related` and `multipart/form-data` is only required when deleting files. The default mode of operation is for file parts to be processed, regardless of whether or not they are listed in `files`, as a convenience to the client.

operationId: Snippets_updateSnippet

Responses

200 The updated snippet object.
401 If the snippet is private and the request was not authenticated.
403 If authenticated user does not have permission to update the private snippet.
404 If the snippet does not exist.
PUT /snippets/{workspace}/{encoded_id}
GET /snippets/{workspace}/{encoded_id}/comments

Used to retrieve a paginated list of all comments for a specific snippet. This resource works identical to commit and pull request comments. The default sorting is oldest to newest and can be overridden with the `sort` query parameter.

operationId: Snippets_listComments

Responses

200 A paginated list of snippet comments, ordered by creation date.
403 If the authenticated user does not have access to the snippet.
404 If the snippet does not exist.
GET /snippets/{workspace}/{encoded_id}/comments
POST /snippets/{workspace}/{encoded_id}/comments

Creates a new comment. The only required field in the body is `content.raw`. To create a threaded reply to an existing comment, include `parent.id`.

operationId: Snippets_createComment

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/snippet_comment"
      }
    }
  },
  "required": true,
  "description": "The contents of the new comment."
}

Responses

201 The newly created comment.
403 If the authenticated user does not have access to the snippet.
404 If the snippet does not exist.
POST /snippets/{workspace}/{encoded_id}/comments
DELETE /snippets/{workspace}/{encoded_id}/comments/{comment_id}

Deletes a snippet comment. Comments can only be removed by the comment author, snippet creator, or workspace admin.

operationId: Snippets_deleteComment

Responses

204 Indicates the comment was deleted successfully.
403 If the authenticated user is not the author of the comment.
404 If the comment or the snippet does not exist.
DELETE /snippets/{workspace}/{encoded_id}/comments/{comment_id}
GET /snippets/{workspace}/{encoded_id}/comments/{comment_id}

Returns the specific snippet comment.

operationId: Snippets_getComment

Responses

200 The specified comment.
403 If the authenticated user does not have access to the snippet.
404 If the comment or snippet does not exist.
GET /snippets/{workspace}/{encoded_id}/comments/{comment_id}
PUT /snippets/{workspace}/{encoded_id}/comments/{comment_id}

Updates a comment. The only required field in the body is `content.raw`. Comments can only be updated by their author.

operationId: Snippets_updateComment

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/snippet_comment"
      }
    }
  },
  "required": true,
  "description": "The contents to update the comment to."
}

Responses

200 The updated comment object.
403 If the authenticated user does not have access to the snippet.
404 If the comment or snippet does not exist.
PUT /snippets/{workspace}/{encoded_id}/comments/{comment_id}
GET /snippets/{workspace}/{encoded_id}/commits

Returns the changes (commits) made on this snippet.

operationId: Snippets_listChanges

Responses

200 The paginated list of snippet commits.
403 If the authenticated user does not have access to the snippet.
404 If the snippet does not exist.
GET /snippets/{workspace}/{encoded_id}/commits
GET /snippets/{workspace}/{encoded_id}/commits/{revision}

Returns the changes made on this snippet in this commit.

operationId: Snippets_getPreviousSnippetChange

Responses

200 The specified snippet commit.
403 If the authenticated user does not have access to the snippet.
404 If the commit or the snippet does not exist.
GET /snippets/{workspace}/{encoded_id}/commits/{revision}
GET /snippets/{workspace}/{encoded_id}/files/{path}

Convenience resource for getting to a snippet's raw files without the need for first having to retrieve the snippet itself and having to pull out the versioned file links.

operationId: Snippets_getSnippetFileAtHead

Responses

200 OK
302 A redirect to the most recent revision of the specified file.
403 If the authenticated user does not have access to the snippet.
404 If the snippet does not exist.
GET /snippets/{workspace}/{encoded_id}/files/{path}
DELETE /snippets/{workspace}/{encoded_id}/watch

Used to stop watching a specific snippet. Returns 204 (No Content) to indicate success.

operationId: Snippets_stopWatchingSnippet

Responses

204 Indicates the user stopped watching the snippet successfully.
401 If the request was not authenticated.
404 If the snippet does not exist.
DELETE /snippets/{workspace}/{encoded_id}/watch
GET /snippets/{workspace}/{encoded_id}/watch

Used to check if the current user is watching a specific snippet. Returns 204 (No Content) if the user is watching the snippet and 404 if not. Hitting this endpoint anonymously always returns a 404.

operationId: Snippets_checkUserWatchingSnippet

Responses

204 If the authenticated user is watching the snippet.
404 If the snippet does not exist, or if the authenticated user is not watching the snippet.
GET /snippets/{workspace}/{encoded_id}/watch
PUT /snippets/{workspace}/{encoded_id}/watch

Used to start watching a specific snippet. Returns 204 (No Content).

operationId: Snippets_watchSnippet

Responses

204 Indicates the authenticated user is now watching the snippet.
401 If the request was not authenticated.
404 If the snippet does not exist.
PUT /snippets/{workspace}/{encoded_id}/watch
DELETE /snippets/{workspace}/{encoded_id}/{node_id}

Deletes the snippet. Note that this only works for versioned URLs that point to the latest commit of the snippet. Pointing to an older commit results in a 405 status code. To delete a snippet, regardless of whether or not concurrent changes are being made to it, use `DELETE /snippets/{encoded_id}` instead.

operationId: Snippets_deletePreviousRevision

Responses

204 If the snippet was deleted successfully.
401 If the snippet is private and the request was not authenticated.
403 If authenticated user does not have permission to delete the private snippet.
404 If the snippet does not exist.
405 If `{node_id}` is not the latest revision.
DELETE /snippets/{workspace}/{encoded_id}/{node_id}
GET /snippets/{workspace}/{encoded_id}/{node_id}

Identical to `GET /snippets/encoded_id`, except that this endpoint can be used to retrieve the contents of the snippet as it was at an older revision, while `/snippets/encoded_id` always returns the snippet's current revision. Note that only the snippet's file contents are versioned, not its meta data properties like the title. Other than that, the two endpoints are identical in behavior.

operationId: Snippets_getPreviousRevision

Responses

200 The snippet object.
401 If the snippet is private and the request was not authenticated.
403 If authenticated user does not have access to the private snippet.
404 If the snippet, or the revision does not exist.
GET /snippets/{workspace}/{encoded_id}/{node_id}
PUT /snippets/{workspace}/{encoded_id}/{node_id}

Identical to `UPDATE /snippets/encoded_id`, except that this endpoint takes an explicit commit revision. Only the snippet's "HEAD"/"tip" (most recent) version can be updated and requests on all other, older revisions fail by returning a 405 status. Usage of this endpoint over the unrestricted `/snippets/encoded_id` could be desired if the caller wants to be sure no concurrent modifications have taken place between the moment of the UPDATE request and the original GET. This can be considered a so-called "Compare And Swap", or CAS operation. Other than that, the two endpoints are identical in behavior.

operationId: Snippets_updatePreviousRevision

Responses

200 The updated snippet object.
401 If the snippet is private and the request was not authenticated.
403 If authenticated user does not have permission to update the private snippet.
404 If the snippet or the revision does not exist.
405 If `{node_id}` is not the latest revision.
PUT /snippets/{workspace}/{encoded_id}/{node_id}
GET /snippets/{workspace}/{encoded_id}/{node_id}/files/{path}

Retrieves the raw contents of a specific file in the snippet. The `Content-Disposition` header will be "attachment" to avoid issues with malevolent executable files. The file's mime type is derived from its filename and returned in the `Content-Type` header. Note that for text files, no character encoding is included as part of the content type.

operationId: Snippets_getRawFile

Responses

200 Returns the contents of the specified file.
403 If the authenticated user does not have access to the snippet.
404 If the file or snippet does not exist.
GET /snippets/{workspace}/{encoded_id}/{node_id}/files/{path}
GET /snippets/{workspace}/{encoded_id}/{revision}/diff

Returns the diff of the specified commit against its first parent. Note that this resource is different in functionality from the `patch` resource. The differences between a diff and a patch are: * patches have a commit header with the username, message, etc * diffs support the optional `path=foo/bar.py` query param to filter the diff to just that one file diff (not supported for patches) * for a merge, the diff will show the diff between the merge commit and its first parent (identical to how PRs work), while patch returns a response containing separate patches for each commit on the second parent's ancestry, up to the oldest common ancestor (identical to its reachability). Note that the character encoding of the contents of the diff is unspecified as Git does not track this, making it hard for Bitbucket to reliably determine this.

operationId: Snippets_getSnippetDiff

Parameters

Name In Required Type Description
path query optional string When used, only one the diff of the specified file will be returned.

Responses

200 The raw diff contents.
403 If the authenticated user does not have access to the snippet.
404 If the snippet does not exist.
GET /snippets/{workspace}/{encoded_id}/{revision}/diff
GET /snippets/{workspace}/{encoded_id}/{revision}/patch

Returns the patch of the specified commit against its first parent. Note that this resource is different in functionality from the `diff` resource. The differences between a diff and a patch are: * patches have a commit header with the username, message, etc * diffs support the optional `path=foo/bar.py` query param to filter the diff to just that one file diff (not supported for patches) * for a merge, the diff will show the diff between the merge commit and its first parent (identical to how PRs work), while patch returns a response containing separate patches for each commit on the second parent's ancestry, up to the oldest common ancestor (identical to its reachability). Note that the character encoding of the contents of the patch is unspecified as Git does not track this, making it hard for Bitbucket to reliably determine this.

operationId: Snippets_getSnippetPatch

Responses

200 The raw patch contents.
403 If the authenticated user does not have access to the snippet.
404 If the snippet does not exist.
GET /snippets/{workspace}/{encoded_id}/{revision}/patch

Source 4 endpoints

GET /repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path}

Returns a paginated list of commits that modified the specified file. Commits are returned in reverse chronological order. This is roughly equivalent to the following commands: $ git log --follow --date-order <sha> <path> By default, Bitbucket will follow renames and the path name in the returned entries reflects that. This can be turned off using the `?renames=false` query parameter. Results are returned in descending chronological order by default, and like most endpoints you can [filter and sort](/cloud/bitbucket/rest/intro/#filtering) the response to only provide exactly the data you want. The example response returns commits made before 2011-05-18 against a file named `README.rst`. The results are filtered to only return the path and date. This request can be made using: ``` $ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\ '?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18' ``` In the response you can see that the file was renamed to `README.rst` by the commit made on 2011-05-16, and was previously named `README.txt`.

operationId: Source_filehistoryListCommits

Parameters

Name In Required Type Description
renames query optional string When `true`, Bitbucket will follow the history of the file across renames (this is the default behavior). This can be turned off by specifying `false`.
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Name of a response property sort the result by as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).

Responses

200 A paginated list of commits that modified the specified file
404 If the repository does not exist.
GET /repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path}
GET /repositories/{workspace}/{repo_slug}/src

This endpoint redirects the client to the directory listing of the root directory on the main branch. This is equivalent to directly hitting [/2.0/repositories/{username}/{repo_slug}/src/{commit}/{path}](src/%7Bcommit%7D/%7Bpath%7D) without having to know the name or SHA1 of the repo's main branch. To create new commits, [POST to this endpoint](https://dac-static.atlassian.com)

operationId: Source_getRootDirectory

Parameters

Name In Required Type Description
format query optional string Instead of returning the file's contents, return the (json) meta data for it.

Responses

200 If the path matches a file, then the raw contents of the file are returned (unless the `format=meta` query parameter was provided, in which case a json document containing the file's meta data is returned). If the path matches a directory, then a paginated list of file and directory entries is returned (if the `format=meta` query parameter was provided, then the json document containing the directory's meta data is returned).
404 If the path or commit in the URL does not exist.
GET /repositories/{workspace}/{repo_slug}/src
POST /repositories/{workspace}/{repo_slug}/src

This endpoint is used to create new commits in the repository by uploading files. To add a new file to a repository: ``` $ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \ -F /repo/path/to/image.png=@image.png ``` This will create a new commit on top of the main branch, inheriting the contents of the main branch, but adding (or overwriting) the `image.png` file to the repository in the `/repo/path/to` directory. To create a commit that deletes files, use the `files` parameter: ``` $ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \ -F files=/file/to/delete/1.txt \ -F files=/file/to/delete/2.txt ``` You can add/modify/delete multiple files in a request. Rename/move a file by deleting the old path and adding the content at the new path. This endpoint accepts `multipart/form-data` (as in the examples above), as well as `application/x-www-form-urlencoded`. Note: `multipart/form-data` is currently not supported by Forge apps for this API. #### multipart/form-data A `multipart/form-data` post contains a series of "form fields" that identify both the individual files that are being uploaded, as well as additional, optional meta data. Files are uploaded in file form fields (those that have a `Content-Disposition` parameter) whose field names point to the remote path in the repository where the file should be stored. Path field names are always interpreted to be absolute from the root of the repository, regardless whether the client uses a leading slash (as the above `curl` example did). File contents are treated as bytes and are not decoded as text. The commit message, as well as other non-file meta data for the request, is sent along as normal form field elements. Meta data fields share the same namespace as the file objects. For `multipart/form-data` bodies that should not lead to any ambiguity, as the `Content-Disposition` header will contain the `filename` parameter to distinguish between a file named "message" and the commit message field. #### application/x-www-form-urlencoded It is also possible to upload new files using a simple `application/x-www-form-urlencoded` POST. This can be convenient when uploading pure text files: ``` $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src \ --data-urlencode "/path/to/me.txt=Lorem ipsum." \ --data-urlencode "message=Initial commit" \ --data-urlencode "author=Erik van Zijst <erik.van.zijst@gmail.com>" ``` There could be a field name clash if a client were to upload a file named "message", as this filename clashes with the meta data property for the commit message. To avoid this and to upload files whose names clash with the meta data properties, use a leading slash for the files, e.g. `curl --data-urlencode "/message=file contents"`. When an explicit slash is omitted for a file whose path matches that of a meta data parameter, then it is interpreted as meta data, not as a file. #### Executables and links While this API aims to facilitate the most common use cases, it is possible to perform some more advanced operations like creating a new symlink in the repository, or creating an executable file. Files can be supplied with a `x-attributes` value in the `Content-Disposition` header. For example, to upload an executable file, as well as create a symlink from `README.txt` to `README`: ``` --===============1438169132528273974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-ID: "bin/shutdown.sh" Content-Disposition: attachment; filename="shutdown.sh"; x-attributes:"executable" #!/bin/sh halt --===============1438169132528273974== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-ID: "/README.txt" Content-Disposition: attachment; filename="README.txt"; x-attributes:"link" README --===============1438169132528273974==-- ``` Links are files that contain the target path and have `x-attributes:"link"` set. When overwriting links with files, or vice versa, the newly uploaded file determines both the new contents, as well as the attributes. That means uploading a file without specifying `x-attributes="link"` will create a regular file, even if the parent commit hosted a symlink at the same path. The same applies to executables. When modifying an existing executable file, the form-data file element must include `x-attributes="executable"` in order to preserve the executable status of the file. Note that this API does not support the creation or manipulation of subrepos / submodules.

operationId: Source_createCommitByUploadingFile

Parameters

Name In Required Type Description
message query optional string The commit message. When omitted, Bitbucket uses a canned string.
author query optional string The raw string to be used as the new commit's author. This string follows the format `Erik van Zijst <evzijst@atlassian.com>`. When omitted, Bitbucket uses the authenticated user's full/display name and primary email address. Commits cannot be created anonymously.
parents query optional string A comma-separated list of SHA1s of the commits that should be the parents of the newly created commit. When omitted, the new commit will inherit from and become a child of the main branch's tip/HEAD commit. When more than one SHA1 is provided, the first SHA1 identifies the commit from which the content will be inherited.".
files query optional string Optional field that declares the files that the request is manipulating. When adding a new file to a repo, or when overwriting an existing file, the client can just upload the full contents of the file in a normal form field and the use of this `files` meta data field is redundant. However, when the `files` field contains a file path that does not have a corresponding, identically-named form field, then Bitbucket interprets that as the client wanting to replace the named file with the null set and the file is deleted instead. Paths in the repo that are referenced in neither files nor an individual file field, remain unchanged and carry over from the parent to the new commit. This API does not support renaming as an explicit feature. To rename a file, simply delete it and recreate it under the new name in the same commit.
branch query optional string The name of the branch that the new commit should be created on. When omitted, the commit will be created on top of the main branch and will become the main branch's new head. When a branch name is provided that already exists in the repo, then the commit will be created on top of that branch. In this case, *if* a parent SHA1 was also provided, then it is asserted that the parent is the branch's tip/HEAD at the time the request is made. When this is not the case, a 409 is returned. When a new branch name is specified (that does not already exist in the repo), and no parent SHA1s are provided, then the new commit will inherit from the current main branch's tip/HEAD commit, but not advance the main branch. The new commit will be the new branch. When the request *also* specifies a parent SHA1, then the new commit and branch are created directly on top of the parent commit, regardless of the state of the main branch. When a branch name is not specified, but a parent SHA1 is provided, then Bitbucket asserts that it represents the main branch's current HEAD/tip, or a 409 is returned. When a branch name is not specified and the repo is empty, the new commit will become the repo's root commit and will be on the main branch. When a branch name is specified and the repo is empty, the new commit will become the repo's root commit and also define the repo's main branch going forward. This API cannot be used to create additional root commits in non-empty repos. The branch field cannot be repeated. As a side effect, this API can be used to create a new branch without modifying any files, by specifying a new branch name in this field, together with `parents`, but omitting the `files` fields, while not sending any files. This will create a new commit and branch with the same contents as the first parent. The diff of this commit against its first parent will be empty.

Responses

201
403 If the authenticated user does not have write or admin access
404 If the repository does not exist.
POST /repositories/{workspace}/{repo_slug}/src
GET /repositories/{workspace}/{repo_slug}/src/{commit}/{path}

This endpoints is used to retrieve the contents of a single file, or the contents of a directory at a specified revision. #### Raw file contents When `path` points to a file, this endpoint returns the raw contents. The response's Content-Type is derived from the filename extension (not from the contents). The file contents are not processed and no character encoding/recoding is performed and as a result no character encoding is included as part of the Content-Type. The `Content-Disposition` header will be "attachment" to prevent browsers from running executable files. If the file is managed by LFS, then a 301 redirect pointing to Atlassian's media services platform is returned. The response includes an ETag that is based on the contents of the file and its attributes. This means that an empty `__init__.py` always returns the same ETag, regardless on the directory it lives in, or the commit it is on. #### File meta data When the request for a file path includes the query parameter `?format=meta`, instead of returning the file's raw contents, Bitbucket instead returns the JSON object describing the file's properties: ```javascript $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests/__init__.py?format=meta { "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py" }, "meta": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta" } }, "path": "tests/__init__.py", "commit": { "type": "commit", "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335" }, "html": { "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335" } } }, "attributes": [], "type": "commit_file", "size": 0 } ``` File objects contain an `attributes` element that contains a list of possible modifiers. Currently defined values are: * `link` -- indicates that the entry is a symbolic link. The contents of the file represent the path the link points to. * `executable` -- indicates that the file has the executable bit set. * `subrepository` -- indicates that the entry points to a submodule or subrepo. The contents of the file is the SHA1 of the repository pointed to. * `binary` -- indicates whether Bitbucket thinks the file is binary. This endpoint can provide an alternative to how a HEAD request can be used to check for the existence of a file, or a file's size without incurring the overhead of receiving its full contents. #### Directory listings When `path` points to a directory instead of a file, the response is a paginated list of directory and file objects in the same order as the underlying SCM system would return them. For example: ```javascript $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests { "pagelen": 10, "values": [ { "path": "tests/test_project", "type": "commit_directory", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/" }, "meta": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta" } }, "commit": { "type": "commit", "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335" }, "html": { "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335" } } } }, { "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py" }, "meta": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta" } }, "path": "tests/__init__.py", "commit": { "type": "commit", "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335" }, "html": { "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335" } } }, "attributes": [], "type": "commit_file", "size": 0 } ], "page": 1, "size": 2 } ``` When listing the contents of the repo's root directory, the use of a trailing slash at the end of the URL is required. The response by default is not recursive, meaning that only the direct contents of a path are returned. The response does not recurse down into subdirectories. In order to "walk" the entire directory tree, the client can either parse each response and follow the `self` links of each `commit_directory` object, or can specify a `max_depth` to recurse to. The max_depth parameter will do a breadth-first search to return the contents of the subdirectories up to the depth specified. Breadth-first search was chosen as it leads to the least amount of file system operations for git. If the `max_depth` parameter is specified to be too large, the call will time out and return a 555. Each returned object is either a `commit_file`, or a `commit_directory`, both of which contain a `path` element. This path is the absolute path from the root of the repository. Each object also contains a `commit` object which embeds the commit the file is on. Note that this is merely the commit that was used in the URL. It is *not* the commit that last modified the file. Directory objects have 2 representations. Their `self` link returns the paginated contents of the directory. The `meta` link on the other hand returns the actual `directory` object itself, e.g.: ```javascript { "path": "tests/test_project", "type": "commit_directory", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/" }, "meta": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta" } }, "commit": { ... } } ``` #### Querying, filtering and sorting Like most API endpoints, this API supports the Bitbucket querying/filtering syntax and so you could filter a directory listing to only include entries that match certain criteria. For instance, to list all binary files over 1kb use the expression: `size > 1024 and attributes = "binary"` which after urlencoding yields the query string: `?q=size%3E1024+and+attributes%3D%22binary%22` To change the ordering of the response, use the `?sort` parameter: `.../src/eefd5ef/?sort=-size` See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.

operationId: Source_getRepositorySrcContent

Parameters

Name In Required Type Description
format query optional string If 'meta' is provided, returns the (json) meta data for the contents of the file. If 'rendered' is provided, returns the contents of a non-binary file in HTML-formatted rendered markup. The 'rendered' option only supports these filetypes: `.md`, `.markdown`, `.mkd`, `.mkdn`, `.mdown`, `.text`, `.rst`, and `.textile`. Since Git does not generally track what text encoding scheme is used, this endpoint attempts to detect the most appropriate character encoding. While usually correct, determining the character encoding can be ambiguous which in exceptional cases can lead to misinterpretation of the characters. As such, the raw element in the response object should not be treated as equivalent to the file's actual contents.
q query optional string Optional filter expression as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Optional sorting parameter as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).
max_depth query optional integer If provided, returns the contents of the repository and its subdirectories recursively until the specified max_depth of nested directories. When omitted, this defaults to 1.

Responses

200 If the path matches a file, then the raw contents of the file are returned. If the `format=meta` query parameter is provided, a json document containing the file's meta data is returned. If the `format=rendered` query parameter is provided, the contents of the file in HTML-formated rendered markup is returned. If the path matches a directory, then a paginated list of file and directory entries is returned (if the `format=meta` query parameter was provided, then the json document containing the directory's meta data is returned.)
404 If the path or commit in the URL does not exist.
555 If the call times out, possibly because the specified recursion depth is too large.
GET /repositories/{workspace}/{repo_slug}/src/{commit}/{path}

Ssh 5 endpoints

GET /users/{selected_user}/ssh-keys

Returns a paginated list of the user's SSH public keys.

operationId: Ssh_listSshKeys

Responses

200 A list of the SSH keys associated with the account.
403 If the specified user's keys are not accessible to the current user
404 If the specified user does not exist
GET /users/{selected_user}/ssh-keys
POST /users/{selected_user}/ssh-keys

Adds a new SSH public key to the specified user account and returns the resulting key. Example: ``` $ curl -X POST -H "Content-Type: application/json" -d '{"key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY user@myhost"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys ```

operationId: Ssh_keyAddition

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ssh_account_key"
      }
    }
  },
  "description": "The new SSH key object. Note that the username property has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis)."
}

Responses

201 The newly created SSH key.
400 If the submitted key or related value is invalid
403 If the current user does not have permission to add a key for the specified user
404 If the specified user does not exist
POST /users/{selected_user}/ssh-keys
DELETE /users/{selected_user}/ssh-keys/{key_id}

Deletes a specific SSH public key from a user's account.

operationId: Ssh_deleteKey

Responses

204 The key has been deleted
400 If the submitted key or related value is invalid
403 If the current user does not have permission to add a key for the specified user
404 If the specified user does not exist
DELETE /users/{selected_user}/ssh-keys/{key_id}
GET /users/{selected_user}/ssh-keys/{key_id}

Returns a specific SSH public key belonging to a user.

operationId: Ssh_getKey

Responses

200 The specific SSH key matching the user and UUID
403 If the specified user or key is not accessible to the current user
404 If the specified user or key does not exist
GET /users/{selected_user}/ssh-keys/{key_id}
PUT /users/{selected_user}/ssh-keys/{key_id}

Updates a specific SSH public key on a user's account Note: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again. Example: ``` $ curl -X PUT -H "Content-Type: application/json" -d '{"label": "Work key"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a} ```

operationId: Ssh_updateSshKeyComment

Request Body

{
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/ssh_account_key"
      }
    }
  },
  "description": "The updated SSH key object"
}

Responses

200 The newly updated SSH key.
400 If the submitted key or related value is invalid
403 If the current user does not have permission to add a key for the specified user
404 If the specified user does not exist
PUT /users/{selected_user}/ssh-keys/{key_id}

Users 4 endpoints

GET /user

Returns the currently logged in user.

operationId: Users_getCurrentUser

Responses

200 The current user.
401 When the request wasn't authenticated.
GET /user
GET /user/emails

Returns all the authenticated user's email addresses. Both confirmed and unconfirmed.

operationId: Users_listEmailAddresses

Responses

default Unexpected error.
GET /user/emails
GET /user/emails/{email}

Returns details about a specific one of the authenticated user's email addresses. Details describe whether the address has been confirmed by the user and whether it is the user's primary address or not.

operationId: Users_getEmailDetails

Responses

default Unexpected error.
GET /user/emails/{email}
GET /users/{selected_user}

Gets the public information associated with a user account. If the user's profile is private, `location`, `website` and `created_on` elements are omitted. Note that the user object returned by this operation is changing significantly, due to privacy changes. See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-bitbucket-user-objects) for details.

operationId: Users_getUserDetails

Responses

200 The user object
404 If no user exists for the specified UUID, or if the specified account is a team account, not a personal account.
GET /users/{selected_user}

Webhooks 2 endpoints

GET /hook_events

Returns the webhook resource or subject types on which webhooks can be registered. Each resource/subject type contains an `events` link that returns the paginated list of specific events each individual subject type can emit. This endpoint is publicly accessible and does not require authentication or scopes.

operationId: Webhooks_getResourceEvents

Responses

200 A mapping of resource/subject types pointing to their individual event types.
GET /hook_events
GET /hook_events/{subject_type}

Returns a paginated list of all valid webhook events for the specified entity. **The team and user webhooks are deprecated, and you should use workspace instead. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).** This is public data that does not require any scopes or authentication. NOTE: The example response is a truncated response object for the `workspace` `subject_type`. We return the same structure for the other `subject_type` objects.

operationId: Webhooks_listSubscribableTypes

Responses

200 A paginated list of webhook types available to subscribe on.
404 If an invalid `{subject_type}` value was specified.
GET /hook_events/{subject_type}

Workspaces 14 endpoints

GET /user/permissions/workspaces

Returns an object for each workspace the caller is a member of, and their effective role - the highest level of privilege the caller has. If a user is a member of multiple groups with distinct roles, only the highest level is returned. Permissions can be: * `owner` * `collaborator` * `member` **The `collaborator` role is being removed from the Bitbucket Cloud API. For more information, see the [deprecation announcement](https://dac-static.atlassian.com).** **When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on `workspace_membership` will no longer be present: `last_accessed` and `added_on`. See the [deprecation announcement](https://dac-static.atlassian.com).** Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by workspace or permission by adding the following query string parameters: * `q=workspace.slug="bbworkspace1"` or `q=permission="owner"` * `sort=workspace.slug` Note that the query parameter values need to be URL escaped so that `=` would become `%3D`.

operationId: Workspaces_listForCurrentUser

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.
sort query optional string Name of a response property to sort results. See [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results) for details.

Responses

200 All of the workspace memberships for the authenticated user.
401 The request wasn't authenticated.
GET /user/permissions/workspaces
GET /workspaces

Returns a list of workspaces accessible by the authenticated user. Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by workspace or permission by adding the following query string parameters: * `q=slug="bbworkspace1"` or `q=is_private=true` * `sort=created_on` Note that the query parameter values need to be URL escaped so that `=` would become `%3D`. **The `collaborator` role is being removed from the Bitbucket Cloud API. For more information, see the [deprecation announcement](https://dac-static.atlassian.com).**

operationId: Workspaces_listForUser

Parameters

Name In Required Type Description
role query optional string Filters the workspaces based on the authenticated user's role on each workspace. * **member**: returns a list of all the workspaces which the caller is a member of at least one workspace group or repository * **collaborator**: returns a list of workspaces which the caller has write access to at least one repository in the workspace * **owner**: returns a list of workspaces which the caller has administrator access
q query optional string Query string to narrow down the response. See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.
sort query optional string Name of a response property to sort results. See [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results) for details.

Responses

200 The list of workspaces accessible by the authenticated user.
401 The request wasn't authenticated.
GET /workspaces
GET /workspaces/{workspace}

Returns the requested workspace.

operationId: Workspaces_getWorkspace

Responses

200 The workspace.
404 If no workspace exists for the specified name or UUID.
GET /workspaces/{workspace}
GET /workspaces/{workspace}/members

Returns all members of the requested workspace.

operationId: Workspaces_listMembers

Responses

200 The list of users that are part of a workspace.
401 The request wasn't authenticated.
GET /workspaces/{workspace}/members
GET /workspaces/{workspace}/members/{member}

Returns the workspace membership, which includes a `User` object for the member and a `Workspace` object for the requested workspace.

operationId: Workspaces_getUserMembership

Responses

200 The user that is part of a workspace.
401 The request wasn't authenticated.
404 A workspace cannot be found, or a user cannot be found, or the user is not a a member of the workspace.
GET /workspaces/{workspace}/members/{member}
GET /workspaces/{workspace}/permissions

Returns the list of members in a workspace and their permission levels. Permission can be: * `owner` * `collaborator` * `member` **The `collaborator` role is being removed from the Bitbucket Cloud API. For more information, see the [deprecation announcement](https://dac-static.atlassian.com).** **When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on `workspace_membership` will no longer be present: `last_accessed` and `added_on`. See the [deprecation announcement](https://dac-static.atlassian.com).** Results may be further [filtered](/cloud/bitbucket/rest/intro/#filtering) by permission by adding the following query string parameters: * `q=permission="owner"`

operationId: Workspaces_listPermissions

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).

Responses

200 The list of users that are part of a workspace, along with their permission.
401 The request wasn't authenticated.
GET /workspaces/{workspace}/permissions
GET /workspaces/{workspace}/permissions/repositories

Returns an object for each repository permission for all of a workspace's repositories. Permissions returned are effective permissions: the highest level of permission the user has. This does not distinguish between direct and indirect (group) privileges. Only users with admin permission for the team may access this resource. Permissions can be: * `admin` * `write` * `read` Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by repository, user, or permission by adding the following query string parameters: * `q=repository.name="geordi"` or `q=permission>"read"` * `sort=user.display_name` Note that the query parameter values need to be URL escaped so that `=` would become `%3D`.

operationId: Workspaces_listRepositoryPermissions

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Name of a response property sort the result by as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).

Responses

200 List of workspace's repository permissions.
403 The requesting user isn't an admin of the workspace.
GET /workspaces/{workspace}/permissions/repositories
GET /workspaces/{workspace}/permissions/repositories/{repo_slug}

Returns an object for the repository permission of each user in the requested repository. Permissions returned are effective permissions: the highest level of permission the user has. This does not distinguish between direct and indirect (group) privileges. Only users with admin permission for the repository may access this resource. Permissions can be: * `admin` * `write` * `read` Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by user, or permission by adding the following query string parameters: * `q=permission>"read"` * `sort=user.display_name` Note that the query parameter values need to be URL escaped so that `=` would become `%3D`.

operationId: Workspaces_listRepositoryPermissions

Parameters

Name In Required Type Description
q query optional string Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
sort query optional string Name of a response property sort the result by as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).

Responses

200 The repository permission for all users in this repository.
403 The requesting user isn't an admin of the repository.
GET /workspaces/{workspace}/permissions/repositories/{repo_slug}
GET /workspaces/{workspace}/projects

Returns the list of projects in this workspace.

operationId: Workspaces_listProjects

Responses

200 The list of projects in this workspace.
404 A workspace doesn't exist at this location.
GET /workspaces/{workspace}/projects
GET /workspaces/{workspace}/hooks

Returns a paginated list of webhooks installed on this workspace.

operationId: Workspaces_listWebhooks

Responses

200 The paginated list of installed webhooks.
403 If the authenticated user is not an owner on the specified workspace.
404 If the specified workspace does not exist.
GET /workspaces/{workspace}/hooks
POST /workspaces/{workspace}/hooks

Creates a new webhook on the specified workspace. Workspace webhooks are fired for events from all repositories contained by that workspace. Example: ``` $ curl -X POST -u credentials -H 'Content-Type: application/json' https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks -d ' { "description": "Webhook Description", "url": "https://example.com/", "active": true, "secret": "this is a really bad secret", "events": [ "repo:push", "issue:created", "issue:updated" ] }' ``` When the `secret` is provided it will be used as the key to generate a HMAC digest value sent in the `X-Hub-Signature` header at delivery time. Passing a `null` or empty `secret` or not passing a `secret` will leave the webhook's secret unset. Bitbucket only generates the `X-Hub-Signature` when the webhook's secret is set. This call requires the webhook scope, as well as any scope that applies to the events that the webhook subscribes to. In the example above that means: `webhook`, `repository` and `issue`. The `url` must properly resolve and cannot be an internal, non-routed address. Only workspace owners can install webhooks on workspaces.

operationId: Workspaces_createWebhook

Responses

201 If the webhook was registered successfully.
403 If the authenticated user does not have permission to install webhooks on the specified workspace.
404 If the specified workspace does not exist.
POST /workspaces/{workspace}/hooks
DELETE /workspaces/{workspace}/hooks/{uid}

Deletes the specified webhook subscription from the given workspace.

operationId: Workspaces_deleteWebhook

Responses

204 When the webhook was deleted successfully
403 If the authenticated user does not have permission to delete the webhook.
404 If the webhook or workspace does not exist.
DELETE /workspaces/{workspace}/hooks/{uid}
GET /workspaces/{workspace}/hooks/{uid}

Returns the webhook with the specified id installed on the given workspace.

operationId: Workspaces_getWorkspaceWebhook

Responses

200 The webhook subscription object.
404 If the webhook or workspace does not exist.
GET /workspaces/{workspace}/hooks/{uid}
PUT /workspaces/{workspace}/hooks/{uid}

Updates the specified webhook subscription. The following properties can be mutated: * `description` * `url` * `secret` * `active` * `events` The hook's secret is used as a key to generate the HMAC hex digest sent in the `X-Hub-Signature` header at delivery time. This signature is only generated when the hook has a secret. Set the hook's secret by passing the new value in the `secret` field. Passing a `null` value in the `secret` field will remove the secret from the hook. The hook's secret can be left unchanged by not passing the `secret` field in the request.

operationId: Workspaces_updateWebhook

Responses

200 The webhook subscription object.
403 If the authenticated user does not have permission to update the webhook.
404 If the webhook or workspace does not exist.
PUT /workspaces/{workspace}/hooks/{uid}

Properties 12 endpoints

DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}

Delete an [application property](https://dac-static.atlassian.com) value stored against a commit.

operationId: Properties_deleteCommitApplicationProperty

Parameters

Name In Required Type Description
workspace path required string The repository container; either the workspace slug or the UUID in curly braces.
repo_slug path required string The repository.
commit path required string The commit.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Responses

204 An empty response.
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}

Retrieve an [application property](https://dac-static.atlassian.com) value stored against a commit.

operationId: Properties_getValue

Parameters

Name In Required Type Description
workspace path required string The repository container; either the workspace slug or the UUID in curly braces.
repo_slug path required string The repository.
commit path required string The commit.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Responses

200 The value of the property.
GET /repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}

Update an [application property](https://dac-static.atlassian.com) value stored against a commit.

operationId: Properties_updateCommitApplicationProperty

Parameters

Name In Required Type Description
workspace path required string The repository container; either the workspace slug or the UUID in curly braces.
repo_slug path required string The repository.
commit path required string The commit.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Request Body

{
  "$ref": "#/components/requestBodies/application_property"
}

Responses

204 An empty response.
PUT /repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}
DELETE /repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}

Delete an [application property](https://dac-static.atlassian.com) value stored against a repository.

operationId: Properties_deleteRepositoryApplicationProperty

Parameters

Name In Required Type Description
workspace path required string The repository container; either the workspace slug or the UUID in curly braces.
repo_slug path required string The repository.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Responses

204 An empty response.
DELETE /repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}
GET /repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}

Retrieve an [application property](https://dac-static.atlassian.com) value stored against a repository.

operationId: Properties_getApplicationValue

Parameters

Name In Required Type Description
workspace path required string The repository container; either the workspace slug or the UUID in curly braces.
repo_slug path required string The repository.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Responses

200 The value of the property.
GET /repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}
PUT /repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}

Update an [application property](https://dac-static.atlassian.com) value stored against a repository.

operationId: Properties_updateApplicationProperty

Parameters

Name In Required Type Description
workspace path required string The repository container; either the workspace slug or the UUID in curly braces.
repo_slug path required string The repository.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Request Body

{
  "$ref": "#/components/requestBodies/application_property"
}

Responses

204 An empty response.
PUT /repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}

Delete an [application property](https://dac-static.atlassian.com) value stored against a pull request.

operationId: Properties_deletePullRequestApplicationProperty

Parameters

Name In Required Type Description
workspace path required string The repository container; either the workspace slug or the UUID in curly braces.
repo_slug path required string The repository.
pullrequest_id path required string The pull request ID.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Responses

204 An empty response.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}

Retrieve an [application property](https://dac-static.atlassian.com) value stored against a pull request.

operationId: Properties_getPullRequestApplicationProperty

Parameters

Name In Required Type Description
workspace path required string The repository container; either the workspace slug or the UUID in curly braces.
repo_slug path required string The repository.
pullrequest_id path required string The pull request ID.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Responses

200 The value of the property.
GET /repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}
PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}

Update an [application property](https://dac-static.atlassian.com) value stored against a pull request.

operationId: Properties_updatePullRequestApplicationProperty

Parameters

Name In Required Type Description
workspace path required string The repository container; either the workspace slug or the UUID in curly braces.
repo_slug path required string The repository.
pullrequest_id path required string The pull request ID.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Request Body

{
  "$ref": "#/components/requestBodies/application_property"
}

Responses

204 An empty response.
PUT /repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}
DELETE /users/{selected_user}/properties/{app_key}/{property_name}

Delete an [application property](https://dac-static.atlassian.com) value stored against a user.

operationId: Properties_deleteUserAppPropertyValue

Parameters

Name In Required Type Description
selected_user path required string Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Responses

204 An empty response.
DELETE /users/{selected_user}/properties/{app_key}/{property_name}
GET /users/{selected_user}/properties/{app_key}/{property_name}

Retrieve an [application property](https://dac-static.atlassian.com) value stored against a user.

operationId: Properties_getUserAppPropertyValue

Parameters

Name In Required Type Description
selected_user path required string Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Responses

200 The value of the property.
GET /users/{selected_user}/properties/{app_key}/{property_name}
PUT /users/{selected_user}/properties/{app_key}/{property_name}

Update an [application property](https://dac-static.atlassian.com) value stored against a user.

operationId: Properties_updateUserAppPropertyValue

Parameters

Name In Required Type Description
selected_user path required string Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
app_key path required string The key of the Connect app.
property_name path required string The name of the property.

Request Body

{
  "$ref": "#/components/requestBodies/application_property"
}

Responses

204 An empty response.
PUT /users/{selected_user}/properties/{app_key}/{property_name}

Schemas

object A_pull_request_task
{
  "allOf": [
    {
      "$ref": "#/components/schemas/task"
    },
    {
      "type": "object",
      "title": "Pull Request Task",
      "properties": {
        "links": {
          "type": "object",
          "properties": {
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        }
      },
      "description": "A pull request task."
    }
  ]
}
object A_pullrequest_comment_task
{
  "allOf": [
    {
      "$ref": "#/components/schemas/A_pull_request_task"
    },
    {
      "type": "object",
      "title": "Pull Request Comment Task",
      "properties": {
        "comment": {
          "$ref": "#/components/schemas/comment"
        }
      },
      "description": "A pullrequest comment task"
    }
  ]
}
object A_pullrequest_task_create
{
  "type": "object",
  "title": "Pull Request Task Create",
  "required": [
    "content"
  ],
  "properties": {
    "comment": {
      "$ref": "#/components/schemas/comment"
    },
    "content": {
      "type": "object",
      "title": "Task Raw Content",
      "required": [
        "raw"
      ],
      "properties": {
        "raw": {
          "type": "string",
          "description": "The task contents"
        }
      },
      "description": "task raw content"
    },
    "pending": {
      "type": "boolean"
    }
  },
  "description": "A pullrequest task create"
}
object A_pullrequest_task_update
{
  "type": "object",
  "title": "Pull Request Task Update",
  "properties": {
    "state": {
      "enum": [
        "RESOLVED",
        "UNRESOLVED"
      ],
      "type": "string"
    },
    "content": {
      "type": "object",
      "title": "Task Raw Content",
      "required": [
        "raw"
      ],
      "properties": {
        "raw": {
          "type": "string",
          "description": "The task contents"
        }
      },
      "description": "task raw content"
    }
  },
  "description": "A pullrequest task update"
}
array ReportsBulkCreateOrUpdateAnnotationsRequest
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/report_annotation"
  },
  "maxItems": 100,
  "minItems": 1
}
array ReportsBulkCreateOrUpdateAnnotationsResponse
{
  "type": "array",
  "items": {
    "$ref": "#/components/schemas/report_annotation"
  }
}
object account
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Account",
      "properties": {
        "uuid": {
          "type": "string"
        },
        "links": {
          "$ref": "#/components/schemas/account_links"
        },
        "username": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_\\-]+$"
        },
        "created_on": {
          "type": "string",
          "format": "date-time"
        },
        "display_name": {
          "type": "string"
        }
      },
      "description": "An account object.",
      "additionalProperties": true
    }
  ]
}
object account_links
{
  "type": "object",
  "title": "Account Links",
  "properties": {
    "avatar": {
      "$ref": "#/components/schemas/link"
    }
  },
  "description": "Links related to an Account.",
  "additionalProperties": true
}
object app_user
{
  "allOf": [
    {
      "$ref": "#/components/schemas/account"
    },
    {
      "type": "object",
      "title": "App User",
      "properties": {
        "kind": {
          "type": "string",
          "description": "The kind of App User."
        },
        "account_id": {
          "type": "string",
          "description": "The user's Atlassian account ID."
        },
        "account_status": {
          "type": "string",
          "description": "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future."
        }
      },
      "description": "An app user object.",
      "additionalProperties": true
    }
  ]
}
object application_property
{
  "type": "object",
  "title": "Application Property",
  "properties": {
    "_attributes": {
      "type": "array",
      "items": {
        "enum": [
          "public",
          "read_only"
        ],
        "type": "string"
      }
    }
  },
  "description": "An application property. It is a caller defined JSON object that Bitbucket will store and return. \nThe `_attributes` field at its top level can be used to control who is allowed to read and update the property. \nThe keys of the JSON object must match an allowed pattern. For details, \nsee [Application properties](https://dac-static.atlassian.com).\n",
  "additionalProperties": true
}
object author
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Author",
      "properties": {
        "raw": {
          "type": "string",
          "description": "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket."
        },
        "user": {
          "$ref": "#/components/schemas/account"
        }
      },
      "description": "The author of a change in a repository",
      "additionalProperties": true
    }
  ]
}
object base_commit
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Base Commit",
      "properties": {
        "date": {
          "type": "string",
          "format": "date-time"
        },
        "hash": {
          "type": "string",
          "pattern": "[0-9a-f]{7,}?"
        },
        "author": {
          "$ref": "#/components/schemas/author"
        },
        "message": {
          "type": "string"
        },
        "parents": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/base_commit"
          },
          "minItems": 0
        },
        "summary": {
          "type": "object",
          "properties": {
            "raw": {
              "type": "string",
              "description": "The text as it was typed by a user."
            },
            "html": {
              "type": "string",
              "description": "The user's content rendered as HTML."
            },
            "markup": {
              "enum": [
                "markdown",
                "creole",
                "plaintext"
              ],
              "type": "string",
              "description": "The type of markup language the raw content is to be interpreted in."
            }
          }
        }
      },
      "description": "The common base type for both repository and snippet commits.",
      "additionalProperties": true
    }
  ]
}
object bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema
{
  "type": "object",
  "required": [
    "permission"
  ],
  "properties": {
    "permission": {
      "enum": [
        "read",
        "write",
        "create-repo",
        "admin"
      ],
      "type": "string"
    }
  }
}
object bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema
{
  "type": "object",
  "required": [
    "permission"
  ],
  "properties": {
    "permission": {
      "enum": [
        "read",
        "write",
        "admin"
      ],
      "type": "string"
    }
  }
}
object branch
{
  "allOf": [
    {
      "$ref": "#/components/schemas/ref"
    },
    {
      "type": "object",
      "title": "Branch",
      "properties": {
        "merge_strategies": {
          "type": "array",
          "items": {
            "enum": [
              "merge_commit",
              "squash",
              "fast_forward"
            ],
            "type": "string"
          },
          "description": "Available merge strategies for pull requests targeting this branch."
        },
        "default_merge_strategy": {
          "type": "string",
          "description": "The default merge strategy for pull requests targeting this branch."
        }
      },
      "description": "A branch object, representing a branch in a repository.",
      "additionalProperties": true
    }
  ]
}
object branching_model
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Branching Model",
      "properties": {
        "production": {
          "type": "object",
          "required": [
            "name",
            "use_mainbranch"
          ],
          "properties": {
            "name": {
              "type": "string",
              "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty."
            },
            "branch": {
              "$ref": "#/components/schemas/branch"
            },
            "use_mainbranch": {
              "type": "boolean",
              "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)."
            }
          }
        },
        "development": {
          "type": "object",
          "required": [
            "name",
            "use_mainbranch"
          ],
          "properties": {
            "name": {
              "type": "string",
              "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty."
            },
            "branch": {
              "$ref": "#/components/schemas/branch"
            },
            "use_mainbranch": {
              "type": "boolean",
              "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)."
            }
          }
        },
        "branch_types": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "kind",
              "prefix"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "feature",
                  "bugfix",
                  "release",
                  "hotfix"
                ],
                "type": "string",
                "description": "The kind of branch."
              },
              "prefix": {
                "type": "string",
                "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`."
              }
            }
          },
          "maxItems": 4,
          "minItems": 0,
          "description": "The active branch types.",
          "uniqueItems": true
        }
      },
      "description": "A repository's branching model",
      "additionalProperties": true
    }
  ]
}
object branching_model_settings
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Branching Model Settings",
      "properties": {
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "production": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The configured branch. It must be `null` when `use_mainbranch` is `true`. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set). In this case `is_valid` will be `false`. The branch must exist when updating/setting the `name` or an error will occur."
            },
            "enabled": {
              "type": "boolean",
              "description": "Indicates if branch is enabled or not."
            },
            "is_valid": {
              "type": "boolean",
              "description": "Indicates if the configured branch is valid, that is, if the configured branch actually exists currently. Is always `true` when `use_mainbranch` is `true` (even if the main branch does not exist). This field is read-only. This field is ignored when updating/creating settings."
            },
            "use_mainbranch": {
              "type": "boolean",
              "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). When `true` the `name` must be `null` or not provided. When `false` the `name` must contain a non-empty branch name."
            }
          }
        },
        "development": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The configured branch. It must be `null` when `use_mainbranch` is `true`. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set). In this case `is_valid` will be `false`. The branch must exist when updating/setting the `name` or an error will occur."
            },
            "is_valid": {
              "type": "boolean",
              "description": "Indicates if the configured branch is valid, that is, if the configured branch actually exists currently. Is always `true` when `use_mainbranch` is `true` (even if the main branch does not exist). This field is read-only. This field is ignored when updating/creating settings."
            },
            "use_mainbranch": {
              "type": "boolean",
              "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). When `true` the `name` must be `null` or not provided. When `false` the `name` must contain a non-empty branch name."
            }
          }
        },
        "branch_types": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "feature",
                  "bugfix",
                  "release",
                  "hotfix"
                ],
                "type": "string",
                "description": "The kind of the branch type."
              },
              "prefix": {
                "type": "string",
                "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The `prefix` of an enabled branch type must be a valid branch prefix.Additionally, it cannot be blank, empty or `null`. The `prefix` for a disabled branch type can be empty or invalid."
              },
              "enabled": {
                "type": "boolean",
                "description": "Whether the branch type is enabled or not. A disabled branch type may contain an invalid `prefix`."
              }
            }
          },
          "maxItems": 4,
          "minItems": 0,
          "uniqueItems": true
        }
      },
      "description": "A repository's branching model settings",
      "additionalProperties": true
    }
  ]
}
object branchrestriction
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Branch Restriction",
      "properties": {
        "users": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/account"
          },
          "minItems": 0
        },
        "groups": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/group"
          },
          "minItems": 0
        }
      },
      "description": "A branch restriction rule.",
      "additionalProperties": true
    }
  ]
}
object comment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Comment",
      "properties": {
        "id": {
          "type": "integer"
        },
        "user": {
          "$ref": "#/components/schemas/account"
        },
        "links": {
          "type": "object",
          "properties": {
            "code": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "inline": {
          "type": "object",
          "required": [
            "path"
          ],
          "properties": {
            "to": {
              "type": "integer",
              "minimum": 1,
              "description": "The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed."
            },
            "from": {
              "type": "integer",
              "minimum": 1,
              "description": "The comment's anchor line in the old version of the file."
            },
            "path": {
              "type": "string",
              "description": "The path of the file this comment is anchored to."
            }
          }
        },
        "parent": {
          "$ref": "#/components/schemas/comment"
        },
        "content": {
          "type": "object",
          "properties": {
            "raw": {
              "type": "string",
              "description": "The text as it was typed by a user."
            },
            "html": {
              "type": "string",
              "description": "The user's content rendered as HTML."
            },
            "markup": {
              "enum": [
                "markdown",
                "creole",
                "plaintext"
              ],
              "type": "string",
              "description": "The type of markup language the raw content is to be interpreted in."
            }
          }
        },
        "deleted": {
          "type": "boolean"
        },
        "created_on": {
          "type": "string",
          "format": "date-time"
        },
        "updated_on": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "The base type for all comments. This type should be considered abstract. Each of the \"commentable\" resources defines its own subtypes (e.g. `issue_comment`).",
      "additionalProperties": true
    }
  ]
}
object comment_resolution
{
  "type": "object",
  "title": "Comment Resolution",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "user": {
      "$ref": "#/components/schemas/account"
    },
    "created_on": {
      "type": "string",
      "format": "date-time",
      "description": "The ISO8601 timestamp the resolution was created."
    }
  },
  "description": "The resolution object for a Comment.",
  "additionalProperties": true
}
object commit
{
  "allOf": [
    {
      "$ref": "#/components/schemas/base_commit"
    },
    {
      "type": "object",
      "title": "Commit",
      "properties": {
        "repository": {
          "$ref": "#/components/schemas/repository"
        },
        "participants": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/participant"
          },
          "minItems": 0
        }
      },
      "description": "A repository commit object.",
      "additionalProperties": true
    }
  ]
}
object commit_comment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/comment"
    },
    {
      "type": "object",
      "title": "Commit Comment",
      "properties": {
        "commit": {
          "$ref": "#/components/schemas/commit"
        }
      },
      "description": "A commit comment.",
      "additionalProperties": true
    }
  ]
}
object commit_file
{
  "type": "object",
  "title": "Commit File",
  "required": [
    "type"
  ],
  "properties": {
    "path": {
      "type": "string",
      "description": "The path in the repository"
    },
    "type": {
      "type": "string"
    },
    "commit": {
      "$ref": "#/components/schemas/commit"
    },
    "attributes": {
      "enum": [
        "link",
        "executable",
        "subrepository",
        "binary",
        "lfs"
      ],
      "type": "string"
    },
    "escaped_path": {
      "type": "string",
      "description": "The escaped version of the path as it appears in a diff. If the path does not require escaping this will be the same as path."
    }
  },
  "description": "A file object, representing a file at a commit in a repository",
  "additionalProperties": true
}
object commitstatus
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Commit Status",
      "properties": {
        "key": {
          "type": "string",
          "description": "An identifier for the status that's unique to\n        its type (current \"build\" is the only supported type) and the vendor,\n        e.g. BB-DEPLOY"
        },
        "url": {
          "type": "string",
          "description": "A URL linking back to the vendor or build system, for providing more information about whatever process produced this status. Accepts context variables `repository` and `commit` that Bitbucket will evaluate at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name} which Bitbucket will turn into https://foo.com/builds/foo/bar at render time."
        },
        "name": {
          "type": "string",
          "description": "An identifier for the build itself, e.g. BB-DEPLOY-1"
        },
        "uuid": {
          "type": "string",
          "description": "The commit status' id."
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "commit": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "state": {
          "enum": [
            "FAILED",
            "INPROGRESS",
            "STOPPED",
            "SUCCESSFUL"
          ],
          "type": "string",
          "description": "Provides some indication of the status of this commit"
        },
        "refname": {
          "type": "string",
          "description": "\nThe name of the ref that pointed to this commit at the time the status\nobject was created. Note that this the ref may since have moved off of\nthe commit. This optional field can be useful for build systems whose\nbuild triggers and configuration are branch-dependent (e.g. a Pipeline\nbuild).\nIt is legitimate for this field to not be set, or even apply (e.g. a\nstatic linting job)."
        },
        "created_on": {
          "type": "string",
          "format": "date-time"
        },
        "updated_on": {
          "type": "string",
          "format": "date-time"
        },
        "description": {
          "type": "string",
          "description": "A description of the build (e.g. \"Unit tests in Bamboo\")"
        }
      },
      "description": "A commit status object.",
      "additionalProperties": true
    }
  ]
}
object component
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Component",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        }
      },
      "description": "A component as defined in a repository's issue tracker.",
      "additionalProperties": true
    }
  ]
}
object ddev_report
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "description": "A report for a commit.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}",
  "x-bb-default-fields": [
    "uuid",
    "commitHash"
  ]
}
object default_reviewer_and_type
{
  "type": "object",
  "title": "Default Reviewer and Type",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "user": {
      "$ref": "#/components/schemas/user"
    },
    "reviewer_type": {
      "type": "string"
    }
  },
  "description": "Object containing a user that is a default reviewer and the type of reviewer",
  "additionalProperties": true
}
object deploy_key
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deploy Key",
      "properties": {
        "key": {
          "type": "string",
          "description": "The deploy key value."
        },
        "label": {
          "type": "string",
          "description": "The user-defined label for the deploy key"
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "owner": {
          "$ref": "#/components/schemas/account"
        },
        "comment": {
          "type": "string",
          "description": "The comment parsed from the deploy key (if present)"
        },
        "added_on": {
          "type": "string",
          "format": "date-time"
        },
        "last_used": {
          "type": "string",
          "format": "date-time"
        },
        "repository": {
          "$ref": "#/components/schemas/repository"
        }
      },
      "description": "Represents deploy key for a repository.",
      "additionalProperties": true
    }
  ]
}
object deployment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the deployment."
        },
        "state": {
          "$ref": "#/components/schemas/deployment_state"
        },
        "release": {
          "$ref": "#/components/schemas/deployment_release"
        },
        "environment": {
          "$ref": "#/components/schemas/deployment_environment"
        }
      },
      "description": "A Bitbucket Deployment.",
      "additionalProperties": true
    }
  ]
}
object deployment_environment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment Environment",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the environment."
        },
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the environment."
        }
      },
      "description": "A Bitbucket Deployment Environment.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}",
  "x-bb-batch-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch",
  "x-bb-batch-max-size": 100,
  "x-bb-default-fields": [
    "uuid"
  ]
}
object deployment_environment_lock
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment Environment Lock",
      "properties": {
        "environmentUuid": {
          "type": "string",
          "description": "The UUID identifying the environment."
        }
      },
      "description": "A Bitbucket Deployment Environment Lock.",
      "additionalProperties": true
    }
  ],
  "x-bb-batch-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch",
  "x-bb-batch-max-size": 100,
  "x-bb-default-fields": [
    "*",
    "lock_opener.*",
    "owner.*"
  ]
}
object deployment_release
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment Release",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Link to the pipeline that produced the release."
        },
        "name": {
          "type": "string",
          "description": "The name of the release."
        },
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the release."
        },
        "commit": {
          "$ref": "#/components/schemas/commit"
        },
        "created_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the release was created."
        }
      },
      "description": "A Bitbucket Deployment Release.",
      "additionalProperties": true
    }
  ]
}
object deployment_state
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment State",
      "properties": {},
      "description": "The representation of the progress state of a deployment.",
      "additionalProperties": true
    }
  ]
}
object deployment_state_completed
{
  "allOf": [
    {
      "$ref": "#/components/schemas/deployment_state"
    },
    {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Link to the deployment result."
        },
        "name": {
          "enum": [
            "COMPLETED"
          ],
          "type": "string",
          "description": "The name of deployment state (COMPLETED)."
        },
        "status": {
          "$ref": "#/components/schemas/deployment_state_completed_status"
        },
        "deployer": {
          "$ref": "#/components/schemas/account"
        },
        "start_date": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the deployment was started."
        },
        "completion_date": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the deployment completed."
        }
      },
      "description": "A Bitbucket Deployment COMPLETED deployment state.",
      "additionalProperties": true
    }
  ]
}
object deployment_state_completed_status
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Completed Deployment",
      "properties": {},
      "description": "The status of a completed deployment.",
      "additionalProperties": true
    }
  ]
}
object deployment_state_completed_status_failed
{
  "allOf": [
    {
      "$ref": "#/components/schemas/deployment_state_completed_status"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "FAILED"
          ],
          "type": "string",
          "description": "The name of the completed deployment status (FAILED)."
        }
      },
      "description": "A FAILED completed deployment status.",
      "additionalProperties": true
    }
  ]
}
object deployment_state_completed_status_stopped
{
  "allOf": [
    {
      "$ref": "#/components/schemas/deployment_state_completed_status"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "STOPPED"
          ],
          "type": "string",
          "description": "The name of the completed deployment status (STOPPED)."
        }
      },
      "description": "A STOPPED completed deployment status.",
      "additionalProperties": true
    }
  ]
}
object deployment_state_completed_status_successful
{
  "allOf": [
    {
      "$ref": "#/components/schemas/deployment_state_completed_status"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "SUCCESSFUL"
          ],
          "type": "string",
          "description": "The name of the completed deployment status (SUCCESSFUL)."
        }
      },
      "description": "A SUCCESSFUL completed deployment status.",
      "additionalProperties": true
    }
  ]
}
object deployment_state_in_progress
{
  "allOf": [
    {
      "$ref": "#/components/schemas/deployment_state"
    },
    {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Link to the deployment result."
        },
        "name": {
          "enum": [
            "IN_PROGRESS"
          ],
          "type": "string",
          "description": "The name of deployment state (IN_PROGRESS)."
        },
        "deployer": {
          "$ref": "#/components/schemas/account"
        },
        "start_date": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the deployment was started."
        }
      },
      "description": "A Bitbucket Deployment IN_PROGRESS deployment state.",
      "additionalProperties": true
    }
  ]
}
object deployment_state_undeployed
{
  "allOf": [
    {
      "$ref": "#/components/schemas/deployment_state"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "UNDEPLOYED"
          ],
          "type": "string",
          "description": "The name of deployment state (UNDEPLOYED)."
        },
        "trigger_url": {
          "type": "string",
          "format": "uri",
          "description": "Link to trigger the deployment."
        }
      },
      "description": "A Bitbucket Deployment UNDEPLOYED deployment state.",
      "additionalProperties": true
    }
  ]
}
object deployment_variable
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment Variable",
      "properties": {
        "key": {
          "type": "string",
          "description": "The unique name of the variable."
        },
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the variable."
        },
        "value": {
          "type": "string",
          "description": "The value of the variable. If the variable is secured, this will be empty."
        },
        "secured": {
          "type": "boolean",
          "description": "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API."
        }
      },
      "description": "A Pipelines deployment variable.",
      "additionalProperties": true
    }
  ]
}
object deployments_ddev_deployment_environment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment Environment",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the environment."
        },
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the environment."
        }
      },
      "description": "A Bitbucket Deployment Environment.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}",
  "x-bb-batch-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch",
  "x-bb-batch-max-size": 100,
  "x-bb-default-fields": [
    "uuid"
  ]
}
object deployments_ddev_deployment_environment_lock
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment Environment Lock",
      "properties": {
        "environmentUuid": {
          "type": "string",
          "description": "The UUID identifying the environment."
        }
      },
      "description": "A Bitbucket Deployment Environment Lock.",
      "additionalProperties": true
    }
  ],
  "x-bb-batch-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch",
  "x-bb-batch-max-size": 100,
  "x-bb-default-fields": [
    "*",
    "lock_opener.*",
    "owner.*"
  ]
}
object deployments_ddev_paginated_environments
{
  "type": "object",
  "title": "Paginated Deployment Environments",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/deployments_ddev_deployment_environment"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of environments"
}
object deployments_stg_west_deployment_environment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment Environment",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the environment."
        },
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the environment."
        }
      },
      "description": "A Bitbucket Deployment Environment.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}",
  "x-bb-batch-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch",
  "x-bb-batch-max-size": 100,
  "x-bb-default-fields": [
    "uuid"
  ]
}
object deployments_stg_west_deployment_environment_lock
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Deployment Environment Lock",
      "properties": {
        "environmentUuid": {
          "type": "string",
          "description": "The UUID identifying the environment."
        }
      },
      "description": "A Bitbucket Deployment Environment Lock.",
      "additionalProperties": true
    }
  ],
  "x-bb-batch-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch",
  "x-bb-batch-max-size": 100,
  "x-bb-default-fields": [
    "*",
    "lock_opener.*",
    "owner.*"
  ]
}
object deployments_stg_west_paginated_environments
{
  "type": "object",
  "title": "Paginated Deployment Environments",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/deployments_stg_west_deployment_environment"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of environments"
}
object diffstat
{
  "type": "object",
  "title": "Diff Stat",
  "required": [
    "type"
  ],
  "properties": {
    "new": {
      "$ref": "#/components/schemas/commit_file"
    },
    "old": {
      "$ref": "#/components/schemas/commit_file"
    },
    "type": {
      "type": "string"
    },
    "status": {
      "enum": [
        "added",
        "removed",
        "modified",
        "renamed"
      ],
      "type": "string"
    },
    "lines_added": {
      "type": "integer"
    },
    "lines_removed": {
      "type": "integer"
    }
  },
  "description": "A diffstat object that includes a summary of changes made to a file between two commits.",
  "additionalProperties": true
}
object effective_repo_branching_model
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Effective Repository Branching Model",
      "properties": {
        "production": {
          "type": "object",
          "required": [
            "name",
            "use_mainbranch"
          ],
          "properties": {
            "name": {
              "type": "string",
              "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty."
            },
            "branch": {
              "$ref": "#/components/schemas/branch"
            },
            "use_mainbranch": {
              "type": "boolean",
              "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)."
            }
          }
        },
        "development": {
          "type": "object",
          "required": [
            "name",
            "use_mainbranch"
          ],
          "properties": {
            "name": {
              "type": "string",
              "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty."
            },
            "branch": {
              "$ref": "#/components/schemas/branch"
            },
            "use_mainbranch": {
              "type": "boolean",
              "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)."
            }
          }
        },
        "branch_types": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "kind",
              "prefix"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "feature",
                  "bugfix",
                  "release",
                  "hotfix"
                ],
                "type": "string",
                "description": "The kind of branch."
              },
              "prefix": {
                "type": "string",
                "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`."
              }
            }
          },
          "maxItems": 4,
          "minItems": 0,
          "description": "The active branch types.",
          "uniqueItems": true
        }
      },
      "description": "A repository's effective branching model",
      "additionalProperties": true
    }
  ]
}
object error
{
  "type": "object",
  "title": "Error",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "error": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "data": {
          "type": "object",
          "properties": {},
          "description": "Optional structured data that is endpoint-specific.",
          "additionalProperties": true
        },
        "detail": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    }
  },
  "description": "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`.",
  "additionalProperties": true
}
object export_options
{
  "type": "object",
  "title": "Export Options",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "send_email": {
      "type": "boolean"
    },
    "project_key": {
      "type": "string"
    },
    "project_name": {
      "type": "string"
    },
    "include_attachments": {
      "type": "boolean"
    }
  },
  "description": "Options for issue export.",
  "additionalProperties": true
}
object group
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Group",
      "properties": {
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string",
          "description": "The \"sluggified\" version of the group's name. This contains only ASCII\ncharacters and can therefore be slightly different than the name"
        },
        "links": {
          "type": "object",
          "properties": {
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "owner": {
          "$ref": "#/components/schemas/account"
        },
        "full_slug": {
          "type": "string",
          "description": "The concatenation of the workspace's slug and the group's slug,\nseparated with a colon (e.g. `acme:developers`)\n"
        },
        "workspace": {
          "$ref": "#/components/schemas/workspace"
        }
      },
      "description": "A group object",
      "additionalProperties": true
    }
  ]
}
object hook_event
{
  "type": "object",
  "title": "Hook Event",
  "properties": {
    "event": {
      "enum": [
        "pullrequest:updated",
        "issue:comment_created",
        "repo:transfer",
        "issue:created",
        "pullrequest:rejected",
        "repo:deleted",
        "pullrequest:fulfilled",
        "repo:commit_status_created",
        "repo:imported",
        "pullrequest:changes_request_created",
        "repo:push",
        "pullrequest:created",
        "pullrequest:comment_created",
        "project:updated",
        "repo:created",
        "repo:commit_status_updated",
        "pullrequest:unapproved",
        "repo:commit_comment_created",
        "pullrequest:comment_reopened",
        "repo:fork",
        "repo:updated",
        "pullrequest:comment_deleted",
        "issue:updated",
        "pullrequest:changes_request_removed",
        "pullrequest:comment_resolved",
        "pullrequest:approved",
        "pullrequest:comment_updated"
      ],
      "type": "string",
      "description": "The event identifier."
    },
    "label": {
      "type": "string",
      "description": "Summary of the webhook event type."
    },
    "category": {
      "type": "string",
      "description": "The category this event belongs to."
    },
    "description": {
      "type": "string",
      "description": "More detailed description of the webhook event type."
    }
  },
  "description": "An event, associated with a resource or subject type."
}
object issue
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Issue",
      "properties": {
        "id": {
          "type": "integer"
        },
        "kind": {
          "enum": [
            "bug",
            "enhancement",
            "proposal",
            "task"
          ],
          "type": "string"
        },
        "links": {
          "type": "object",
          "properties": {
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "vote": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "watch": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "comments": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "attachments": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "state": {
          "enum": [
            "submitted",
            "new",
            "open",
            "resolved",
            "on hold",
            "invalid",
            "duplicate",
            "wontfix",
            "closed"
          ],
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "votes": {
          "type": "integer"
        },
        "content": {
          "type": "object",
          "properties": {
            "raw": {
              "type": "string",
              "description": "The text as it was typed by a user."
            },
            "html": {
              "type": "string",
              "description": "The user's content rendered as HTML."
            },
            "markup": {
              "enum": [
                "markdown",
                "creole",
                "plaintext"
              ],
              "type": "string",
              "description": "The type of markup language the raw content is to be interpreted in."
            }
          }
        },
        "version": {
          "$ref": "#/components/schemas/version"
        },
        "assignee": {
          "$ref": "#/components/schemas/account"
        },
        "priority": {
          "enum": [
            "trivial",
            "minor",
            "major",
            "critical",
            "blocker"
          ],
          "type": "string"
        },
        "reporter": {
          "$ref": "#/components/schemas/account"
        },
        "component": {
          "$ref": "#/components/schemas/component"
        },
        "edited_on": {
          "type": "string",
          "format": "date-time"
        },
        "milestone": {
          "$ref": "#/components/schemas/milestone"
        },
        "created_on": {
          "type": "string",
          "format": "date-time"
        },
        "repository": {
          "$ref": "#/components/schemas/repository"
        },
        "updated_on": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "An issue.",
      "additionalProperties": true
    }
  ]
}
object issue_attachment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Issue Attachment",
      "properties": {
        "name": {
          "type": "string"
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        }
      },
      "description": "An issue file attachment's meta data. Note this does not contain the file's actual contents.",
      "additionalProperties": true
    }
  ]
}
object issue_change
{
  "type": "object",
  "title": "Issue Change",
  "required": [
    "type"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "user": {
      "$ref": "#/components/schemas/account"
    },
    "issue": {
      "$ref": "#/components/schemas/issue"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        },
        "issue": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        }
      }
    },
    "changes": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "object",
          "properties": {
            "new": {
              "type": "string"
            },
            "old": {
              "type": "string"
            }
          }
        },
        "state": {
          "type": "object",
          "properties": {
            "new": {
              "type": "string"
            },
            "old": {
              "type": "string"
            }
          }
        },
        "title": {
          "type": "object",
          "properties": {
            "new": {
              "type": "string"
            },
            "old": {
              "type": "string"
            }
          }
        },
        "content": {
          "type": "object",
          "properties": {
            "new": {
              "type": "string"
            },
            "old": {
              "type": "string"
            }
          }
        },
        "version": {
          "type": "object",
          "properties": {
            "new": {
              "type": "string"
            },
            "old": {
              "type": "string"
            }
          }
        },
        "assignee": {
          "type": "object",
          "properties": {
            "new": {
              "type": "string"
            },
            "old": {
              "type": "string"
            }
          }
        },
        "priority": {
          "type": "object",
          "properties": {
            "new": {
              "type": "string"
            },
            "old": {
              "type": "string"
            }
          }
        },
        "component": {
          "type": "object",
          "properties": {
            "new": {
              "type": "string"
            },
            "old": {
              "type": "string"
            }
          }
        },
        "milestone": {
          "type": "object",
          "properties": {
            "new": {
              "type": "string"
            },
            "old": {
              "type": "string"
            }
          }
        }
      }
    },
    "message": {
      "type": "object",
      "properties": {
        "raw": {
          "type": "string",
          "description": "The text as it was typed by a user."
        },
        "html": {
          "type": "string",
          "description": "The user's content rendered as HTML."
        },
        "markup": {
          "enum": [
            "markdown",
            "creole",
            "plaintext"
          ],
          "type": "string",
          "description": "The type of markup language the raw content is to be interpreted in."
        }
      }
    },
    "created_on": {
      "type": "string",
      "format": "date-time"
    }
  },
  "description": "An issue change.",
  "additionalProperties": true
}
object issue_comment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/comment"
    },
    {
      "type": "object",
      "title": "Issue Comment",
      "properties": {
        "issue": {
          "$ref": "#/components/schemas/issue"
        }
      },
      "description": "A issue comment.",
      "additionalProperties": true
    }
  ]
}
object issue_job_status
{
  "type": "object",
  "title": "Issue Job Status",
  "properties": {
    "pct": {
      "type": "number",
      "maximum": 100,
      "minimum": 0,
      "description": "The percentage of issues already imported/exported"
    },
    "type": {
      "type": "string"
    },
    "count": {
      "type": "integer",
      "description": "The total number of issues already imported/exported"
    },
    "phase": {
      "type": "string",
      "description": "The phase of the import/export job"
    },
    "total": {
      "type": "integer",
      "description": "The total number of issues being imported/exported"
    },
    "status": {
      "enum": [
        "ACCEPTED",
        "STARTED",
        "RUNNING",
        "FAILURE"
      ],
      "type": "string",
      "description": "The status of the import/export job"
    }
  },
  "description": "The status of an import or export job"
}
object jira_project
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "description": "A Jira Project.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/api/{target_user.uuid}/jira/sites/{cloudId}/projects/{id}?atlassian_account_id={user.account_id}",
  "x-bb-detail-fields": [
    "key",
    "name",
    "url",
    "avatarUrls.*",
    "site"
  ],
  "x-bb-default-fields": [
    "type",
    "cloudId",
    "id"
  ]
}
object jira_site
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "description": "A Jira Site.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/api/{target_user.uuid}/jira/sites/{cloudId}?atlassian_account_id={user.account_id}",
  "x-bb-detail-fields": [
    "connected"
  ],
  "x-bb-default-fields": [
    "type",
    "cloudId",
    "cloudUrl",
    "cloudName"
  ]
}
object link
{
  "type": "object",
  "title": "Link",
  "properties": {
    "href": {
      "type": "string",
      "format": "uri"
    },
    "name": {
      "type": "string"
    }
  },
  "description": "A link to a resource related to this object."
}
object milestone
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Milestone",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        }
      },
      "description": "A milestone as defined in a repository's issue tracker.",
      "additionalProperties": true
    }
  ]
}
object object
{
  "type": "object",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    }
  },
  "description": "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`.",
  "discriminator": {
    "propertyName": "type"
  },
  "additionalProperties": true
}
object page
{
  "type": "object",
  "title": "Page",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  }
}
object paginated_accounts
{
  "type": "object",
  "title": "Paginated Accounts",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/account"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of accounts."
}
object paginated_annotations
{
  "type": "object",
  "title": "Paginated Annotations",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/report_annotation"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of annotations."
}
object paginated_branches
{
  "type": "object",
  "title": "Paginated Branches",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/branch"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of branches."
}
object paginated_branchrestrictions
{
  "type": "object",
  "title": "Paginated Branch Restrictions",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/branchrestriction"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of branch restriction rules."
}
object paginated_changeset
{
  "type": "object",
  "title": "Page",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/base_commit"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of commits."
}
object paginated_commit_comments
{
  "type": "object",
  "title": "Paginated Commit Comments",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/commit_comment"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of commit comments."
}
object paginated_commitstatuses
{
  "type": "object",
  "title": "Paginated Commit Statuses",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/commitstatus"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of commit status objects."
}
object paginated_components
{
  "type": "object",
  "title": "Paginated Components",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/component"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of issue tracker components."
}
object paginated_default_reviewer_and_type
{
  "type": "object",
  "title": "Paginated Default Reviewer and Type",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/default_reviewer_and_type"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of default reviewers with reviewer type."
}
object paginated_deploy_keys
{
  "type": "object",
  "title": "Paginated Deploy Keys",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/deploy_key"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of deploy keys."
}
object paginated_deployment_variable
{
  "type": "object",
  "title": "Paginated Deployment Variables",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/deployment_variable"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of deployment variables."
}
object paginated_deployments
{
  "type": "object",
  "title": "Paginated Deployments",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/deployment"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of deployments"
}
object paginated_diffstats
{
  "type": "object",
  "title": "Paginated Diff Stat",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/diffstat"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 500 with 5000 being the maximum allowed value."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of diffstats."
}
object paginated_environments
{
  "type": "object",
  "title": "Paginated Deployment Environments",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/deployment_environment"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of environments"
}
object paginated_files
{
  "type": "object",
  "title": "Paginated Files",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/commit_file"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of commit_file objects."
}
object paginated_hook_events
{
  "type": "object",
  "title": "Paginated Hook Events",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/hook_event"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of webhook types available to subscribe on."
}
object paginated_issue_attachments
{
  "type": "object",
  "title": "Paginated Issue Attachment",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/issue_attachment"
      },
      "minItems": 0
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of issue attachments."
}
object paginated_issue_comments
{
  "type": "object",
  "title": "Paginated Issue Comments",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/issue_comment"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of issue comments."
}
object paginated_issues
{
  "type": "object",
  "title": "Paginated Issues",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/issue"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of issues."
}
object paginated_log_entries
{
  "type": "object",
  "title": "Paginated Log Entries",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/issue_change"
      },
      "minItems": 0
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of issue changes."
}
object paginated_milestones
{
  "type": "object",
  "title": "Paginated Milestones",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/milestone"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of issue tracker milestones."
}
object paginated_pipeline_caches
{
  "type": "object",
  "title": "Paginated Pipeline Cache",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pipeline_cache"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of pipeline caches"
}
object paginated_pipeline_known_hosts
{
  "type": "object",
  "title": "Paginated Pipeline Known Hosts",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pipeline_known_host"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of known hosts."
}
object paginated_pipeline_schedule_executions
{
  "type": "object",
  "title": "Paginated Pipeline Schedule Executions",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pipeline_schedule_execution"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of the executions of a schedule."
}
object paginated_pipeline_schedules
{
  "type": "object",
  "title": "Paginated Pipeline Schedule",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pipeline_schedule"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of schedules"
}
object paginated_pipeline_steps
{
  "type": "object",
  "title": "Paginated Pipeline Steps",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pipeline_step"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of pipeline steps."
}
object paginated_pipeline_variables
{
  "type": "object",
  "title": "Paginated Pipeline Variables",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pipeline_variable"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of variables."
}
object paginated_pipelines
{
  "type": "object",
  "title": "Paginated Pipelines",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pipeline"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paged list of pipelines"
}
object paginated_project_deploy_keys
{
  "type": "object",
  "title": "Paginated Project Deploy Keys",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/project_deploy_key"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of project deploy keys."
}
object paginated_project_group_permissions
{
  "type": "object",
  "title": "Paginated Project Group Permissions",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/project_group_permission"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of project group permissions."
}
object paginated_project_user_permissions
{
  "type": "object",
  "title": "Paginated Project User Permissions",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/project_user_permission"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of project user permissions."
}
object paginated_projects
{
  "type": "object",
  "title": "Paginated Projects",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/project"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of projects"
}
object paginated_pullrequest_comments
{
  "type": "object",
  "title": "Paginated Pull Request Comments",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pullrequest_comment"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of pullrequest comments."
}
object paginated_pullrequests
{
  "type": "object",
  "title": "Paginated Pull Requests",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/pullrequest"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of pullrequests."
}
object paginated_refs
{
  "type": "object",
  "title": "Paginated Refs",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ref"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of refs."
}
object paginated_reports
{
  "type": "object",
  "title": "Paginated Reports",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/report"
      },
      "minItems": 0,
      "description": "The values of the current page."
    },
    "pagelen": {
      "type": "integer",
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of reports."
}
object paginated_repositories
{
  "type": "object",
  "title": "Paginated Repositories",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/repository"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of repositories."
}
object paginated_repository_group_permissions
{
  "type": "object",
  "title": "Paginated Repository Group Permissions",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/repository_group_permission"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of repository group permissions."
}
object paginated_repository_permissions
{
  "type": "object",
  "title": "Paginated Repository Permissions",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/repository_permission"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of repository permissions."
}
object paginated_repository_user_permissions
{
  "type": "object",
  "title": "Paginated Repository User Permissions",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/repository_user_permission"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of repository user permissions."
}
object paginated_snippet_comments
{
  "type": "object",
  "title": "Paginated Snippet Comments",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/snippet_comment"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of snippet comments."
}
object paginated_snippet_commit
{
  "type": "object",
  "title": "Paginated Snippet Commits",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/snippet_commit"
      },
      "minItems": 0
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of snippet commits."
}
object paginated_snippets
{
  "type": "object",
  "title": "Paginated Snippets",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/snippet"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of snippets."
}
object paginated_ssh_user_keys
{
  "type": "object",
  "title": "Paginated SSH User Keys",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ssh_account_key"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of SSH keys."
}
object paginated_tags
{
  "type": "object",
  "title": "Paginated Tags",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/tag"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of tags."
}
object paginated_tasks
{
  "type": "object",
  "title": "Paginated Tasks",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/A_pullrequest_comment_task"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of tasks."
}
object paginated_treeentries
{
  "type": "object",
  "title": "Paginated Tree Entry",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/treeentry"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of commit_file and/or commit_directory objects."
}
object paginated_versions
{
  "type": "object",
  "title": "Paginated Versions",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/version"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of issue tracker versions."
}
object paginated_webhook_subscriptions
{
  "type": "object",
  "title": "Paginated Webhook Subscriptions",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/webhook_subscription"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of webhook subscriptions"
}
object paginated_workspace_memberships
{
  "type": "object",
  "title": "Paginated Workspace Memberships",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/workspace_membership"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of workspace memberships."
}
object paginated_workspaces
{
  "type": "object",
  "title": "Paginated Workspaces",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs."
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "description": "Page number of the current results. This is an optional element that is not provided in all responses."
    },
    "size": {
      "type": "integer",
      "minimum": 0,
      "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute."
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/workspace"
      },
      "minItems": 0,
      "uniqueItems": true
    },
    "pagelen": {
      "type": "integer",
      "minimum": 1,
      "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values."
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs."
    }
  },
  "description": "A paginated list of workspaces."
}
object participant
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Participant",
      "properties": {
        "role": {
          "enum": [
            "PARTICIPANT",
            "REVIEWER"
          ],
          "type": "string"
        },
        "user": {
          "$ref": "#/components/schemas/account"
        },
        "state": {
          "enum": [
            "approved",
            "changes_requested",
            null
          ],
          "type": "string"
        },
        "approved": {
          "type": "boolean"
        },
        "participated_on": {
          "type": "string",
          "format": "date-time",
          "description": "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented."
        }
      },
      "description": "Object describing a user's role on resources like commits or pull requests.",
      "additionalProperties": true
    }
  ]
}
object pipeline
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the pipeline."
        },
        "state": {
          "$ref": "#/components/schemas/pipeline_state"
        },
        "target": {
          "$ref": "#/components/schemas/pipeline_target"
        },
        "creator": {
          "$ref": "#/components/schemas/account"
        },
        "trigger": {
          "$ref": "#/components/schemas/pipeline_trigger"
        },
        "variables": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/pipeline_variable"
          },
          "minItems": 0,
          "description": "The variables for the pipeline."
        },
        "created_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the pipeline was created."
        },
        "repository": {
          "$ref": "#/components/schemas/repository"
        },
        "build_number": {
          "type": "integer",
          "description": "The build number of the pipeline."
        },
        "completed_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the Pipeline was completed. This is not set if the pipeline is still in progress."
        },
        "build_seconds_used": {
          "type": "integer",
          "description": "The number of build seconds used by this pipeline."
        },
        "configuration_sources": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/pipeline_configuration_source"
          },
          "minItems": 0,
          "description": "An ordered list of sources of the pipeline configuration"
        }
      },
      "description": "A Bitbucket Pipeline. This represents an actual pipeline result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_build_number
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Build Number",
      "properties": {
        "next": {
          "type": "integer",
          "description": "The next number that will be used as build number."
        }
      },
      "description": "A Pipelines build number.",
      "additionalProperties": true
    }
  ]
}
object pipeline_cache
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Cache",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the cache."
        },
        "path": {
          "type": "string",
          "description": "The path where the cache contents were retrieved from."
        },
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the pipeline cache."
        },
        "key_hash": {
          "type": "string",
          "description": "The key hash of the cache version."
        },
        "step_uuid": {
          "type": "string",
          "description": "The uuid of the step that created the cache."
        },
        "created_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the cache was created."
        },
        "pipeline_uuid": {
          "type": "string",
          "description": "The UUID of the pipeline that created the cache."
        },
        "file_size_bytes": {
          "type": "integer",
          "description": "The size of the file containing the archive of the cache."
        }
      },
      "description": "A representation of metadata for a pipeline cache for given repository.",
      "additionalProperties": true
    }
  ]
}
object pipeline_cache_content_uri
{
  "type": "object",
  "title": "Pipeline Cache Content URI",
  "properties": {
    "uri": {
      "type": "string",
      "format": "uri",
      "description": "The uri for pipeline cache content."
    }
  },
  "description": "A representation of the location of pipeline cache content."
}
object pipeline_command
{
  "type": "object",
  "title": "Pipeline Command",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the command."
    },
    "command": {
      "type": "string",
      "description": "The executable command."
    }
  },
  "description": "An executable pipeline command."
}
object pipeline_commit_target
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_target"
    },
    {
      "type": "object",
      "title": "Pipeline Commit Target",
      "properties": {
        "commit": {
          "$ref": "#/components/schemas/commit"
        },
        "selector": {
          "$ref": "#/components/schemas/pipeline_selector"
        }
      },
      "description": "A Bitbucket Pipelines commit target.",
      "additionalProperties": true
    }
  ]
}
object pipeline_configuration_source
{
  "type": "object",
  "required": [
    "source",
    "uri"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "uri",
      "description": "Link to the configuration source view or its immediate content"
    },
    "source": {
      "type": "string",
      "description": "Identifier of the configuration source"
    }
  },
  "description": "Information about the source of the pipeline configuration"
}
object pipeline_error
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Error",
      "properties": {
        "key": {
          "type": "string",
          "description": "The error key."
        },
        "message": {
          "type": "string",
          "description": "The error message."
        }
      },
      "description": "An error causing a pipeline failure.",
      "additionalProperties": true
    }
  ]
}
object pipeline_image
{
  "type": "object",
  "title": "Pipeline Image",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the image. If the image is hosted on DockerHub the short name can be used, otherwise the fully qualified name is required here."
    },
    "email": {
      "type": "string",
      "description": "The email needed to authenticate with the Docker registry. Only required when using a private Docker image."
    },
    "password": {
      "type": "string",
      "description": "The password needed to authenticate with the Docker registry. Only required when using a private Docker image."
    },
    "username": {
      "type": "string",
      "description": "The username needed to authenticate with the Docker registry. Only required when using a private Docker image."
    }
  },
  "description": "The definition of a Docker image that can be used for a Bitbucket Pipelines step execution context."
}
object pipeline_known_host
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Known Host",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the known host."
        },
        "hostname": {
          "type": "string",
          "description": "The hostname of the known host."
        },
        "public_key": {
          "$ref": "#/components/schemas/pipeline_ssh_public_key"
        }
      },
      "description": "A Pipelines known host.",
      "additionalProperties": true
    }
  ]
}
object pipeline_ref_target
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_target"
    },
    {
      "type": "object",
      "title": "Pipeline Ref Target",
      "properties": {
        "commit": {
          "$ref": "#/components/schemas/commit"
        },
        "ref_name": {
          "type": "string",
          "description": "The name of the reference."
        },
        "ref_type": {
          "enum": [
            "branch",
            "tag",
            "named_branch",
            "bookmark"
          ],
          "type": "string",
          "description": "The type of reference (branch/tag)."
        },
        "selector": {
          "$ref": "#/components/schemas/pipeline_selector"
        }
      },
      "description": "A Bitbucket Pipelines reference target.",
      "additionalProperties": true
    }
  ]
}
object pipeline_schedule
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Schedule",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the schedule."
        },
        "target": {
          "$ref": "#/components/schemas/pipeline_ref_target"
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether the schedule is enabled."
        },
        "created_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the schedule was created."
        },
        "updated_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the schedule was updated."
        },
        "cron_pattern": {
          "type": "string",
          "description": "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day."
        }
      },
      "description": "A Pipelines schedule.",
      "additionalProperties": true
    }
  ]
}
object pipeline_schedule_execution
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Schedule Execution",
      "properties": {},
      "description": "A Pipelines schedule execution.",
      "additionalProperties": true
    }
  ]
}
object pipeline_schedule_execution_errored
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_schedule_execution"
    },
    {
      "type": "object",
      "properties": {
        "error": {
          "$ref": "#/components/schemas/pipeline_error"
        }
      },
      "description": "A Pipelines schedule execution that failed to be executed.",
      "additionalProperties": true
    }
  ]
}
object pipeline_schedule_execution_executed
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_schedule_execution"
    },
    {
      "type": "object",
      "properties": {
        "pipeline": {
          "$ref": "#/components/schemas/pipeline"
        }
      },
      "description": "A Pipelines executed schedule execution.",
      "additionalProperties": true
    }
  ]
}
object pipeline_schedule_post_request_body
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Request body for Pipeline Schedule POST request",
      "required": [
        "target",
        "cron_pattern"
      ],
      "properties": {
        "target": {
          "type": "object",
          "required": [
            "selector",
            "ref_name",
            "ref_type"
          ],
          "properties": {
            "ref_name": {
              "type": "string",
              "description": "The name of the reference."
            },
            "ref_type": {
              "enum": [
                "branch"
              ],
              "type": "string",
              "description": "The type of reference (branch only)."
            },
            "selector": {
              "$ref": "#/components/schemas/pipeline_selector"
            }
          },
          "description": "The target on which the schedule will be executed."
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether the schedule is enabled."
        },
        "cron_pattern": {
          "type": "string",
          "description": "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day."
        }
      },
      "additionalProperties": true
    }
  ]
}
object pipeline_schedule_put_request_body
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Request body for Pipeline Schedule PUT request",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether the schedule is enabled."
        }
      },
      "additionalProperties": true
    }
  ]
}
object pipeline_selector
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Selector",
      "properties": {
        "type": {
          "enum": [
            "branches",
            "tags",
            "bookmarks",
            "default",
            "custom"
          ],
          "type": "string",
          "description": "The type of selector."
        },
        "pattern": {
          "type": "string",
          "description": "The name of the matching pipeline definition."
        }
      },
      "description": "A representation of the selector that was used to identify the pipeline in the YML file.",
      "additionalProperties": true
    }
  ]
}
object pipeline_ssh_key_pair
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline SSH Key Pair",
      "properties": {
        "public_key": {
          "type": "string",
          "description": "The SSH public key."
        },
        "private_key": {
          "type": "string",
          "description": "The SSH private key. This value will be empty when retrieving the SSH key pair."
        }
      },
      "description": "A Pipelines SSH key pair.",
      "additionalProperties": true
    }
  ]
}
object pipeline_ssh_public_key
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline SSH Public Key",
      "properties": {
        "key": {
          "type": "string",
          "description": "The base64 encoded public key."
        },
        "key_type": {
          "type": "string",
          "description": "The type of the public key."
        },
        "md5_fingerprint": {
          "type": "string",
          "description": "The MD5 fingerprint of the public key."
        },
        "sha256_fingerprint": {
          "type": "string",
          "description": "The SHA-256 fingerprint of the public key."
        }
      },
      "description": "A Pipelines known host public key.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline State",
      "properties": {},
      "description": "The representation of the progress state of a pipeline.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_completed
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state"
    },
    {
      "type": "object",
      "title": "Pipeline Completed State",
      "properties": {
        "name": {
          "enum": [
            "COMPLETED"
          ],
          "type": "string",
          "description": "The name of pipeline state (COMPLETED)."
        },
        "result": {
          "$ref": "#/components/schemas/pipeline_state_completed_result"
        }
      },
      "description": "A Bitbucket Pipelines COMPLETED pipeline state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_completed_error
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state_completed_result"
    },
    {
      "type": "object",
      "title": "Pipeline Completed Error",
      "properties": {
        "name": {
          "enum": [
            "ERROR"
          ],
          "type": "string",
          "description": "The name of the result (ERROR)"
        },
        "error": {
          "$ref": "#/components/schemas/pipeline_error"
        }
      },
      "description": "A Bitbucket Pipelines ERROR pipeline result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_completed_expired
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "EXPIRED"
          ],
          "type": "string",
          "description": "The name of the stopped result (EXPIRED)."
        }
      },
      "description": "A Bitbucket Pipelines EXPIRED pipeline result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_completed_failed
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "FAILED"
          ],
          "type": "string",
          "description": "The name of the failed result (FAILED)."
        }
      },
      "description": "A Bitbucket Pipelines FAILED pipeline result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_completed_result
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Completed Result",
      "properties": {},
      "description": "A result of a completed pipeline state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_completed_stopped
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "STOPPED"
          ],
          "type": "string",
          "description": "The name of the stopped result (STOPPED)."
        }
      },
      "description": "A Bitbucket Pipelines STOPPED pipeline result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_completed_successful
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "SUCCESSFUL"
          ],
          "type": "string",
          "description": "The name of the successful result (SUCCESSFUL)."
        }
      },
      "description": "A Bitbucket Pipelines SUCCESSFUL pipeline result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_in_progress
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state"
    },
    {
      "type": "object",
      "title": "Pipeline In-Progress State",
      "properties": {
        "name": {
          "enum": [
            "IN_PROGRESS"
          ],
          "type": "string",
          "description": "The name of pipeline state (IN_PROGRESS)."
        },
        "stage": {
          "$ref": "#/components/schemas/pipeline_state_in_progress_stage"
        }
      },
      "description": "A Bitbucket Pipelines IN_PROGRESS pipeline state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_in_progress_paused
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state_in_progress_stage"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "PAUSED"
          ],
          "type": "string",
          "description": "The name of the stage (PAUSED)"
        }
      },
      "description": "A Bitbucket Pipelines PAUSED stage of a pipeline that is in progress.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_in_progress_running
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state_in_progress_stage"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "RUNNING"
          ],
          "type": "string",
          "description": "The name of the stage (RUNNING)"
        }
      },
      "description": "A Bitbucket Pipelines RUNNING stage of a pipeline that is in progress.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_in_progress_stage
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline In-Progress Stage",
      "properties": {},
      "description": "A result of an in progress pipeline state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_state_pending
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_state"
    },
    {
      "type": "object",
      "title": "Pipeline Pending State",
      "properties": {
        "name": {
          "enum": [
            "PENDING"
          ],
          "type": "string",
          "description": "The name of pipeline state (PENDING)."
        }
      },
      "description": "A Bitbucket Pipelines PENDING pipeline state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Step",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the step."
        },
        "image": {
          "$ref": "#/components/schemas/pipeline_image"
        },
        "state": {
          "$ref": "#/components/schemas/pipeline_step_state"
        },
        "started_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the step execution was started. This is not set when the step hasn't executed yet."
        },
        "completed_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the step execution was completed. This is not set if the step is still in progress."
        },
        "setup_commands": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/pipeline_command"
          },
          "description": "The list of commands that are executed as part of the setup phase of the build. These commands are executed outside the build container."
        },
        "script_commands": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/pipeline_command"
          },
          "description": "The list of build commands. These commands are executed in the build container."
        }
      },
      "description": "A step of a Bitbucket pipeline. This represents the actual result of the step execution.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}",
  "x-bb-batch-url": "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch",
  "x-bb-batch-max-size": 100,
  "x-bb-default-fields": [
    "uuid"
  ]
}
object pipeline_step_error
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Step Error",
      "properties": {
        "key": {
          "type": "string",
          "description": "The error key."
        },
        "message": {
          "type": "string",
          "description": "The error message."
        }
      },
      "description": "An error causing a step failure.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Step State",
      "properties": {},
      "description": "The representation of the progress state of a pipeline step.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_completed
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "COMPLETED"
          ],
          "type": "string",
          "description": "The name of pipeline step state (COMPLETED)."
        },
        "result": {
          "$ref": "#/components/schemas/pipeline_step_state_completed_result"
        }
      },
      "description": "A Bitbucket Pipelines COMPLETED pipeline step state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_completed_error
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "ERROR"
          ],
          "type": "string",
          "description": "The name of the result (ERROR)"
        },
        "error": {
          "$ref": "#/components/schemas/pipeline_step_error"
        }
      },
      "description": "A Bitbucket Pipelines ERROR pipeline step result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_completed_expired
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "EXPIRED"
          ],
          "type": "string",
          "description": "The name of the result (EXPIRED)"
        }
      },
      "description": "A Bitbucket Pipelines EXPIRED pipeline step result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_completed_failed
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "FAILED"
          ],
          "type": "string",
          "description": "The name of the result (FAILED)"
        }
      },
      "description": "A Bitbucket Pipelines FAILED pipeline step result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_completed_not_run
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "NOT_RUN"
          ],
          "type": "string",
          "description": "The name of the result (NOT_RUN)"
        }
      },
      "description": "A Bitbucket Pipelines NOT_RUN pipeline step result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_completed_result
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Completed Step Result",
      "properties": {},
      "description": "A result of a completed pipeline step state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_completed_stopped
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "STOPPED"
          ],
          "type": "string",
          "description": "The name of the result (STOPPED)"
        }
      },
      "description": "A Bitbucket Pipelines STOPPED pipeline step result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_completed_successful
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state_completed_result"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "SUCCESSFUL"
          ],
          "type": "string",
          "description": "The name of the result (SUCCESSFUL)"
        }
      },
      "description": "A Bitbucket Pipelines SUCCESSFUL pipeline step result.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_in_progress
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "IN_PROGRESS"
          ],
          "type": "string",
          "description": "The name of pipeline step state (IN_PROGRESS)."
        }
      },
      "description": "A Bitbucket Pipelines IN_PROGRESS pipeline step state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_pending
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "PENDING"
          ],
          "type": "string",
          "description": "The name of pipeline step state (PENDING)."
        }
      },
      "description": "A Bitbucket Pipelines PENDING pipeline step state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_step_state_ready
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_step_state"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "enum": [
            "READY"
          ],
          "type": "string",
          "description": "The name of pipeline step state (READY)."
        }
      },
      "description": "A Bitbucket Pipelines READY pipeline step state.",
      "additionalProperties": true
    }
  ]
}
object pipeline_target
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Target",
      "properties": {},
      "description": "A representation of the target that a pipeline executes on.",
      "additionalProperties": true
    }
  ]
}
object pipeline_trigger
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Trigger",
      "properties": {},
      "description": "A representation of the trigger used for a pipeline.",
      "additionalProperties": true
    }
  ]
}
object pipeline_trigger_manual
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_trigger"
    },
    {
      "type": "object",
      "title": "Pipeline Manual Trigger",
      "properties": {},
      "description": "A Bitbucket Pipelines MANUAL trigger.",
      "additionalProperties": true
    }
  ]
}
object pipeline_trigger_push
{
  "allOf": [
    {
      "$ref": "#/components/schemas/pipeline_trigger"
    },
    {
      "type": "object",
      "title": "Pipeline Push Trigger",
      "properties": {},
      "description": "A Bitbucket Pipelines PUSH trigger.",
      "additionalProperties": true
    }
  ]
}
object pipeline_variable
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Variable",
      "properties": {
        "key": {
          "type": "string",
          "description": "The unique name of the variable."
        },
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the variable."
        },
        "value": {
          "type": "string",
          "description": "The value of the variable. If the variable is secured, this will be empty."
        },
        "secured": {
          "type": "boolean",
          "description": "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API."
        }
      },
      "description": "A Pipelines variable.",
      "additionalProperties": true
    }
  ]
}
object pipelines_config
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipelines Configuration",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether Pipelines is enabled for the repository."
        },
        "repository": {
          "$ref": "#/components/schemas/repository"
        }
      },
      "description": "The Pipelines configuration for a repository.",
      "additionalProperties": true
    }
  ]
}
object pipelines_ddev_links_section_href
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Links href",
      "properties": {
        "href": {
          "type": "string",
          "format": "uri",
          "description": "A link"
        }
      },
      "description": "A links section href",
      "additionalProperties": true
    }
  ]
}
object pipelines_ddev_pipeline
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "The UUID identifying the pipeline."
        },
        "links": {
          "$ref": "#/components/schemas/pipelines_ddev_pipeline_links"
        },
        "state": {
          "$ref": "#/components/schemas/pipeline_state"
        },
        "target": {
          "$ref": "#/components/schemas/pipeline_target"
        },
        "creator": {
          "$ref": "#/components/schemas/account"
        },
        "trigger": {
          "$ref": "#/components/schemas/pipeline_trigger"
        },
        "variables": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/pipeline_variable"
          },
          "minItems": 0,
          "description": "The variables for the pipeline."
        },
        "created_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the pipeline was created."
        },
        "repository": {
          "$ref": "#/components/schemas/repository"
        },
        "build_number": {
          "type": "integer",
          "description": "The build number of the pipeline."
        },
        "completed_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the Pipeline was completed. This is not set if the pipeline is still in progress."
        },
        "build_seconds_used": {
          "type": "integer",
          "description": "The number of build seconds used by this pipeline."
        }
      },
      "description": "A Bitbucket Pipeline. This represents an actual pipeline result.",
      "additionalProperties": true
    }
  ]
}
object pipelines_ddev_pipeline_error
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Error",
      "properties": {
        "key": {
          "type": "string",
          "description": "The error key."
        },
        "message": {
          "type": "string",
          "description": "The error message"
        }
      },
      "description": "An error causing a pipeline failure.",
      "additionalProperties": true
    }
  ]
}
object pipelines_ddev_pipeline_links
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pipeline Links",
      "properties": {
        "self": {
          "$ref": "#/components/schemas/pipelines_ddev_links_section_href"
        },
        "steps": {
          "$ref": "#/components/schemas/pipelines_ddev_links_section_href"
        }
      },
      "description": "Links section for a Pipeline.",
      "additionalProperties": true
    }
  ]
}
object pipelines_ddev_pipeline_step
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "description": "A step of a Bitbucket pipeline. This represents the actual result of the step execution.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}",
  "x-bb-batch-url": "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch",
  "x-bb-batch-max-size": 100,
  "x-bb-default-fields": [
    "uuid"
  ]
}
object pipelines_stg_west_pipeline_step
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "description": "A step of a Bitbucket pipeline. This represents the actual result of the step execution.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}",
  "x-bb-batch-url": "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch",
  "x-bb-batch-max-size": 100,
  "x-bb-default-fields": [
    "uuid"
  ]
}
object project
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Project",
      "properties": {
        "key": {
          "type": "string",
          "description": "The project's key."
        },
        "name": {
          "type": "string",
          "description": "The name of the project."
        },
        "uuid": {
          "type": "string",
          "description": "The project's immutable id."
        },
        "links": {
          "type": "object",
          "properties": {
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "avatar": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "owner": {
          "$ref": "#/components/schemas/team"
        },
        "created_on": {
          "type": "string",
          "format": "date-time"
        },
        "is_private": {
          "type": "boolean",
          "description": "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories."
        },
        "updated_on": {
          "type": "string",
          "format": "date-time"
        },
        "description": {
          "type": "string"
        },
        "has_publicly_visible_repos": {
          "type": "boolean",
          "description": "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories."
        }
      },
      "description": "A Bitbucket project.\n            Projects are used by teams to organize repositories.",
      "additionalProperties": true
    }
  ]
}
object project_branching_model
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Project Branching Model",
      "properties": {
        "production": {
          "type": "object",
          "required": [
            "name",
            "use_mainbranch"
          ],
          "properties": {
            "name": {
              "type": "string",
              "description": "Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist."
            },
            "use_mainbranch": {
              "type": "boolean",
              "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)."
            }
          }
        },
        "development": {
          "type": "object",
          "required": [
            "name",
            "use_mainbranch"
          ],
          "properties": {
            "name": {
              "type": "string",
              "description": "Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist."
            },
            "use_mainbranch": {
              "type": "boolean",
              "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)."
            }
          }
        },
        "branch_types": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "kind",
              "prefix"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "feature",
                  "bugfix",
                  "release",
                  "hotfix"
                ],
                "type": "string",
                "description": "The kind of branch."
              },
              "prefix": {
                "type": "string",
                "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`."
              }
            }
          },
          "maxItems": 4,
          "minItems": 0,
          "description": "The active branch types.",
          "uniqueItems": true
        }
      },
      "description": "A project's branching model",
      "additionalProperties": true
    }
  ]
}
object project_deploy_key
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Project Deploy Key",
      "properties": {
        "key": {
          "type": "string",
          "description": "The deploy key value."
        },
        "label": {
          "type": "string",
          "description": "The user-defined label for the deploy key"
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "comment": {
          "type": "string",
          "description": "The comment parsed from the deploy key (if present)"
        },
        "project": {
          "$ref": "#/components/schemas/project"
        },
        "added_on": {
          "type": "string",
          "format": "date-time"
        },
        "last_used": {
          "type": "string",
          "format": "date-time"
        },
        "created_by": {
          "$ref": "#/components/schemas/account"
        }
      },
      "description": "Represents deploy key for a project.",
      "additionalProperties": true
    }
  ]
}
object project_group_permission
{
  "type": "object",
  "title": "Project Group Permission",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "group": {
      "$ref": "#/components/schemas/group"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        }
      }
    },
    "project": {
      "$ref": "#/components/schemas/project"
    },
    "permission": {
      "enum": [
        "read",
        "write",
        "create-repo",
        "admin",
        "none"
      ],
      "type": "string"
    }
  },
  "description": "A group's permission for a given project.",
  "additionalProperties": true
}
object project_user_permission
{
  "type": "object",
  "title": "Project User Permission",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "user": {
      "$ref": "#/components/schemas/user"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        }
      }
    },
    "project": {
      "$ref": "#/components/schemas/project"
    },
    "permission": {
      "enum": [
        "read",
        "write",
        "create-repo",
        "admin",
        "none"
      ],
      "type": "string"
    }
  },
  "description": "A user's direct permission for a given project.",
  "additionalProperties": true
}
object pullrequest
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Pull Request",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The pull request's unique ID. Note that pull request IDs are only unique within their associated repository."
        },
        "links": {
          "type": "object",
          "properties": {
            "diff": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "merge": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "approve": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "commits": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "decline": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "activity": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "comments": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "diffstat": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "state": {
          "enum": [
            "OPEN",
            "MERGED",
            "DECLINED",
            "SUPERSEDED"
          ],
          "type": "string",
          "description": "The pull request's current status."
        },
        "title": {
          "type": "string",
          "description": "Title of the pull request."
        },
        "author": {
          "$ref": "#/components/schemas/account"
        },
        "reason": {
          "type": "string",
          "description": "Explains why a pull request was declined. This field is only applicable to pull requests in rejected state."
        },
        "source": {
          "$ref": "#/components/schemas/pullrequest_endpoint"
        },
        "summary": {
          "type": "object",
          "properties": {
            "raw": {
              "type": "string",
              "description": "The text as it was typed by a user."
            },
            "html": {
              "type": "string",
              "description": "The user's content rendered as HTML."
            },
            "markup": {
              "enum": [
                "markdown",
                "creole",
                "plaintext"
              ],
              "type": "string",
              "description": "The type of markup language the raw content is to be interpreted in."
            }
          }
        },
        "rendered": {
          "type": "object",
          "title": "Rendered Pull Request Markup",
          "properties": {
            "title": {
              "type": "object",
              "properties": {
                "raw": {
                  "type": "string",
                  "description": "The text as it was typed by a user."
                },
                "html": {
                  "type": "string",
                  "description": "The user's content rendered as HTML."
                },
                "markup": {
                  "enum": [
                    "markdown",
                    "creole",
                    "plaintext"
                  ],
                  "type": "string",
                  "description": "The type of markup language the raw content is to be interpreted in."
                }
              }
            },
            "reason": {
              "type": "object",
              "properties": {
                "raw": {
                  "type": "string",
                  "description": "The text as it was typed by a user."
                },
                "html": {
                  "type": "string",
                  "description": "The user's content rendered as HTML."
                },
                "markup": {
                  "enum": [
                    "markdown",
                    "creole",
                    "plaintext"
                  ],
                  "type": "string",
                  "description": "The type of markup language the raw content is to be interpreted in."
                }
              }
            },
            "description": {
              "type": "object",
              "properties": {
                "raw": {
                  "type": "string",
                  "description": "The text as it was typed by a user."
                },
                "html": {
                  "type": "string",
                  "description": "The user's content rendered as HTML."
                },
                "markup": {
                  "enum": [
                    "markdown",
                    "creole",
                    "plaintext"
                  ],
                  "type": "string",
                  "description": "The type of markup language the raw content is to be interpreted in."
                }
              }
            }
          },
          "description": "User provided pull request text, interpreted in a markup language and rendered in HTML"
        },
        "closed_by": {
          "$ref": "#/components/schemas/account"
        },
        "reviewers": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/account"
          },
          "description": "The list of users that were added as reviewers on this pull request when it was created. For performance reasons, the API only includes this list on a pull request's `self` URL."
        },
        "created_on": {
          "type": "string",
          "format": "date-time",
          "description": "The ISO8601 timestamp the request was created."
        },
        "task_count": {
          "type": "integer",
          "minimum": 0,
          "description": "The number of open tasks for a specific pull request."
        },
        "updated_on": {
          "type": "string",
          "format": "date-time",
          "description": "The ISO8601 timestamp the request was last updated."
        },
        "destination": {
          "$ref": "#/components/schemas/pullrequest_endpoint"
        },
        "merge_commit": {
          "type": "object",
          "title": "Pull Request Commit",
          "properties": {
            "hash": {
              "type": "string",
              "pattern": "[0-9a-f]{7,}?"
            }
          }
        },
        "participants": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/participant"
          },
          "description": "        The list of users that are collaborating on this pull request.\n        Collaborators are user that:\n\n        * are added to the pull request as a reviewer (part of the reviewers\n          list)\n        * are not explicit reviewers, but have commented on the pull request\n        * are not explicit reviewers, but have approved the pull request\n\n        Each user is wrapped in an object that indicates the user's role and\n        whether they have approved the pull request. For performance reasons,\n        the API only returns this list when an API requests a pull request by\n        id.\n        "
        },
        "comment_count": {
          "type": "integer",
          "minimum": 0,
          "description": "The number of comments for a specific pull request."
        },
        "close_source_branch": {
          "type": "boolean",
          "description": "A boolean flag indicating if merging the pull request closes the source branch."
        }
      },
      "description": "A pull request object.",
      "additionalProperties": true
    }
  ]
}
object pullrequest_comment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/comment"
    },
    {
      "type": "object",
      "title": "Pull Request Comment",
      "properties": {
        "pending": {
          "type": "boolean"
        },
        "resolution": {
          "$ref": "#/components/schemas/comment_resolution"
        },
        "pullrequest": {
          "$ref": "#/components/schemas/pullrequest"
        }
      },
      "description": "A pullrequest comment.",
      "additionalProperties": true
    }
  ]
}
object pullrequest_endpoint
{
  "type": "object",
  "title": "Pull Request Endpoint",
  "properties": {
    "branch": {
      "type": "object",
      "title": "Pull Request Branch",
      "properties": {
        "name": {
          "type": "string"
        },
        "merge_strategies": {
          "type": "array",
          "items": {
            "enum": [
              "merge_commit",
              "squash",
              "fast_forward"
            ],
            "type": "string"
          },
          "description": "Available merge strategies, when this endpoint is the destination of the pull request."
        },
        "default_merge_strategy": {
          "type": "string",
          "description": "The default merge strategy, when this endpoint is the destination of the pull request."
        }
      }
    },
    "commit": {
      "type": "object",
      "title": "Pull Request Commit",
      "properties": {
        "hash": {
          "type": "string",
          "pattern": "[0-9a-f]{7,}?"
        }
      }
    },
    "repository": {
      "$ref": "#/components/schemas/repository"
    }
  }
}
object pullrequest_merge_parameters
{
  "type": "object",
  "title": "Pull Request Merge Parameters",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "message": {
      "type": "string",
      "description": "The commit message that will be used on the resulting commit. Note that the size of the message is limited to 128 KiB."
    },
    "merge_strategy": {
      "enum": [
        "merge_commit",
        "squash",
        "fast_forward"
      ],
      "type": "string",
      "default": "merge_commit",
      "description": "The merge strategy that will be used to merge the pull request."
    },
    "close_source_branch": {
      "type": "boolean",
      "description": "Whether the source branch should be deleted. If this is not provided, we fallback to the value used when the pull request was created, which defaults to False"
    }
  },
  "description": "The metadata that describes a pull request merge.",
  "additionalProperties": true
}
object ref
{
  "type": "object",
  "title": "Ref",
  "required": [
    "type"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the ref."
    },
    "type": {
      "type": "string"
    },
    "links": {
      "type": "object",
      "properties": {
        "html": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        },
        "self": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        },
        "commits": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        }
      }
    },
    "target": {
      "$ref": "#/components/schemas/commit"
    }
  },
  "description": "A ref object, representing a branch or tag in a repository.",
  "additionalProperties": true
}
object report
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Commit Report",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/report_data"
          },
          "description": "An array of data fields to display information on the report. Maximum 10."
        },
        "link": {
          "type": "string",
          "format": "uri",
          "description": "A URL linking to the results of the report in an external tool."
        },
        "uuid": {
          "type": "string",
          "description": "The UUID that can be used to identify the report."
        },
        "title": {
          "type": "string",
          "description": "The title of the report."
        },
        "result": {
          "enum": [
            "PASSED",
            "FAILED",
            "PENDING"
          ],
          "type": "string",
          "description": "The state of the report. May be set to PENDING and later updated."
        },
        "details": {
          "type": "string",
          "description": "A string to describe the purpose of the report."
        },
        "logo_url": {
          "type": "string",
          "format": "uri",
          "description": "A URL to the report logo. If none is provided, the default insights logo will be used."
        },
        "reporter": {
          "type": "string",
          "description": "A string to describe the tool or company who created the report."
        },
        "created_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the report was created."
        },
        "updated_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the report was updated."
        },
        "external_id": {
          "type": "string",
          "description": "ID of the report provided by the report creator. It can be used to identify the report as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the report creator for updating or deleting this specific report. Needs to be unique."
        },
        "report_type": {
          "enum": [
            "SECURITY",
            "COVERAGE",
            "TEST",
            "BUG"
          ],
          "type": "string",
          "description": "The type of the report."
        },
        "remote_link_enabled": {
          "type": "boolean",
          "description": "If enabled, a remote link is created in Jira for the issue associated with the commit the report belongs to."
        }
      },
      "description": "A report for a commit.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}",
  "x-bb-default-fields": [
    "uuid",
    "commitHash"
  ]
}
object report_annotation
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Report Annotation",
      "properties": {
        "line": {
          "type": "integer",
          "minimum": 1,
          "description": "The line number that the annotation should belong to. If no line number is provided, then it will default to 0 and in a pull request it will appear at the top of the file specified by the path field."
        },
        "link": {
          "type": "string",
          "format": "uri",
          "description": "A URL linking to the annotation in an external tool."
        },
        "path": {
          "type": "string",
          "description": "The path of the file on which this annotation should be placed. This is the path of the file relative to the git repository. If no path is provided, then it will appear in the overview modal on all pull requests where the tip of the branch is the given commit, regardless of which files were modified."
        },
        "uuid": {
          "type": "string",
          "description": "The UUID that can be used to identify the annotation."
        },
        "result": {
          "enum": [
            "PASSED",
            "FAILED",
            "SKIPPED",
            "IGNORED"
          ],
          "type": "string",
          "description": "The state of the report. May be set to PENDING and later updated."
        },
        "details": {
          "type": "string",
          "description": "The details to show to users when clicking on the annotation."
        },
        "summary": {
          "type": "string",
          "description": "The message to display to users."
        },
        "severity": {
          "enum": [
            "CRITICAL",
            "HIGH",
            "MEDIUM",
            "LOW"
          ],
          "type": "string",
          "description": "The severity of the annotation."
        },
        "created_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the report was created."
        },
        "updated_on": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp when the report was updated."
        },
        "external_id": {
          "type": "string",
          "description": "ID of the annotation provided by the annotation creator. It can be used to identify the annotation as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the annotation creator for updating or deleting this specific annotation. Needs to be unique."
        },
        "annotation_type": {
          "enum": [
            "VULNERABILITY",
            "CODE_SMELL",
            "BUG"
          ],
          "type": "string",
          "description": "The type of the report."
        }
      },
      "description": "A report for a commit.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commit.hash}/reports/{reportUuid}/annotations/{uuid}",
  "x-bb-default-fields": [
    "uuid"
  ]
}
object report_data
{
  "type": "object",
  "title": "Report Data",
  "properties": {
    "type": {
      "enum": [
        "BOOLEAN",
        "DATE",
        "DURATION",
        "LINK",
        "NUMBER",
        "PERCENTAGE",
        "TEXT"
      ],
      "type": "string",
      "description": "The type of data contained in the value field. If not provided, then the value will be detected as a boolean, number or string."
    },
    "title": {
      "type": "string",
      "description": "A string describing what this data field represents."
    },
    "value": {
      "type": "object",
      "description": "The value of the data element."
    }
  },
  "description": "A key-value element that will be displayed along with the report."
}
object repository
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Repository",
      "properties": {
        "scm": {
          "enum": [
            "git"
          ],
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "size": {
          "type": "integer"
        },
        "uuid": {
          "type": "string",
          "description": "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user."
        },
        "links": {
          "type": "object",
          "properties": {
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "clone": {
              "type": "array",
              "items": {
                "type": "object",
                "title": "Link",
                "properties": {
                  "href": {
                    "type": "string",
                    "format": "uri"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "description": "A link to a resource related to this object."
              }
            },
            "forks": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "hooks": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "avatar": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "commits": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "watchers": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "downloads": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "pullrequests": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "owner": {
          "$ref": "#/components/schemas/account"
        },
        "parent": {
          "$ref": "#/components/schemas/repository"
        },
        "project": {
          "$ref": "#/components/schemas/project"
        },
        "has_wiki": {
          "type": "boolean",
          "description": "\nThe wiki for this repository is enabled. Wiki\nfeatures are not supported for repositories in workspaces\nadministered through admin.atlassian.com.\n"
        },
        "language": {
          "type": "string"
        },
        "full_name": {
          "type": "string",
          "description": "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs."
        },
        "created_on": {
          "type": "string",
          "format": "date-time"
        },
        "has_issues": {
          "type": "boolean",
          "description": "\nThe issue tracker for this repository is enabled. Issue Tracker\nfeatures are not supported for repositories in workspaces\nadministered through admin.atlassian.com.\n"
        },
        "is_private": {
          "type": "boolean"
        },
        "mainbranch": {
          "$ref": "#/components/schemas/branch"
        },
        "updated_on": {
          "type": "string",
          "format": "date-time"
        },
        "description": {
          "type": "string"
        },
        "fork_policy": {
          "enum": [
            "allow_forks",
            "no_public_forks",
            "no_forks"
          ],
          "type": "string",
          "description": "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n  be made public later)\n* **no_forks**: deny all forking\n"
        }
      },
      "description": "A Bitbucket repository.",
      "additionalProperties": true
    }
  ]
}
object repository_group_permission
{
  "type": "object",
  "title": "Repository Group Permission",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "group": {
      "$ref": "#/components/schemas/group"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        }
      }
    },
    "permission": {
      "enum": [
        "read",
        "write",
        "admin",
        "none"
      ],
      "type": "string"
    },
    "repository": {
      "$ref": "#/components/schemas/repository"
    }
  },
  "description": "A group's permission for a given repository.",
  "additionalProperties": true
}
object repository_inheritance_state
{
  "type": "object",
  "title": "Repository Inheritance State",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "override_settings": {
      "type": "object"
    }
  },
  "description": "A json object representing the repository's inheritance state values",
  "additionalProperties": true
}
object repository_permission
{
  "type": "object",
  "title": "Repository Permission",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "user": {
      "$ref": "#/components/schemas/user"
    },
    "permission": {
      "enum": [
        "read",
        "write",
        "admin",
        "none"
      ],
      "type": "string"
    },
    "repository": {
      "$ref": "#/components/schemas/repository"
    }
  },
  "description": "A user's permission for a given repository.",
  "additionalProperties": true
}
object repository_user_permission
{
  "type": "object",
  "title": "Repository User Permission",
  "required": [
    "type"
  ],
  "properties": {
    "type": {
      "type": "string"
    },
    "user": {
      "$ref": "#/components/schemas/user"
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        }
      }
    },
    "permission": {
      "enum": [
        "read",
        "write",
        "admin",
        "none"
      ],
      "type": "string"
    },
    "repository": {
      "$ref": "#/components/schemas/repository"
    }
  },
  "description": "A user's direct permission for a given repository.",
  "additionalProperties": true
}
object search_code_search_result
{
  "type": "object",
  "properties": {
    "file": {
      "$ref": "#/components/schemas/commit_file"
    },
    "type": {
      "type": "string",
      "readOnly": true
    },
    "path_matches": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/search_segment"
      },
      "readOnly": true
    },
    "content_matches": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/search_content_match"
      },
      "readOnly": true
    },
    "content_match_count": {
      "type": "integer",
      "format": "int64",
      "readOnly": true
    }
  }
}
object search_content_match
{
  "type": "object",
  "properties": {
    "lines": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/search_line"
      },
      "readOnly": true
    }
  }
}
object search_line
{
  "type": "object",
  "properties": {
    "line": {
      "type": "integer",
      "format": "int32",
      "readOnly": true
    },
    "segments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/search_segment"
      },
      "readOnly": true
    }
  }
}
object search_result_page
{
  "type": "object",
  "properties": {
    "next": {
      "type": "string",
      "format": "uri",
      "readOnly": true
    },
    "page": {
      "type": "integer",
      "format": "int32",
      "readOnly": true
    },
    "size": {
      "type": "integer",
      "format": "int64",
      "readOnly": true
    },
    "values": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/search_code_search_result"
      },
      "readOnly": true
    },
    "pagelen": {
      "type": "integer",
      "format": "int32",
      "readOnly": true
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "readOnly": true
    },
    "query_substituted": {
      "type": "boolean",
      "readOnly": true
    }
  }
}
object search_segment
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "readOnly": true
    },
    "match": {
      "type": "boolean",
      "readOnly": true
    }
  }
}
object snippet
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Snippet",
      "properties": {
        "id": {
          "type": "integer",
          "minimum": 0
        },
        "scm": {
          "enum": [
            "git"
          ],
          "type": "string",
          "description": "The DVCS used to store the snippet."
        },
        "owner": {
          "$ref": "#/components/schemas/account"
        },
        "title": {
          "type": "string"
        },
        "creator": {
          "$ref": "#/components/schemas/account"
        },
        "created_on": {
          "type": "string",
          "format": "date-time"
        },
        "is_private": {
          "type": "boolean"
        },
        "updated_on": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "A snippet object.",
      "additionalProperties": true
    }
  ]
}
object snippet_comment
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Snippet Comment",
      "properties": {
        "links": {
          "type": "object",
          "properties": {
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "snippet": {
          "$ref": "#/components/schemas/snippet"
        }
      },
      "description": "A comment on a snippet.",
      "additionalProperties": true
    }
  ]
}
object snippet_commit
{
  "allOf": [
    {
      "$ref": "#/components/schemas/base_commit"
    },
    {
      "type": "object",
      "title": "Snippet Commit",
      "properties": {
        "links": {
          "type": "object",
          "properties": {
            "diff": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "snippet": {
          "$ref": "#/components/schemas/snippet"
        }
      },
      "description": "",
      "additionalProperties": true
    }
  ]
}
object ssh_account_key
{
  "allOf": [
    {
      "$ref": "#/components/schemas/ssh_key"
    },
    {
      "type": "object",
      "title": "SSH Account Key",
      "properties": {
        "owner": {
          "$ref": "#/components/schemas/account"
        }
      },
      "description": "Represents an SSH public key for a user.",
      "additionalProperties": true
    }
  ]
}
object ssh_key
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "SSH Key",
      "properties": {
        "key": {
          "type": "string",
          "description": "The SSH public key value in OpenSSH format."
        },
        "uuid": {
          "type": "string",
          "description": "The SSH key's immutable ID."
        },
        "label": {
          "type": "string",
          "description": "The user-defined label for the SSH key"
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "comment": {
          "type": "string",
          "description": "The comment parsed from the SSH key (if present)"
        },
        "last_used": {
          "type": "string",
          "format": "date-time"
        },
        "created_on": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "Base type for representing SSH public keys.",
      "additionalProperties": true
    }
  ]
}
object stg_west_report
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "description": "A report for a commit.",
      "additionalProperties": true
    }
  ],
  "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}",
  "x-bb-default-fields": [
    "uuid",
    "commitHash"
  ]
}
object subject_types
{
  "type": "object",
  "title": "Subject Types",
  "properties": {
    "workspace": {
      "type": "object",
      "properties": {
        "events": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        }
      }
    },
    "repository": {
      "type": "object",
      "properties": {
        "events": {
          "type": "object",
          "title": "Link",
          "properties": {
            "href": {
              "type": "string",
              "format": "uri"
            },
            "name": {
              "type": "string"
            }
          },
          "description": "A link to a resource related to this object."
        }
      }
    }
  },
  "description": "The mapping of resource/subject types pointing to their individual event types."
}
object tag
{
  "allOf": [
    {
      "$ref": "#/components/schemas/ref"
    },
    {
      "type": "object",
      "title": "Tag",
      "properties": {
        "date": {
          "type": "string",
          "format": "date-time",
          "description": "The date that the tag was created, if available"
        },
        "tagger": {
          "$ref": "#/components/schemas/author"
        },
        "message": {
          "type": "string",
          "description": "The message associated with the tag, if available."
        }
      },
      "description": "A tag object, representing a tag in a repository.",
      "additionalProperties": true
    }
  ]
}
object task
{
  "type": "object",
  "title": "Task",
  "required": [
    "created_on",
    "updated_on",
    "state",
    "content",
    "creator"
  ],
  "properties": {
    "id": {
      "type": "integer"
    },
    "state": {
      "enum": [
        "RESOLVED",
        "UNRESOLVED"
      ],
      "type": "string"
    },
    "content": {
      "type": "object",
      "properties": {
        "raw": {
          "type": "string",
          "description": "The text as it was typed by a user."
        },
        "html": {
          "type": "string",
          "description": "The user's content rendered as HTML."
        },
        "markup": {
          "enum": [
            "markdown",
            "creole",
            "plaintext"
          ],
          "type": "string",
          "description": "The type of markup language the raw content is to be interpreted in."
        }
      }
    },
    "creator": {
      "$ref": "#/components/schemas/account"
    },
    "pending": {
      "type": "boolean"
    },
    "created_on": {
      "type": "string",
      "format": "date-time"
    },
    "updated_on": {
      "type": "string",
      "format": "date-time"
    },
    "resolved_by": {
      "$ref": "#/components/schemas/account"
    },
    "resolved_on": {
      "type": "string",
      "format": "date-time",
      "description": "The ISO8601 timestamp for when the task was resolved."
    }
  },
  "description": "A task object."
}
object team
{
  "allOf": [
    {
      "$ref": "#/components/schemas/account"
    },
    {
      "type": "object",
      "title": "Team",
      "properties": {
        "links": {
          "$ref": "#/components/schemas/team_links"
        }
      },
      "description": "A team object.",
      "additionalProperties": true
    }
  ]
}
object team_links
{
  "allOf": [
    {
      "$ref": "#/components/schemas/account_links"
    },
    {
      "type": "object",
      "title": "Team Links",
      "properties": {
        "html": {
          "$ref": "#/components/schemas/link"
        },
        "self": {
          "$ref": "#/components/schemas/link"
        },
        "members": {
          "$ref": "#/components/schemas/link"
        },
        "projects": {
          "$ref": "#/components/schemas/link"
        },
        "repositories": {
          "$ref": "#/components/schemas/link"
        }
      },
      "description": "Links related to a Team.",
      "additionalProperties": true
    }
  ]
}
object treeentry
{
  "type": "object",
  "title": "Tree Entry",
  "required": [
    "type"
  ],
  "properties": {
    "path": {
      "type": "string",
      "description": "The path in the repository"
    },
    "type": {
      "type": "string"
    },
    "commit": {
      "$ref": "#/components/schemas/commit"
    }
  },
  "description": "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`.",
  "additionalProperties": true
}
object user
{
  "allOf": [
    {
      "$ref": "#/components/schemas/account"
    },
    {
      "type": "object",
      "title": "User",
      "properties": {
        "links": {
          "$ref": "#/components/schemas/user_links"
        },
        "website": {
          "type": "string"
        },
        "is_staff": {
          "type": "boolean"
        },
        "nickname": {
          "type": "string",
          "description": "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique."
        },
        "account_id": {
          "type": "string",
          "description": "The user's Atlassian account ID."
        },
        "account_status": {
          "type": "string",
          "description": "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future."
        },
        "has_2fa_enabled": {
          "type": "boolean"
        }
      },
      "description": "A user object.",
      "additionalProperties": true
    }
  ]
}
object user_links
{
  "allOf": [
    {
      "$ref": "#/components/schemas/account_links"
    },
    {
      "type": "object",
      "title": "User Links",
      "properties": {
        "html": {
          "$ref": "#/components/schemas/link"
        },
        "self": {
          "$ref": "#/components/schemas/link"
        },
        "repositories": {
          "$ref": "#/components/schemas/link"
        }
      },
      "description": "Links related to a User.",
      "additionalProperties": true
    }
  ]
}
object version
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Version",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        }
      },
      "description": "A version as defined in a repository's issue tracker.",
      "additionalProperties": true
    }
  ]
}
object webhook_subscription
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Webhook Subscription",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The URL events get delivered to."
        },
        "uuid": {
          "type": "string",
          "description": "The webhook's id"
        },
        "active": {
          "type": "boolean"
        },
        "events": {
          "type": "array",
          "items": {
            "enum": [
              "pullrequest:updated",
              "issue:comment_created",
              "repo:transfer",
              "issue:created",
              "pullrequest:rejected",
              "repo:deleted",
              "pullrequest:fulfilled",
              "repo:commit_status_created",
              "repo:imported",
              "pullrequest:changes_request_created",
              "repo:push",
              "pullrequest:created",
              "pullrequest:comment_created",
              "project:updated",
              "repo:created",
              "repo:commit_status_updated",
              "pullrequest:unapproved",
              "repo:commit_comment_created",
              "pullrequest:comment_reopened",
              "repo:fork",
              "repo:updated",
              "pullrequest:comment_deleted",
              "issue:updated",
              "pullrequest:changes_request_removed",
              "pullrequest:comment_resolved",
              "pullrequest:approved",
              "pullrequest:comment_updated"
            ],
            "type": "string"
          },
          "minItems": 1,
          "description": "The events this webhook is subscribed to.",
          "uniqueItems": true
        },
        "secret": {
          "type": "string",
          "maxLength": 128,
          "minLength": 0,
          "description": "The secret to associate with the hook. The secret is never returned via the API. As such, this field is only used during updates. The secret can be set to `null` or \"\" to remove the secret (or create a hook with no secret). Leaving out the secret field during updates will leave the secret unchanged. Leaving out the secret during creation will create a hook with no secret."
        },
        "subject": {
          "$ref": "#/components/schemas/object"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "secret_set": {
          "type": "boolean",
          "description": "Indicates whether or not the hook has an associated secret. It is not possible to see the hook's secret. This field is ignored during updates."
        },
        "description": {
          "type": "string",
          "description": "A user-defined description of the webhook."
        },
        "subject_type": {
          "enum": [
            "repository",
            "workspace"
          ],
          "type": "string",
          "description": "The type of entity. Set to either `repository` or `workspace` based on where the subscription is defined."
        }
      },
      "description": "A Webhook subscription.",
      "additionalProperties": true
    }
  ]
}
object workspace
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Workspace",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the workspace."
        },
        "slug": {
          "type": "string",
          "description": "The short label that identifies this workspace."
        },
        "uuid": {
          "type": "string",
          "description": "The workspace's immutable id."
        },
        "links": {
          "type": "object",
          "properties": {
            "html": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "avatar": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "owners": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "members": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "projects": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "snippets": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            },
            "repositories": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "created_on": {
          "type": "string",
          "format": "date-time"
        },
        "is_private": {
          "type": "boolean",
          "description": "Indicates whether the workspace is publicly accessible, or whether it is\nprivate to the members and consequently only visible to members."
        },
        "updated_on": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "A Bitbucket workspace.\n            Workspaces are used to organize repositories.",
      "additionalProperties": true
    }
  ]
}
object workspace_membership
{
  "allOf": [
    {
      "$ref": "#/components/schemas/object"
    },
    {
      "type": "object",
      "title": "Workspace Membership",
      "properties": {
        "user": {
          "$ref": "#/components/schemas/account"
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "object",
              "title": "Link",
              "properties": {
                "href": {
                  "type": "string",
                  "format": "uri"
                },
                "name": {
                  "type": "string"
                }
              },
              "description": "A link to a resource related to this object."
            }
          }
        },
        "workspace": {
          "$ref": "#/components/schemas/workspace"
        }
      },
      "description": "A Bitbucket workspace membership.\n            Links a user to a workspace.",
      "additionalProperties": true
    }
  ]
}