Bitbucket Pipelines Refs API

The refs resource allows you access branches and tags in a 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.

Operations 9

GET /repositories/{workspace}/{repo_slug}/refs List branches and tags
GET /repositories/{workspace}/{repo_slug}/refs/branches List open branches
POST /repositories/{workspace}/{repo_slug}/refs/branches Create a branch
DELETE /repositories/{workspace}/{repo_slug}/refs/branches/{name} Delete a branch
GET /repositories/{workspace}/{repo_slug}/refs/branches/{name} Get a branch
GET /repositories/{workspace}/{repo_slug}/refs/tags List tags
POST /repositories/{workspace}/{repo_slug}/refs/tags Create a tag
DELETE /repositories/{workspace}/{repo_slug}/refs/tags/{name} Delete a tag
GET /repositories/{workspace}/{repo_slug}/refs/tags/{name} Get a tag

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bitbucket-pipelines-refs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bitbucket-pipelines-refs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bitbucket Addon Refs API
  description: Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework.
  version: '2.0'
  termsOfService: https://www.atlassian.com/legal/customer-agreement
  contact:
    name: Bitbucket Support
    url: https://support.atlassian.com/bitbucket-cloud/
    email: support@bitbucket.org
servers:
- url: https://api.bitbucket.org/2.0
tags:
- name: Refs
  description: "The refs resource allows you access branches and tags in a repository.\nBy default, results will be in the order the underlying source control\nsystem returns them and identical to the ordering one sees when running\n\"$ git show-ref\". Note that this follows simple lexical ordering of the\n ref names.\n"
paths:
  /repositories/{workspace}/{repo_slug}/refs:
    parameters:
    - name: repo_slug
      in: path
      description: 'This can either be the repository slug or the UUID of the repository,

        surrounded by curly-braces, for example: `{repository UUID}`.

        '
      required: true
      schema:
        type: string
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Refs
      description: '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.'
      summary: List branches and tags
      responses:
        '200':
          description: A paginated list of refs matching any filter criteria that were provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_refs'
        '403':
          description: 'If the repository is private and the authenticated user does not have

            access to it.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The specified repository does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      parameters:
      - name: q
        in: query
        description: '

          Query string to narrow down the response as per

          [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).'
        schema:
          type: string
      - name: sort
        in: query
        description: '

          Field by which the results should be sorted as per

          [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name`

          field is handled specially for refs in that, if specified as the sort field, it

          uses a natural sort order instead of the default lexicographical sort order. For example,

          it will return [''1.1'', ''1.2'', ''1.10''] instead of [''1.1'', ''1.10'', ''1.2''].'
        schema:
          type: string
      security:
      - oauth2:
        - repository
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:repository:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
  /repositories/{workspace}/{repo_slug}/refs/branches:
    parameters:
    - name: repo_slug
      in: path
      description: 'This can either be the repository slug or the UUID of the repository,

        surrounded by curly-braces, for example: `{repository UUID}`.

        '
      required: true
      schema:
        type: string
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Refs
      description: 'Returns a list of all open branches within the specified repository.

        Results will be in the order the source control manager returns them.


        Branches support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)

        that can be used to search for specific branches. For instance, to find

        all branches that have "stab" in their name:


        ```

        curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches -G --data-urlencode ''q=name ~ "stab"''

        ```


        By default, results will be in the order the underlying source control system returns them and identical to

        the ordering one sees when running "$ git branch --list". Note that this follows simple

        lexical ordering of the ref names.


        This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are

        sorted ["v10", "v11", "v9"] instead of ["v9", "v10", "v11"].


        Sorting can be changed using the ?q= query parameter. When using ?q=name to explicitly sort on ref name,

        Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.'
      summary: List open branches
      responses:
        '200':
          description: A paginated list of branches matching any filter criteria that were provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_branches'
              example:
                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
                  - squash_fast_forward
                  - rebase_fast_forward
                  - rebase_merge
                  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

                      '
                    type: commit
                page: 1
                next: https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1&page=2
        '403':
          description: 'If the repository is private and the authenticated user does not have

            access to it.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The specified repository does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      parameters:
      - name: q
        in: query
        description: '

          Query string to narrow down the response as per

          [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).'
        schema:
          type: string
      - name: sort
        in: query
        description: '

          Field by which the results should be sorted as per

          [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name`

          field is handled specially for branches in that, if specified as the sort field, it

          uses a natural sort order instead of the default lexicographical sort order. For example,

          it will return [''branch1'', ''branch2'', ''branch10''] instead of [''branch1'', ''branch10'', ''branch2''].'
        schema:
          type: string
      security:
      - oauth2:
        - repository
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:repository:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
    post:
      tags:
      - Refs
      description: "Creates a new branch in the specified repository.\n\nThe payload of the POST should consist of a JSON document that\ncontains the name of the tag and the target hash.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/branches \\\n-s -u seanfarley -X POST -H \"Content-Type: application/json\" \\\n-d '{\n    \"name\" : \"smf/create-feature\",\n    \"target\" : {\n        \"hash\" : \"default\",\n    }\n}'\n```\n\nThis call requires authentication. Private repositories require the\ncaller to authenticate with an account that has appropriate\nauthorization.\n\nThe branch name should not include any prefixes (e.g.\nrefs/heads). This endpoint does support using short hash prefixes for\nthe commit hash, but it may return a 400 response if the provided\nprefix is ambiguous. Using a full commit hash is the preferred\napproach."
      summary: Create a branch
      responses:
        '201':
          description: The newly created branch object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/branch'
        '403':
          description: 'If the repository is private and the authenticated user does not have

            access to it.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The specified repository or branch does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - repository:write
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - write:repository:bitbucket
        - read:repository:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
  /repositories/{workspace}/{repo_slug}/refs/branches/{name}:
    parameters:
    - name: name
      in: path
      description: The name of the branch.
      required: true
      schema:
        type: string
    - name: repo_slug
      in: path
      description: 'This can either be the repository slug or the UUID of the repository,

        surrounded by curly-braces, for example: `{repository UUID}`.

        '
      required: true
      schema:
        type: string
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    delete:
      tags:
      - Refs
      description: '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).'
      summary: Delete a branch
      responses:
        '204':
          description: Indicates that the specified branch was successfully deleted.
        '403':
          description: 'If the repository is private and the authenticated user does not have

            access to it.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The specified repository or branch does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - repository:write
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - write:repository:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
    get:
      tags:
      - Refs
      description: '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).'
      summary: Get a branch
      responses:
        '200':
          description: The branch object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/branch'
              example:
                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
                - squash_fast_forward
                - rebase_fast_forward
                - rebase_merge
                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)


                    chore(deps): update babel monorepo to v7.13.15 (master)


                    Approved-by: Chris "Daz" Darroch

                    '
                  type: commit
        '403':
          description: 'If the repository is private and the authenticated user does not have

            access to it.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The specified repository or branch does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - repository
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:repository:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
  /repositories/{workspace}/{repo_slug}/refs/tags:
    parameters:
    - name: repo_slug
      in: path
      description: 'This can either be the repository slug or the UUID of the repository,

        surrounded by curly-braces, for example: `{repository UUID}`.

        '
      required: true
      schema:
        type: string
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    get:
      tags:
      - Refs
      description: '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.'
      summary: List tags
      responses:
        '200':
          description: A paginated list of tags matching any filter criteria that were provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/paginated_tags'
        '403':
          description: 'If the repository is private and the authenticated user does not have

            access to it.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The specified repository does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      parameters:
      - name: q
        in: query
        description: '

          Query string to narrow down the response as per

          [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).'
        schema:
          type: string
      - name: sort
        in: query
        description: '

          Field by which the results should be sorted as per

          [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name`

          field is handled specially for tags in that, if specified as the sort field, it

          uses a natural sort order instead of the default lexicographical sort order. For example,

          it will return [''1.1'', ''1.2'', ''1.10''] instead of [''1.1'', ''1.10'', ''1.2''].'
        schema:
          type: string
      security:
      - oauth2:
        - repository
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - read:repository:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
    post:
      tags:
      - Refs
      description: "Creates a new annotated tag in the specified repository.\n\nThe payload of the POST should consist of a JSON document that\ncontains the name of the tag and the target hash.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/jdoe/myrepo/refs/tags \\\n-s -u jdoe -X POST -H \"Content-Type: application/json\" \\\n-d '{\n    \"name\" : \"new-tag-name\",\n    \"target\" : {\n        \"hash\" : \"a1b2c3d4e5f6\",\n    }\n}'\n```\n\nThis endpoint does support using short hash prefixes for the commit\nhash, but it may return a 400 response if the provided prefix is\nambiguous. Using a full commit hash is the preferred approach.\n\nA message for the tag object may optionally be provided. If it is\nomitted or the provided message is empty, a default message of\n\"Added tag <tagname> for changeset <shorthash>\" will be used."
      summary: Create a tag
      responses:
        '201':
          description: The newly created tag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tag'
        '400':
          description: If the target hash is missing, ambiguous, or invalid, or if the name is not provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - repository:write
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - write:repository:bitbucket
        - read:repository:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tag'
        required: true
  /repositories/{workspace}/{repo_slug}/refs/tags/{name}:
    parameters:
    - name: name
      in: path
      description: The name of the tag.
      required: true
      schema:
        type: string
    - name: repo_slug
      in: path
      description: 'This can either be the repository slug or the UUID of the repository,

        surrounded by curly-braces, for example: `{repository UUID}`.

        '
      required: true
      schema:
        type: string
    - name: workspace
      in: path
      description: 'This can either be the workspace ID (slug) or the workspace UUID

        surrounded by curly-braces, for example: `{workspace UUID}`.

        '
      required: true
      schema:
        type: string
    delete:
      tags:
      - Refs
      description: 'Delete a tag in the specified repository.


        The tag name should not include any prefixes (e.g. refs/tags).'
      summary: Delete a tag
      responses:
        '204':
          description: Indicates the specified tag was successfully deleted.
        '403':
          description: 'If the repository is private and the authenticated user does not have

            access to it.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: The specified repository or tag does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - oauth2:
        - repository:write
      - basic: []
      - api_key: []
      x-atlassian-oauth2-scopes:
      - state: Current
        scheme: oauth2
        scopes:
        - write:repository:bitbucket
      x-atlassian-auth-types:
      - forge-oauth2
      - api-token
    get:
      tags:
      - Refs
      description: "Returns the specified tag.\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8 -G | jq .\n{\n  \"name\": \"3.8\",\n  \"links\": {\n    \"commits\": {\n      \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commits/3.8\"\n    },\n    \"self\": {\n      \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8\"\n    },\n    \"html\": {\n      \"href\": \"https://bitbucket.org/seanfarley/hg/commits/tag/3.8\"\n    }\n  },\n  \"tagger\": {\n    \"raw\": \"Matt Mackall <mpm@selenic.com>\",\n    \"type\": \"author\",\n    \"user\": {\n      \"username\": \"mpmselenic\",\n      \"nickname\": \"mpmselenic\",\n      \"display_name\": \"Matt Mackall\",\n      \"type\": \"user\",\n      \"uuid\": \"{a4934530-db4c-419c-a478-9ab4964c2ee7}\",\n      \"links\": {\n        \"self\": {\n          \"href\": \"https://api.bitbucket.org/2.0/users/mpmselenic\"\n        },\n        \"html\": {\n          \"href\": \"https://bitbucket.org/mpmselenic/\"\n        },\n        \"avatar\": {\n          \"href\": \"https://bitbucket.org/account/mpmselenic/avatar/32/\"\n        }\n      }\n    }\n  },\n  \"date\": \"2016-05-01T18:52:25+00:00\",\n  \"message\": \"Added tag 3.8 for changeset f85de28eae32\",\n  \"type\": \"tag\",\n  \"target\": {\n    \"hash\": \"f85de28eae32e7d3064b1a1321309071bbaaa069\",\n    \"repository\": {\n      \"links\": {\n        \"self\": {\n          \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg\"\n        },\n        \"html\": {\n          \"href\": \"https://bitbucket.org/seanfarley/hg\"\n        },\n        \"avatar\": {\n          \"href\": \"https://bitbucket.org/seanfarley/hg/avatar/32/\"\n        }\n      },\n      \"type\": \"repository\",\n      \"name\": \"hg\",\n      \"full_name\": \"seanfarley/hg\",\n      \"uuid\": \"{c75687fb-e99d-4579-9087-190dbd406d30}\"\n    },\n    \"links\": {\n      \"self\": {\n        \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n      },\n      \"comments\": {\n        \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/comments\"\n      },\n      \"patch\": {\n        \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/patch/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n      },\n      \"html\": {\n        \"href\": \"https://bitbucket.org/seanfarley/hg/commits/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n      },\n      \"diff\": {\n        \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/diff/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n      },\n      \"approve\": {\n        \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/approve\"\n      },\n      \"statuses\": {\n        \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/statuses\"\n      }\n    },\n    \"author\": {\n      \"raw\": \"Sean Farley <sean@farley.io>\",\n      \"type\": \"author\",\n      \"user\": {\n        \"username\": \"seanfarley\",\n        \"nickname\": \"seanfarley\",\n        \"display_name\": \"Sean Farley\",\n        \"type\": \"user\",\n        \"uuid\": \"{a295f8a8-5876-4d43-89b5-3ad8c6c3c51d}\",\n        \"links\": {\n          \"self\": {\n            \"href\": \"https://api.bitbucket.org/2.0/users/seanfarley\"\n          },\n          \"html\": {\n            \"href\": \"https://bitbucket.org/seanfarley/\"\n          },\n          \"avatar\": {\n            \"href\": \"https://bitbucket.org/account/seanfarley/avatar/32/\"\n          }\n        }\n      }\n    },\n    \"parents\": [\n      {\n        \"hash\": \"9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\",\n    

# --- truncated at 32 KB (168 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bitbucket-pipelines/refs/heads/main/openapi/bitbucket-pipelines-refs-api-openapi.yml