Git code hosting and collaboration
developer.atlassian.com/cloud/bitbucket/rest ↗Query structured spec data via REST or MCP. Get exactly what your agent needs.
https://api.bitbucket.org/2.0
/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>"
Request has succeeded. The application has been deleted for the user.
No authorization.
Improper authentication.
DELETE /addon
/addon/linkers/{linker_key}/values
Delete all linker values for the
specified linker of the authenticated application.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| linker_key | path | required | string | The unique key of a linker module |
Successfully deleted the linker values.
Authentication must use app JWT
The linker does not exist.
DELETE /addon/linkers/{linker_key}/values
/addon/linkers/{linker_key}/values/{value_id}
Delete a single linker value
of the authenticated application.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| linker_key | path | required | string | The unique key of a linker module |
| value_id | path | required | integer | The numeric ID of the linker value. |
Successfully deleted the linker value.
Authentication must use app JWT
The linker value does not exist.
DELETE /addon/linkers/{linker_key}/values/{value_id}
/repositories/{workspace}/{repo_slug}/branch-restrictions/{id}
Deletes an existing branch restriction rule.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | path | required | string | The restriction rule’s id |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
If the request was not authenticated
If the authenticated user does not have admin access to the repository
If the repository or branch restriction id does not exist
DELETE /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| commit | path | required | string | The commit’s SHA1. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
An empty response indicating the authenticated user’s approval has been withdrawn.
If the specified commit, or the repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/approve
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| comment_id | path | required | integer | The id of the comment. |
| commit | path | required | string | The commit’s SHA1. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Indicates the comment was deleted by this action or a previous delete.
If the comment doesn’t exist
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}
/repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}
This deletes a deploy key from a repository.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| key_id | path | required | string | The key ID matching the deploy key. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The key has been deleted
If the current user does not have permission to delete a key for the specified user
If the specified user, repository, or deploy key does not exist
DELETE /repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}
/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}
Delete an environment
| 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 |
| repo_slug | path | required | string | The repository. |
| environment_uuid | path | required | string | The environment UUID. |
The environment was deleted.
No account or repository with the UUID provided exists.
DELETE /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}
/workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}
This deletes a deploy key from a project.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| key_id | path | required | string | The key ID matching the project deploy key. |
| project_key | path | required | string | The project in question. This is the actual |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The project deploy key has been deleted
If the current user does not have permission to delete a key for the specified project
If the specified workspace, project, or project deploy key does not exist
DELETE /workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}
/repositories/{workspace}/{repo_slug}/downloads/{filename}
Deletes the specified download artifact from the repository.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| filename | path | required | string | Name of the file. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The specified download artifact was deleted.
User is not authorized to write to the repository.
The specified download does not exist.
DELETE /repositories/{workspace}/{repo_slug}/downloads/{filename}
/repositories/{workspace}/{repo_slug}/issues/{issue_id}
Deletes the specified issue. This requires write access to the
repository.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| issue_id | path | required | string | The issue id |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The issue object.
When the authenticated user isn’t authorized to delete the issue.
The specified repository or issue does not exist or does not have the issue tracker enabled.
DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}
/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}
Deletes an attachment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| issue_id | path | required | string | The issue id |
| path | path | required | string | Path to the file. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Indicates that the deletion was successful
If the issue tracker is private and the request was not authenticated.
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}
/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}
Deletes the specified comment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| comment_id | path | required | integer | The id of the comment. |
| issue_id | path | required | string | The issue id |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Indicates successful deletion.
DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}
/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote
Retract your vote.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| issue_id | path | required | string | The issue id |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Unexpected error.
DELETE /repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote
/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch
Stop watching this issue.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| issue_id | path | required | string | The issue id |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Indicates that the authenticated user successfully stopped watching this issue.
When the request wasn’t authenticated.
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
/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}
Delete a deployment environment level variable.
| 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 |
| 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. |
The variable was deleted.
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}
/repositories/{workspace}/{repo_slug}/pipelines-config/caches
Delete repository cache versions by name.
| 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. |
The caches were deleted.
The workspace, repository or cache name was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines-config/caches
/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}
Delete a repository cache.
| 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. |
The cache was deleted.
The workspace, repository or cache_uuid with given UUID was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}
/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}
Delete a schedule.
| 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 |
| repo_slug | path | required | string | The repository. |
| schedule_uuid | path | required | string | The uuid of the schedule. |
The schedule was deleted.
The account, repository or schedule was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}
/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair
Delete the repository SSH key pair.
| 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 |
| repo_slug | path | required | string | The repository. |
The SSH key pair was deleted.
The account, repository or SSH key pair was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair
/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}
Delete a repository level known host.
| 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 |
| repo_slug | path | required | string | The repository. |
| known_host_uuid | path | required | string | The UUID of the known host to delete. |
The known host was deleted.
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}
/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}
Delete a repository level variable.
| 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 |
| repo_slug | path | required | string | The repository. |
| variable_uuid | path | required | string | The UUID of the variable to delete. |
The variable was deleted.
The account, repository or variable with given UUID was not found.
DELETE /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}
/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}
Delete a workspace level variable.
| 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 |
| variable_uuid | path | required | string | The UUID of the variable to delete. |
The variable was deleted
The workspace or the variable with the provided UUID does not exist.
DELETE /workspaces/{workspace}/pipelines-config/variables/{variable_uuid}
/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
or transfer the repositories first.
Example:
$ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects/PROJ
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| project_key | path | required | string | The project in question. This is the actual |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Successful deletion.
The requesting user isn’t authorized to delete the project or the project isn’t empty.
A project isn’t hosted at this location.
DELETE /workspaces/{workspace}/projects/{project_key}
/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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| project_key | path | required | string | The project in question. This can either be the actual |
| selected_user | path | required | string | This can either be the username or the UUID of the default reviewer, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The specified user was removed from the list of project default reviewers
If the specified user is not a default reviewer for the project
If the authenticated user does not have admin access to the project
If the specified user, project, or workspace does not exist
DELETE /workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_slug | path | required | string | Slug of the requested group. |
| project_key | path | required | string | The project in question. This is the actual key assigned to the project. |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The project group permission was deleted and no content returned.
The user couldn’t be authenticated.
The requesting user isn’t an admin of the project, or the authentication method was not via app password.
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}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| project_key | path | required | string | The project in question. This is the actual key assigned to the project. |
| selected_user_id | path | required | string | This can either be the username, the user’s UUID surrounded by curly-braces, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The project user permission was deleted and no content returned.
The user couldn’t be authenticated.
The requesting user isn’t an admin of the project, or the authentication method was not via app password.
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}
/repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}
Delete an application property value stored against a commit.
| 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. |
An empty response.
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}
/repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}
Delete an application property value stored against a repository.
| 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. |
An empty response.
DELETE /repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}
/repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}
Delete an application property value stored against a pull request.
| 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. |
An empty response.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}
/users/{selected_user}/properties/{app_key}/{property_name}
Delete an application property value stored against a user.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| selected_user | path | required | string | Either the UUID of the account surrounded by curly-braces, for example |
| app_key | path | required | string | The key of the Connect app. |
| property_name | path | required | string | The name of the property. |
An empty response.
DELETE /users/{selected_user}/properties/{app_key}/{property_name}
/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}
Removes a default reviewer from the repository.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| target_username | path | required | string | This can either be the username or the UUID of the default reviewer, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The specified user successfully removed from the default reviewers
If the authenticated user does not have access modify the default reviewers
If the specified user does not exist
DELETE /repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve
Redact the authenticated user’s approval of the specified pull
request.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| pull_request_id | path | required | integer | The id of the pull request. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
An empty response indicating the authenticated user’s approval has been withdrawn.
Pull request cannot be unapproved because the pull request has already been merged.
The request wasn’t authenticated.
The specified pull request or the repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
Deletes a specific pull request comment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| comment_id | path | required | integer | The id of the comment. |
| pull_request_id | path | required | integer | The id of the pull request. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Successful deletion.
If the authenticated user does not have access to delete the comment.
If the comment does not exist.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| comment_id | path | required | integer | The id of the comment. |
| pull_request_id | path | required | integer | The id of the pull request. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The comment is reopened.
If the authenticated user does not have access to the pull request,
or if the provided comment is not a top-level comment.
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
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| pull_request_id | path | required | integer | The id of the pull request. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
An empty response indicating the authenticated user’s request for change has been withdrawn.
Pull request requested changes cannot be removed because the pull request has already been merged.
The request wasn’t authenticated.
The specified pull request or the repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}
Deletes a specific pull request task.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| pull_request_id | path | required | integer | The id of the pull request. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| task_id | path | required | integer | The ID of the task. |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Successful deletion.
If the authenticated user does not have access to delete the task.
If the task does not exist.
DELETE /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}
/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).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| name | path | required | string | The name of the branch. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Indicates that the specified branch was successfully deleted.
If the repository is private and the authenticated user does not have
access to it.
The specified repository or branch does not exist.
DELETE /repositories/{workspace}/{repo_slug}/refs/branches/{name}
/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).
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| name | path | required | string | The name of the tag. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Indicates the specified tag was successfully deleted.
If the repository is private and the authenticated user does not have
access to it.
The specified repository or tag does not exist.
DELETE /repositories/{workspace}/{repo_slug}/refs/tags/{name}
/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}
Deletes a single Report matching the provided ID.
| 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 |
| 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. |
No content
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}
/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}
Deletes a single Annotation matching the provided ID.
| 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 |
| 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. |
No content
DELETE /repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}
/repositories/{workspace}/{repo_slug}
Deletes the repository. This is an irreversible operation.
This does not affect its forks.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
| redirect_to | query | optional | string | If a repository has been moved to a new location, use this parameter to |
Indicates successful deletion.
If the caller either does not have admin access to the repository, or the repository is set to read-only.
If the repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_slug | path | required | string | Slug of the requested group. |
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Group permission deleted
The user couldn’t be authenticated.
The requesting user isn’t an admin of the repository, or the authentication method was not via app password.
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}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| selected_user_id | path | required | string | This can either be the UUID of the account, surrounded by curly-braces, for |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
The repository user permission was deleted and no content returned.
The user couldn’t be authenticated.
The requesting user isn’t an admin of the repository, or the authentication method was not via app password.
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}
/repositories/{workspace}/{repo_slug}/hooks/{uid}
Deletes the specified webhook subscription from the given
repository.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| repo_slug | path | required | string | This can either be the repository slug or the UUID of the repository, |
| uid | path | required | string | Installed webhook’s ID |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
When the webhook was deleted successfully
If the authenticated user does not have permission to delete the webhook.
If the webhook or repository does not exist.
DELETE /repositories/{workspace}/{repo_slug}/hooks/{uid}
/snippets/{workspace}/{encoded_id}
Deletes a snippet and returns an empty response.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| encoded_id | path | required | string | The snippet id. |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
If the snippet was deleted successfully.
If the snippet is private and the request was not authenticated.
If authenticated user does not have permission to delete the private snippet.
If the snippet does not exist.
DELETE /snippets/{workspace}/{encoded_id}
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| comment_id | path | required | integer | The id of the comment. |
| encoded_id | path | required | string | The snippet id. |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Indicates the comment was deleted successfully.
If the authenticated user is not the author of the comment.
If the comment or the snippet does not exist.
DELETE /snippets/{workspace}/{encoded_id}/comments/{comment_id}
/snippets/{workspace}/{encoded_id}/watch
Used to stop watching a specific snippet. Returns 204 (No Content)
to indicate success.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| encoded_id | path | required | string | The snippet id. |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
Indicates the user stopped watching the snippet successfully.
If the request was not authenticated.
If the snippet does not exist.
DELETE /snippets/{workspace}/{encoded_id}/watch
/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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| encoded_id | path | required | string | The snippet id. |
| node_id | path | required | string | A commit revision (SHA1). |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
If the snippet was deleted successfully.
If the snippet is private and the request was not authenticated.
If authenticated user does not have permission to delete the private snippet.
If the snippet does not exist.
If {node_id} is not the latest revision.
DELETE /snippets/{workspace}/{encoded_id}/{node_id}
/users/{selected_user}/ssh-keys/{key_id}
Deletes a specific SSH public key from a user’s account.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| key_id | path | required | string | The SSH key’s UUID value. |
| selected_user | path | required | string | This can either be an Atlassian Account ID OR the UUID of the account, |
The key has been deleted
If the submitted key or related value is invalid
If the current user does not have permission to add a key for the specified user
If the specified user does not exist
DELETE /users/{selected_user}/ssh-keys/{key_id}
/workspaces/{workspace}/hooks/{uid}
Deletes the specified webhook subscription from the given workspace.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| uid | path | required | string | Installed webhook’s ID |
| workspace | path | required | string | This can either be the workspace ID (slug) or the workspace UUID |
When the webhook was deleted successfully
If the authenticated user does not have permission to delete the webhook.
If the webhook or workspace does not exist.
DELETE /workspaces/{workspace}/hooks/{uid}
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."
}
]
}
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"
}
]
}
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"
}
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"
}
ReportsBulkCreateOrUpdateAnnotationsRequest
{
"type": "array",
"items": {
"$ref": "#/components/schemas/report_annotation"
},
"maxItems": 100,
"minItems": 1
}
ReportsBulkCreateOrUpdateAnnotationsResponse
{
"type": "array",
"items": {
"$ref": "#/components/schemas/report_annotation"
}
}
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
}
]
}
account_links
{
"type": "object",
"title": "Account Links",
"properties": {
"avatar": {
"$ref": "#/components/schemas/link"
}
},
"description": "Links related to an Account.",
"additionalProperties": true
}
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
}
]
}
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
}
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
}
]
}
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
}
]
}
bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema
{
"type": "object",
"required": [
"permission"
],
"properties": {
"permission": {
"enum": [
"read",
"write",
"create-repo",
"admin"
],
"type": "string"
}
}
}
bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema
{
"type": "object",
"required": [
"permission"
],
"properties": {
"permission": {
"enum": [
"read",
"write",
"admin"
],
"type": "string"
}
}
}
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
}
]
}
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
}
]
}
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
}
]
}
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
}
]
}
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
}
]
}
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
}
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
}
]
}
commit_comment
{
"allOf": [
{
"$ref": "#/components/schemas/comment"
},
{
"type": "object",
"title": "Commit Comment",
"properties": {
"commit": {
"$ref": "#/components/schemas/commit"
}
},
"description": "A commit comment.",
"additionalProperties": true
}
]
}
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
}
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
}
]
}
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
}
]
}
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"
]
}
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
}
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
}
]
}
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
}
]
}
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"
]
}
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.*"
]
}
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
}
]
}
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
}
]
}
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
}
]
}
deployment_state_completed_status
{
"allOf": [
{
"$ref": "#/components/schemas/object"
},
{
"type": "object",
"title": "Completed Deployment",
"properties": {},
"description": "The status of a completed deployment.",
"additionalProperties": true
}
]
}
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
}
]
}
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
}
]
}
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
}
]
}
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
}
]
}
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
}
]
}
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
}
]
}
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"
]
}
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.*"
]
}
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"
}
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"
]
}
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.*"
]
}
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"
}
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
}
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
}
]
}
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
}
| Version | Endpoints | Schemas | Ingested | Status |
|---|---|---|---|---|
| 2.0 | 318 | 216 | 2026-05-11 | current |
| 2.0 | 318 | 216 | 2026-04-16 |