• Addon
  • Branch restrictions
  • Branching model
  • Commit statuses
  • Commits
  • Deployments
  • Downloads
  • Issue tracker
  • Pipelines
  • Projects
  • Pullrequests
  • Refs
  • Reports
  • Repositories
  • Snippets
  • Source
  • Ssh
  • Users
  • Webhooks
  • Workspaces
  • Other operations
Cloud
Bitbucket Cloud / Reference / REST APIs

Refs

Postman Collection
OpenAPI
GET

List branches and tags

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.

Scopes
repository
read:repository:bitbucket

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Query parameters

q

string

sort

string

Responses

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

application/json

Paginated Refs

A paginated list of refs.

GET/repositories/{workspace}/{repo_slug}/refs
1 2 3 4 curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 { "size": 142, "page": 102, "pagelen": 159, "next": "<string>", "previous": "<string>", "values": [ { "type": "<string>", "links": { "self": { "href": "<string>", "name": "<string>" }, "commits": { "href": "<string>", "name": "<string>" }, "html": { "href": "<string>", "name": "<string>" } }, "name": "<string>", "target": { "type": "<string>" } } ] }
GET

List open 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 that can be used to search for specific branches. For instance, to find all branches that have "stab" in their name:

1 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.

Scopes
repository
read:repository:bitbucket

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Query parameters

q

string

sort

string

Responses

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

application/json

Paginated Branches

A paginated list of branches.

GET/repositories/{workspace}/{repo_slug}/refs/branches
1 2 3 4 curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs/branches' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 { "pagelen": 1, "size": 187, "values": [ { "name": "issue-9.3/AUI-5343-assistive-class", "links": { "commits": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/issue-9.3/AUI-5343-assistive-class" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/issue-9.3/AUI-5343-assistive-class" }, "html": { "href": "https://bitbucket.org/atlassian/aui/branch/issue-9.3/AUI-5343-assistive-class" } }, "default_merge_strategy": "squash", "merge_strategies": [ "merge_commit", "squash", "fast_forward" ], "type": "branch", "target": { "hash": "e5d1cde9069fcb9f0af90403a4de2150c125a148", "repository": { "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui" }, "html": { "href": "https://bitbucket.org/atlassian/aui" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317" } }, "type": "repository", "name": "aui", "full_name": "atlassian/aui", "uuid": "{585074de-7b60-4fd1-81ed-e0bc7fafbda5}" }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/comments" }, "patch": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e5d1cde9069fcb9f0af90403a4de2150c125a148" }, "html": { "href": "https://bitbucket.org/atlassian/aui/commits/e5d1cde9069fcb9f0af90403a4de2150c125a148" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e5d1cde9069fcb9f0af90403a4de2150c125a148" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/statuses" } }, "author": { "raw": "Marcin Konopka <mkonopka@atlassian.com>", "type": "author", "user": { "display_name": "Marcin Konopka", "uuid": "{47cc24f4-2a05-4420-88fe-0417535a110a}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D" }, "html": { "href": "https://bitbucket.org/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D/" }, "avatar": { "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/MK-1.png" } }, "nickname": "Marcin Konopka", "type": "user", "account_id": "60113d2b47a9540069f4de03" } }, "parents": [ { "hash": "87f7fc92b00464ae47b13ef65c91884e4ac9be51", "type": "commit", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/87f7fc92b00464ae47b13ef65c91884e4ac9be51" }, "html": { "href": "https://bitbucket.org/atlassian/aui/commits/87f7fc92b00464ae47b13ef65c91884e4ac9be51" } } } ], "date": "2021-04-13T13:44:49+00:00", "message": "wip\n", "type": "commit" } } ], "page": 1, "next": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1&page=2" }
POST

Create a branch

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.

1 2 3 4 5 6 7 8 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.

Scopes
repository:write
write:repository:bitbucket, read:repository:bitbucket

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Responses

The newly created branch object.

application/json

allOf [Ref, Branch]

Ref

A ref object, representing a branch or tag in a repository.

Branch

A branch object, representing a branch in a repository.

POST/repositories/{workspace}/{repo_slug}/refs/branches
1 2 3 4 curl --request POST \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs/branches' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
201Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 { "type": "<string>", "links": { "self": { "href": "<string>", "name": "<string>" }, "commits": { "href": "<string>", "name": "<string>" }, "html": { "href": "<string>", "name": "<string>" } }, "name": "<string>", "target": { "type": "<string>" }, "merge_strategies": [ "merge_commit" ], "default_merge_strategy": "<string>" }
GET

Get a branch

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).

Scopes
repository
read:repository:bitbucket

Request

Path parameters

name

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

The branch object.

application/json

allOf [Ref, Branch]

Ref

A ref object, representing a branch or tag in a repository.

Branch

A branch object, representing a branch in a repository.

GET/repositories/{workspace}/{repo_slug}/refs/branches/{name}
1 2 3 4 curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs/branches/{name}' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 { "name": "master", "links": { "commits": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/master" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master" }, "html": { "href": "https://bitbucket.org/atlassian/aui/branch/master" } }, "default_merge_strategy": "squash", "merge_strategies": [ "merge_commit", "squash", "fast_forward" ], "type": "branch", "target": { "hash": "e7d158ff7ed5538c28f94cd97a9ad569680fc94e", "repository": { "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui" }, "html": { "href": "https://bitbucket.org/atlassian/aui" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317" } }, "type": "repository", "name": "aui", "full_name": "atlassian/aui", "uuid": "{585074de-7b60-4fd1-81ed-e0bc7fafbda5}" }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/comments" }, "patch": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" }, "html": { "href": "https://bitbucket.org/atlassian/aui/commits/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/statuses" } }, "author": { "raw": "psre-renovate-bot <psre-renovate-bot@atlassian.com>", "type": "author", "user": { "display_name": "psre-renovate-bot", "uuid": "{250a442a-3ab3-4fcb-87c3-3c8f3df65ec7}", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D" }, "html": { "href": "https://bitbucket.org/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D/" }, "avatar": { "href": "https://secure.gravatar.com/avatar/6972ee037c9f36360170a86f544071a2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-3.png" } }, "nickname": "Renovate Bot", "type": "user", "account_id": "5d5355e8c6b9320d9ea5b28d" } }, "parents": [ { "hash": "eab868a309e75733de80969a7bed1ec6d4651e06", "type": "commit", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/eab868a309e75733de80969a7bed1ec6d4651e06" }, "html": { "href": "https://bitbucket.org/atlassian/aui/commits/eab868a309e75733de80969a7bed1ec6d4651e06" } } } ], "date": "2021-04-12T06:44:38+00:00", "message": "Merged in issue/NONE-renovate-master-babel-monorepo (pull request #2883)\n\nchore(deps): update babel monorepo to v7.13.15 (master)\n\nApproved-by: Chris \"Daz\" Darroch\n", "type": "commit" } }
DEL

Delete a branch

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).

Scopes
repository:write
write:repository:bitbucket

Request

Path parameters

name

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

Indicates that the specified branch was successfully deleted.

DEL/repositories/{workspace}/{repo_slug}/refs/branches/{name}
1 2 3 curl --request DELETE \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs/branches/{name}' \ --header 'Authorization: Bearer <access_token>'
GET

List 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.

Scopes
repository
read:repository:bitbucket

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Query parameters

q

string

sort

string

Responses

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

application/json

Paginated Tags

A paginated list of tags.

GET/repositories/{workspace}/{repo_slug}/refs/tags
1 2 3 4 curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs/tags' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "size": 142, "page": 102, "pagelen": 159, "next": "<string>", "previous": "<string>", "values": [ { "type": "<string>", "links": { "self": { "href": "<string>", "name": "<string>" }, "commits": { "href": "<string>", "name": "<string>" }, "html": { "href": "<string>", "name": "<string>" } }, "name": "<string>", "target": { "type": "<string>" }, "message": "<string>", "date": "<string>", "tagger": { "type": "<string>" } } ] }
POST

Create a tag

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.

1 2 3 4 5 6 7 8 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.

Scopes
repository:write
write:repository:bitbucket, read:repository:bitbucket

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Request bodyapplication/json

allOf [Ref, Tag]

Ref

A ref object, representing a branch or tag in a repository.

Tag

A tag object, representing a tag in a repository.

Responses

The newly created tag.

application/json

allOf [Ref, Tag]

Ref

A ref object, representing a branch or tag in a repository.

Tag

A tag object, representing a tag in a repository.

POST/repositories/{workspace}/{repo_slug}/refs/tags
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 curl --request POST \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs/tags' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "type": "<string>", "links": { "self": { "href": "<string>", "name": "<string>" }, "commits": { "href": "<string>", "name": "<string>" }, "html": { "href": "<string>", "name": "<string>" } }, "name": "<string>", "target": { "type": "<string>" }, "message": "<string>", "date": "<string>", "tagger": { "type": "<string>" } }'
201Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 { "type": "<string>", "links": { "self": { "href": "<string>", "name": "<string>" }, "commits": { "href": "<string>", "name": "<string>" }, "html": { "href": "<string>", "name": "<string>" } }, "name": "<string>", "target": { "type": "<string>" }, "message": "<string>", "date": "<string>", "tagger": { "type": "<string>" } }
GET

Get a tag

Returns the specified tag.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 $ 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" } }
Scopes
repository
read:repository:bitbucket

Request

Path parameters

name

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

The tag object.

application/json

allOf [Ref, Tag]

Ref

A ref object, representing a branch or tag in a repository.

Tag

A tag object, representing a tag in a repository.

GET/repositories/{workspace}/{repo_slug}/refs/tags/{name}
1 2 3 4 curl --request GET \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs/tags/{name}' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 { "type": "<string>", "links": { "self": { "href": "<string>", "name": "<string>" }, "commits": { "href": "<string>", "name": "<string>" }, "html": { "href": "<string>", "name": "<string>" } }, "name": "<string>", "target": { "type": "<string>" }, "message": "<string>", "date": "<string>", "tagger": { "type": "<string>" } }
DEL

Delete a tag

Delete a tag in the specified repository.

The tag name should not include any prefixes (e.g. refs/tags).

Scopes
repository:write
write:repository:bitbucket

Request

Path parameters

name

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

Indicates the specified tag was successfully deleted.

DEL/repositories/{workspace}/{repo_slug}/refs/tags/{name}
1 2 3 curl --request DELETE \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/refs/tags/{name}' \ --header 'Authorization: Bearer <access_token>'

Rate this page: