openapi: 3.0.0
servers:
  - url: https://api.bitbucket.org/2.0
info:
  contact:
    email: support@bitbucket.org
    name: Bitbucket Support
    url: https://support.atlassian.com/bitbucket-cloud/
  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.
  termsOfService: https://www.atlassian.com/legal/customer-agreement
  title: Bitbucket API
  version: "2.0"
  x-apisguru-categories:
    - developer_tools
    - collaboration
  x-logo:
    url: https://d301sr5gafysq2.cloudfront.net/0c55837759e5/img/homepage/bitbucket-logo-blue.svg
  x-origin:
    - format: openapi
      url: https://bitbucket.org/api/swagger.json
      version: "3.0"
  x-providerName: bitbucket.org
  x-tags:
    - code repository
    - code collaboration
    - git
externalDocs:
  url: https://bitbucket.org/api
tags:
  - description: |
      The addon resource is intended to use used by Bitbucket Cloud Connect
      Apps, and only supports JWT authentication.
    name: Addon
  - description: |
      Repository owners and administrators can set branch management
      rules on a repository that control what can be pushed by whom.
      Through these rules, you can enforce a project or team
      workflow. For example, owners or administrators can:

      * Limit push powers
      * Prevent branch deletion
      * Prevent history re-writes (Git only)
    name: Branch restrictions
  - description: |
      The branching model resource is used to modify the branching model
      for a repository.

      You can use the branching model to define a branch based workflow
      for your repositories. When you map your workflow to branch types,
      you can ensure that branches are named consistently by configuring
      which branch types to make available.
    name: Branching model
  - description: |
      Commit statuses provide a way to tag commits with meta data,
      like automated build results.
    name: Commit statuses
  - description: |
      These are the repository's commits. They are paginated and returned in
      reverse chronological order, similar to the output of git log.
    name: Commits
  - description: |
      Teams are deploying code faster than ever, thanks to continuous
      delivery practices and tools like Bitbucket Pipelines. Bitbucket
      Deployments gives teams visibility into their deployment
      environments and helps teams to track how far changes have
      progressed in their deployment pipeline.
    name: Deployments
  - description: Access the list of download links associated with the repository.
    name: Downloads
  - description: |
      The issue resources provide functionality for getting information on
      issues in an issue tracker, creating new issues, updating them and deleting
      them.

      You can access public issues without authentication, but you can't gain access
      to private repositories' issues. By authenticating, you will get the ability
      to create issues, as well as access to updating data or deleting issues you
      have access to.
    name: Issue tracker
  - description: |
      Bitbucket Pipelines brings continuous delivery to Bitbucket
      Cloud, empowering teams with full branching to deployment
      visibility and faster feedback loops.
    name: Pipelines
  - description: |
      Bitbucket Cloud projects make it easier for teams to focus on
      a goal, product, or process by organizing their repositories.
    name: Projects
  - description: |
      Pull requests are a feature that makes it easier for developers
      to collaborate using Bitbucket. They provide a user-friendly web
      interface for discussing proposed changes before integrating them
      into the official project.
    name: Pullrequests
  - description: |
      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.
    name: Refs
  - description: |
      Code insights provides reports, annotations, and metrics to help you
      and your team improve code quality in pull requests throughout the code
      review process. Some of the available code insights are static analysis
      reports, security scan results, artifact links, unit tests, and build
      status.
    name: Reports
  - description: |
      A Git repository is a virtual storage of your project. It
      allows you to save versions of your code, which you can access
      when needed. The repo resource allows you to access public repos,
      or repos that belong to a specific workspace.
    name: Repositories
  - description: |
      Snippets allow you share code segments or files with yourself, members of
      your workspace, or the world.

      Like pull requests, repositories and workspaces, the full set of snippets
      is defined by what the current user has access to. This includes all
      snippets owned by any of the workspaces the user is a member of, or
      snippets by other users that the current user is either watching or has
       collaborated on (for instance by commenting on it).
    name: Snippets
  - description: |-
      Browse the source code in the repository and
                                    create new commits by uploading.
    name: Source
  - description: |
      The SSH resource allows you to manage SSH keys.
    name: Ssh
  - description: |
      The teams resource has been deprecated, and the workspaces
      endpoint should be used instead.

      The teams resource returns all the teams that the authenticated
      user is associated with.
    name: Teams
  - description: |
      The users resource allows you to access public information
      associated with a user account. Most resources in the users
      endpoint have been deprecated in favor of workspaces.
    name: Users
  - description: |
      Webhooks provide a way to configure Bitbucket Cloud to make requests to
      your server (or another external service) whenever certain events occur in
      Bitbucket Cloud.

      A webhook consists of:

      * A subject -- The resource that generates the events. Currently, this resource
      is the repository, user account, or team where you create the webhook.
      * One or more event -- The default event is a repository push, but you can
      select multiple events that can trigger the webhook.
      * A URL -- The endpoint where you want Bitbucket to send the event payloads
      when a matching event happens.

      There are two parts to getting a webhook to work: creating the webhook and
      triggering the webhook. After you create a webhook for an event, every time
      that event occurs, Bitbucket sends a payload request that describes the event
      to the specified URL. Thus, you can think of webhooks as a kind of
      notification system.

      Use webhooks to integrate applications with Bitbucket Cloud. The following
      use cases provides examples of when you would want to use webhooks:

      * Every time a user pushes commits in a repository, you may want to notify
      your CI server to start a build.
      * Every time a user pushes commits or creates a pull request, you may want to
      display a notification in your application.
    name: Webhooks
  - description: |
      The wiki is a simple place to keep documents. Some people use it
      as their project home page. The wiki is a Git repository, so you
      can clone it and edit it like any other source files.
    name: Wiki
  - description: |
      A workspace is where you create repositories, collaborate on
      your code, and organize different streams of work in your Bitbucket
      Cloud account. Workspaces replace the use of teams and users in API
      calls.
    name: Workspaces
paths:
  /addon:
    delete:
      description: |-
        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>"
        ```
      responses:
        "204":
          description: Request has succeeded. The application has been deleted for the user.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No authorization.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Improper authentication.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Delete an app
      tags:
        - Addon
    parameters: []
    put:
      description: |-
        Updates the application installation for the user.

        This endpoint is intended to be used by Bitbucket Connect apps
        and only supports JWT authentication -- that is how Bitbucket
        identifies the particular installation of the app. Developers
        with applications registered in the "Develop Apps" section
        of Bitbucket need not use this endpoint as updates for those
        applications can be sent out via the UI of that section.

        Passing an empty body will update the installation using the
        existing descriptor URL.

        ```
        $ curl -X PUT https://api.bitbucket.org/2.0/addon \
          -H "Authorization: JWT <JWT Token>" \
          --header "Content-Type: application/json" \
          --data '{}'
        ```

        The new `descriptor` for the installation can be also provided
        in the body directly.

        ```
        $ curl -X PUT https://api.bitbucket.org/2.0/addon \
          -H "Authorization: JWT <JWT Token>" \
          --header "Content-Type: application/json" \
          --data '{"descriptor": $NEW_DESCRIPTOR}'
        ```

        In both these modes the URL of the descriptor cannot be changed. To
        change the descriptor location and upgrade an installation
        the request must be made exclusively with a `descriptor_url`.

         ```
        $ curl -X PUT https://api.bitbucket.org/2.0/addon \
          -H "Authorization: JWT <JWT Token>" \
          --header "Content-Type: application/json" \
          --data '{"descriptor_url": $NEW_URL}'
        ```

        The `descriptor_url` must exactly match the marketplace registration
        that Atlassian has for the application. Contact your Atlassian
        developer advocate to update this registration. Once the registration
        has been updated you may call this resource for each installation.

        Note that the scopes of the application cannot be increased
        in the new descriptor nor reduced to none.
      responses:
        "204":
          description: Request has succeeded. The installation has been updated to the new descriptor.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Scopes have increased or decreased to none.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No authorization.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Improper authentication.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Update an installed app
      tags:
        - Addon
  /addon/linkers:
    get:
      description: |-
        Gets a list of all [linkers](/cloud/bitbucket/modules/linker/)
        for the authenticated application.
      responses:
        "200":
          description: Successful.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Authentication must use app JWT
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: List linkers for an app
      tags:
        - Addon
    parameters: []
  "/addon/linkers/{linker_key}":
    get:
      description: |-
        Gets a [linker](/cloud/bitbucket/modules/linker/) specified by `linker_key`
        for the authenticated application.
      responses:
        "200":
          description: Successful.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Authentication must use app JWT
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The linker does not exist.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Get a linker for an app
      tags:
        - Addon
    parameters:
      - description: |-
          The unique key of a [linker module](/cloud/bitbucket/modules/linker/)
          as defined in an application descriptor.
        in: path
        name: linker_key
        required: true
        schema:
          type: string
  "/addon/linkers/{linker_key}/values":
    delete:
      description: |-
        Delete all [linker](/cloud/bitbucket/modules/linker/) values for the
        specified linker of the authenticated application.
      responses:
        "204":
          description: Successfully deleted the linker values.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Authentication must use app JWT
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The linker does not exist.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Delete all linker values
      tags:
        - Addon
    get:
      description: |-
        Gets a list of all [linker](/cloud/bitbucket/modules/linker/) values for the
        specified linker of the authenticated application.

        A linker value lets applications supply values to modify its regular expression.

        The base regular expression must use a Bitbucket-specific match group `(?K)`
        which will be translated to `([\w\-]+)`. A value must match this pattern.

        [Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)
      responses:
        "200":
          description: Successful.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Authentication must use app JWT
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The linker does not exist.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: List linker values for a linker
      tags:
        - Addon
    parameters:
      - description: |-
          The unique key of a [linker module](/cloud/bitbucket/modules/linker/)
          as defined in an application descriptor.
        in: path
        name: linker_key
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a [linker](/cloud/bitbucket/modules/linker/) value for the specified
        linker of authenticated application.

        A linker value lets applications supply values to modify its regular expression.

        The base regular expression must use a Bitbucket-specific match group `(?K)`
        which will be translated to `([\w\-]+)`. A value must match this pattern.

        [Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)
      responses:
        "201":
          description: Successfully created the linker value.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Authentication must use app JWT
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The linker does not exist.
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The linker already has the value being added.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Create a linker value
      tags:
        - Addon
    put:
      description: |-
        Bulk update [linker](/cloud/bitbucket/modules/linker/) values for the specified
        linker of the authenticated application.

        A linker value lets applications supply values to modify its regular expression.

        The base regular expression must use a Bitbucket-specific match group `(?K)`
        which will be translated to `([\w\-]+)`. A value must match this pattern.

        [Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)
      responses:
        "204":
          description: Successfully updated the linker values.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Invalid input.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Authentication must use app JWT
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The linker does not exist.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Update a linker value
      tags:
        - Addon
  "/addon/linkers/{linker_key}/values/{value_id}":
    delete:
      description: |-
        Delete a single [linker](/cloud/bitbucket/modules/linker/) value
        of the authenticated application.
      responses:
        "204":
          description: Successfully deleted the linker value.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Authentication must use app JWT
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The linker value does not exist.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Delete a linker value
      tags:
        - Addon
    get:
      description: |-
        Get a single [linker](/cloud/bitbucket/modules/linker/) value
        of the authenticated application.
      responses:
        "200":
          description: Successful.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Authentication must use app JWT
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The linker value does not exist.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Get a linker value
      tags:
        - Addon
    parameters:
      - description: |-
          The unique key of a [linker module](/cloud/bitbucket/modules/linker/)
          as defined in an application descriptor.
        in: path
        name: linker_key
        required: true
        schema:
          type: string
      - description: The numeric ID of the linker value.
        in: path
        name: value_id
        required: true
        schema:
          type: integer
  /hook_events:
    get:
      description: |-
        Returns the webhook resource or subject types on which webhooks can
        be registered.

        Each resource/subject type contains an `events` link that returns the
        paginated list of specific events each individual subject type can
        emit.

        This endpoint is publicly accessible and does not require
        authentication or scopes.

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/hook_events

        {
            "repository": {
                "links": {
                    "events": {
                        "href": "https://api.bitbucket.org/2.0/hook_events/repository"
                    }
                }
            },
            "workspace": {
                "links": {
                    "events": {
                        "href": "https://api.bitbucket.org/2.0/hook_events/workspace"
                    }
                }
            }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/subject_types"
          description: A mapping of resource/subject types pointing to their individual event types.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Get a webhook resource
      tags:
        - Webhooks
    parameters: []
  "/hook_events/{subject_type}":
    get:
      description: |-
        Returns a paginated list of all valid webhook events for the
        specified entity.
        **The team and user webhooks are deprecated, and you should use workspace instead.
        For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**

        This is public data that does not require any scopes or authentication.

        Example:

        NOTE: The following example is a truncated response object for the `workspace` `subject_type`.
        We return the same structure for the other `subject_type` objects.

        ```
        $ curl https://api.bitbucket.org/2.0/hook_events/workspace
        {
            "page": 1,
            "pagelen": 30,
            "size": 21,
            "values": [
                {
                    "category": "Repository",
                    "description": "Whenever a repository push occurs",
                    "event": "repo:push",
                    "label": "Push"
                },
                {
                    "category": "Repository",
                    "description": "Whenever a repository fork occurs",
                    "event": "repo:fork",
                    "label": "Fork"
                },
                {
                    "category": "Repository",
                    "description": "Whenever a repository import occurs",
                    "event": "repo:imported",
                    "label": "Import"
                },
                ...
                {
                    "category":"Pull Request",
                    "label":"Approved",
                    "description":"When someone has approved a pull request",
                    "event":"pullrequest:approved"
                },
            ]
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_hook_events"
          description: A paginated list of webhook types available to subscribe on.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If an invalid `{subject_type}` value was specified.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: List subscribable webhook types
      tags:
        - Webhooks
    parameters:
      - description: A resource or subject type.
        in: path
        name: subject_type
        required: true
        schema:
          enum:
            - repository
            - workspace
          type: string
  "/pullrequests/{selected_user}":
    get:
      description: |-
        Returns all pull requests authored by the specified user.

        By default only open pull requests are returned. This can be controlled
        using the `state` query parameter. To retrieve pull requests that are
        in one of multiple states, repeat the `state` parameter for each
        individual state.

        This endpoint also supports filtering and sorting of the results. See
        [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.
      parameters:
        - description: Only return pull requests that are in this state. This parameter can be repeated.
          in: query
          name: state
          schema:
            enum:
              - OPEN
              - MERGED
              - DECLINED
              - SUPERSEDED
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pullrequests"
          description: All pull requests authored by the specified user.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List pull requests for a user
      tags:
        - Pullrequests
    parameters:
      - description: |
          This can either be the username of the pull request author, the author's UUID
          surrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID.
        in: path
        name: selected_user
        required: true
        schema:
          type: string
  /repositories:
    get:
      description: |-
        Returns a paginated list of all public repositories.

        This endpoint also supports filtering and sorting of the results. See
        [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.
      parameters:
        - description: |-
            Filter the results to include only repositories created on or
            after this [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)
             timestamp. Example: `YYYY-MM-DDTHH:mm:ss.sssZ`
          in: query
          name: after
          required: false
          schema:
            type: string
        - description: |
            Filters the result based on the authenticated user's role on each repository.

            * **member**: returns repositories to which the user has explicit read access
            * **contributor**: returns repositories to which the user has explicit write access
            * **admin**: returns repositories to which the user has explicit administrator access
            * **owner**: returns all repositories owned by the current user
          in: query
          name: role
          required: false
          schema:
            enum:
              - admin
              - contributor
              - member
              - owner
            type: string
        - description: |
            Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
            `role` parameter must also be specified.
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_repositories"
          description: All public repositories.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List public repositories
      tags:
        - Repositories
    parameters: []
  "/repositories/{workspace}":
    get:
      description: |-
        Returns a paginated list of all repositories owned by the specified
        workspace.

        The result can be narrowed down based on the authenticated user's role.

        E.g. with `?role=contributor`, only those repositories that the
        authenticated user has write access to are returned (this includes any
        repo the user is an admin on, as that implies write access).

        This endpoint also supports filtering and sorting of the results. See
        [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.
      parameters:
        - description: |
            
            Filters the result based on the authenticated user's role on each repository.

            * **member**: returns repositories to which the user has explicit read access
            * **contributor**: returns repositories to which the user has explicit write access
            * **admin**: returns repositories to which the user has explicit administrator access
            * **owner**: returns all repositories owned by the current user
          in: query
          name: role
          required: false
          schema:
            enum:
              - admin
              - contributor
              - member
              - owner
            type: string
        - description: |
            
            Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: "

            Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).

            \        "
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_repositories"
          description: The repositories owned by the specified account.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified account does not exist.
        "410":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified account marked as spam.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List repositories in a workspace
      tags:
        - Repositories
    parameters:
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}":
    delete:
      description: |-
        Deletes the repository. This is an irreversible operation.

        This does not affect its forks.
      parameters:
        - description: |
            If a repository has been moved to a new location, use this parameter to
            show users a friendly message in the Bitbucket UI that the repository
            has moved to a new location. However, a GET to this endpoint will still
            return a 404.
          in: query
          name: redirect_to
          required: false
          schema:
            type: string
      responses:
        "204":
          description: Indicates successful deletion.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the caller either does not have admin access to the repository, or the repository is set to read-only.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist.
      security:
        - oauth2:
            - repository:delete
        - basic: []
        - api_key: []
      summary: Delete a repository
      tags:
        - Repositories
    get:
      description: Returns the object describing this repository.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository"
          description: The repository object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository is private and the authenticated user does not have access to it.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If no repository exists at this location.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get a repository
      tags:
        - Repositories
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new repository.

        Note: In order to set the project for the newly created repository,
        pass in either the project key or the project UUID as part of the
        request body as shown in the examples below:

        ```
        $ curl -X POST -H "Content-Type: application/json" -d '{
            "scm": "git",
            "project": {
                "key": "MARS"
            }
        }' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding
        ```

        or

        ```
        $ curl -X POST -H "Content-Type: application/json" -d '{
            "scm": "git",
            "project": {
                "key": "{ba516952-992a-4c2d-acbd-17d502922f96}"
            }
        }' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding
        ```

        The project must be assigned for all repositories. If the project is not provided,
        the repository is automatically assigned to the oldest project in the workspace.

        Note: In the examples above, the workspace ID `teamsinspace`,
        and/or the repository name `hablanding` can be replaced by UUIDs.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/repository"
        description: The repository that is to be created. Note that most object elements are optional. Elements "owner" and "full_name" are ignored as the URL implies them.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository"
          description: The newly created repository.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated.
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Create a repository
      tags:
        - Repositories
    put:
      description: |-
        Since this endpoint can be used to both update and to create a
        repository, the request body depends on the intent.

        #### Creation

        See the POST documentation for the repository endpoint for an example
        of the request body.

        #### Update

        Note: Changing the `name` of the repository will cause the location to
        be changed. This is because the URL of the repo is derived from the
        name (a process called slugification). In such a scenario, it is
        possible for the request to fail if the newly created slug conflicts
        with an existing repository's slug. But if there is no conflict,
        the new location will be returned in the `Location` header of the
        response.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/repository"
        description: |
          The repository that is to be updated.

          Note that the elements "owner" and "full_name" are ignored since the
          URL implies them.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository"
          description: The existing repository has been updated
          headers:
            Location:
              description: |-
                The location of the repository. This header is only
                provided when the repository's name is changed.
              schema:
                type: string
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository"
          description: A new repository has been created
          headers:
            Location:
              description: The location of the newly created repository
              schema:
                type: string
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated.
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Update a repository
      tags:
        - Repositories
  "/repositories/{workspace}/{repo_slug}/branch-restrictions":
    get:
      description: |-
        Returns a paginated list of all branch restrictions on the
        repository.
      parameters:
        - description: Branch restrictions of this type
          in: query
          name: kind
          required: false
          schema:
            type: string
        - description: Branch restrictions applied to branches of this pattern
          in: query
          name: pattern
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_branchrestrictions"
          description: A paginated list of branch restrictions
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the repository
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: List branch restrictions
      tags:
        - Branch restrictions
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new branch restriction rule for a repository.

        `kind` describes what will be restricted. Allowed values include:
        `push`, `force`, `delete` and `restrict_merges`.

        Different kinds of branch restrictions have different requirements:

        * `push` and `restrict_merges` require `users` and `groups` to be
          specified. Empty lists are allowed, in which case permission is
          denied for everybody.

        The restriction applies to all branches that match. There are
        two ways to match a branch. It is configured in `branch_match_kind`:

        1. `glob`: Matches a branch against the `pattern`. A `'*'` in
           `pattern` will expand to match zero or more characters, and every
           other character matches itself. For example, `'foo*'` will match
           `'foo'` and `'foobar'`, but not `'barfoo'`. `'*'` will match all
           branches.
        2. `branching_model`: Matches a branch against the repository's
           branching model. The `branch_type` controls the type of branch
           to match. Allowed values include: `production`, `development`,
           `bugfix`, `release`, `feature` and `hotfix`.

        The combination of `kind` and match must be unique. This means that
        two `glob` restrictions in a repository cannot have the same `kind` and
        `pattern`. Additionally, two `branching_model` restrictions in a
        repository cannot have the same `kind` and `branch_type`.

        `users` and `groups` are lists of users and groups that are except from
        the restriction. They can only be configured in `push` and
        `restrict_merges` restrictions. The `push` restriction stops a user
        pushing to matching branches unless that user is in `users` or is a
        member of a group in `groups`. The `restrict_merges` stops a user
        merging pull requests to matching branches unless that user is in
        `users` or is a member of a group in `groups`. Adding new users or
        groups to an existing restriction should be done via `PUT`.

        Note that branch restrictions with overlapping matchers is allowed,
        but the resulting behavior may be surprising.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/branchrestriction"
        description: The new rule
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branchrestriction"
          description: A paginated list of branch restrictions
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the repository
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Create a branch restriction rule
      tags:
        - Branch restrictions
  "/repositories/{workspace}/{repo_slug}/branch-restrictions/{id}":
    delete:
      description: Deletes an existing branch restriction rule.
      responses:
        "204":
          description: ""
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the repository
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository or branch restriction id does not exist
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Delete a branch restriction rule
      tags:
        - Branch restrictions
    get:
      description: Returns a specific branch restriction rule.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branchrestriction"
          description: The branch restriction rule
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the repository
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository or branch restriction id does not exist
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Get a branch restriction rule
      tags:
        - Branch restrictions
    parameters:
      - description: The restriction rule's id
        in: path
        name: id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Updates an existing branch restriction rule.

        Fields not present in the request body are ignored.

        See [`POST`](/cloud/bitbucket/rest/api-group-branch-restrictions/#api-repositories-workspace-repo-slug-branch-restrictions-post) for details.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/branchrestriction"
        description: The new version of the existing rule
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branchrestriction"
          description: The updated branch restriction rule
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the repository
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository or branch restriction id does not exist
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Update a branch restriction rule
      tags:
        - Branch restrictions
  "/repositories/{workspace}/{repo_slug}/branching-model":
    get:
      description: |-
        Return the branching model as applied to the repository. This view is
        read-only. The branching model settings can be changed using the
        [settings](#api-repositories-workspace-repo-slug-branching-model-settings-get) API.

        The returned object:

        1. Always has a `development` property. `development.branch` contains
           the actual repository branch object that is considered to be the
           `development` branch. `development.branch` will not be present
           if it does not exist.
        2. Might have a `production` property. `production` will not
           be present when `production` is disabled.
           `production.branch` contains the actual branch object that is
           considered to be the `production` branch. `production.branch` will
           not be present if it does not exist.
        3. Always has a `branch_types` array which contains all enabled branch
           types.

        Example body:

        ```
        {
          "development": {
            "name": "master",
            "branch": {
              "type": "branch",
              "name": "master",
              "target": {
                "hash": "16dffcb0de1b22e249db6799532074cf32efe80f"
              }
            },
            "use_mainbranch": true
          },
          "production": {
            "name": "production",
            "branch": {
              "type": "branch",
              "name": "production",
              "target": {
                "hash": "16dffcb0de1b22e249db6799532074cf32efe80f"
              }
            },
            "use_mainbranch": false
          },
          "branch_types": [
            {
              "kind": "release",
              "prefix": "release/"
            },
            {
              "kind": "hotfix",
              "prefix": "hotfix/"
            },
            {
              "kind": "feature",
              "prefix": "feature/"
            },
            {
              "kind": "bugfix",
              "prefix": "bugfix/"
            }
          ],
          "type": "branching_model",
          "links": {
            "self": {
              "href": "https://api.bitbucket.org/.../branching-model"
            }
          }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branching_model"
          description: The branching model object
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have read access to the repository
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get the branching model for a repository
      tags:
        - Branching model
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/branching-model/settings":
    get:
      description: |-
        Return the branching model configuration for a repository. The returned
        object:

        1. Always has a `development` property for the development branch.
        2. Always a `production` property for the production branch. The
           production branch can be disabled.
        3. The `branch_types` contains all the branch types.

        This is the raw configuration for the branching model. A client
        wishing to see the branching model with its actual current branches may
        find the [active model API](/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-get) more useful.

        Example body:

        ```
        {
          "development": {
            "is_valid": true,
            "name": null,
            "use_mainbranch": true
          },
          "production": {
            "is_valid": true,
            "name": "production",
            "use_mainbranch": false,
            "enabled": false
          },
          "branch_types": [
            {
              "kind": "release",
              "enabled": true,
              "prefix": "release/"
            },
            {
              "kind": "hotfix",
              "enabled": true,
              "prefix": "hotfix/"
            },
            {
              "kind": "feature",
              "enabled": true,
              "prefix": "feature/"
            },
            {
              "kind": "bugfix",
              "enabled": false,
              "prefix": "bugfix/"
            }
          ],
          "type": "branching_model_settings",
          "links": {
            "self": {
              "href": "https://api.bitbucket.org/.../branching-model/settings"
            }
          }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branching_model_settings"
          description: The branching model configuration
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the repository
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Get the branching model config for a repository
      tags:
        - Branching model
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Update the branching model configuration for a repository.

        The `development` branch can be configured to a specific branch or to
        track the main branch. When set to a specific branch it must
        currently exist. Only the passed properties will be updated. The
        properties not passed will be left unchanged. A request without a
        `development` property will leave the development branch unchanged.

        It is possible for the `development` branch to be invalid. This
        happens when it points at a specific branch that has been
        deleted. This is indicated in the `is_valid` field for the branch. It is
        not possible to update the settings for `development` if that
        would leave the branch in an invalid state. Such a request will be
        rejected.

        The `production` branch can be a specific branch, the main
        branch or disabled. When set to a specific branch it must currently
        exist. The `enabled` property can be used to enable (`true`) or
        disable (`false`) it. Only the passed properties will be updated. The
        properties not passed will be left unchanged. A request without a
        `production` property will leave the production branch unchanged.

        It is possible for the `production` branch to be invalid. This
        happens when it points at a specific branch that has been
        deleted. This is indicated in the `is_valid` field for the branch. A
        request that would leave `production` enabled and invalid will be
        rejected. It is possible to update `production` and make it invalid if
        it would also be left disabled.

        The `branch_types` property contains the branch types to be updated.
        Only the branch types passed will be updated. All updates will be
        rejected if it would leave the branching model in an invalid state.
        For branch types this means that:

        1. The prefixes for all enabled branch types are valid. For example,
           it is not possible to use '*' inside a Git prefix.
        2. A prefix of an enabled branch type must not be a prefix of another
           enabled branch type. This is to ensure that a branch can be easily
           classified by its prefix unambiguously.

        It is possible to store an invalid prefix if that branch type would be
        left disabled. Only the passed properties will be updated. The
        properties not passed will be left unchanged. Each branch type must
        have a `kind` property to identify it.

        Example Body:

        ```
            {
              "development": {
                "use_mainbranch": true
              },
              "production": {
                "enabled": true,
                "use_mainbranch": false,
                "name": "production"
              },
              "branch_types": [
                {
                  "kind": "bugfix",
                  "enabled": true,
                  "prefix": "bugfix/"
                },
                {
                  "kind": "feature",
                  "enabled": true,
                  "prefix": "feature/"
                },
                {
                  "kind": "hotfix",
                  "prefix": "hotfix/"
                },
                {
                  "kind": "release",
                  "enabled": false,
                }
              ]
            }
        ```

        There is currently a side effect when using this API endpoint. If the
        repository is inheriting branching model settings from its project,
        updating the branching model for this repository will disable the
        project setting inheritance.


        We have deprecated this side effect and will remove it on 1 August 2022.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branching_model_settings"
          description: The updated branching model configuration
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request contains invalid branching model configuration
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the repository
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Update the branching model config for a repository
      tags:
        - Branching model
  "/repositories/{workspace}/{repo_slug}/commit/{commit}":
    get:
      description: |-
        Returns the specified commit.

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a1
        {
            "rendered": {
                "message": {
                "raw": "Add a GEORDI_OUTPUT_DIR setting",
                "markup": "markdown",
                "html": "<p>Add a GEORDI_OUTPUT_DIR setting</p>",
                "type": "rendered"
                }
            },
            "hash": "f7591a13eda445d9a9167f98eb870319f4b6c2d8",
            "repository": {
                "name": "geordi",
                "type": "repository",
                "full_name": "bitbucket/geordi",
                "links": {
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi"
                    },
                    "html": {
                        "href": "https://bitbucket.org/bitbucket/geordi"
                    },
                    "avatar": {
                        "href": "https://bytebucket.org/ravatar/%7B85d08b4e-571d-44e9-a507-fa476535aa98%7D?ts=1730260"
                    }
                },
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
            },
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8"
                },
                "comments": {
                    "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/comments"
                },
                "patch": {
                    "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/patch/f7591a13eda445d9a9167f98eb870319f4b6c2d8"
                },
                "html": {
                    "href": "https://bitbucket.org/bitbucket/geordi/commits/f7591a13eda445d9a9167f98eb870319f4b6c2d8"
                },
                "diff": {
                    "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diff/f7591a13eda445d9a9167f98eb870319f4b6c2d8"
                },
                "approve": {
                    "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/approve"
                },
                "statuses": {
                    "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/statuses"
                }
            },
            "author": {
                "raw": "Brodie Rao <a@b.c>",
                "type": "author",
                "user": {
                    "display_name": "Brodie Rao",
                    "uuid": "{9484702e-c663-4afd-aefb-c93a8cd31c28}",
                    "links": {
                        "self": {
                            "href": "https://api.bitbucket.org/2.0/users/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D"
                        },
                        "html": {
                            "href": "https://bitbucket.org/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D/"
                        },
                        "avatar": {
                            "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca/613070db-28b0-421f-8dba-ae8a87e2a5c7/128"
                        }
                    },
                    "type": "user",
                    "nickname": "brodie",
                    "account_id": "557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca"
                }
            },
            "summary": {
                "raw": "Add a GEORDI_OUTPUT_DIR setting",
                "markup": "markdown",
                "html": "<p>Add a GEORDI_OUTPUT_DIR setting</p>",
                "type": "rendered"
            },
            "participants": [],
            "parents": [
                {
                    "type": "commit",
                    "hash": "f06941fec4ef6bcb0c2456927a0cf258fa4f899b",
                    "links": {
                        "self": {
                            "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f06941fec4ef6bcb0c2456927a0cf258fa4f899b"
                        },
                        "html": {
                            "href": "https://bitbucket.org/bitbucket/geordi/commits/f06941fec4ef6bcb0c2456927a0cf258fa4f899b"
                        }
                    }
                }
            ],
            "date": "2012-07-16T19:37:54+00:00",
            "message": "Add a GEORDI_OUTPUT_DIR setting",
            "type": "commit"
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/commit"
          description: The commit object
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified commit or repository does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get a commit
      tags:
        - Commits
    parameters:
      - description: The commit's SHA1.
        in: path
        name: commit
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/approve":
    delete:
      description: |-
        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.
      responses:
        "204":
          description: An empty response indicating the authenticated user's approval has been withdrawn.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified commit, or the repository does not exist.
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Unapprove a commit
      tags:
        - Commits
    parameters:
      - description: The commit's SHA1.
        in: path
        name: commit
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Approve the specified commit as the authenticated user.

        This operation is only available to users that have explicit access to
        the repository. In contrast, just the fact that a repository is
        publicly accessible to users does not give them the ability to approve
        commits.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/participant"
          description: The `participant` object recording that the authenticated user approved the commit.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified commit, or the repository does not exist.
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Approve a commit
      tags:
        - Commits
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments":
    get:
      description: |-
        Returns the commit's comments.

        This includes both global and inline comments.

        The default sorting is oldest to newest and can be overridden with
        the `sort` query parameter.
      parameters:
        - description: |
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            Field by which the results should be sorted as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_commit_comments"
          description: A paginated list of commit comments.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List a commit's comments
      tags:
        - Commits
    parameters:
      - description: The commit's SHA1.
        in: path
        name: commit
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates new comment on the specified commit.

        To post a reply to an existing comment, include the `parent.id` field:

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \
          -X POST -u evzijst \
          -H 'Content-Type: application/json' \
          -d '{"content": {"raw": "One more thing!"},
               "parent": {"id": 5728901}}'
        ```
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/commit_comment"
        description: The specified comment.
        required: true
      responses:
        "201":
          description: The newly created comment.
          headers:
            Location:
              description: The location of the newly created comment.
              schema:
                type: string
        "400":
          description: If the comment was detected as spam, or if the parent comment is not attached to the same node as the new comment
        "404":
          description: If a parent ID was passed in that cannot be found
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Create comment for a commit
      tags:
        - Commits
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}":
    delete:
      description: |-
        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.
      responses:
        "204":
          description: Indicates the comment was deleted by this action or a previous delete.
        "404":
          description: If the comment doesn't exist
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Delete a commit comment
      tags:
        - Commits
    get:
      description: Returns the specified commit comment.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/commit_comment"
          description: The commit comment.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get a commit comment
      tags:
        - Commits
    parameters:
      - description: The id of the comment.
        in: path
        name: comment_id
        required: true
        schema:
          type: integer
      - description: The commit's SHA1.
        in: path
        name: commit
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Used to update the contents of a comment. Only the content of the comment can be updated.

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/7f71b5/comments/5728901 \
          -X PUT -u evzijst \
          -H 'Content-Type: application/json' \
          -d '{"content": {"raw": "One more thing!"}'
        ```
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/commit_comment"
        description: The updated comment.
        required: true
      responses:
        "201":
          description: The newly updated comment.
          headers:
            Location:
              description: The location of the newly updated comment.
              schema:
                type: string
        "400":
          description: If the comment update was detected as spam
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Update a commit comment
      tags:
        - Commits
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}":
    delete:
      description: Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.
      operationId: deleteCommitHostedPropertyValue
      parameters:
        - description: The repository container; either the workspace slug or the UUID in curly braces.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      responses:
        "204":
          description: An empty response.
      summary: Delete a commit application property
      tags:
        - properties
    get:
      description: Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.
      operationId: getCommitHostedPropertyValue
      parameters:
        - description: The repository container; either the workspace slug or the UUID in curly braces.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/application_property"
          description: The value of the property.
      summary: Get a commit application property
      tags:
        - properties
    put:
      description: Update an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.
      operationId: updateCommitHostedPropertyValue
      parameters:
        - description: The repository container; either the workspace slug or the UUID in curly braces.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/application_property"
      responses:
        "204":
          description: An empty response.
      summary: Update a commit application property
      tags:
        - properties
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests":
    get:
      description: Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.
      operationId: getPullrequestsForCommit
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository; either the UUID in curly braces, or the slug
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The SHA1 of the commit
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: Which page to retrieve
          in: query
          name: page
          required: false
          schema:
            default: 1
            format: int32
            type: integer
        - description: How many pull requests to retrieve per page
          in: query
          name: pagelen
          required: false
          schema:
            default: 30
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pullrequests"
          description: The paginated list of pull requests.
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pullrequests"
          description: The repository's pull requests are still being indexed.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Either the repository does not exist, or pull request commit links have not yet been indexed.
      summary: List pull requests that contain a commit
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports":
    get:
      description: Returns a paginated list of Reports linked to this commit.
      operationId: getReportsForCommit
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit for which to retrieve reports.
          in: path
          name: commit
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_reports"
          description: OK
      summary: List reports
      tags:
        - Reports
        - Commits
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}":
    delete:
      description: Deletes a single Report matching the provided ID.
      operationId: deleteReport
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit the report belongs to.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: Either the uuid or external-id of the report.
          in: path
          name: reportId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No content
      summary: Delete a report
      tags:
        - Reports
        - Commits
    get:
      description: Returns a single Report matching the provided ID.
      operationId: getReport
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit the report belongs to.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: Either the uuid or external-id of the report.
          in: path
          name: reportId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/report"
          description: OK
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The report with the given ID was not found.
      summary: Get a report
      tags:
        - Reports
        - Commits
    put:
      description: |
        Creates or updates a report for the specified commit.
        To upload a report, make sure to generate an ID that is unique across all reports for that commit. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-001.

        ### Sample cURL request:
        ```
        curl --request PUT 'https://api.bitbucket.org/2.0/repositories/<username>/<reposity-name>/commit/<commit-hash>/reports/mysystem-001' \
        --header 'Content-Type: application/json' \
        --data-raw '{
            "title": "Security scan report",
            "details": "This pull request introduces 10 new dependency vulnerabilities.",
            "report_type": "SECURITY",
            "reporter": "mySystem",
            "link": "http://www.mysystem.com/reports/001",
            "result": "FAILED",
            "data": [
                {
                    "title": "Duration (seconds)",
                    "type": "DURATION",
                    "value": 14
                },
                {
                    "title": "Safe to merge?",
                    "type": "BOOLEAN",
                    "value": false
                }
            ]
        }'
        ```

        ### Possible field values:
        report_type: SECURITY, COVERAGE, TEST, BUG
        result: PASSED, FAILED, PENDING
        data.type: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT

        #### Data field formats
        | Type  Field   | Value Field Type  | Value Field Display |
        |:--------------|:------------------|:--------------------|
        | None/ Omitted | Number, String or Boolean (not an array or object) | Plain text |
        | BOOLEAN	| Boolean | The value will be read as a JSON boolean and displayed as 'Yes' or 'No'. |
        | DATE  | Number | The value will be read as a JSON number in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise  it will be displayed as an absolute date. |
        | DURATION | Number | The value will be read as a JSON number in milliseconds and will be displayed in a human readable duration format. |
        | LINK | Object: `{"text": "Link text here", "href": "https://link.to.annotation/in/external/tool"}` | The value will be read as a JSON object containing the fields "text" and "href" and will be displayed as a clickable link on the report. |
        | NUMBER | Number | The value will be read as a JSON number and large numbers will be  displayed in a human readable format (e.g. 14.3k). |
        | PERCENTAGE | Number (between 0 and 100) | The value will be read as a JSON number between 0 and 100 and will be displayed with a percentage sign. |
        | TEXT | String | The value will be read as a JSON string and will be displayed as-is |

        Please refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.
      operationId: createOrUpdateReport
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit the report belongs to.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: Either the uuid or external-id of the report.
          in: path
          name: reportId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/report"
        description: The report to create or update
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/report"
          description: OK
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The provided Report object is malformed or incomplete.
      summary: Create or update a report
      tags:
        - Reports
        - Commits
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations":
    get:
      description: Returns a paginated list of Annotations for a specified report.
      operationId: getAnnotationsForReport
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit for which to retrieve reports.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: Uuid or external-if of the report for which to get annotations for.
          in: path
          name: reportId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_annotations"
          description: OK
      summary: List annotations
      tags:
        - Reports
        - Commits
    post:
      description: |
        Bulk upload of annotations.
        Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.

        Add the annotations you want to upload as objects in a JSON array and make sure each annotation has the external_id field set to a unique value. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. The external id can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). You can upload up to 100 annotations per POST request.

        ### Sample cURL request:
        ```
        curl --location 'https://api.bitbucket.org/2.0/repositories/<username>/<reposity-name>/commit/<commit-hash>/reports/mysystem-001/annotations' \
        --header 'Content-Type: application/json' \
        --data-raw '[
          {
                "external_id": "mysystem-annotation001",
                "title": "Security scan report",
                "annotation_type": "VULNERABILITY",
                "summary": "This line represents a security threat.",
                "severity": "HIGH",
              "path": "my-service/src/main/java/com/myCompany/mysystem/logic/Main.java",
                "line": 42
          },
          {
                "external_id": "mySystem-annotation002",
                "title": "Bug report",
                "annotation_type": "BUG",
                "result": "FAILED",
                "summary": "This line might introduce a bug.",
                "severity": "MEDIUM",
              "path": "my-service/src/main/java/com/myCompany/mysystem/logic/Helper.java",
                "line": 13
          }
        ]'
        ```

        ### Possible field values:
        annotation_type: VULNERABILITY, CODE_SMELL, BUG
        result: PASSED, FAILED, IGNORED, SKIPPED
        severity: HIGH, MEDIUM, LOW, CRITICAL

        Please refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.
      operationId: bulkCreateOrUpdateAnnotations
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit for which to retrieve reports.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: Uuid or external-if of the report for which to get annotations for.
          in: path
          name: reportId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: "#/components/schemas/report_annotation"
              maxItems: 100
              minItems: 1
              type: array
        description: The annotations to create or update
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/report_annotation"
                type: array
          description: OK
      summary: Bulk create or update annotations
      tags:
        - Reports
        - Commits
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}":
    delete:
      description: Deletes a single Annotation matching the provided ID.
      operationId: deleteAnnotation
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit the annotation belongs to.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: Either the uuid or external-id of the annotation.
          in: path
          name: reportId
          required: true
          schema:
            type: string
        - description: Either the uuid or external-id of the annotation.
          in: path
          name: annotationId
          required: true
          schema:
            type: string
      responses:
        "204":
          description: No content
      summary: Delete an annotation
      tags:
        - Reports
        - Commits
    get:
      description: Returns a single Annotation matching the provided ID.
      operationId: getAnnotation
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit the report belongs to.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: Either the uuid or external-id of the report.
          in: path
          name: reportId
          required: true
          schema:
            type: string
        - description: Either the uuid or external-id of the annotation.
          in: path
          name: annotationId
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/report_annotation"
          description: OK
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The annotation with the given ID was not found.
      summary: Get an annotation
      tags:
        - Reports
        - Commits
    put:
      description: |
        Creates or updates an individual annotation for the specified report.
        Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.

        Just as reports, annotation needs to be uploaded with a unique ID that can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001.

        ### Sample cURL request:
        ```
        curl --request PUT 'https://api.bitbucket.org/2.0/repositories/<username>/<reposity-name>/commit/<commit-hash>/reports/mySystem-001/annotations/mysystem-annotation001' \
        --header 'Content-Type: application/json' \
        --data-raw '{
            "title": "Security scan report",
            "annotation_type": "VULNERABILITY",
            "summary": "This line represents a security thread.",
            "severity": "HIGH",
            "path": "my-service/src/main/java/com/myCompany/mysystem/logic/Main.java",
            "line": 42
        }'
        ```

        ### Possible field values:
        annotation_type: VULNERABILITY, CODE_SMELL, BUG
        result: PASSED, FAILED, IGNORED, SKIPPED
        severity: HIGH, MEDIUM, LOW, CRITICAL

        Please refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.
      operationId: createOrUpdateAnnotation
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The commit the report belongs to.
          in: path
          name: commit
          required: true
          schema:
            type: string
        - description: Either the uuid or external-id of the report.
          in: path
          name: reportId
          required: true
          schema:
            type: string
        - description: Either the uuid or external-id of the annotation.
          in: path
          name: annotationId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/report_annotation"
        description: The annotation to create or update
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/report_annotation"
          description: OK
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The provided Annotation object is malformed or incomplete.
      summary: Create or update an annotation
      tags:
        - Reports
        - Commits
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses":
    get:
      description: Returns all statuses (e.g. build results) for a specific commit.
      parameters:
        - description: |
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            Field by which the results should be sorted as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
            Defaults to `created_on`.
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_commitstatuses"
          description: A paginated list of all commit statuses for this commit.
        "401":
          description: If the repository is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository or commit does not exist
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List commit statuses for a commit
      tags:
        - Commit statuses
    parameters:
      - description: The commit's SHA1.
        in: path
        name: commit
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build":
    parameters:
      - description: The commit's SHA1.
        in: path
        name: commit
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new build status against the specified commit.

        If the specified key already exists, the existing status object will
        be overwritten.

        Example:

        ```
        curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/           -X POST -u jdoe -H 'Content-Type: application/json'           -d '{
            "key": "MY-BUILD",
            "state": "SUCCESSFUL",
            "description": "42 tests passed",
            "url": "https://www.example.org/my-build-result"
          }'
        ```

        When creating a new commit status, you can use a URI template for the URL.
        Templates are URLs that contain variable names that Bitbucket will
        evaluate at runtime whenever the URL is displayed anywhere similar to
        parameter substitution in
        [Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html).
        For example, one could use `https://foo.com/builds/{repository.full_name}`
        which Bitbucket will turn into `https://foo.com/builds/foo/bar` at render time.
        The context variables available are `repository` and `commit`.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/commitstatus"
        description: The new commit status object.
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/commitstatus"
          description: The newly created build status object.
        "401":
          description: If the repository is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository, commit, or build status key does not exist
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Create a build status for a commit
      tags:
        - Commit statuses
  "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key}":
    get:
      description: Returns the specified build status for a commit.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/commitstatus"
          description: The build status object with the specified key.
        "401":
          description: If the repository is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository, commit, or build status key does not exist
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get a build status for a commit
      tags:
        - Commit statuses
    parameters:
      - description: The commit's SHA1.
        in: path
        name: commit
        required: true
        schema:
          type: string
      - description: The build status' unique key
        in: path
        name: key
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Used to update the current status of a build status object on the
        specific commit.

        This operation can also be used to change other properties of the
        build status:

        * `state`
        * `name`
        * `description`
        * `url`
        * `refname`

        The `key` cannot be changed.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/commitstatus"
        description: The updated build status object
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/commitstatus"
          description: The updated build status object.
        "401":
          description: If the repository is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository or build does not exist
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Update a build status for a commit
      tags:
        - Commit statuses
  "/repositories/{workspace}/{repo_slug}/commits":
    get:
      description: |-
        These are the repository's commits. They are paginated and returned
        in reverse chronological order, similar to the output of `git log`.
        Like these tools, the DAG can be filtered.

        #### GET /repositories/{workspace}/{repo_slug}/commits/

        Returns all commits in the repo in topological order (newest commit
        first). All branches and tags are included (similar to
        `git log --all`).

        #### GET /repositories/{workspace}/{repo_slug}/commits/?exclude=master

        Returns all commits in the repo that are not on master
        (similar to `git log --all ^master`).

        #### GET /repositories/{workspace}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar

        Returns all commits that are on refs `foo` or `bar`, but not on `fu` or
        `fubar` (similar to `git log foo bar ^fu ^fubar`).

        An optional `path` parameter can be specified that will limit the
        results to commits that affect that path. `path` can either be a file
        or a directory. If a directory is specified, commits are returned that
        have modified any file in the directory tree rooted by `path`. It is
        important to note that if the `path` parameter is specified, the commits
        returned by this endpoint may no longer be a DAG, parent commits that
        do not modify the path will be omitted from the response.

        #### GET /repositories/{workspace}/{repo_slug}/commits/?path=README.md&include=foo&include=bar&exclude=master

        Returns all commits that are on refs `foo` or `bar`, but not on `master`
        that changed the file README.md.

        #### GET /repositories/{workspace}/{repo_slug}/commits/?path=src/&include=foo&include=bar&exclude=master

        Returns all commits that are on refs `foo` or `bar`, but not on `master`
        that changed to a file in any file in the directory src or its children.

        Because the response could include a very large number of commits, it
        is paginated. Follow the 'next' link in the response to navigate to the
        next page of commits. As with other paginated resources, do not
        construct your own links.

        When the include and exclude parameters are more than can fit in a
        query string, clients can use a `x-www-form-urlencoded` POST instead.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_changeset"
          description: A paginated list of commits
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified repository does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List commits
      tags:
        - Commits
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Identical to `GET /repositories/{workspace}/{repo_slug}/commits`,
        except that POST allows clients to place the include and exclude
        parameters in the request body to avoid URL length issues.

        **Note that this resource does NOT support new commit creation.**
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_changeset"
          description: A paginated list of commits
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified repository does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List commits with include/exclude
      tags:
        - Commits
  "/repositories/{workspace}/{repo_slug}/commits/{revision}":
    get:
      description: |-
        These are the repository's commits. They are paginated and returned
        in reverse chronological order, similar to the output of `git log`.
        Like these tools, the DAG can be filtered.

        #### GET /repositories/{workspace}/{repo_slug}/commits/master

        Returns all commits on ref `master` (similar to `git log master`).

        #### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master

        Returns all commits on ref `dev` or `foo`, except those that are reachable on
        `master` (similar to `git log dev foo ^master`).

        An optional `path` parameter can be specified that will limit the
        results to commits that affect that path. `path` can either be a file
        or a directory. If a directory is specified, commits are returned that
        have modified any file in the directory tree rooted by `path`. It is
        important to note that if the `path` parameter is specified, the commits
        returned by this endpoint may no longer be a DAG, parent commits that
        do not modify the path will be omitted from the response.

        #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=README.md&include=foo&include=bar&exclude=master

        Returns all commits that are on refs `dev` or `foo` or `bar`, but not on `master`
        that changed the file README.md.

        #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master

        Returns all commits that are on refs `dev` or `foo`, but not on `master`
        that changed to a file in any file in the directory src or its children.

        Because the response could include a very large number of commits, it
        is paginated. Follow the 'next' link in the response to navigate to the
        next page of commits. As with other paginated resources, do not
        construct your own links.

        When the include and exclude parameters are more than can fit in a
        query string, clients can use a `x-www-form-urlencoded` POST instead.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_changeset"
          description: A paginated list of commits
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified revision does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List commits for revision
      tags:
        - Commits
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: A commit SHA1 or ref name.
        in: path
        name: revision
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Identical to `GET /repositories/{workspace}/{repo_slug}/commits/{revision}`,
        except that POST allows clients to place the include and exclude
        parameters in the request body to avoid URL length issues.

        **Note that this resource does NOT support new commit creation.**
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_changeset"
          description: A paginated list of commits
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified revision does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List commits for revision using include/exclude
      tags:
        - Commits
  "/repositories/{workspace}/{repo_slug}/components":
    get:
      description: |-
        Returns the components that have been defined in the issue tracker.

        This resource is only available on repositories that have the issue
        tracker enabled.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_components"
          description: The components that have been defined in the issue tracker.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: List components
      tags:
        - Issue tracker
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/components/{component_id}":
    get:
      description: Returns the specified issue tracker component object.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/component"
          description: The specified component object.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or component does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: Get a component for issues
      tags:
        - Issue tracker
    parameters:
      - description: The component's id
        in: path
        name: component_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/default-reviewers":
    get:
      description: |-
        Returns the repository's default reviewers.

        These are the users that are automatically added as reviewers on every
        new pull request that is created. To obtain the repository's default reviewers
        as well as the default reviewers inherited from the project, use the
        [effective-default-reveiwers](#api-repositories-workspace-repo-slug-effective-default-reviewers-get) endpoint.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_accounts"
          description: The paginated list of default reviewers
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to view the default reviewers
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List default reviewers
      tags:
        - Pullrequests
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}":
    delete:
      description: Removes a default reviewer from the repository.
      responses:
        "204":
          description: The specified user successfully removed from the default reviewers
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access modify the default reviewers
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user does not exist
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Remove a user from the default reviewers
      tags:
        - Pullrequests
    get:
      description: |-
        Returns the specified reviewer.

        This can be used to test whether a user is among the repository's
        default reviewers list. A 404 indicates that that specified user is not
        a default reviewer.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/account"
          description: The specified user is a default reviewer
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to check if the specified user is a default reviewer
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user does not exist or is not a default reviewer
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Get a default reviewer
      tags:
        - Pullrequests
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the username or the UUID of the default reviewer,
          surrounded by curly-braces, for example: `{account UUID}`.
        in: path
        name: target_username
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Adds the specified user to the repository's list of default
        reviewers.

        This method is idempotent. Adding a user a second time has no effect.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/account"
          description: The specified user was successfully added to the default reviewers
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user tried to add a team, bot user, or user without access to the repository to the default reviewers
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have permission to modify the default reviewers
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user does not exist
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Add a user to the default reviewers
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/deploy-keys":
    get:
      description: |-
        Returns all deploy-keys belonging to a repository.

        Example:
        ```
        $ curl -H "Authorization <auth header>" \
        https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys

        Output:
        {
            "pagelen": 10,
            "values": [
                {
                    "id": 123,
                    "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5",
                    "label": "mykey",
                    "type": "deploy_key",
                    "created_on": "2018-08-15T23:50:59.993890+00:00",
                    "repository": {
                        "full_name": "mleu/test",
                        "name": "test",
                        "type": "repository",
                        "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
                    },
                    "links":{
                        "self":{
                            "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123"
                        }
                    }
                    "last_used": null,
                    "comment": "mleu@C02W454JHTD8"
                }
            ],
            "page": 1,
            "size": 1
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_deploy_keys"
          description: Deploy keys matching the repository
        "403":
          description: If the specified user or repository is not accessible to the current user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user or repository does not exist
      security:
        - oauth2:
            - repository
            - repository:admin
        - basic: []
        - api_key: []
      summary: List repository deploy keys
      tags:
        - Deployments
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Create a new deploy key in a repository. Note: If authenticating a deploy key
        with an OAuth consumer, any changes to the OAuth consumer will subsequently
        invalidate the deploy key.


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

        Output:
        {
            "id": 123,
            "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5",
            "label": "mydeploykey",
            "type": "deploy_key",
            "created_on": "2018-08-15T23:50:59.993890+00:00",
            "repository": {
                "full_name": "mleu/test",
                "name": "test",
                "type": "repository",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
            },
            "links":{
                "self":{
                    "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123"
                }
            }
            "last_used": null,
            "comment": "mleu@C02W454JHTD8"
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deploy_key"
          description: The deploy key that was created
        "400":
          description: Invalid deploy key inputs
        "403":
          description: If the specified user or repository is not accessible to the current user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user or repository does not exist
      security:
        - oauth2:
            - repository
            - repository:admin
        - basic: []
        - api_key: []
      summary: Add a repository deploy key
      tags:
        - Deployments
  "/repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}":
    delete:
      description: |-
        This deletes a deploy key from a repository.

        Example:
        ```
        $ curl -XDELETE \
        -H "Authorization <auth header>" \
        https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234
        ```
      responses:
        "204":
          description: The key has been deleted
        "403":
          description: If the current user does not have permission to delete a key for the specified user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user, repository, or deploy key does not exist
      security:
        - oauth2:
            - repository
            - repository:admin
        - basic: []
        - api_key: []
      summary: Delete a repository deploy key
      tags:
        - Deployments
    get:
      description: |-
        Returns the deploy key belonging to a specific key.

        Example:
        ```
        $ curl -H "Authorization <auth header>" \
        https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234

        Output:
        {
            "comment": "mleu@C02W454JHTD8",
            "last_used": null,
            "links": {
                "self": {
                    "href": https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234"
                }
            },
            "repository": {
                "full_name": "mleu/test",
                "name": "test",
                "type": "repository",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
            },
            "label": "mykey",
            "created_on": "2018-08-15T23:50:59.993890+00:00",
            "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5",
            "id": 1234,
            "type": "deploy_key"
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deploy_key"
          description: Deploy key matching the key ID
        "403":
          description: If the specified user or repository is not accessible to the current user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user or repository does not exist
      security:
        - oauth2:
            - repository
            - repository:admin
        - basic: []
        - api_key: []
      summary: Get a repository deploy key
      tags:
        - Deployments
    parameters:
      - description: The key ID matching the deploy key.
        in: path
        name: key_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Create a new deploy key in a repository.

        The same key needs to be passed in but the comment and label can change.

        Example:
        ```
        $ curl -XPUT \
        -H "Authorization <auth header>" \
        -H "Content-type: application/json" \
        https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234 -d \
        '{
            "label": "newlabel",
            "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 newcomment",
        }'

        Output:
        {
            "comment": "newcomment",
            "last_used": null,
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234"
                }
            },
            "repository": {
                "full_name": "mleu/test",
                "name": "test",
                "type": "repository",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
            },
            "label": "newlabel",
            "created_on": "2018-08-15T23:50:59.993890+00:00",
            "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5",
            "id": 1234,
            "type": "deploy_key"
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deploy_key"
          description: The newly updated deploy key.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the submitted key or related value is invalid
        "403":
          description: If the current user does not have permission to add a key for the specified user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user, repository, or deploy key does not exist
      security:
        - oauth2:
            - repository
            - repository:admin
        - basic: []
        - api_key: []
      summary: Update a repository deploy key
      tags:
        - Deployments
  "/repositories/{workspace}/{repo_slug}/deployments":
    get:
      description: Find deployments
      operationId: getDeploymentsForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_deployments"
          description: The matching deployments.
      summary: List deployments
      tags:
        - Deployments
  "/repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid}":
    get:
      description: Retrieve a deployment
      operationId: getDeploymentForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The deployment UUID.
          in: path
          name: deployment_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deployment"
          description: The deployment.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No account, repository or deployment with the UUID provided exists.
      summary: Get a deployment
      tags:
        - Deployments
  "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables":
    get:
      description: Find deployment environment level variables.
      operationId: getDeploymentVariables
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The environment.
          in: path
          name: environment_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_deployment_variable"
          description: The retrieved deployment variables.
      summary: List variables for an environment
      tags:
        - Pipelines
    post:
      description: Create a deployment environment level variable.
      operationId: createDeploymentVariable
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The environment.
          in: path
          name: environment_uuid
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/deployment_variable"
        description: The variable to create
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deployment_variable"
          description: The variable was created.
          headers:
            Location:
              description: The URL of the newly created variable.
              schema:
                type: string
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository, environment or variable with the given UUID was not found.
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A variable with the provided key already exists.
      summary: Create a variable for an environment
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}":
    delete:
      description: Delete a deployment environment level variable.
      operationId: deleteDeploymentVariable
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The environment.
          in: path
          name: environment_uuid
          required: true
          schema:
            type: string
        - description: The UUID of the variable to delete.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The variable was deleted.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository, environment or variable with given UUID was not found.
      summary: Delete a variable for an environment
      tags:
        - Pipelines
    put:
      description: Update a deployment environment level variable.
      operationId: updateDeploymentVariable
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The environment.
          in: path
          name: environment_uuid
          required: true
          schema:
            type: string
        - description: The UUID of the variable to update.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/deployment_variable"
        description: The updated deployment variable.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deployment_variable"
          description: The deployment variable was updated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository, environment or variable with the given UUID was not found.
      summary: Update a variable for an environment
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/diff/{spec}":
    get:
      description: |-
        Produces a raw git-style diff.

        #### Single commit spec

        If the `spec` argument to this API is a single commit, the diff is
        produced against the first parent of the specified commit.

        #### Two commit spec

        Two commits separated by `..` may be provided as the `spec`, e.g.,
        `3a8b42..9ff173`. When two commits are provided and the `topic` query
        parameter is true or absent, this API produces a 2-way three dot diff.
        This is the diff between source commit and the merge base of the source
        commit and the destination commit. When the `topic` query param is false,
        a simple git-style diff is produced.

        The two commits are interpreted as follows:

        * First commit: the commit containing the changes we wish to preview
        * Second commit: the commit representing the state to which we want to
          compare the first commit
        * **Note**: This is the opposite of the order used in `git diff`.

        #### Comparison to patches

        While similar to patches, diffs:

        * Don't have a commit header (username, commit message, etc)
        * Support the optional `path=foo/bar.py` query param to filter
          the diff to just that one file diff

        #### Response

        The raw diff is returned as-is, in whatever encoding the files in the
        repository use. It is not decoded into unicode. As such, the
        content-type is `text/plain`.
      parameters:
        - description: Generate diffs with <n> lines of context instead of the usual three.
          in: query
          name: context
          required: false
          schema:
            type: integer
        - description: |-
            Limit the diff to a particular file (this parameter
            can be repeated for multiple paths).
          in: query
          name: path
          required: false
          schema:
            type: string
        - description: Generate diffs that ignore whitespace.
          in: query
          name: ignore_whitespace
          required: false
          schema:
            type: boolean
        - description: Generate diffs that include binary files, true if omitted.
          in: query
          name: binary
          required: false
          schema:
            type: boolean
        - description: Whether to perform rename detection, true if omitted.
          in: query
          name: renames
          required: false
          schema:
            type: boolean
        - description: |-
            This parameter is deprecated and will be removed at the end
            of 2022. The 'topic' parameter should be used instead. The
            'merge' and 'topic' parameters cannot be both used at the same
            time.

            If true, the source commit is merged into the
            destination commit, and then a diff from the
            destination to the merge result is returned. If false,
            a simple 'two dot' diff between the source and
            destination is returned. True if omitted.
          in: query
          name: merge
          required: false
          schema:
            type: boolean
        - description: |-
            If true, returns 2-way 'three-dot' diff.
            This is a diff between the source commit and the merge base
            of the source commit and the destination commit.
            If false, a simple 'two dot' diff between the source and
            destination is returned.
          in: query
          name: topic
          required: false
          schema:
            type: boolean
      responses:
        "200":
          description: The raw diff
        "555":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |-
            If the diff was too large and timed out.

            Since this endpoint does not employ any form of pagination, but
            instead returns the diff as a single document, it can run into
            trouble on very large diffs. If Bitbucket times out in cases
            like these, a 555 status code is returned.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Compare two commits
      tags:
        - Commits
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          A commit SHA (e.g. `3a8b42`) or a commit range using double dot
          notation (e.g. `3a8b42..9ff173`).
        in: path
        name: spec
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/diffstat/{spec}":
    get:
      description: |-
        Produces a response in JSON format with a record for every path
        modified, including information on the type of the change and the
        number of lines added and removed.

        #### Single commit spec

        If the `spec` argument to this API is a single commit, the diff is
        produced against the first parent of the specified commit.

        #### Two commit spec

        Two commits separated by `..` may be provided as the `spec`, e.g.,
        `3a8b42..9ff173`. When two commits are provided and the `topic` query
        parameter is true or absent, this API produces a 2-way three dot diff.
        This is the diff between source commit and the merge base of the source
        commit and the destination commit. When the `topic` query param is false,
        a simple git-style diff is produced.

        The two commits are interpreted as follows:

        * First commit: the commit containing the changes we wish to preview
        * Second commit: the commit representing the state to which we want to
          compare the first commit
        * **Note**: This is the opposite of the order used in `git diff`.

        #### Sample output
        ```
        curl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diffstat/d222fa2..e174964
        {
            "pagelen": 500,
            "values": [
                {
                    "type": "diffstat",
                    "status": "modified",
                    "lines_removed": 1,
                    "lines_added": 2,
                    "old": {
                        "path": "setup.py",
                        "escaped_path": "setup.py",
                        "type": "commit_file",
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/e1749643d655d7c7014001a6c0f58abaf42ad850/setup.py"
                            }
                        }
                    },
                    "new": {
                        "path": "setup.py",
                        "escaped_path": "setup.py",
                        "type": "commit_file",
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/d222fa235229c55dad20b190b0b571adf737d5a6/setup.py"
                            }
                        }
                    }
                }
            ],
            "page": 1,
            "size": 1
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_diffstats"
          description: The diff stats
        "555":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If generating the diffstat timed out.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Compare two commit diff stats
      tags:
        - Commits
    parameters:
      - description: Generate diffs that ignore whitespace
        in: query
        name: ignore_whitespace
        required: false
        schema:
          type: boolean
      - description: |-
          This parameter is deprecated and will be removed at the end
          of 2022. The 'topic' parameter should be used instead. The
          'merge' and 'topic' parameters cannot be both used at the same
          time.

          If true, the source commit is merged into the
          destination commit, and then a diffstat from the
          destination to the merge result is returned. If false,
          a simple 'two dot' diffstat between the source and
          destination is returned. True if omitted.
        in: query
        name: merge
        required: false
        schema:
          type: boolean
      - description: |-
          Limit the diffstat to a particular file (this parameter
          can be repeated for multiple paths).
        in: query
        name: path
        required: false
        schema:
          type: string
      - description: Whether to perform rename detection, true if omitted.
        in: query
        name: renames
        required: false
        schema:
          type: boolean
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          A commit SHA (e.g. `3a8b42`) or a commit range using double dot
          notation (e.g. `3a8b42..9ff173`).
        in: path
        name: spec
        required: true
        schema:
          type: string
      - description: |-
          If true, returns 2-way 'three-dot' diff.
          This is a diff between the source commit and the merge base
          of the source commit and the destination commit.
          If false, a simple 'two dot' diff between the source and
          destination is returned.
        in: query
        name: topic
        required: false
        schema:
          type: boolean
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/downloads":
    get:
      description: Returns a list of download links associated with the repository.
      responses:
        "200":
          description: Returns a paginated list of the downloads associated with the repository.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: User is not authorized to read from the repository.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List download artifacts
      tags:
        - Downloads
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Upload new download artifacts.

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

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

        When a file is uploaded with the same name as an existing artifact,
        then the existing file will be replaced.
      responses:
        "201":
          description: The artifact was uploaded sucessfully.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Bad Request.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: User is not authorized to write to the repository.
        "406":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Unsupported Content-Type. Use multiplart/form-data.
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Upload a download artifact
      tags:
        - Downloads
  "/repositories/{workspace}/{repo_slug}/downloads/{filename}":
    delete:
      description: Deletes the specified download artifact from the repository.
      responses:
        "204":
          description: The specified download artifact was deleted.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: User is not authorized to write to the repository.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified download does not exist.
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Delete a download artifact
      tags:
        - Downloads
    get:
      description: |-
        Return a redirect to the contents of a download artifact.

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

            $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt
            Hello World
      responses:
        "302":
          description: Redirects to the url of the specified download artifact.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: User is not authorized to read from the repository.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified download artifact does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get a download artifact link
      tags:
        - Downloads
    parameters:
      - description: Name of the file.
        in: path
        name: filename
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/effective-branching-model":
    get:
      description: ""
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/effective_repo_branching_model"
          description: The effective branching model object
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have read access to the repository
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get the effective, or currently applied, branching model for a repository
      tags:
        - Branching model
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/effective-default-reviewers":
    get:
      description: |-
        Returns the repository's effective default reviewers. This includes both default
        reviewers defined at the repository level as well as those inherited from its project.

        These are the users that are automatically added as reviewers on every
        new pull request that is created.

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/{workspace_slug}/{repo_slug}/effective-default-reviewers?page=1&pagelen=20
        {
            "pagelen": 20,
            "values": [
                {
                    "user": {
                        "display_name": "Patrick Wolf",
                        "uuid": "{9565301a-a3cf-4b5d-88f4-dd6af8078d7e}"
                    },
                    "reviewer_type": "project",
                    "type": "default_reviewer",
                },
                {
                    "user": {
                        "display_name": "Davis Lee",
                        "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}"
                    },
                    "reviewer_type": "repository",
                    "type": "default_reviewer",
                }
            ],
            "page": 1,
            "size": 2
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_default_reviewer_and_type"
          description: The paginated list of effective default reviewers
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to view the default reviewers
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List effective default reviewers
      tags:
        - Pullrequests
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/environments":
    get:
      description: Find environments
      operationId: getEnvironmentsForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_environments"
          description: The matching environments.
      summary: List environments
      tags:
        - Deployments
    post:
      description: Create an environment.
      operationId: createEnvironment
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/deployment_environment"
        description: The environment to create.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deployment_environment"
          description: The environment was created.
          headers:
            Location:
              description: The URL of the newly created environment.
              schema:
                type: string
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository does not exist.
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: An environment host with the provided name already exists.
      summary: Create an environment
      tags:
        - Deployments
  "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}":
    delete:
      description: Delete an environment
      operationId: deleteEnvironmentForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The environment UUID.
          in: path
          name: environment_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The environment was deleted.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No account or repository with the UUID provided exists.
      summary: Delete an environment
      tags:
        - Deployments
    get:
      description: Retrieve an environment
      operationId: getEnvironmentForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The environment UUID.
          in: path
          name: environment_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/deployment_environment"
          description: The environment.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No account, repository or environment with the UUID provided exists.
      summary: Get an environment
      tags:
        - Deployments
  "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes":
    post:
      description: Update an environment
      operationId: updateEnvironmentForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The environment UUID.
          in: path
          name: environment_uuid
          required: true
          schema:
            type: string
      responses:
        "202":
          description: The environment update request was accepted.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No account, repository or environment with the UUID provided exists.
      summary: Update an environment
      tags:
        - Deployments
  "/repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path}":
    get:
      description: |-
        Returns a paginated list of commits that modified the specified file.

        Commits are returned in reverse chronological order. This is roughly
        equivalent to the following commands:

            $ git log --follow --date-order <sha> <path>

        By default, Bitbucket will follow renames and the path name in the
        returned entries reflects that. This can be turned off using the
        `?renames=false` query parameter.

        Results are returned in descending chronological order by default, and
        like most endpoints you can
        [filter and sort](/cloud/bitbucket/rest/intro/#filtering) the response to
        only provide exactly the data you want.

        For example, if you wanted to find commits made before 2011-05-18
        against a file named `README.rst`, but you only wanted the path and
        date, your query would look like this:

        ```
        $ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\
          '?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18'
        {
          "values": [
            {
              "commit": {
                "date": "2011-05-17T07:32:09+00:00"
              },
              "path": "README.rst"
            },
            {
              "commit": {
                "date": "2011-05-16T06:33:28+00:00"
              },
              "path": "README.txt"
            },
            {
              "commit": {
                "date": "2011-05-16T06:15:39+00:00"
              },
              "path": "README.txt"
            }
          ]
        }
        ```

        In the response you can see that the file was renamed to `README.rst`
        by the commit made on 2011-05-16, and was previously named `README.txt`.
      parameters:
        - description: |-
            
            When `true`, Bitbucket will follow the history of the file across
            renames (this is the default behavior). This can be turned off by
            specifying `false`.
          in: query
          name: renames
          required: false
          schema:
            type: string
        - description: |-
            
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            
            Name of a response property sort the result by as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_files"
          description: A paginated list of commits that modified the specified file
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List commits that modified a file
      tags:
        - Source
        - Repositories
    parameters:
      - description: The commit's SHA1.
        in: path
        name: commit
        required: true
        schema:
          type: string
      - description: Path to the file.
        in: path
        name: path
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/forks":
    get:
      description: |-
        Returns a paginated list of all the forks of the specified
        repository.
      parameters:
        - description: |
            Filters the result based on the authenticated user's role on each repository.

            * **member**: returns repositories to which the user has explicit read access
            * **contributor**: returns repositories to which the user has explicit write access
            * **admin**: returns repositories to which the user has explicit administrator access
            * **owner**: returns all repositories owned by the current user
          in: query
          name: role
          required: false
          schema:
            enum:
              - admin
              - contributor
              - member
              - owner
            type: string
        - description: |
            Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_repositories"
          description: All forks.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List repository forks
      tags:
        - Repositories
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new fork of the specified repository.

        #### Forking a repository

        To create a fork, specify the workspace explicitly as part of the
        request body:

        ```
        $ curl -X POST -u jdoe https://api.bitbucket.org/2.0/repositories/atlassian/bbql/forks \
          -H 'Content-Type: application/json' -d '{
            "name": "bbql_fork",
            "workspace": {
              "slug": "atlassian"
            }
        }'
        ```

        To fork a repository into the same workspace, also specify a new `name`.

        When you specify a value for `name`, it will also affect the `slug`.
        The `slug` is reflected in the repository URL of the new fork. It is
        derived from `name` by substituting non-ASCII characters, removes
        whitespace, and changes characters to lower case. For example,
        `My repo` would turn into `my_repo`.

        You need contributor access to create new forks within a workspace.


        #### Change the properties of a new fork

        By default the fork inherits most of its properties from the parent.
        However, since the optional POST body document follows the normal
        `repository` JSON schema and you can override the new fork's
        properties.

        Properties that can be overridden include:

        * description
        * fork_policy
        * language
        * mainbranch
        * is_private (note that a private repo's fork_policy might prohibit
          the creation of public forks, in which `is_private=False` would fail)
        * has_issues (to initialize or disable the new repo's issue tracker --
          note that the actual contents of the parent repository's issue
          tracker are not copied during forking)
        * has_wiki (to initialize or disable the new repo's wiki --
          note that the actual contents of the parent repository's wiki are not
          copied during forking)
        * project (when forking into a private project, the fork's `is_private`
          must be `true`)

        Properties that cannot be modified include:

        * scm
        * parent
        * full_name
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/repository"
        description: A repository object. This can be left blank.
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository"
          description: The newly created fork.
          headers:
            Location:
              description: The URL of the newly created fork
              schema:
                type: string
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Fork a repository
      tags:
        - Repositories
  "/repositories/{workspace}/{repo_slug}/hooks":
    get:
      description: Returns a paginated list of webhooks installed on this repository.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_webhook_subscriptions"
          description: The paginated list of installed webhooks.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have permission to access the webhooks.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: List webhooks for a repository
      tags:
        - Repositories
        - Webhooks
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new webhook on the specified repository.

        Example:

        ```
        $ curl -X POST -u credentials -H 'Content-Type: application/json'
          https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo-slug/hooks
          -d '
            {
              "description": "Webhook Description",
              "url": "https://example.com/",
              "active": true,
              "events": [
                "repo:push",
                "issue:created",
                "issue:updated"
              ]
            }'
        ```

        Note that this call requires the webhook scope, as well as any scope
        that applies to the events that the webhook subscribes to. In the
        example above that means: `webhook`, `repository` and `issue`.

        Also note that the `url` must properly resolve and cannot be an
        internal, non-routed address.
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/webhook_subscription"
          description: If the webhook was registered successfully.
          headers:
            Location:
              description: The URL of new newly created webhook.
              schema:
                type: string
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have permission to install webhooks on the specified repository.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: Create a webhook for a repository
      tags:
        - Repositories
        - Webhooks
  "/repositories/{workspace}/{repo_slug}/hooks/{uid}":
    delete:
      description: |-
        Deletes the specified webhook subscription from the given
        repository.
      responses:
        "204":
          description: When the webhook was deleted successfully
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have permission to delete the webhook.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the webhook or repository does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: Delete a webhook for a repository
      tags:
        - Repositories
        - Webhooks
    get:
      description: |-
        Returns the webhook with the specified id installed on the specified
        repository.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/webhook_subscription"
          description: The webhook subscription object.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the webhook or repository does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: Get a webhook for a repository
      tags:
        - Repositories
        - Webhooks
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: Installed webhook's ID
        in: path
        name: uid
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Updates the specified webhook subscription.

        The following properties can be mutated:

        * `description`
        * `url`
        * `active`
        * `events`
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/webhook_subscription"
          description: The webhook subscription object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have permission to update the webhook.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the webhook or repository does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: Update a webhook for a repository
      tags:
        - Repositories
        - Webhooks
  "/repositories/{workspace}/{repo_slug}/issues":
    get:
      description: Returns the issues in the issue tracker.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_issues"
          description: A paginated list of the issues matching any filter criteria that were provided.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: List issues
      tags:
        - Issue tracker
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new issue.

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

        The authenticated user is used for the issue's `reporter` field.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/issue"
        description: The new issue. The only required element is `title`. All other elements can be omitted from the body.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue"
          description: The newly created issue.
          headers:
            Location:
              description: The (absolute) URL of the newly created issue.
              schema:
                type: string
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the request wasn't authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the authenticated user isn't authorized to create the issue.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue:write
        - basic: []
        - api_key: []
      summary: Create an issue
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/issues/export":
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        A POST request to this endpoint initiates a new background celery task that archives the repo's issues.

        For example, you can run:

        curl -u <username> -X POST http://api.bitbucket.org/2.0/repositories/<owner_username>/<repo_slug>/
        issues/export

        When the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the
        'Location' response header. This url is the endpoint for where the user can obtain their zip files."
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/export_options"
        description: The options to apply to the export. Available options include `project_key` and `project_name` which, if specified, are used as the project key and name in the exported Jira json format. Option `send_email` specifies whether an email should be sent upon export result. Option `include_attachments` specifies whether attachments are included in the export.
      responses:
        "202":
          description: The export job has been accepted
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated properly
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the authenticated user does not have admin permission on the repo
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The repo does not exist or does not have an issue tracker
      security:
        - oauth2:
            - issue
            - repository:admin
        - basic: []
        - api_key: []
      summary: Export issues
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zip":
    get:
      description: |-
        This endpoint is used to poll for the progress of an issue export
        job and return the zip file after the job is complete.
        As long as the job is running, this will return a 200 response
        with in the response body a description of the current status.

        After the job has been scheduled, but before it starts executing, this
        endpoint's response is:

        {
         "type": "issue_job_status",
         "status": "ACCEPTED",
         "phase": "Initializing",
         "total": 0,
         "count": 0,
         "pct": 0
        }


        Then once it starts running, it becomes:

        {
         "type": "issue_job_status",
         "status": "STARTED",
         "phase": "Attachments",
         "total": 15,
         "count": 11,
         "pct": 73
        }

        Once the job has successfully completed, it returns a stream of the zip file.
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue_job_status"
          description: Export job accepted
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated properly
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the authenticated user does not have admin permission on the repo
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No export job has begun
      security:
        - oauth2:
            - issue
            - repository:admin
        - basic: []
        - api_key: []
      summary: Check issue export status
      tags:
        - Issue tracker
    parameters:
      - description: The name of the repo
        in: path
        name: repo_name
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: The ID of the export task
        in: path
        name: task_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/issues/import":
    get:
      description: |-
        When using GET, this endpoint reports the status of the current import task. Request example:

        ```
        $ curl -u <username> -X GET https://api.bitbucket.org/2.0/repositories/<owner_username>/<repo_slug>/issues/import
        ```

        After the job has been scheduled, but before it starts executing, this endpoint's response is:

        ```
        < HTTP/1.1 202 Accepted
        {
            "type": "issue_job_status",
            "status": "PENDING",
            "phase": "Attachments",
            "total": 15,
            "count": 0,
            "percent": 0
        }
        ```

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

        After it is finished, it becomes a 200 response with status SUCCESS or FAILURE.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue_job_status"
          description: Import job complete with either FAILURE or SUCCESS status
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue_job_status"
          description: Import job started
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated properly
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the authenticated user does not have admin permission on the repo
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No export job has begun
      security:
        - oauth2:
            - issue:write
            - repository:admin
        - basic: []
        - api_key: []
      summary: Check issue import status
      tags:
        - Issue tracker
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All
        existing issues will be deleted and replaced by the contents of the imported zip file.

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

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

        When the import job is accepted, here is example output:

        ```
        < HTTP/1.1 202 Accepted

        {
            "type": "issue_job_status",
            "status": "ACCEPTED",
            "phase": "Attachments",
            "total": 15,
            "count": 0,
            "percent": 0
        }
        ```
      responses:
        "202":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue_job_status"
          description: Import job accepted
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated properly
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the authenticated user does not have admin permission on the repo
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No export job has begun
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Import already running
      security:
        - oauth2:
            - issue:write
            - repository:admin
        - basic: []
        - api_key: []
      summary: Import issues
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/issues/{issue_id}":
    delete:
      description: |-
        Deletes the specified issue. This requires write access to the
        repository.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue"
          description: The issue object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the authenticated user isn't authorized to delete the issue.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue:write
        - basic: []
        - api_key: []
      summary: Delete an issue
      tags:
        - Issue tracker
    get:
      description: Returns the specified issue.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue"
          description: The issue object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the authenticated user isn't authorized to access the issue.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
        "410":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified issue is unavailable.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: Get an issue
      tags:
        - Issue tracker
    parameters:
      - description: The issue id
        in: path
        name: issue_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Modifies the issue.

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

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

        Each time an issue is edited in the UI or through the API, an immutable
        change record is created under the `/issues/123/changes` endpoint. It
        also has a comment associated with the change.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue"
          description: The updated issue object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the authenticated user isn't authorized to access the issue.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue:write
        - basic: []
        - api_key: []
      summary: Update an issue
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments":
    get:
      description: |-
        Returns all attachments for this issue.

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

        The files are always ordered by their upload date.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_issue_attachments"
          description: A paginated list of all attachments for this issue.
        "401":
          description: If the issue tracker is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: List attachments for an issue
      tags:
        - Issue tracker
    parameters:
      - description: The issue id
        in: path
        name: issue_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Upload new issue attachments.

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

        When a file is uploaded with the same name as an existing attachment,
        then the existing file will be replaced.
      responses:
        "201":
          description: An empty response document.
          headers:
            Location:
              description: The URL to the issue's collection of attachments.
              schema:
                type: string
        "400":
          description: If no files were uploaded, or if the wrong `Content-Type` was used.
        "401":
          description: If the issue tracker is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue:write
        - basic: []
        - api_key: []
      summary: Upload an attachment to an issue
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}":
    delete:
      description: Deletes an attachment.
      responses:
        "204":
          description: Indicates that the deletion was successful
        "401":
          description: If the issue tracker is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue:write
        - basic: []
        - api_key: []
      summary: Delete an attachment for an issue
      tags:
        - Issue tracker
    get:
      description: |-
        Returns the contents of the specified file attachment.

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

        The redirect URL contains a one-time token that has a limited lifetime.
        As a result, the link should not be persisted, stored, or shared.
      responses:
        "302":
          description: A redirect to the file's contents
          headers:
            Location:
              schema:
                type: string
        "401":
          description: If the issue tracker is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: Get attachment for an issue
      tags:
        - Issue tracker
    parameters:
      - description: The issue id
        in: path
        name: issue_id
        required: true
        schema:
          type: string
      - description: Path to the file.
        in: path
        name: path
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes":
    get:
      description: |-
        Returns the list of all changes that have been made to the specified
        issue. Changes are returned in chronological order with the oldest
        change first.

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

        Note that this operation is changing significantly, due to privacy changes.
        See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-the-issue-changes-api)
        for details.

        ```
        $ curl -s https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes - | jq .

        {
          "pagelen": 20,
          "values": [
            {
              "changes": {
                "priority": {
                  "new": "trivial",
                  "old": "major"
                },
                "assignee": {
                  "new": "",
                  "old": "evzijst"
                },
                "assignee_account_id": {
                  "new": "",
                  "old": "557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443"
                },
                "kind": {
                  "new": "enhancement",
                  "old": "bug"
                }
              },
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes/2"
                },
                "html": {
                  "href": "https://bitbucket.org/evzijst/dogslow/issues/1#comment-2"
                }
              },
              "issue": {
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1"
                  }
                },
                "type": "issue",
                "id": 1,
                "repository": {
                  "links": {
                    "self": {
                      "href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow"
                    },
                    "html": {
                      "href": "https://bitbucket.org/evzijst/dogslow"
                    },
                    "avatar": {
                      "href": "https://bitbucket.org/evzijst/dogslow/avatar/32/"
                    }
                  },
                  "type": "repository",
                  "name": "dogslow",
                  "full_name": "evzijst/dogslow",
                  "uuid": "{988b17c6-1a47-4e70-84ee-854d5f012bf6}"
                },
                "title": "Updated title"
              },
              "created_on": "2018-03-03T00:35:28.353630+00:00",
              "user": {
                "username": "evzijst",
                "nickname": "evzijst",
                "display_name": "evzijst",
                "type": "user",
                "uuid": "{aaa7972b-38af-4fb1-802d-6e3854c95778}",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/users/evzijst"
                  },
                  "html": {
                    "href": "https://bitbucket.org/evzijst/"
                  },
                  "avatar": {
                    "href": "https://bitbucket.org/account/evzijst/avatar/32/"
                  }
                }
              },
              "message": {
                "raw": "Removed assignee, changed kind and priority.",
                "markup": "markdown",
                "html": "<p>Removed assignee, changed kind and priority.</p>",
                "type": "rendered"
              },
              "type": "issue_change",
              "id": 2
            }
          ],
          "page": 1
        }
        ```

        Changes support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) that
        can be used to search for specific changes. For instance, to see
        when an issue transitioned to "resolved":

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

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

        N.B.

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

        The `changes.assignee` field is deprecated will disappear in the
        future. Use `changes.assignee_account_id` instead.
      parameters:
        - description: |-
            
            Query string to narrow down the response. See
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            
            Name of a response property to sort results. See
            [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results)
            for details.
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_log_entries"
          description: Returns all the issue changes that were made on the specified issue.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: List changes on an issue
      tags:
        - Issue tracker
    parameters:
      - description: The issue id
        in: path
        name: issue_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Makes a change to the specified issue.

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

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

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

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

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

        This call requires authentication. Private repositories or private
        issue trackers require the caller to authenticate with an account that
        has appropriate authorization.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/issue_change"
        description: The new issue state change. The only required elements are `changes.[].new`. All other elements can be omitted from the body.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue_change"
          description: The newly created issue change.
          headers:
            Location:
              description: The (absolute) URL of the newly created issue change.
              schema:
                type: string
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the request wasn't authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the authenticated user isn't authorized to modify the issue.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue:write
        - basic: []
        - api_key: []
      summary: Modify the state of an issue
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes/{change_id}":
    get:
      description: |-
        Returns the specified issue change object.

        This resource is only available on repositories that have the issue
        tracker enabled.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue_change"
          description: The specified issue change object.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue change does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: Get issue change object
      tags:
        - Issue tracker
    parameters:
      - description: The issue change id
        in: path
        name: change_id
        required: true
        schema:
          type: string
      - description: The issue id
        in: path
        name: issue_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments":
    get:
      description: |-
        Returns a paginated list of all comments that were made on the
        specified issue.

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

        This endpoint also supports filtering and sorting of the results. See
        [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.
      parameters:
        - description: |-
            
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_issue_comments"
          description: A paginated list of issue comments.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: List comments on an issue
      tags:
        - Issue tracker
    parameters:
      - description: The issue id
        in: path
        name: issue_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new issue comment.

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/ \
          -X POST -u evzijst \
          -H 'Content-Type: application/json' \
          -d '{"content": {"raw": "Lorem ipsum."}}'
        ```
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/issue_comment"
        description: The new issue comment object.
        required: true
      responses:
        "201":
          description: The newly created comment.
          headers:
            Location:
              description: The location of the newly issue comment.
              schema:
                type: string
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: "If the input was invalid, or if the comment being created is detected as spam "
      security:
        - oauth2:
            - issue:write
        - basic: []
        - api_key: []
      summary: Create a comment on an issue
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}":
    delete:
      description: Deletes the specified comment.
      responses:
        "204":
          description: Indicates successful deletion.
      security:
        - oauth2:
            - issue:write
        - basic: []
        - api_key: []
      summary: Delete a comment on an issue
      tags:
        - Issue tracker
    get:
      description: Returns the specified issue comment object.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue_comment"
          description: The issue comment.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: Get a comment on an issue
      tags:
        - Issue tracker
    parameters:
      - description: The id of the comment.
        in: path
        name: comment_id
        required: true
        schema:
          type: integer
      - description: The issue id
        in: path
        name: issue_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Updates the content of the specified issue comment. Note that only
        the `content.raw` field can be modified.

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/5728901 \
          -X PUT -u evzijst \
          -H 'Content-Type: application/json' \
          -d '{"content": {"raw": "Lorem ipsum."}'
        ```
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/issue_comment"
        description: The updated comment.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/issue_comment"
          description: The updated issue comment.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: "If the input was invalid, or if the update to the comment is detected as spam "
      security:
        - oauth2:
            - issue:write
        - basic: []
        - api_key: []
      summary: Update a comment on an issue
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote":
    delete:
      description: Retract your vote.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Unexpected error.
      security:
        - oauth2:
            - account:write
            - issue:write
        - basic: []
        - api_key: []
      summary: Remove vote for an issue
      tags:
        - Issue tracker
    get:
      description: |-
        Check whether the authenticated user has voted for this issue.
        A 204 status code indicates that the user has voted, while a 404
        implies they haven't.
      responses:
        "204":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user has not voted for this issue.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user has not voted for this issue, or when the repo does not exist, or does not have an issue tracker.
      security:
        - oauth2:
            - account
            - issue
        - basic: []
        - api_key: []
      summary: Check if current user voted for an issue
      tags:
        - Issue tracker
    parameters:
      - description: The issue id
        in: path
        name: issue_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Vote for this issue.

        To cast your vote, do an empty PUT. The 204 status code indicates that
        the operation was successful.
      responses:
        "204":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Indicating the authenticated user has cast their vote successfully.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - account:write
            - issue
        - basic: []
        - api_key: []
      summary: Vote for an issue
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch":
    delete:
      description: Stop watching this issue.
      responses:
        "204":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Indicates that the authenticated user successfully stopped watching this issue.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or issue does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - account:write
            - issue:write
        - basic: []
        - api_key: []
      summary: Stop watching an issue
      tags:
        - Issue tracker
    get:
      description: |-
        Indicated whether or not the authenticated user is watching this
        issue.
      responses:
        "204":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user is watching this issue.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.
      security:
        - oauth2:
            - account
            - issue
        - basic: []
        - api_key: []
      summary: Check if current user is watching a issue
      tags:
        - Issue tracker
    parameters:
      - description: The issue id
        in: path
        name: issue_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Start watching this issue.

        To start watching this issue, do an empty PUT. The 204 status code
        indicates that the operation was successful.
      responses:
        "204":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Indicates that the authenticated user successfully started watching this issue.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.
      security:
        - oauth2:
            - account:write
            - issue
        - basic: []
        - api_key: []
      summary: Watch an issue
      tags:
        - Issue tracker
  "/repositories/{workspace}/{repo_slug}/merge-base/{revspec}":
    get:
      description: |-
        Returns the best common ancestor between two commits, specified in a revspec
        of 2 commits (e.g. 3a8b42..9ff173).

        If more than one best common ancestor exists, only one will be returned. It is
        unspecified which will be returned.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/commit"
          description: The merge base of the provided spec.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to any of the repositories specified.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository or ref in the spec does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get the common ancestor between two commits
      tags:
        - Commits
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          A commit range using double dot notation (e.g. `3a8b42..9ff173`).
        in: path
        name: revspec
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/milestones":
    get:
      description: |-
        Returns the milestones that have been defined in the issue tracker.

        This resource is only available on repositories that have the issue
        tracker enabled.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_milestones"
          description: The milestones that have been defined in the issue tracker.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: List milestones
      tags:
        - Issue tracker
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/milestones/{milestone_id}":
    get:
      description: Returns the specified issue tracker milestone object.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/milestone"
          description: The specified milestone object.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or milestone does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: Get a milestone
      tags:
        - Issue tracker
    parameters:
      - description: The milestone's id
        in: path
        name: milestone_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/override-settings":
    get:
      description: ""
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository_inheritance_state"
          description: The repository setting inheritance state
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If no repository exists at this location
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Retrieve the inheritance state for repository settings
      tags:
        - Repositories
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: ""
      responses:
        "204":
          description: The repository setting inheritance state was set and no content returned
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If no repository exists at this location
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: "Set the inheritance state for repository settings

        \                "
      tags:
        - Repositories
  "/repositories/{workspace}/{repo_slug}/patch/{spec}":
    get:
      description: |-
        Produces a raw patch for a single commit (diffed against its first
        parent), or a patch-series for a revspec of 2 commits (e.g.
        `3a8b42..9ff173` where the first commit represents the source and the
        second commit the destination).

        In case of the latter (diffing a revspec), a patch series is returned
        for the commits on the source branch (`3a8b42` and its ancestors in
        our example).

        While similar to diffs, patches:

        * Have a commit header (username, commit message, etc)
        * Do not support the `path=foo/bar.py` query parameter

        The raw patch is returned as-is, in whatever encoding the files in the
        repository use. It is not decoded into unicode. As such, the
        content-type is `text/plain`.
      responses:
        "200":
          description: The raw patches
        "555":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |-
            If the diff was too large and timed out.

            Since this endpoint does not employ any form of pagination, but
            instead returns the diff as a single document, it can run into
            trouble on very large diffs. If Bitbucket times out in cases
            like these, a 555 status code is returned.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get a patch for two commits
      tags:
        - Commits
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          A commit SHA (e.g. `3a8b42`) or a commit range using double dot
          notation (e.g. `3a8b42..9ff173`).
        in: path
        name: spec
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/permissions-config/groups":
    get:
      description: |-
        Returns a paginated list of explicit group permissions for the given repository.
        This endpoint does not support BBQL features.

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups

        HTTP/1.1 200
        Location: https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups

        {
          "pagelen": 10,
          "values": [
            {
              "type": "repository_group_permission",
              "group": {
                "type": "group",
                "name": "Administrators",
                "slug": "administrators"
              },
              "permission": "admin",
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/
                           geordi/permissions-config/groups/administrators"
                }
              }
            },
            {
              "type": "repository_group_permission",
              "group": {
                "type": "group",
                "name": "Developers",
                "slug": "developers"
              },
              "permission": "read",
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/
                           geordi/permissions-config/groups/developers"
                }
              }
            }
          ],
          "page": 1,
          "size": 2
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_repository_group_permissions"
          description: Paginated of explicit group permissions on the repository.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The user couldn't be authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the repository.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: One or both of the workspace and repository doesn't exist for the given identifiers.
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: List explicit group permissions for a repository
      tags:
        - Repositories
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}":
    delete:
      description: |-
        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.

        Example:

        $ curl -X DELETE https://api.bitbucket.org/2.0/repositories/atlassian_tutorial
        /geordi/permissions-config/groups/developers


        HTTP/1.1 204
      responses:
        "204":
          description: Group permission deleted
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The user couldn't be authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the repository, or the authentication method was not via app password.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace does not exist, the repository does not exist, or the group does not exist.
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Delete an explicit group permission for a repository
      tags:
        - Repositories
    get:
      description: |-
        Returns the group permission for a given group slug and repository

        Only users with admin permission for the repository may access this resource.

        Permissions can be:

        * `admin`
        * `write`
        * `read`
        * `none`

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers

        HTTP/1.1 200
        Location:
        https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers

        {
            "type": "repository_group_permission",
            "group": {
                "type": "group",
                "name": "Developers",
                "slug": "developers"
            },
            "repository": {
                "type": "repository",
                "name": "geordi",
                "full_name": "atlassian_tutorial/geordi",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
            },
            "permission": "read",
            "links": {
              "self": {
                "href":
                "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers"
              }
            }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository_group_permission"
          description: Group permission for group slug and repository
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The user couldn't be authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the repository.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The given user, workspace, and/or repository could not be found
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Get an explicit group permission for a repository
      tags:
        - Repositories
    parameters:
      - description: Slug of the requested group.
        in: path
        name: group_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Updates the group permission if it exists.

        Only users with admin permission for the repository may access this resource.

        The only authentication method supported for this endpoint is via app passwords.

        Permissions can be:

        * `admin`
        * `write`
        * `read`

        Example:
        ```
        $ curl -X PUT -H "Content-Type: application/json"
        https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers
        -d
        '{
            "permission": "write"
        }'

        HTTP/1.1 200
        Location:
        https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers

        {
            "type": "repository_group_permission",
            "group": {
                "type": "group",
                "name": "Developers",
                "slug": "developers"
            },
            "repository": {
                "type": "repository",
                "name": "geordi",
                "full_name": "atlassian_tutorial/geordi",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
            },
            "permission": "write",
            "links": {
              "self": {
                "href":
                "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers"
              }
            }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository_group_permission"
          description: Group permission updated
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No permission value was provided or the value is invalid(not one of read, write, or admin)
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The user couldn't be authenticated.
        "402":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: You have reached your plan's user limit and must upgrade before giving access to additional users.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the repository, or the authentication method was not via app password.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace does not exist, the repository does not exist, or the group does not exist.
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Update an explicit group permission for a repository
      tags:
        - Repositories
  "/repositories/{workspace}/{repo_slug}/permissions-config/users":
    get:
      description: |-
        Returns a paginated list of explicit user permissions for the given repository.
        This endpoint does not support BBQL features.

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users

        {
          "pagelen": 10,
          "values": [
            {
                "type": "repository_user_permission",
                "user": {
                    "type": "user",
                    "display_name": "Colin Cameron",
                    "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}",
                    "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a"
                },
                "permission": "admin",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/
                             permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a"
                  }
                }
            },
            {
              "type": "repository_user_permission",
              "user": {
                "type": "user",
                "display_name": "Sean Conaty",
                "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}",
                "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c"
              },
              "permission": "write",
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0//repositories/atlassian_tutorial/geordi/
                           permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c"
                }
              }
            }
          ],
          "page": 1,
          "size": 2
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_repository_user_permissions"
          description: Paginated of explicit user permissions on the repository.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The user couldn't be authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the repository.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No repository exists for the given repository slug and workspace.
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: List explicit user permissions for a repository
      tags:
        - Repositories
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}":
    delete:
      description: |-
        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.

        ```
        $ curl -X DELETE https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/
        permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a


        HTTP/1.1 204
        ```
      responses:
        "204":
          description: The repository user permission was deleted and no content returned.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The user couldn't be authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the repository, or the authentication method was not via app password.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: One or more of the workspace, repository, and user doesn't exist for the given identifiers.
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Delete an explicit user permission for a repository
      tags:
        - Repositories
    get:
      description: |-
        Returns the explicit user permission for a given user and repository.

        Only users with admin permission for the repository may access this resource.

        Permissions can be:

        * `admin`
        * `write`
        * `read`
        * `none`

        Example:

        ```
        $ curl 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/
                permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'

        HTTP/1.1 200
        Location: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/
                   permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'

        {
            "type": "repository_user_permission",
            "user": {
                "type": "user",
                "display_name": "Colin Cameron",
                "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}",
                "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a"
            },
            "repository": {
                "type": "repository",
                "name": "geordi",
                "full_name": "atlassian_tutorial/geordi",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
            },
            "permission": "admin",
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/
                             permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a"
                }
            }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository_user_permission"
          description: Explicit user permission for user and repository
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The user couldn't be authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the repository.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: One or both of the workspace and repository doesn't exist for the given identifiers.
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Get an explicit user permission for a repository
      tags:
        - Repositories
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the UUID of the account, surrounded by curly-braces, for
          example: `{account UUID}`, OR an Atlassian Account ID.
        in: path
        name: selected_user_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Updates the explicit user permission for a given user and repository. The selected user must be a member of
        the workspace, and cannot be the workspace owner.
        Only users with admin permission for the repository may access this resource.

        The only authentication method for this endpoint is via app passwords.

        Permissions can be:

        * `admin`
        * `write`
        * `read`

        Example:

        ```
        $ curl -X PUT -H "Content-Type: application/json" 'https://api.bitbucket.org/2.0/repositories/
        atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'
        -d         '{
            "permission": "write"
        }'

        HTTP/1.1 200
        Location: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/
        permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'


        {
            "type": "repository_user_permission",
            "user": {
                "type": "user",
                "display_name": "Colin Cameron",
                "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}",
                "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a"
            },
            "repository": {
                "type": "repository",
                "name": "geordi",
                "full_name": "atlassian_tutorial/geordi",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
            },
            "permission": "write",
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/
                             permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a"
                }
            }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/repository_user_permission"
          description: Explicit user permission updated
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No permission value was provided or the value is invalid (not one of read, write, or admin), or the selected user is not a valid user to update.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The user couldn't be authenticated.
        "402":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: You have reached your plan's user limit and must upgrade before giving access to additional users.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the repository, or the authentication method was not via app password.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: One or more of the workspace, repository, and selected user doesn't exist for the given identifiers.
      security:
        - oauth2:
            - repository:admin
        - basic: []
        - api_key: []
      summary: Update an explicit user permission for a repository
      tags:
        - Repositories
  "/repositories/{workspace}/{repo_slug}/pipelines":
    get:
      description: Find pipelines
      operationId: getPipelinesForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipelines"
          description: The matching pipelines.
      summary: List pipelines
      tags:
        - Pipelines
    post:
      description: |
        Endpoint to create and initiate a pipeline.
        There are a couple of different options to initiate a pipeline, where the payload of the request will determine which type of pipeline will be instantiated.
        # Trigger a Pipeline for a branch
        One way to trigger pipelines is by specifying the branch for which you want to trigger a pipeline.
        The specified branch will be used to determine which pipeline definition from the `bitbucket-pipelines.yml` file will be applied to initiate the pipeline. The pipeline will then do a clone of the repository and checkout the latest revision of the specified branch.

        ### Example

        ```
        $ curl -X POST -is -u username:password \
          -H 'Content-Type: application/json' \
         https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \
          -d '
          {
            "target": {
              "ref_type": "branch",
              "type": "pipeline_ref_target",
              "ref_name": "master"
            }
          }'
        ```
        # Trigger a Pipeline for a commit on a branch or tag
        You can initiate a pipeline for a specific commit and in the context of a specified reference (e.g. a branch, tag or bookmark).
        The specified reference will be used to determine which pipeline definition from the bitbucket-pipelines.yml file will be applied to initiate the pipeline. The pipeline will clone the repository and then do a checkout the specified reference.

        The following reference types are supported:

        * `branch`
        * `named_branch`
        * `bookmark`
         * `tag`

        ### Example

        ```
        $ curl -X POST -is -u username:password \
          -H 'Content-Type: application/json' \
          https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \
          -d '
          {
            "target": {
              "commit": {
                "type": "commit",
                "hash": "ce5b7431602f7cbba007062eeb55225c6e18e956"
              },
              "ref_type": "branch",
              "type": "pipeline_ref_target",
              "ref_name": "master"
            }
          }'
        ```
        # Trigger a specific pipeline definition for a commit
        You can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit.
        In addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition. The resulting pipeline will then clone the repository and checkout the specified revision.

        ### Example

        ```
        $ curl -X POST -is -u username:password \
          -H 'Content-Type: application/json' \
         https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \
         -d '
          {
             "target": {
              "commit": {
                 "hash":"a3c4e02c9a3755eccdc3764e6ea13facdf30f923",
                 "type":"commit"
               },
                "selector": {
                   "type":"custom",
                      "pattern":"Deploy to production"
                  },
                "type":"pipeline_commit_target"
           }
          }'
        ```
        # Trigger a specific pipeline definition for a commit on a branch or tag
        You can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit in the context of a specified reference.
        In addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition, as well as the reference information. The resulting pipeline will then clone the repository a checkout the specified reference.

        ### Example

        ```
        $ curl -X POST -is -u username:password \
          -H 'Content-Type: application/json' \
         https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \
         -d '
          {
             "target": {
              "commit": {
                 "hash":"a3c4e02c9a3755eccdc3764e6ea13facdf30f923",
                 "type":"commit"
               },
               "selector": {
                  "type": "custom",
                  "pattern": "Deploy to production"
               },
               "type": "pipeline_ref_target",
               "ref_name": "master",
               "ref_type": "branch"
             }
          }'
        ```


        # Trigger a custom pipeline with variables
        In addition to triggering a custom pipeline that is defined in your `bitbucket-pipelines.yml` file as shown in the examples above, you can specify variables that will be available for your build. In the request, provide a list of variables, specifying the following for each variable: key, value, and whether it should be secured or not (this field is optional and defaults to not secured).

        ### Example

        ```
        $ curl -X POST -is -u username:password \
          -H 'Content-Type: application/json' \
         https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \
         -d '
          {
            "target": {
              "type": "pipeline_ref_target",
              "ref_type": "branch",
              "ref_name": "master",
              "selector": {
                "type": "custom",
                "pattern": "Deploy to production"
              }
            },
            "variables": [
              {
                "key": "var1key",
                "value": "var1value",
                "secured": true
              },
              {
                "key": "var2key",
                "value": "var2value"
              }
            ]
          }'
        ```

        # Trigger a pull request pipeline

        You can also initiate a pipeline for a specific pull request.

        ### Example

        ```
        $ curl -X POST -is -u username:password \
          -H 'Content-Type: application/json' \
         https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \
         -d '
          {
        	"target": {
              "type": "pipeline_pullrequest_target",
        	  "source": "pull-request-branch",
              "destination": "master",
              "destination_commit": {
              	 "hash" : "9f848b7"
              },
              "commit": {
              	"hash" : "1a372fc"
              },
              "pullrequest" : {
              	"id" : "3"
              },
        	  "selector": {
                "type": "pull-requests",
                "pattern": "**"
              }
            }
          }'
        ```
      operationId: createPipelineForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipeline"
        description: The pipeline to initiate.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline"
          description: The initiated pipeline.
          headers:
            Location:
              description: The URL of the newly created pipeline.
              schema:
                type: string
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository is not enabled, the yml file does not exist in the repository for the given revision, or the request body contained invalid properties.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository was not found.
      summary: Run a pipeline
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines-config/caches":
    delete:
      description: Delete repository cache versions by name.
      operationId: deleteRepositoryPipelineCaches
      parameters:
        - description: The account.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The cache name.
          in: query
          name: name
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The caches were deleted.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace, repository or cache name was not found.
      summary: Delete caches
      tags:
        - Pipelines
    get:
      description: Retrieve the repository pipelines caches.
      operationId: getRepositoryPipelineCaches
      parameters:
        - description: The account.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipeline_caches"
          description: The list of caches for the given repository.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository was not found.
      summary: List caches
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}":
    delete:
      description: Delete a repository cache.
      operationId: deleteRepositoryPipelineCache
      parameters:
        - description: The account.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the cache to delete.
          in: path
          name: cache_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The cache was deleted.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace, repository or cache_uuid with given UUID was not found.
      summary: Delete a cache
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri":
    get:
      description: Retrieve the URI of the content of the specified cache.
      operationId: getRepositoryPipelineCacheContentURI
      parameters:
        - description: The account.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the cache.
          in: path
          name: cache_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_cache_content_uri"
          description: The cache content uri.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace, repository or cache_uuid with given UUID was not found.
      summary: Get cache content URI
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}":
    get:
      description: Retrieve a specified pipeline
      operationId: getPipelineForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The pipeline UUID.
          in: path
          name: pipeline_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline"
          description: The pipeline.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No account, repository or pipeline with the UUID provided exists.
      summary: Get a pipeline
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps":
    get:
      description: Find steps for the given pipeline.
      operationId: getPipelineStepsForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the pipeline.
          in: path
          name: pipeline_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipeline_steps"
          description: The steps.
      summary: List steps for a pipeline
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}":
    get:
      description: Retrieve a given step of a pipeline.
      operationId: getPipelineStepForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the pipeline.
          in: path
          name: pipeline_uuid
          required: true
          schema:
            type: string
        - description: The UUID of the step.
          in: path
          name: step_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_step"
          description: The step.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No account, repository, pipeline or step with the UUID provided exists for the pipeline with the UUID provided.
      summary: Get a step of a pipeline
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log":
    get:
      description: |-
        Retrieve the log file for a given step of a pipeline.

        This endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.
      operationId: getPipelineStepLogForRepository
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the pipeline.
          in: path
          name: pipeline_uuid
          required: true
          schema:
            type: string
        - description: The UUID of the step.
          in: path
          name: step_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The raw log file for this pipeline step.
        "304":
          content:
            application/octet-stream:
              schema:
                $ref: "#/components/schemas/error"
          description: The log has the same etag as the provided If-None-Match header.
        "404":
          content:
            application/octet-stream:
              schema:
                $ref: "#/components/schemas/error"
          description: A pipeline with the given UUID does not exist, a step with the given UUID does not exist in the pipeline or a log file does not exist for the given step.
        "416":
          content:
            application/octet-stream:
              schema:
                $ref: "#/components/schemas/error"
          description: The requested range does not exist for requests that specified the [HTTP Range header](https://tools.ietf.org/html/rfc7233#section-3.1).
      summary: Get log file for a step
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}":
    get:
      description: |-
        Retrieve the log file for a build container or service container.

        This endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.
      operationId: getPipelineContainerLog
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the pipeline.
          in: path
          name: pipeline_uuid
          required: true
          schema:
            type: string
        - description: The UUID of the step.
          in: path
          name: step_uuid
          required: true
          schema:
            type: string
        - description: For the main build container specify the step UUID; for a service container specify the service container UUID
          in: path
          name: log_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The raw log file for the build container or service container.
        "404":
          content:
            application/octet-stream:
              schema:
                $ref: "#/components/schemas/error"
          description: No account, repository, pipeline, step or log exist for the provided path.
      summary: Get the logs for the build container or a service container for a given step of a pipeline.
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports":
    get:
      operationId: getPipelineTestReports
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the pipeline.
          in: path
          name: pipeline_uuid
          required: true
          schema:
            type: string
        - description: The UUID of the step.
          in: path
          name: step_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          description: A summary of test reports for this pipeline step.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No account, repository, pipeline, step or test reports exist for the provided path.
      summary: Get a summary of test reports for a given step of a pipeline.
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases":
    get:
      operationId: getPipelineTestReportTestCases
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the pipeline.
          in: path
          name: pipeline_uuid
          required: true
          schema:
            type: string
        - description: The UUID of the step.
          in: path
          name: step_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Test cases for this pipeline step.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No account, repository, pipeline, step or test reports exist for the provided path.
      summary: Get test cases for a given step of a pipeline.
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons":
    get:
      operationId: getPipelineTestReportTestCaseReasons
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the pipeline.
          in: path
          name: pipeline_uuid
          required: true
          schema:
            type: string
        - description: The UUID of the step.
          in: path
          name: step_uuid
          required: true
          schema:
            type: string
        - description: The UUID of the test case.
          in: path
          name: test_case_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Test case reasons (output).
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: No account, repository, pipeline, step or test case with the UUID provided exists for the pipeline with the UUID provided.
      summary: Get test case reasons (output) for a given test case in a step of a pipeline.
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline":
    post:
      description: Signal the stop of a pipeline and all of its steps that not have completed yet.
      operationId: stopPipeline
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the pipeline.
          in: path
          name: pipeline_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The pipeline has been signaled to stop.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified pipeline has already completed.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Either the account, repository or pipeline with the given UUID does not exist.
      summary: Stop a pipeline
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config":
    get:
      description: Retrieve the repository pipelines configuration.
      operationId: getRepositoryPipelineConfig
      parameters:
        - description: The account.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipelines_config"
          description: The repository pipelines configuration.
      summary: Get configuration
      tags:
        - Pipelines
    put:
      description: Update the pipelines configuration for a repository.
      operationId: updateRepositoryPipelineConfig
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipelines_config"
        description: The updated repository pipelines configuration.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipelines_config"
          description: The repository pipelines configuration was updated.
      summary: Update configuration
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config/build_number":
    put:
      description: Update the next build number that should be assigned to a pipeline. The next build number that will be configured has to be strictly higher than the current latest build number for this repository.
      operationId: updateRepositoryBuildNumber
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipeline_build_number"
        description: The build number to update.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_build_number"
          description: The build number has been configured.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The update failed because the next number was invalid (it should be higher than the current number).
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository was not found.
      summary: Update the next build number
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules":
    get:
      description: Retrieve the configured schedules for the given repository.
      operationId: getRepositoryPipelineSchedules
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipeline_schedules"
          description: The list of schedules.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository was not found.
      summary: List schedules
      tags:
        - Pipelines
    post:
      description: Create a schedule for the given repository.
      operationId: createRepositoryPipelineSchedule
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipeline_schedule_post_request_body"
        description: The schedule to create.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_schedule"
          description: The created schedule.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: There were errors validating the request.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The maximum limit of schedules for this repository was reached.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository was not found.
      summary: Create a schedule
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}":
    delete:
      description: Delete a schedule.
      operationId: deleteRepositoryPipelineSchedule
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The uuid of the schedule.
          in: path
          name: schedule_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The schedule was deleted.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or schedule was not found.
      summary: Delete a schedule
      tags:
        - Pipelines
    get:
      description: Retrieve a schedule by its UUID.
      operationId: getRepositoryPipelineSchedule
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The uuid of the schedule.
          in: path
          name: schedule_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_schedule"
          description: The requested schedule.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or schedule was not found.
      summary: Get a schedule
      tags:
        - Pipelines
    put:
      description: Update a schedule.
      operationId: updateRepositoryPipelineSchedule
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The uuid of the schedule.
          in: path
          name: schedule_uuid
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipeline_schedule_put_request_body"
        description: The schedule to update.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_schedule"
          description: The schedule is updated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or schedule was not found.
      summary: Update a schedule
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions":
    get:
      description: Retrieve the executions of a given schedule.
      operationId: getRepositoryPipelineScheduleExecutions
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The uuid of the schedule.
          in: path
          name: schedule_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipeline_schedule_executions"
          description: The list of executions of a schedule.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository was not found.
      summary: List executions of a schedule
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair":
    delete:
      description: Delete the repository SSH key pair.
      operationId: deleteRepositoryPipelineKeyPair
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The SSH key pair was deleted.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or SSH key pair was not found.
      summary: Delete SSH key pair
      tags:
        - Pipelines
    get:
      description: Retrieve the repository SSH key pair excluding the SSH private key. The private key is a write only field and will never be exposed in the logs or the REST API.
      operationId: getRepositoryPipelineSshKeyPair
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_ssh_key_pair"
          description: The SSH key pair.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or SSH key pair was not found.
      summary: Get SSH key pair
      tags:
        - Pipelines
    put:
      description: Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container.
      operationId: updateRepositoryPipelineKeyPair
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipeline_ssh_key_pair"
        description: The created or updated SSH key pair.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_ssh_key_pair"
          description: The SSH key pair was created or updated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or SSH key pair was not found.
      summary: Update SSH key pair
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts":
    get:
      description: Find repository level known hosts.
      operationId: getRepositoryPipelineKnownHosts
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipeline_known_hosts"
          description: The retrieved known hosts.
      summary: List known hosts
      tags:
        - Pipelines
    post:
      description: Create a repository level known host.
      operationId: createRepositoryPipelineKnownHost
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipeline_known_host"
        description: The known host to create.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_known_host"
          description: The known host was created.
          headers:
            Location:
              description: The URL of the newly created pipeline known host.
              schema:
                type: string
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository does not exist.
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A known host with the provided hostname already exists.
      summary: Create a known host
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}":
    delete:
      description: Delete a repository level known host.
      operationId: deleteRepositoryPipelineKnownHost
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the known host to delete.
          in: path
          name: known_host_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The known host was deleted.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or known host with given UUID was not found.
      summary: Delete a known host
      tags:
        - Pipelines
    get:
      description: Retrieve a repository level known host.
      operationId: getRepositoryPipelineKnownHost
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the known host to retrieve.
          in: path
          name: known_host_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_known_host"
          description: The known host.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or known host with the specified UUID was not found.
      summary: Get a known host
      tags:
        - Pipelines
    put:
      description: Update a repository level known host.
      operationId: updateRepositoryPipelineKnownHost
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the known host to update.
          in: path
          name: known_host_uuid
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipeline_known_host"
        description: The updated known host.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_known_host"
          description: The known host was updated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or known host with the given UUID was not found.
      summary: Update a known host
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config/variables":
    get:
      description: Find repository level variables.
      operationId: getRepositoryPipelineVariables
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipeline_variables"
          description: The retrieved variables.
      summary: List variables for a repository
      tags:
        - Pipelines
    post:
      description: Create a repository level variable.
      operationId: createRepositoryPipelineVariable
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipeline_variable"
        description: The variable to create.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The variable was created.
          headers:
            Location:
              description: The URL of the newly created pipeline variable.
              schema:
                type: string
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or repository does not exist.
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A variable with the provided key already exists.
      summary: Create a variable for a repository
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}":
    delete:
      description: Delete a repository level variable.
      operationId: deleteRepositoryPipelineVariable
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the variable to delete.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The variable was deleted.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or variable with given UUID was not found.
      summary: Delete a variable for a repository
      tags:
        - Pipelines
    get:
      description: Retrieve a repository level variable.
      operationId: getRepositoryPipelineVariable
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the variable to retrieve.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The variable.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or variable with the specified UUID was not found.
      summary: Get a variable for a repository
      tags:
        - Pipelines
    put:
      description: Update a repository level variable.
      operationId: updateRepositoryPipelineVariable
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The UUID of the variable to update.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pipeline_variable"
        description: The updated variable
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The variable was updated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account, repository or variable with the given UUID was not found.
      summary: Update a variable for a repository
      tags:
        - Pipelines
  "/repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}":
    delete:
      description: Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.
      operationId: deleteRepositoryHostedPropertyValue
      parameters:
        - description: The repository container; either the workspace slug or the UUID in curly braces.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      responses:
        "204":
          description: An empty response.
      summary: Delete a repository application property
      tags:
        - properties
    get:
      description: Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.
      operationId: getRepositoryHostedPropertyValue
      parameters:
        - description: The repository container; either the workspace slug or the UUID in curly braces.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/application_property"
          description: The value of the property.
      summary: Get a repository application property
      tags:
        - properties
    put:
      description: Update an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.
      operationId: updateRepositoryHostedPropertyValue
      parameters:
        - description: The repository container; either the workspace slug or the UUID in curly braces.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/application_property"
      responses:
        "204":
          description: An empty response.
      summary: Update a repository application property
      tags:
        - properties
  "/repositories/{workspace}/{repo_slug}/pullrequests":
    get:
      description: |-
        Returns all pull requests on the specified repository.

        By default only open pull requests are returned. This can be controlled
        using the `state` query parameter. To retrieve pull requests that are
        in one of multiple states, repeat the `state` parameter for each
        individual state.

        This endpoint also supports filtering and sorting of the results. See
        [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.
      parameters:
        - description: Only return pull requests that are in this state. This parameter can be repeated.
          in: query
          name: state
          schema:
            enum:
              - OPEN
              - MERGED
              - DECLINED
              - SUPERSEDED
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pullrequests"
          description: All pull requests on the specified repository.
        "401":
          description: If the repository is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified repository does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List pull requests
      tags:
        - Pullrequests
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new pull request where the destination repository is
        this repository and the author is the authenticated user.

        The minimum required fields to create a pull request are `title` and
        `source`, specified by a branch name.

        ```
        curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repository/pullrequests \
            -u my-username:my-password \
            --request POST \
            --header 'Content-Type: application/json' \
            --data '{
                "title": "My Title",
                "source": {
                    "branch": {
                        "name": "staging"
                    }
                }
            }'
        ```

        If the pull request's `destination` is not specified, it will default
        to the `repository.mainbranch`. To open a pull request to a
        different branch, say from a feature branch to a staging branch,
        specify a `destination` (same format as the `source`):

        ```
        {
            "title": "My Title",
            "source": {
                "branch": {
                    "name": "my-feature-branch"
                }
            },
            "destination": {
                "branch": {
                    "name": "staging"
                }
            }
        }
        ```

        Reviewers can be specified by adding an array of user objects as the
        `reviewers` property.

        ```
        {
            "title": "My Title",
            "source": {
                "branch": {
                    "name": "my-feature-branch"
                }
            },
            "reviewers": [
                {
                    "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}"
                }
            ]
        }
        ```

        Other fields:

        * `description` - a string
        * `close_source_branch` - boolean that specifies if the source branch should be closed upon merging
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pullrequest"
        description: |-
          The new pull request.

          The request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork).

          Since not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title.
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pullrequest"
          description: The newly created pull request.
          headers:
            Location:
              description: The URL of new newly created pull request.
              schema:
                type: string
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated.
      security:
        - oauth2:
            - pullrequest:write
        - basic: []
        - api_key: []
      summary: Create a pull request
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/pullrequests/activity":
    get:
      description: |-
        Returns a paginated list of the pull request's activity log.

        This handler serves both a v20 and internal endpoint. The v20 endpoint
        returns reviewer comments, updates, approvals and request changes. The internal
        endpoint includes those plus tasks and attachments.

        Comments created on a file or a line of code have an inline property.

        Comment example:
        ```
        {
            "pagelen": 20,
            "values": [
                {
                    "comment": {
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088"
                            },
                            "html": {
                                "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088"
                            }
                        },
                        "deleted": false,
                        "pullrequest": {
                            "type": "pullrequest",
                            "id": 5695,
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                                }
                            },
                            "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                        },
                        "content": {
                            "raw": "inline with to a dn from lines",
                            "markup": "markdown",
                            "html": "<p>inline with to a dn from lines</p>",
                            "type": "rendered"
                        },
                        "created_on": "2019-09-27T00:33:46.039178+00:00",
                        "user": {
                            "display_name": "Name Lastname",
                            "uuid": "{}",
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/users/%7B%7D"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/%7B%7D/"
                                },
                                "avatar": {
                                    "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
                                }
                            },
                            "type": "user",
                            "nickname": "Name",
                            "account_id": ""
                        },
                        "created_on": "2019-09-27T00:33:46.039178+00:00",
                        "user": {
                            "display_name": "Name Lastname",
                            "uuid": "{}",
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/users/%7B%7D"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/%7B%7D/"
                                },
                                "avatar": {
                                    "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
                                }
                            },
                            "type": "user",
                            "nickname": "Name",
                            "account_id": ""
                        },
                        "updated_on": "2019-09-27T00:33:46.055384+00:00",
                        "inline": {
                            "context_lines": "",
                            "to": null,
                            "path": "",
                            "outdated": false,
                            "from": 211
                        },
                        "type": "pullrequest_comment",
                        "id": 118571088
                    },
                    "pull_request": {
                        "type": "pullrequest",
                        "id": 5695,
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                            },
                            "html": {
                                "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                            }
                        },
                        "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                    }
                }
            ]
        }
        ```

        Updates include a state property of OPEN, MERGED, or DECLINED.

        Update example:
        ```
        {
            "pagelen": 20,
            "values": [
                {
                    "update": {
                        "description": "",
                        "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it",
                        "destination": {
                            "commit": {
                                "type": "commit",
                                "hash": "6a2c16e4a152",
                                "links": {
                                    "self": {
                                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152"
                                    },
                                    "html": {
                                        "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152"
                                    }
                                }
                            },
                            "branch": {
                                "name": "master"
                            },
                            "repository": {
                                "name": "Atlaskit-MK-2",
                                "type": "repository",
                                "full_name": "atlassian/atlaskit-mk-2",
                                "links": {
                                    "self": {
                                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2"
                                    },
                                    "html": {
                                        "href": "https://bitbucket.org/atlassian/atlaskit-mk-2"
                                    },
                                    "avatar": {
                                        "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js"
                                    }
                                },
                                "uuid": "{}"
                            }
                        },
                        "reason": "",
                        "source": {
                            "commit": {
                                "type": "commit",
                                "hash": "728c8bad1813",
                                "links": {
                                    "self": {
                                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813"
                                    },
                                    "html": {
                                        "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813"
                                    }
                                }
                            },
                            "branch": {
                                "name": "username/NONE-add-onClick-prop-for-accessibility"
                            },
                            "repository": {
                                "name": "Atlaskit-MK-2",
                                "type": "repository",
                                "full_name": "atlassian/atlaskit-mk-2",
                                "links": {
                                    "self": {
                                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2"
                                    },
                                    "html": {
                                        "href": "https://bitbucket.org/atlassian/atlaskit-mk-2"
                                    },
                                    "avatar": {
                                        "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js"
                                    }
                                },
                                "uuid": "{}"
                            }
                        },
                        "state": "OPEN",
                        "author": {
                            "display_name": "Name Lastname",
                            "uuid": "{}",
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/users/%7B%7D"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/%7B%7D/"
                                },
                                "avatar": {
                                    "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
                                }
                            },
                            "type": "user",
                            "nickname": "Name",
                            "account_id": ""
                        },
                        "date": "2019-05-10T06:48:25.305565+00:00"
                    },
                    "pull_request": {
                        "type": "pullrequest",
                        "id": 5695,
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                            },
                            "html": {
                                "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                            }
                        },
                        "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                    }
                }
            ]
        }
        ```

        Approval example:
        ```
        {
            "pagelen": 20,
            "values": [
                {
                    "approval": {
                        "date": "2019-09-27T00:37:19.849534+00:00",
                        "pullrequest": {
                            "type": "pullrequest",
                            "id": 5695,
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                                }
                            },
                            "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                        },
                        "user": {
                            "display_name": "Name Lastname",
                            "uuid": "{}",
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/users/%7B%7D"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/%7B%7D/"
                                },
                                "avatar": {
                                    "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
                                }
                            },
                            "type": "user",
                            "nickname": "Name",
                            "account_id": ""
                        }
                    },
                    "pull_request": {
                        "type": "pullrequest",
                        "id": 5695,
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                            },
                            "html": {
                                "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                            }
                        },
                        "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                    }
                }
            ]
        }
        ```
      responses:
        "200":
          description: The pull request activity log
        "401":
          description: If the repository is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified repository does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List a pull request activity log
      tags:
        - Pullrequests
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}":
    get:
      description: Returns the specified pull request.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pullrequest"
          description: The pull request object
        "401":
          description: If the repository is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository or pull request does not exist
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Get a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Mutates the specified pull request.

        This can be used to change the pull request's branches or description.

        Only open pull requests can be mutated.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pullrequest"
        description: The pull request that is to be updated.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pullrequest"
          description: The updated pull request
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the input document was invalid.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository or pull request id does not exist
      security:
        - oauth2:
            - pullrequest:write
        - basic: []
        - api_key: []
      summary: Update a pull request
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity":
    get:
      description: |-
        Returns a paginated list of the pull request's activity log.

        This handler serves both a v20 and internal endpoint. The v20 endpoint
        returns reviewer comments, updates, approvals and request changes. The internal
        endpoint includes those plus tasks and attachments.

        Comments created on a file or a line of code have an inline property.

        Comment example:
        ```
        {
            "pagelen": 20,
            "values": [
                {
                    "comment": {
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088"
                            },
                            "html": {
                                "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088"
                            }
                        },
                        "deleted": false,
                        "pullrequest": {
                            "type": "pullrequest",
                            "id": 5695,
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                                }
                            },
                            "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                        },
                        "content": {
                            "raw": "inline with to a dn from lines",
                            "markup": "markdown",
                            "html": "<p>inline with to a dn from lines</p>",
                            "type": "rendered"
                        },
                        "created_on": "2019-09-27T00:33:46.039178+00:00",
                        "user": {
                            "display_name": "Name Lastname",
                            "uuid": "{}",
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/users/%7B%7D"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/%7B%7D/"
                                },
                                "avatar": {
                                    "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
                                }
                            },
                            "type": "user",
                            "nickname": "Name",
                            "account_id": ""
                        },
                        "created_on": "2019-09-27T00:33:46.039178+00:00",
                        "user": {
                            "display_name": "Name Lastname",
                            "uuid": "{}",
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/users/%7B%7D"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/%7B%7D/"
                                },
                                "avatar": {
                                    "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
                                }
                            },
                            "type": "user",
                            "nickname": "Name",
                            "account_id": ""
                        },
                        "updated_on": "2019-09-27T00:33:46.055384+00:00",
                        "inline": {
                            "context_lines": "",
                            "to": null,
                            "path": "",
                            "outdated": false,
                            "from": 211
                        },
                        "type": "pullrequest_comment",
                        "id": 118571088
                    },
                    "pull_request": {
                        "type": "pullrequest",
                        "id": 5695,
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                            },
                            "html": {
                                "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                            }
                        },
                        "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                    }
                }
            ]
        }
        ```

        Updates include a state property of OPEN, MERGED, or DECLINED.

        Update example:
        ```
        {
            "pagelen": 20,
            "values": [
                {
                    "update": {
                        "description": "",
                        "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it",
                        "destination": {
                            "commit": {
                                "type": "commit",
                                "hash": "6a2c16e4a152",
                                "links": {
                                    "self": {
                                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152"
                                    },
                                    "html": {
                                        "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152"
                                    }
                                }
                            },
                            "branch": {
                                "name": "master"
                            },
                            "repository": {
                                "name": "Atlaskit-MK-2",
                                "type": "repository",
                                "full_name": "atlassian/atlaskit-mk-2",
                                "links": {
                                    "self": {
                                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2"
                                    },
                                    "html": {
                                        "href": "https://bitbucket.org/atlassian/atlaskit-mk-2"
                                    },
                                    "avatar": {
                                        "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js"
                                    }
                                },
                                "uuid": "{}"
                            }
                        },
                        "reason": "",
                        "source": {
                            "commit": {
                                "type": "commit",
                                "hash": "728c8bad1813",
                                "links": {
                                    "self": {
                                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813"
                                    },
                                    "html": {
                                        "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813"
                                    }
                                }
                            },
                            "branch": {
                                "name": "username/NONE-add-onClick-prop-for-accessibility"
                            },
                            "repository": {
                                "name": "Atlaskit-MK-2",
                                "type": "repository",
                                "full_name": "atlassian/atlaskit-mk-2",
                                "links": {
                                    "self": {
                                        "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2"
                                    },
                                    "html": {
                                        "href": "https://bitbucket.org/atlassian/atlaskit-mk-2"
                                    },
                                    "avatar": {
                                        "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js"
                                    }
                                },
                                "uuid": "{}"
                            }
                        },
                        "state": "OPEN",
                        "author": {
                            "display_name": "Name Lastname",
                            "uuid": "{}",
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/users/%7B%7D"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/%7B%7D/"
                                },
                                "avatar": {
                                    "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
                                }
                            },
                            "type": "user",
                            "nickname": "Name",
                            "account_id": ""
                        },
                        "date": "2019-05-10T06:48:25.305565+00:00"
                    },
                    "pull_request": {
                        "type": "pullrequest",
                        "id": 5695,
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                            },
                            "html": {
                                "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                            }
                        },
                        "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                    }
                }
            ]
        }
        ```

        Approval example:
        ```
        {
            "pagelen": 20,
            "values": [
                {
                    "approval": {
                        "date": "2019-09-27T00:37:19.849534+00:00",
                        "pullrequest": {
                            "type": "pullrequest",
                            "id": 5695,
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                                }
                            },
                            "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                        },
                        "user": {
                            "display_name": "Name Lastname",
                            "uuid": "{}",
                            "links": {
                                "self": {
                                    "href": "https://api.bitbucket.org/2.0/users/%7B%7D"
                                },
                                "html": {
                                    "href": "https://bitbucket.org/%7B%7D/"
                                },
                                "avatar": {
                                    "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
                                }
                            },
                            "type": "user",
                            "nickname": "Name",
                            "account_id": ""
                        }
                    },
                    "pull_request": {
                        "type": "pullrequest",
                        "id": 5695,
                        "links": {
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
                            },
                            "html": {
                                "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
                            }
                        },
                        "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
                    }
                }
            ]
        }
        ```
      responses:
        "200":
          description: The pull request activity log
        "401":
          description: If the repository is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified repository does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List a pull request activity log
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve":
    delete:
      description: |-
        Redact the authenticated user's approval of the specified pull
        request.
      responses:
        "204":
          description: An empty response indicating the authenticated user's approval has been withdrawn.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Pull request cannot be unapproved because the pull request has already been merged.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified pull request or the repository does not exist.
      security:
        - oauth2:
            - pullrequest:write
        - basic: []
        - api_key: []
      summary: Unapprove a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: Approve the specified pull request as the authenticated user.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/participant"
          description: The `participant` object recording that the authenticated user approved the pull request.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified pull request or the repository does not exist.
      security:
        - oauth2:
            - pullrequest:write
        - basic: []
        - api_key: []
      summary: Approve a pull request
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments":
    get:
      description: |-
        Returns a paginated list of the pull request's comments.

        This includes both global, inline comments and replies.

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

        This endpoint also supports filtering and sorting of the results. See
        [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more
        details.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pullrequest_comments"
          description: A paginated list of comments made on the given pull request, in chronological order.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the pull request.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the pull request does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List comments on a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new pull request comment.

        Returns the newly created pull request comment.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pullrequest_comment"
        description: The comment object.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pullrequest_comment"
          description: The newly created comment.
          headers:
            Location:
              description: The URL of the new comment
              schema:
                type: string
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the pull request.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the pull request does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Create a comment on a pull request
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}":
    delete:
      description: Deletes a specific pull request comment.
      responses:
        "204":
          description: Successful deletion.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to delete the comment.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the comment does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Delete a comment on a pull request
      tags:
        - Pullrequests
    get:
      description: Returns a specific pull request comment.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pullrequest_comment"
          description: The comment.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the pull request.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the comment does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Get a comment on a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the comment.
        in: path
        name: comment_id
        required: true
        schema:
          type: integer
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: Updates a specific pull request comment.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pullrequest_comment"
        description: The contents of the updated comment.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pullrequest_comment"
          description: The updated comment.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the comment.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the comment does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Update a comment on a pull request
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve":
    delete:
      description: ""
      responses:
        "204":
          description: The comment is reopened.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |-
            If the authenticated user does not have access to the pull request,
            or if the provided comment is not a top-level comment.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the comment does not exist, or if the comment has not been resolved
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Reopen a comment thread
      tags:
        - Pullrequests
    parameters:
      - description: The id of the comment.
        in: path
        name: comment_id
        required: true
        schema:
          type: integer
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: ""
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/comment_resolution"
          description: The comment resolution details.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |-
            If the authenticated user does not have access to the pull request,
            or if the provided comment is not a top-level comment.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the comment does not exist.
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the comment has already been resolved.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Resolve a comment thread
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits":
    get:
      description: |-
        Returns a paginated list of the pull request's commits.

        These are the commits that are being merged into the destination
        branch when the pull requests gets accepted.
      responses:
        "200":
          description: A paginated list of commits made on the given pull request, in chronological order. This list will be empty if the source branch no longer exists.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the pull request.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the pull request does not exist or the source branch is from a forked repository which no longer exists.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List commits on a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline":
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: Declines the pull request.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pullrequest"
          description: The pull request was successfully declined.
        "555":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |-
            If the decline took too long and timed out.
            In this case the caller should retry the request later.
      security:
        - oauth2:
            - pullrequest:write
        - basic: []
        - api_key: []
      summary: Decline a pull request
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff":
    get:
      description: |-
        Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get)
        with the revspec that corresponds to the pull request.
      responses:
        "302":
          description: |
            Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) with the
            revspec that corresponds to the pull request.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List changes in a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat":
    get:
      description: |-
        Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get)
        with the revspec that corresponds to the pull request.
      responses:
        "302":
          description: |
            Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get) with
            the revspec that corresponds to pull request.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Get the diff stat for a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge":
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: Merges the pull request.
      parameters:
        - description: |-
            Default value is false.


            When set to true, runs merge asynchronously and
            immediately returns a 202 with polling link to
            the task-status API in the Location header.


            When set to false, runs merge and waits for it to
            complete, returning 200 when it succeeds. If the
            duration of the merge exceeds a timeout threshold,
            the API returns a 202 with polling link to the
            task-status API in the Location header.
          in: query
          name: async
          required: false
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/pullrequest_merge_parameters"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pullrequest"
          description: The pull request object.
        "202":
          description: In the Location header, the URL to poll for the pull request merge status
        "555":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |-
            If the merge took too long and timed out.
            In this case the caller should retry the request later
      security:
        - oauth2:
            - pullrequest:write
        - basic: []
        - api_key: []
      summary: Merge a pull request
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}":
    get:
      description: |-
        When merging a pull request takes too long, the client receives a
        task ID along with a 202 status code. The task ID can be used in a call
        to this endpoint to check the status of a merge task.

        ```
        curl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>
        ```

        If the merge task is not yet finished, a PENDING status will be returned.

        ```
        HTTP/2 200
        {
            "task_status": "PENDING",
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>"
                }
            }
        }
        ```

        If the merge was successful, a SUCCESS status will be returned.

        ```
        HTTP/2 200
        {
            "task_status": "SUCCESS",
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>"
                }
            },
            "merge_result": <the merged pull request object>
        }
        ```

        If the merge task failed, an error will be returned.

        ```
        {
            "type": "error",
            "error": {
                "message": "<error message>"
            }
        }
        ```
      responses:
        "200":
          description: Returns a task status if the merge is either pending or successful, and if it is successful, a pull request
        "400":
          description: If the provided task ID does not relate to this pull request, or if something went wrong during the merge operation
        "403":
          description: The user making the request does not have permission to the repo and is different from the user who queued the task
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Get the merge task status for a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: ID of the merge task
        in: path
        name: task_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch":
    get:
      description: |-
        Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get)
        with the revspec that corresponds to pull request.
      responses:
        "302":
          description: |
            Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get) with
            the revspec that corresponds to pull request.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: Get the patch for a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes":
    delete:
      description: ""
      responses:
        "204":
          description: An empty response indicating the authenticated user's request for change has been withdrawn.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Pull request requested changes cannot be removed because the pull request has already been merged.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified pull request or the repository does not exist.
      security:
        - oauth2:
            - pullrequest:write
        - basic: []
        - api_key: []
      summary: Remove change request for a pull request
      tags:
        - Pullrequests
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: ""
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/participant"
          description: The `participant` object recording that the authenticated user requested changes on the pull request.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Pull request changes cannot be requested because the pull request has already been merged.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified pull request or the repository does not exist.
      security:
        - oauth2:
            - pullrequest:write
        - basic: []
        - api_key: []
      summary: Request changes for a pull request
      tags:
        - Pullrequests
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses":
    get:
      description: |-
        Returns all statuses (e.g. build results) for the given pull
        request.
      parameters:
        - description: |
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            Field by which the results should be sorted as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
            Defaults to `created_on`.
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_commitstatuses"
          description: A paginated list of all commit statuses for this pull request.
        "401":
          description: If the repository is private and the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified repository or pull request does not exist.
      security:
        - oauth2:
            - pullrequest
        - basic: []
        - api_key: []
      summary: List commit statuses for a pull request
      tags:
        - Pullrequests
        - Commit statuses
    parameters:
      - description: The id of the pull request.
        in: path
        name: pull_request_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}":
    delete:
      description: Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.
      operationId: deletePullRequestHostedPropertyValue
      parameters:
        - description: The repository container; either the workspace slug or the UUID in curly braces.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The pull request ID.
          in: path
          name: pullrequest_id
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      responses:
        "204":
          description: An empty response.
      summary: Delete a pull request application property
      tags:
        - properties
    get:
      description: Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.
      operationId: getPullRequestHostedPropertyValue
      parameters:
        - description: The repository container; either the workspace slug or the UUID in curly braces.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The pull request ID.
          in: path
          name: pullrequest_id
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/application_property"
          description: The value of the property.
      summary: Get a pull request application property
      tags:
        - properties
    put:
      description: Update an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.
      operationId: updatePullRequestHostedPropertyValue
      parameters:
        - description: The repository container; either the workspace slug or the UUID in curly braces.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The repository.
          in: path
          name: repo_slug
          required: true
          schema:
            type: string
        - description: The pull request ID.
          in: path
          name: pullrequest_id
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/application_property"
      responses:
        "204":
          description: An empty response.
      summary: Update a pull request application property
      tags:
        - properties
  "/repositories/{workspace}/{repo_slug}/refs":
    get:
      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.
      parameters:
        - description: |-
            
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          schema:
            type: string
        - 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'].
          in: query
          name: sort
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_refs"
          description: A paginated list of refs matching any filter criteria that were provided.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the repository is private and the authenticated user does not have
            access to it.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List branches and tags
      tags:
        - Refs
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/refs/branches":
    get:
      description: |-
        Returns a list of all open branches within the specified repository.
                Results will be in the order the source control manager returns them.

                ```
                $ curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1 | jq .
                {
                  "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
        ",
                        "type": "commit"
                      }
                    }
                  ],
                  "page": 1,
                  "next": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1&page=2"
                }
                ```

                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.
      parameters:
        - description: |-
            
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          schema:
            type: string
        - 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'].
          in: query
          name: sort
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_branches"
          description: A paginated list of branches matching any filter criteria that were provided.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the repository is private and the authenticated user does not have
            access to it.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List open branches
      tags:
        - Refs
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new branch in the specified repository.

        The payload of the POST should consist of a JSON document that
        contains the name of the tag and the target hash.

        ```
        curl https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/branches \
        -s -u seanfarley -X POST -H "Content-Type: application/json" \
        -d '{
            "name" : "smf/create-feature",
            "target" : {
                "hash" : "default",
            }
        }'
        ```

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

        The branch name should not include any prefixes (e.g.
        refs/heads). This endpoint does support using short hash prefixes for
        the commit hash, but it may return a 400 response if the provided
        prefix is ambiguous. Using a full commit hash is the preferred
        approach.
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branch"
          description: The newly created branch object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the repository is private and the authenticated user does not have
            access to it.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or branch does not exist.
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Create a branch
      tags:
        - Refs
  "/repositories/{workspace}/{repo_slug}/refs/branches/{name}":
    delete:
      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).
      responses:
        "204":
          description: Indicates that the specified branch was successfully deleted.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the repository is private and the authenticated user does not have
            access to it.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or branch does not exist.
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Delete a branch
      tags:
        - Refs
    get:
      description: |-
        Returns a branch object within the specified repository.

                ```
                $ curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master | jq .
                {
                  "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)

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

        Approved-by: Chris "Daz" Darroch
        ",
                    "type": "commit"
                  }
                }
                ```

                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).
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branch"
          description: The branch object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the repository is private and the authenticated user does not have
            access to it.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or branch does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get a branch
      tags:
        - Refs
    parameters:
      - description: The name of the branch.
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/refs/tags":
    get:
      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.
      parameters:
        - description: |-
            
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          schema:
            type: string
        - 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'].
          in: query
          name: sort
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_tags"
          description: A paginated list of tags matching any filter criteria that were provided.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the repository is private and the authenticated user does not have
            access to it.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List tags
      tags:
        - Refs
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new tag in the specified repository.

        The payload of the POST should consist of a JSON document that
        contains the name of the tag and the target hash.

        ```
        curl https://api.bitbucket.org/2.0/repositories/jdoe/myrepo/refs/tags \
        -s -u jdoe -X POST -H "Content-Type: application/json" \
        -d '{
            "name" : "new-tag-name",
            "target" : {
                "hash" : "a1b2c3d4e5f6",
            }
        }'
        ```

        This endpoint does support using short hash prefixes for the commit
        hash, but it may return a 400 response if the provided prefix is
        ambiguous. Using a full commit hash is the preferred approach.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/tag"
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/tag"
          description: The newly created tag.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the target hash is missing, ambiguous, or invalid, or if the name is not provided.
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Create a tag
      tags:
        - Refs
  "/repositories/{workspace}/{repo_slug}/refs/tags/{name}":
    delete:
      description: |-
        Delete a tag in the specified repository.

        The tag name should not include any prefixes (e.g. refs/tags).
      responses:
        "204":
          description: Indicates the specified tag was successfully deleted.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the repository is private and the authenticated user does not have
            access to it.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or tag does not exist.
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Delete a tag
      tags:
        - Refs
    get:
      description: |-
        Returns the specified tag.

        ```
        $ curl -s https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8 -G | jq .
        {
          "name": "3.8",
          "links": {
            "commits": {
              "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commits/3.8"
            },
            "self": {
              "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8"
            },
            "html": {
              "href": "https://bitbucket.org/seanfarley/hg/commits/tag/3.8"
            }
          },
          "tagger": {
            "raw": "Matt Mackall <mpm@selenic.com>",
            "type": "author",
            "user": {
              "username": "mpmselenic",
              "nickname": "mpmselenic",
              "display_name": "Matt Mackall",
              "type": "user",
              "uuid": "{a4934530-db4c-419c-a478-9ab4964c2ee7}",
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/users/mpmselenic"
                },
                "html": {
                  "href": "https://bitbucket.org/mpmselenic/"
                },
                "avatar": {
                  "href": "https://bitbucket.org/account/mpmselenic/avatar/32/"
                }
              }
            }
          },
          "date": "2016-05-01T18:52:25+00:00",
          "message": "Added tag 3.8 for changeset f85de28eae32",
          "type": "tag",
          "target": {
            "hash": "f85de28eae32e7d3064b1a1321309071bbaaa069",
            "repository": {
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg"
                },
                "html": {
                  "href": "https://bitbucket.org/seanfarley/hg"
                },
                "avatar": {
                  "href": "https://bitbucket.org/seanfarley/hg/avatar/32/"
                }
              },
              "type": "repository",
              "name": "hg",
              "full_name": "seanfarley/hg",
              "uuid": "{c75687fb-e99d-4579-9087-190dbd406d30}"
            },
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069"
              },
              "comments": {
                "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/comments"
              },
              "patch": {
                "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/patch/f85de28eae32e7d3064b1a1321309071bbaaa069"
              },
              "html": {
                "href": "https://bitbucket.org/seanfarley/hg/commits/f85de28eae32e7d3064b1a1321309071bbaaa069"
              },
              "diff": {
                "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/diff/f85de28eae32e7d3064b1a1321309071bbaaa069"
              },
              "approve": {
                "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/approve"
              },
              "statuses": {
                "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/statuses"
              }
            },
            "author": {
              "raw": "Sean Farley <sean@farley.io>",
              "type": "author",
              "user": {
                "username": "seanfarley",
                "nickname": "seanfarley",
                "display_name": "Sean Farley",
                "type": "user",
                "uuid": "{a295f8a8-5876-4d43-89b5-3ad8c6c3c51d}",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/users/seanfarley"
                  },
                  "html": {
                    "href": "https://bitbucket.org/seanfarley/"
                  },
                  "avatar": {
                    "href": "https://bitbucket.org/account/seanfarley/avatar/32/"
                  }
                }
              }
            },
            "parents": [
              {
                "hash": "9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2",
                "type": "commit",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2"
                  },
                  "html": {
                    "href": "https://bitbucket.org/seanfarley/hg/commits/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2"
                  }
                }
              }
            ],
            "date": "2016-05-01T04:21:17+00:00",
            "message": "debian: alphabetize build deps",
            "type": "commit"
          }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/tag"
          description: The tag object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the repository is private and the authenticated user does not have
            access to it.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or tag does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get a tag
      tags:
        - Refs
    parameters:
      - description: The name of the tag.
        in: path
        name: name
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/src":
    get:
      description: |-
        This endpoint redirects the client to the directory listing of the
        root directory on the main branch.

        This is equivalent to directly hitting
        [/2.0/repositories/{username}/{repo_slug}/src/{commit}/{path}](src/%7Bcommit%7D/%7Bpath%7D)
        without having to know the name or SHA1 of the repo's main branch.

        To create new commits, [POST to this endpoint](#post)
      parameters:
        - description: Instead of returning the file's contents, return the (json) meta data for it.
          in: query
          name: format
          required: false
          schema:
            enum:
              - meta
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_treeentries"
          description: |
            If the path matches a file, then the raw contents of the file are
            returned (unless the `format=meta` query parameter was provided,
            in which case a json document containing the file's meta data is
            returned). If the path matches a directory, then a paginated
            list of file and directory entries is returned (if the
            `format=meta` query parameter was provided, then the json document
            containing the directory's meta data is returned).
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the path or commit in the URL does not exist.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get the root directory of the main branch
      tags:
        - Source
        - Repositories
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        This endpoint is used to create new commits in the repository by
        uploading files.

        To add a new file to a repository:

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \
          -F /repo/path/to/image.png=@image.png
        ```

        This will create a new commit on top of the main branch, inheriting the
        contents of the main branch, but adding (or overwriting) the
        `image.png` file to the repository in the `/repo/path/to` directory.

        To create a commit that deletes files, use the `files` parameter:

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \
          -F files=/file/to/delete/1.txt \
          -F files=/file/to/delete/2.txt
        ```

        You can add/modify/delete multiple files in a request. Rename/move a
        file by deleting the old path and adding the content at the new path.

        This endpoint accepts `multipart/form-data` (as in the examples above),
        as well as `application/x-www-form-urlencoded`.

        #### multipart/form-data

        A `multipart/form-data` post contains a series of "form fields" that
        identify both the individual files that are being uploaded, as well as
        additional, optional meta data.

        Files are uploaded in file form fields (those that have a
        `Content-Disposition` parameter) whose field names point to the remote
        path in the repository where the file should be stored. Path field
        names are always interpreted to be absolute from the root of the
        repository, regardless whether the client uses a leading slash (as the
        above `curl` example did).

        File contents are treated as bytes and are not decoded as text.

        The commit message, as well as other non-file meta data for the
        request, is sent along as normal form field elements. Meta data fields
        share the same namespace as the file objects. For `multipart/form-data`
        bodies that should not lead to any ambiguity, as the
        `Content-Disposition` header will contain the `filename` parameter to
        distinguish between a file named "message" and the commit message field.

        #### application/x-www-form-urlencoded

        It is also possible to upload new files using a simple
        `application/x-www-form-urlencoded` POST. This can be convenient when
        uploading pure text files:

        ```
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src \
          --data-urlencode "/path/to/me.txt=Lorem ipsum." \
          --data-urlencode "message=Initial commit" \
          --data-urlencode "author=Erik van Zijst <erik.van.zijst@gmail.com>"
        ```

        There could be a field name clash if a client were to upload a file
        named "message", as this filename clashes with the meta data property
        for the commit message. To avoid this and to upload files whose names
        clash with the meta data properties, use a leading slash for the files,
        e.g. `curl --data-urlencode "/message=file contents"`.

        When an explicit slash is omitted for a file whose path matches that of
        a meta data parameter, then it is interpreted as meta data, not as a
        file.

        #### Executables and links

        While this API aims to facilitate the most common use cases, it is
        possible to perform some more advanced operations like creating a new
        symlink in the repository, or creating an executable file.

        Files can be supplied with a `x-attributes` value in the
        `Content-Disposition` header. For example, to upload an executable
        file, as well as create a symlink from `README.txt` to `README`:

        ```
        --===============1438169132528273974==
        Content-Type: text/plain; charset="us-ascii"
        MIME-Version: 1.0
        Content-Transfer-Encoding: 7bit
        Content-ID: "bin/shutdown.sh"
        Content-Disposition: attachment; filename="shutdown.sh"; x-attributes:"executable"

        #!/bin/sh
        halt

        --===============1438169132528273974==
        Content-Type: text/plain; charset="us-ascii"
        MIME-Version: 1.0
        Content-Transfer-Encoding: 7bit
        Content-ID: "/README.txt"
        Content-Disposition: attachment; filename="README.txt"; x-attributes:"link"

        README
        --===============1438169132528273974==--
        ```

        Links are files that contain the target path and have
        `x-attributes:"link"` set.

        When overwriting links with files, or vice versa, the newly uploaded
        file determines both the new contents, as well as the attributes. That
        means uploading a file without specifying `x-attributes="link"` will
        create a regular file, even if the parent commit hosted a symlink at
        the same path.

        The same applies to executables. When modifying an existing executable
        file, the form-data file element must include
        `x-attributes="executable"` in order to preserve the executable status
        of the file.

        Note that this API does not support the creation or manipulation of
        subrepos / submodules.
      parameters:
        - description: The commit message. When omitted, Bitbucket uses a canned string.
          in: query
          name: message
          required: false
          schema:
            type: string
        - description: |-
            
            The raw string to be used as the new commit's author.
            This string follows the format
            `Erik van Zijst <evzijst@atlassian.com>`.

            When omitted, Bitbucket uses the authenticated user's
            full/display name and primary email address. Commits cannot
            be created anonymously.
          in: query
          name: author
          required: false
          schema:
            type: string
        - description: |-
            
            A comma-separated list of SHA1s of the commits that should
            be the parents of the newly created commit.

            When omitted, the new commit will inherit from and become
            a child of the main branch's tip/HEAD commit.

            When more than one SHA1 is provided, the first SHA1
            identifies the commit from which the content will be
            inherited.".
          in: query
          name: parents
          required: false
          schema:
            type: string
        - description: |
            
            Optional field that declares the files that the request is
            manipulating. When adding a new file to a repo, or when
            overwriting an existing file, the client can just upload
            the full contents of the file in a normal form field and
            the use of this `files` meta data field is redundant.
            However, when the `files` field contains a file path that
            does not have a corresponding, identically-named form
            field, then Bitbucket interprets that as the client wanting
            to replace the named file with the null set and the file is
            deleted instead.

            Paths in the repo that are referenced in neither files nor
            an individual file field, remain unchanged and carry over
            from the parent to the new commit.

            This API does not support renaming as an explicit feature.
            To rename a file, simply delete it and recreate it under
            the new name in the same commit.
          in: query
          name: files
          required: false
          schema:
            type: string
        - description: |
            
            The name of the branch that the new commit should be
            created on. When omitted, the commit will be created on top
            of the main branch and will become the main branch's new
            head.

            When a branch name is provided that already exists in the
            repo, then the commit will be created on top of that
            branch. In this case, *if* a parent SHA1 was also provided,
            then it is asserted that the parent is the branch's
            tip/HEAD at the time the request is made. When this is not
            the case, a 409 is returned.

            When a new branch name is specified (that does not already
            exist in the repo), and no parent SHA1s are provided, then
            the new commit will inherit from the current main branch's
            tip/HEAD commit, but not advance the main branch. The new
            commit will be the new branch. When the request *also*
            specifies a parent SHA1, then the new commit and branch
            are created directly on top of the parent commit,
            regardless of the state of the main branch.

            When a branch name is not specified, but a parent SHA1 is
            provided, then Bitbucket asserts that it represents the
            main branch's current HEAD/tip, or a 409 is returned.

            When a branch name is not specified and the repo is empty,
            the new commit will become the repo's root commit and will
            be on the main branch.

            When a branch name is specified and the repo is empty, the
            new commit will become the repo's root commit and also
            define the repo's main branch going forward.

            This API cannot be used to create additional root commits
            in non-empty repos.

            The branch field cannot be repeated.

            As a side effect, this API can be used to create a new
            branch without modifying any files, by specifying a new
            branch name in this field, together with `parents`, but
            omitting the `files` fields, while not sending any files.
            This will create a new commit and branch with the same
            contents as the first parent. The diff of this commit
            against its first parent will be empty.
          in: query
          name: branch
          required: false
          schema:
            type: string
      responses:
        "201":
          description: "\n"
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have write or admin access
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the repository does not exist.
      security:
        - oauth2:
            - repository:write
        - basic: []
        - api_key: []
      summary: Create a commit by uploading a file
      tags:
        - Source
        - Repositories
  "/repositories/{workspace}/{repo_slug}/src/{commit}/{path}":
    get:
      description: |-
        This endpoints is used to retrieve the contents of a single file,
        or the contents of a directory at a specified revision.

        #### Raw file contents

        When `path` points to a file, this endpoint returns the raw contents.
        The response's Content-Type is derived from the filename
        extension (not from the contents). The file contents are not processed
        and no character encoding/recoding is performed and as a result no
        character encoding is included as part of the Content-Type.

        The `Content-Disposition` header will be "attachment" to prevent
        browsers from running executable files.

        If the file is managed by LFS, then a 301 redirect pointing to
        Atlassian's media services platform is returned.

        The response includes an ETag that is based on the contents of the file
        and its attributes. This means that an empty `__init__.py` always
        returns the same ETag, regardless on the directory it lives in, or the
        commit it is on.

        #### File meta data

        When the request for a file path includes the query parameter
        `?format=meta`, instead of returning the file's raw contents, Bitbucket
        instead returns the JSON object describing the file's properties:

        ```javascript
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests/__init__.py?format=meta
        {
          "links": {
            "self": {
              "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py"
            },
            "meta": {
              "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta"
            }
          },
          "path": "tests/__init__.py",
          "commit": {
            "type": "commit",
            "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335",
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335"
              },
              "html": {
                "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335"
              }
            }
          },
          "attributes": [],
          "type": "commit_file",
          "size": 0
        }
        ```

        File objects contain an `attributes` element that contains a list of
        possible modifiers. Currently defined values are:

        * `link` -- indicates that the entry is a symbolic link. The contents
            of the file represent the path the link points to.
        * `executable` -- indicates that the file has the executable bit set.
        * `subrepository` -- indicates that the entry points to a submodule or
            subrepo. The contents of the file is the SHA1 of the repository
            pointed to.
        * `binary` -- indicates whether Bitbucket thinks the file is binary.

        This endpoint can provide an alternative to how a HEAD request can be
        used to check for the existence of a file, or a file's size without
        incurring the overhead of receiving its full contents.


        #### Directory listings

        When `path` points to a directory instead of a file, the response is a
        paginated list of directory and file objects in the same order as the
        underlying SCM system would return them.

        For example:

        ```javascript
        $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests
        {
          "pagelen": 10,
          "values": [
            {
              "path": "tests/test_project",
              "type": "commit_directory",
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/"
                },
                "meta": {
                  "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta"
                }
              },
              "commit": {
                "type": "commit",
                "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335"
                  },
                  "html": {
                    "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335"
                  }
                }
              }
            },
            {
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py"
                },
                "meta": {
                  "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta"
                }
              },
              "path": "tests/__init__.py",
              "commit": {
                "type": "commit",
                "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335"
                  },
                  "html": {
                    "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335"
                  }
                }
              },
              "attributes": [],
              "type": "commit_file",
              "size": 0
            }
          ],
          "page": 1,
          "size": 2
        }
        ```

        When listing the contents of the repo's root directory, the use of a
        trailing slash at the end of the URL is required.

        The response by default is not recursive, meaning that only the direct contents of
        a path are returned. The response does not recurse down into
        subdirectories. In order to "walk" the entire directory tree, the
        client can either parse each response and follow the `self` links of each
        `commit_directory` object, or can specify a `max_depth` to recurse to.

        The max_depth parameter will do a breadth-first search to return the contents of the subdirectories
        up to the depth specified. Breadth-first search was chosen as it leads to the least amount of
        file system operations for git. If the `max_depth` parameter is specified to be too
        large, the call will time out and return a 555.

        Each returned object is either a `commit_file`, or a `commit_directory`,
        both of which contain a `path` element. This path is the absolute path
        from the root of the repository. Each object also contains a `commit`
        object which embeds the commit the file is on. Note that this is merely
        the commit that was used in the URL. It is *not* the commit that last
        modified the file.

        Directory objects have 2 representations. Their `self` link returns the
        paginated contents of the directory. The `meta` link on the other hand
        returns the actual `directory` object itself, e.g.:

        ```javascript
        {
          "path": "tests/test_project",
          "type": "commit_directory",
          "links": {
            "self": {
              "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/"
            },
            "meta": {
              "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta"
            }
          },
          "commit": { ... }
        }
        ```

        #### Querying, filtering and sorting

        Like most API endpoints, this API supports the Bitbucket
        querying/filtering syntax and so you could filter a directory listing
        to only include entries that match certain criteria. For instance, to
        list all binary files over 1kb use the expression:

        `size > 1024 and attributes = "binary"`

        which after urlencoding yields the query string:

        `?q=size%3E1024+and+attributes%3D%22binary%22`

        To change the ordering of the response, use the `?sort` parameter:

        `.../src/eefd5ef/?sort=-size`

        See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more
        details.
      parameters:
        - description: If 'meta' is provided, returns the (json) meta data for the contents of the file.  If 'rendered' is provided, returns the contents of a non-binary file in HTML-formatted rendered markup. Since Git does not generally track what text encoding scheme is used, this endpoint attempts to detect the most appropriate character encoding. While usually correct, determining the character encoding can be ambiguous which in exceptional cases can lead to misinterpretation of the characters. As such, the raw element in the response object should not be treated as equivalent to the file's actual contents.
          in: query
          name: format
          required: false
          schema:
            enum:
              - meta
              - rendered
            type: string
        - description: Optional filter expression as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: Optional sorting parameter as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).
          in: query
          name: sort
          required: false
          schema:
            type: string
        - description: If provided, returns the contents of the repository and its subdirectories recursively until the specified max_depth of nested directories. When omitted, this defaults to 1.
          in: query
          name: max_depth
          required: false
          schema:
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_treeentries"
          description: |
            If the path matches a file, then the raw contents of the file are
            returned.  If the `format=meta` query parameter is provided,
            a json document containing the file's meta data is
            returned.  If the `format=rendered` query parameter is provided,
            the contents of the file in HTML-formated rendered markup is returned.
            If the path matches a directory, then a paginated
            list of file and directory entries is returned (if the
            `format=meta` query parameter was provided, then the json document
            containing the directory's meta data is returned.)
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the path or commit in the URL does not exist.
        "555":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the call times out, possibly because the specified recursion depth is too large.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: Get file or directory contents
      tags:
        - Source
        - Repositories
    parameters:
      - description: The commit's SHA1.
        in: path
        name: commit
        required: true
        schema:
          type: string
      - description: Path to the file.
        in: path
        name: path
        required: true
        schema:
          type: string
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/versions":
    get:
      description: |-
        Returns the versions that have been defined in the issue tracker.

        This resource is only available on repositories that have the issue
        tracker enabled.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_versions"
          description: The versions that have been defined in the issue tracker.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: List defined versions for issues
      tags:
        - Issue tracker
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/versions/{version_id}":
    get:
      description: Returns the specified issue tracker version object.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/version"
          description: The specified version object.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The specified repository or version does not exist or does not have the issue tracker enabled.
      security:
        - oauth2:
            - issue
        - basic: []
        - api_key: []
      summary: Get a defined version for issues
      tags:
        - Issue tracker
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: The version's id
        in: path
        name: version_id
        required: true
        schema:
          type: integer
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/repositories/{workspace}/{repo_slug}/watchers":
    get:
      description: |-
        Returns a paginated list of all the watchers on the specified
        repository.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_accounts"
          description: A paginated list of all the watchers on the specified repository.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List repositories watchers
      tags:
        - Repositories
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  /snippets:
    get:
      description: |-
        Returns all snippets. Like pull requests, repositories and workspaces, the
        full set of snippets is defined by what the current user has access to.

        This includes all snippets owned by any of the workspaces the user is a member of,
        or snippets by other users that the current user is either watching or has collaborated
        on (for instance by commenting on it).

        To limit the set of returned snippets, apply the
        `?role=[owner|contributor|member]` query parameter where the roles are
        defined as follows:

        * `owner`: all snippets owned by the current user
        * `contributor`: all snippets owned by, or watched by the current user
        * `member`: created in a workspaces or watched by the current user

        When no role is specified, all public snippets are returned, as well as all
        privately owned snippets watched or commented on.

        The returned response is a normal paginated JSON list. This endpoint
        only supports `application/json` responses and no
        `multipart/form-data` or `multipart/related`. As a result, it is not
        possible to include the file contents.
      parameters:
        - description: Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).
          in: query
          name: role
          required: false
          schema:
            enum:
              - owner
              - contributor
              - member
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_snippets"
          description: A paginated list of snippets.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: List snippets
      tags:
        - Snippets
    parameters: []
    post:
      description: |-
        Creates a new snippet under the authenticated user's account.

        Snippets can contain multiple files. Both text and binary files are
        supported.

        The simplest way to create a new snippet from a local file:

            $ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets               -F file=@image.png

        Creating snippets through curl has a few limitations and so let's look
        at a more complicated scenario.

        Snippets are created with a multipart POST. Both `multipart/form-data`
        and `multipart/related` are supported. Both allow the creation of
        snippets with both meta data (title, etc), as well as multiple text
        and binary files.

        The main difference is that `multipart/related` can use rich encoding
        for the meta data (currently JSON).


        multipart/related (RFC-2387)
        ----------------------------

        This is the most advanced and efficient way to create a paste.

            POST /2.0/snippets/evzijst HTTP/1.1
            Content-Length: 1188
            Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974=="
            MIME-Version: 1.0

            --===============1438169132528273974==
            Content-Type: application/json; charset="utf-8"
            MIME-Version: 1.0
            Content-ID: snippet

            {
              "title": "My snippet",
              "is_private": true,
              "scm": "git",
              "files": {
                  "foo.txt": {},
                  "image.png": {}
                }
            }

            --===============1438169132528273974==
            Content-Type: text/plain; charset="us-ascii"
            MIME-Version: 1.0
            Content-Transfer-Encoding: 7bit
            Content-ID: "foo.txt"
            Content-Disposition: attachment; filename="foo.txt"

            foo

            --===============1438169132528273974==
            Content-Type: image/png
            MIME-Version: 1.0
            Content-Transfer-Encoding: base64
            Content-ID: "image.png"
            Content-Disposition: attachment; filename="image.png"

            iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m
            TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB
            cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5
            EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ
            73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN
            AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==
            --===============1438169132528273974==--

        The request contains multiple parts and is structured as follows.

        The first part is the JSON document that describes the snippet's
        properties or meta data. It either has to be the first part, or the
        request's `Content-Type` header must contain the `start` parameter to
        point to it.

        The remaining parts are the files of which there can be zero or more.
        Each file part should contain the `Content-ID` MIME header through
        which the JSON meta data's `files` element addresses it. The value
        should be the name of the file.

        `Content-Disposition` is an optional MIME header. The header's
        optional `filename` parameter can be used to specify the file name
        that Bitbucket should use when writing the file to disk. When present,
        `filename` takes precedence over the value of `Content-ID`.

        When the JSON body omits the `files` element, the remaining parts are
        not ignored. Instead, each file is added to the new snippet as if its
        name was explicitly linked (the use of the `files` elements is
        mandatory for some operations like deleting or renaming files).


        multipart/form-data
        -------------------

        The use of JSON for the snippet's meta data is optional. Meta data can
        also be supplied as regular form fields in a more conventional
        `multipart/form-data` request:

            $ curl -X POST -u credentials https://api.bitbucket.org/2.0/snippets               -F title="My snippet"               -F file=@foo.txt -F file=@image.png

            POST /2.0/snippets HTTP/1.1
            Content-Length: 951
            Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f

            ------------------------------63a4b224c59f
            Content-Disposition: form-data; name="file"; filename="foo.txt"
            Content-Type: text/plain

            foo

            ------------------------------63a4b224c59f
            Content-Disposition: form-data; name="file"; filename="image.png"
            Content-Type: application/octet-stream

            ?PNG

            IHDR?1??I.....
            ------------------------------63a4b224c59f
            Content-Disposition: form-data; name="title"

            My snippet
            ------------------------------63a4b224c59f--

        Here the meta data properties are included as flat, top-level form
        fields. The file attachments use the `file` field name. To attach
        multiple files, simply repeat the field.

        The advantage of `multipart/form-data` over `multipart/related` is
        that it can be easier to build clients.

        Essentially all properties are optional, `title` and `files` included.


        Sharing and Visibility
        ----------------------

        Snippets can be either public (visible to anyone on Bitbucket, as well
        as anonymous users), or private (visible only to members of the workspace).
        This is controlled through the snippet's `is_private` element:

        * **is_private=false** -- everyone, including anonymous users can view
          the snippet
        * **is_private=true** -- only workspace members can view the snippet

        To create the snippet under a workspace, just append the workspace ID
        to the URL. See [`/2.0/snippets/{workspace}`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-post).
      requestBody:
        $ref: "#/components/requestBodies/snippet"
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet"
          description: The newly created snippet object.
          headers:
            Location:
              description: The URL of the newly created snippet.
              schema:
                type: string
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
      security:
        - oauth2:
            - snippet:write
        - basic: []
        - api_key: []
      summary: Create a snippet
      tags:
        - Snippets
  "/snippets/{workspace}":
    get:
      description: |-
        Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-get), except that the result is further filtered
        by the snippet owner and only those that are owned by `{workspace}` are
        returned.
      parameters:
        - description: Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).
          in: query
          name: role
          required: false
          schema:
            enum:
              - owner
              - contributor
              - member
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_snippets"
          description: A paginated list of snippets.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the user does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: List snippets in a workspace
      tags:
        - Snippets
    parameters:
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-post), except that the new snippet will be
        created under the workspace specified in the path parameter
        `{workspace}`.
      requestBody:
        $ref: "#/components/requestBodies/snippet"
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet"
          description: The newly created snippet object.
          headers:
            Location:
              description: The URL of the newly created snippet.
              schema:
                type: string
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have permission to create snippets in the specified workspace.
      security:
        - oauth2:
            - snippet:write
        - basic: []
        - api_key: []
      summary: Create a snippet for a workspace
      tags:
        - Snippets
  "/snippets/{workspace}/{encoded_id}":
    delete:
      description: Deletes a snippet and returns an empty response.
      responses:
        "204":
          description: If the snippet was deleted successfully.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet is private and the request was not authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If authenticated user does not have permission to delete the private snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet:write
        - basic: []
        - api_key: []
      summary: Delete a snippet
      tags:
        - Snippets
    get:
      description: |-
        Retrieves a single snippet.

        Snippets support multiple content types:

        * application/json
        * multipart/related
        * multipart/form-data


        application/json
        ----------------

        The default content type of the response is `application/json`.
        Since JSON is always `utf-8`, it cannot reliably contain file contents
        for files that are not text. Therefore, JSON snippet documents only
        contain the filename and links to the file contents.

        This means that in order to retrieve all parts of a snippet, N+1
        requests need to be made (where N is the number of files in the
        snippet).


        multipart/related
        -----------------

        To retrieve an entire snippet in a single response, use the
        `Accept: multipart/related` HTTP request header.

            $ curl -H "Accept: multipart/related" https://api.bitbucket.org/2.0/snippets/evzijst/1

        Response:

            HTTP/1.1 200 OK
            Content-Length: 2214
            Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974=="
            MIME-Version: 1.0

            --===============1438169132528273974==
            Content-Type: application/json; charset="utf-8"
            MIME-Version: 1.0
            Content-ID: snippet

            {
              "links": {
                "self": {
                  "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj"
                },
                "html": {
                  "href": "https://bitbucket.org/snippets/evzijst/kypj"
                },
                "comments": {
                  "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/comments"
                },
                "watchers": {
                  "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/watchers"
                },
                "commits": {
                  "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/commits"
                }
              },
              "id": kypj,
              "title": "My snippet",
              "created_on": "2014-12-29T22:22:04.790331+00:00",
              "updated_on": "2014-12-29T22:22:04.790331+00:00",
              "is_private": false,
              "files": {
                "foo.txt": {
                  "links": {
                    "self": {
                      "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/foo.txt"
                    },
                    "html": {
                      "href": "https://bitbucket.org/snippets/evzijst/kypj#file-foo.txt"
                    }
                  }
                },
                "image.png": {
                  "links": {
                    "self": {
                      "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/image.png"
                    },
                    "html": {
                      "href": "https://bitbucket.org/snippets/evzijst/kypj#file-image.png"
                    }
                  }
                }
              ],
              "owner": {
                "username": "evzijst",
                "nickname": "evzijst",
                "display_name": "Erik van Zijst",
                "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/users/evzijst"
                  },
                  "html": {
                    "href": "https://bitbucket.org/evzijst"
                  },
                  "avatar": {
                    "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png"
                  }
                }
              },
              "creator": {
                "username": "evzijst",
                "nickname": "evzijst",
                "display_name": "Erik van Zijst",
                "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/users/evzijst"
                  },
                  "html": {
                    "href": "https://bitbucket.org/evzijst"
                  },
                  "avatar": {
                    "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png"
                  }
                }
              }
            }

            --===============1438169132528273974==
            Content-Type: text/plain; charset="us-ascii"
            MIME-Version: 1.0
            Content-Transfer-Encoding: 7bit
            Content-ID: "foo.txt"
            Content-Disposition: attachment; filename="foo.txt"

            foo

            --===============1438169132528273974==
            Content-Type: image/png
            MIME-Version: 1.0
            Content-Transfer-Encoding: base64
            Content-ID: "image.png"
            Content-Disposition: attachment; filename="image.png"

            iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m
            TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB
            cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5
            EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ
            73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN
            AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==
            --===============1438169132528273974==--

        multipart/form-data
        -------------------

        As with creating new snippets, `multipart/form-data` can be used as an
        alternative to `multipart/related`. However, the inherently flat
        structure of form-data means that only basic, root-level properties
        can be returned, while nested elements like `links` are omitted:

            $ curl -H "Accept: multipart/form-data" https://api.bitbucket.org/2.0/snippets/evzijst/kypj

        Response:

            HTTP/1.1 200 OK
            Content-Length: 951
            Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f

            ------------------------------63a4b224c59f
            Content-Disposition: form-data; name="title"
            Content-Type: text/plain; charset="utf-8"

            My snippet
            ------------------------------63a4b224c59f--
            Content-Disposition: attachment; name="file"; filename="foo.txt"
            Content-Type: text/plain

            foo

            ------------------------------63a4b224c59f
            Content-Disposition: attachment; name="file"; filename="image.png"
            Content-Transfer-Encoding: base64
            Content-Type: application/octet-stream

            iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m
            TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB
            cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5
            EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ
            73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN
            AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==
            ------------------------------5957323a6b76--
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/snippet"
            multipart/related:
              schema:
                $ref: "#/components/schemas/snippet"
          description: The snippet object.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet is private and the request was not authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If authenticated user does not have access to the private snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
        "410":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet marked as spam.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Get a snippet
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Used to update a snippet. Use this to add and delete files and to
        change a snippet's title.

        To update a snippet, one can either PUT a full snapshot, or only the
        parts that need to be changed.

        The contract for PUT on this API is that properties missing from the
        request remain untouched so that snippets can be efficiently
        manipulated with differential payloads.

        To delete a property (e.g. the title, or a file), include its name in
        the request, but omit its value (use `null`).

        As in Git, explicit renaming of files is not supported. Instead, to
        rename a file, delete it and add it again under another name. This can
        be done atomically in a single request. Rename detection is left to
        the SCM.

        PUT supports three different content types for both request and
        response bodies:

        * `application/json`
        * `multipart/related`
        * `multipart/form-data`

        The content type used for the request body can be different than that
        used for the response. Content types are specified using standard HTTP
        headers.

        Use the `Content-Type` and `Accept` headers to select the desired
        request and response format.


        application/json
        ----------------

        As with creation and retrieval, the content type determines what
        properties can be manipulated. `application/json` does not support
        file contents and is therefore limited to a snippet's meta data.

        To update the title, without changing any of its files:

            $ curl -X POST -H "Content-Type: application/json" https://api.bitbucket.org/2.0/snippets/evzijst/kypj             -d '{"title": "Updated title"}'


        To delete the title:

            $ curl -X POST -H "Content-Type: application/json" https://api.bitbucket.org/2.0/snippets/evzijst/kypj             -d '{"title": null}'

        Not all parts of a snippet can be manipulated. The owner and creator
        for instance are immutable.


        multipart/related
        -----------------

        `multipart/related` can be used to manipulate all of a snippet's
        properties. The body is identical to a POST. properties omitted from
        the request are left unchanged. Since the `start` part contains JSON,
        the mechanism for manipulating the snippet's meta data is identical
        to `application/json` requests.

        To update one of a snippet's file contents, while also changing its
        title:

            PUT /2.0/snippets/evzijst/kypj HTTP/1.1
            Content-Length: 288
            Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974=="
            MIME-Version: 1.0

            --===============1438169132528273974==
            Content-Type: application/json; charset="utf-8"
            MIME-Version: 1.0
            Content-ID: snippet

            {
              "title": "My updated snippet",
              "files": {
                  "foo.txt": {}
                }
            }

            --===============1438169132528273974==
            Content-Type: text/plain; charset="us-ascii"
            MIME-Version: 1.0
            Content-Transfer-Encoding: 7bit
            Content-ID: "foo.txt"
            Content-Disposition: attachment; filename="foo.txt"

            Updated file contents.

            --===============1438169132528273974==--

        Here only the parts that are changed are included in the body. The
        other files remain untouched.

        Note the use of the `files` list in the JSON part. This list contains
        the files that are being manipulated. This list should have
        corresponding multiparts in the request that contain the new contents
        of these files.

        If a filename in the `files` list does not have a corresponding part,
        it will be deleted from the snippet, as shown below:

            PUT /2.0/snippets/evzijst/kypj HTTP/1.1
            Content-Length: 188
            Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974=="
            MIME-Version: 1.0

            --===============1438169132528273974==
            Content-Type: application/json; charset="utf-8"
            MIME-Version: 1.0
            Content-ID: snippet

            {
              "files": {
                "image.png": {}
              }
            }

            --===============1438169132528273974==--

        To simulate a rename, delete a file and add the same file under
        another name:

            PUT /2.0/snippets/evzijst/kypj HTTP/1.1
            Content-Length: 212
            Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974=="
            MIME-Version: 1.0

            --===============1438169132528273974==
            Content-Type: application/json; charset="utf-8"
            MIME-Version: 1.0
            Content-ID: snippet

            {
                "files": {
                  "foo.txt": {},
                  "bar.txt": {}
                }
            }

            --===============1438169132528273974==
            Content-Type: text/plain; charset="us-ascii"
            MIME-Version: 1.0
            Content-Transfer-Encoding: 7bit
            Content-ID: "bar.txt"
            Content-Disposition: attachment; filename="bar.txt"

            foo

            --===============1438169132528273974==--


        multipart/form-data
        -----------------

        Again, one can also use `multipart/form-data` to manipulate file
        contents and meta data atomically.

            $ curl -X PUT http://localhost:12345/2.0/snippets/evzijst/kypj             -F title="My updated snippet" -F file=@foo.txt

            PUT /2.0/snippets/evzijst/kypj HTTP/1.1
            Content-Length: 351
            Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f

            ------------------------------63a4b224c59f
            Content-Disposition: form-data; name="file"; filename="foo.txt"
            Content-Type: text/plain

            foo

            ------------------------------63a4b224c59f
            Content-Disposition: form-data; name="title"

            My updated snippet
            ------------------------------63a4b224c59f

        To delete a file, omit its contents while including its name in the
        `files` field:

            $ curl -X PUT https://api.bitbucket.org/2.0/snippets/evzijst/kypj -F files=image.png

            PUT /2.0/snippets/evzijst/kypj HTTP/1.1
            Content-Length: 149
            Content-Type: multipart/form-data; boundary=----------------------------ef8871065a86

            ------------------------------ef8871065a86
            Content-Disposition: form-data; name="files"

            image.png
            ------------------------------ef8871065a86--

        The explicit use of the `files` element in `multipart/related` and
        `multipart/form-data` is only required when deleting files.
        The default mode of operation is for file parts to be processed,
        regardless of whether or not they are listed in `files`, as a
        convenience to the client.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/snippet"
            multipart/related:
              schema:
                $ref: "#/components/schemas/snippet"
          description: The updated snippet object.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet is private and the request was not authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If authenticated user does not have permission to update the private snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet:write
        - basic: []
        - api_key: []
      summary: Update a snippet
      tags:
        - Snippets
  "/snippets/{workspace}/{encoded_id}/comments":
    get:
      description: |-
        Used to retrieve a paginated list of all comments for a specific
        snippet.

        This resource works identical to commit and pull request comments.

        The default sorting is oldest to newest and can be overridden with
        the `sort` query parameter.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_snippet_comments"
          description: A paginated list of snippet comments, ordered by creation date.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: List comments on a snippet
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new comment.

        The only required field in the body is `content.raw`.

        To create a threaded reply to an existing comment, include `parent.id`.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/snippet_comment"
        description: The contents of the new comment.
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet_comment"
          description: The newly created comment.
          headers:
            Location:
              description: The URL of the new comment
              schema:
                type: string
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Create a comment on a snippet
      tags:
        - Snippets
  "/snippets/{workspace}/{encoded_id}/comments/{comment_id}":
    delete:
      description: |-
        Deletes a snippet comment.

        Comments can only be removed by the comment author, snippet creator, or workspace admin.
      responses:
        "204":
          description: Indicates the comment was deleted successfully.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user is not the author of the comment.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the comment or the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Delete a comment on a snippet
      tags:
        - Snippets
    get:
      description: Returns the specific snippet comment.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet_comment"
          description: The specified comment.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the comment or snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Get a comment on a snippet
      tags:
        - Snippets
    parameters:
      - description: The id of the comment.
        in: path
        name: comment_id
        required: true
        schema:
          type: integer
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Updates a comment.

        The only required field in the body is `content.raw`.

        Comments can only be updated by their author.
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/snippet_comment"
        description: The contents to update the comment to.
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet_comment"
          description: The updated comment object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the comment or snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Update a comment on a snippet
      tags:
        - Snippets
  "/snippets/{workspace}/{encoded_id}/commits":
    get:
      description: Returns the changes (commits) made on this snippet.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_snippet_commit"
          description: The paginated list of snippet commits.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: List snippet changes
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/snippets/{workspace}/{encoded_id}/commits/{revision}":
    get:
      description: Returns the changes made on this snippet in this commit.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet_commit"
          description: The specified snippet commit.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the commit or the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Get a previous snippet change
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: The commit's SHA1.
        in: path
        name: revision
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/snippets/{workspace}/{encoded_id}/files/{path}":
    get:
      description: |-
        Convenience resource for getting to a snippet's raw files without the
        need for first having to retrieve the snippet itself and having to pull
        out the versioned file links.
      responses:
        "302":
          description: A redirect to the most recent revision of the specified file.
          headers:
            Location:
              description: The URL of the most recent file revision.
              schema:
                type: string
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Get a snippet's raw file at HEAD
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: Path to the file.
        in: path
        name: path
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/snippets/{workspace}/{encoded_id}/watch":
    delete:
      description: |-
        Used to stop watching a specific snippet. Returns 204 (No Content)
        to indicate success.
      responses:
        "204":
          description: Indicates the user stopped watching the snippet successfully.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet:write
        - basic: []
        - api_key: []
      summary: Stop watching a snippet
      tags:
        - Snippets
    get:
      description: |-
        Used to check if the current user is watching a specific snippet.

        Returns 204 (No Content) if the user is watching the snippet and 404 if
        not.

        Hitting this endpoint anonymously always returns a 404.
      responses:
        "204":
          description: If the authenticated user is watching the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist, or if the authenticated user is not watching the snippet.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Check if the current user is watching a snippet
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: Used to start watching a specific snippet. Returns 204 (No Content).
      responses:
        "204":
          description: Indicates the authenticated user is now watching the snippet.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet:write
        - basic: []
        - api_key: []
      summary: Watch a snippet
      tags:
        - Snippets
  "/snippets/{workspace}/{encoded_id}/watchers":
    get:
      deprecated: true
      description: Returns a paginated list of all users watching a specific snippet.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_accounts"
          description: The paginated list of users watching this snippet
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: List users watching a snippet
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/snippets/{workspace}/{encoded_id}/{node_id}":
    delete:
      description: |-
        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.
      responses:
        "204":
          description: If the snippet was deleted successfully.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet is private and the request was not authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If authenticated user does not have permission to delete the private snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
        "405":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If `{node_id}` is not the latest revision.
      security:
        - oauth2:
            - snippet:write
        - basic: []
        - api_key: []
      summary: Delete a previous revision of a snippet
      tags:
        - Snippets
    get:
      description: |-
        Identical to `GET /snippets/encoded_id`, except that this endpoint
        can be used to retrieve the contents of the snippet as it was at an
        older revision, while `/snippets/encoded_id` always returns the
        snippet's current revision.

        Note that only the snippet's file contents are versioned, not its
        meta data properties like the title.

        Other than that, the two endpoints are identical in behavior.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/snippet"
            multipart/related:
              schema:
                $ref: "#/components/schemas/snippet"
          description: The snippet object.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet is private and the request was not authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If authenticated user does not have access to the private snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet, or the revision does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Get a previous revision of a snippet
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: A commit revision (SHA1).
        in: path
        name: node_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Identical to `UPDATE /snippets/encoded_id`, except that this endpoint
        takes an explicit commit revision. Only the snippet's "HEAD"/"tip"
        (most recent) version can be updated and requests on all other,
        older revisions fail by returning a 405 status.

        Usage of this endpoint over the unrestricted `/snippets/encoded_id`
        could be desired if the caller wants to be sure no concurrent
        modifications have taken place between the moment of the UPDATE
        request and the original GET.

        This can be considered a so-called "Compare And Swap", or CAS
        operation.

        Other than that, the two endpoints are identical in behavior.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/snippet"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/snippet"
            multipart/related:
              schema:
                $ref: "#/components/schemas/snippet"
          description: The updated snippet object.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet is private and the request was not authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If authenticated user does not have permission to update the private snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet or the revision does not exist.
        "405":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
            multipart/form-data:
              schema:
                $ref: "#/components/schemas/error"
            multipart/related:
              schema:
                $ref: "#/components/schemas/error"
          description: If `{node_id}` is not the latest revision.
      security:
        - oauth2:
            - snippet:write
        - basic: []
        - api_key: []
      summary: Update a previous revision of a snippet
      tags:
        - Snippets
  "/snippets/{workspace}/{encoded_id}/{node_id}/files/{path}":
    get:
      description: |-
        Retrieves the raw contents of a specific file in the snippet. The
        `Content-Disposition` header will be "attachment" to avoid issues with
        malevolent executable files.

        The file's mime type is derived from its filename and returned in the
        `Content-Type` header.

        Note that for text files, no character encoding is included as part of
        the content type.
      responses:
        "200":
          description: Returns the contents of the specified file.
          headers:
            Content-Disposition:
              description: attachment
              schema:
                type: string
            Content-Type:
              description: The mime type as derived from the filename
              schema:
                type: string
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the file or snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Get a snippet's raw file
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: A commit revision (SHA1).
        in: path
        name: node_id
        required: true
        schema:
          type: string
      - description: Path to the file.
        in: path
        name: path
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/snippets/{workspace}/{encoded_id}/{revision}/diff":
    get:
      description: |-
        Returns the diff of the specified commit against its first parent.

        Note that this resource is different in functionality from the `patch`
        resource.

        The differences between a diff and a patch are:

        * patches have a commit header with the username, message, etc
        * diffs support the optional `path=foo/bar.py` query param to filter the
          diff to just that one file diff (not supported for patches)
        * for a merge, the diff will show the diff between the merge commit and
          its first parent (identical to how PRs work), while patch returns a
          response containing separate patches for each commit on the second
          parent's ancestry, up to the oldest common ancestor (identical to
          its reachability).

        Note that the character encoding of the contents of the diff is
        unspecified as Git does not track this, making it hard for
        Bitbucket to reliably determine this.
      parameters:
        - description: When used, only one the diff of the specified file will be returned.
          in: query
          name: path
          schema:
            type: string
      responses:
        "200":
          description: The raw diff contents.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Get snippet changes between versions
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`.
        in: path
        name: revision
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/snippets/{workspace}/{encoded_id}/{revision}/patch":
    get:
      description: |-
        Returns the patch of the specified commit against its first
        parent.

        Note that this resource is different in functionality from the `diff`
        resource.

        The differences between a diff and a patch are:

        * patches have a commit header with the username, message, etc
        * diffs support the optional `path=foo/bar.py` query param to filter the
          diff to just that one file diff (not supported for patches)
        * for a merge, the diff will show the diff between the merge commit and
          its first parent (identical to how PRs work), while patch returns a
          response containing separate patches for each commit on the second
          parent's ancestry, up to the oldest common ancestor (identical to
          its reachability).

        Note that the character encoding of the contents of the patch is
        unspecified as Git does not track this, making it hard for
        Bitbucket to reliably determine this.
      responses:
        "200":
          description: The raw patch contents.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have access to the snippet.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the snippet does not exist.
      security:
        - oauth2:
            - snippet
        - basic: []
        - api_key: []
      summary: Get snippet patch between versions
      tags:
        - Snippets
    parameters:
      - description: The snippet id.
        in: path
        name: encoded_id
        required: true
        schema:
          type: string
      - description: A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`.
        in: path
        name: revision
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/teams/{username}/pipelines_config/variables":
    get:
      deprecated: true
      description: |-
        Find account level variables.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: getPipelineVariablesForTeam
      parameters:
        - description: The account.
          in: path
          name: username
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipeline_variables"
          description: The found account level variables.
      summary: List variables for an account
      tags:
        - Pipelines
    post:
      deprecated: true
      description: |-
        Create an account level variable.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: createPipelineVariableForTeam
      parameters:
        - description: The account.
          in: path
          name: username
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/pipeline_variable2"
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The created variable.
          headers:
            Location:
              description: The URL of the newly created pipeline variable.
              schema:
                type: string
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account does not exist.
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A variable with the provided key already exists.
      summary: Create a variable for a user
      tags:
        - Pipelines
  "/teams/{username}/pipelines_config/variables/{variable_uuid}":
    delete:
      deprecated: true
      description: |-
        Delete a team level variable.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: deletePipelineVariableForTeam
      parameters:
        - description: The account.
          in: path
          name: username
          required: true
          schema:
            type: string
        - description: The UUID of the variable to delete.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The variable was deleted
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or the variable with the provided UUID does not exist.
      summary: Delete a variable for a team
      tags:
        - Pipelines
    get:
      deprecated: true
      description: |-
        Retrieve a team level variable.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: getPipelineVariableForTeam
      parameters:
        - description: The account.
          in: path
          name: username
          required: true
          schema:
            type: string
        - description: The UUID of the variable to retrieve.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The variable.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or variable with the given UUID was not found.
      summary: Get a variable for a team
      tags:
        - Pipelines
    put:
      deprecated: true
      description: |-
        Update a team level variable.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: updatePipelineVariableForTeam
      parameters:
        - description: The account.
          in: path
          name: username
          required: true
          schema:
            type: string
        - description: The UUID of the variable.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/pipeline_variable"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The variable was updated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or the variable was not found.
      summary: Update a variable for a team
      tags:
        - Pipelines
  "/teams/{username}/search/code":
    get:
      description: |
        Search for code in the repositories of the specified team.

        Searching across all repositories:

        ```
        curl 'https://api.bitbucket.org/2.0/teams/team_name/search/code?search_query=foo'
        {
          "size": 1,
          "page": 1,
          "pagelen": 10,
          "query_substituted": false,
          "values": [
            {
              "type": "code_search_result",
              "content_match_count": 2,
              "content_matches": [
                {
                  "lines": [
                    {
                      "line": 2,
                      "segments": []
                    },
                    {
                      "line": 3,
                      "segments": [
                        {
                          "text": "def "
                        },
                        {
                          "text": "foo",
                          "match": true
                        },
                        {
                          "text": "():"
                        }
                      ]
                    },
                    {
                      "line": 4,
                      "segments": [
                        {
                          "text": "    print(\"snek\")"
                        }
                      ]
                    },
                    {
                      "line": 5,
                      "segments": []
                    }
                  ]
                }
              ],
              "path_matches": [
                {
                  "text": "src/"
                },
                {
                  "text": "foo",
                  "match": true
                },
                {
                  "text": ".py"
                }
              ],
              "file": {
                "path": "src/foo.py",
                "type": "commit_file",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py"
                  }
                }
              }
            }
          ]
        }
        ```

        Note that searches can match in the file's text (`content_matches`),
        the path (`path_matches`), or both as in the example above.

        You can use the same syntax for the search query as in the UI, e.g.
        to only search within a specific repository:

        ```
        curl 'https://api.bitbucket.org/2.0/teams/team_name/search/code?search_query=foo+repo:demo'
        # results from the "demo" repository
        ```

        Similar to other APIs, you can request more fields using a
        `fields` query parameter. E.g. to get some more information about
        the repository of matched files (the `%2B` is a URL-encoded `+`):

        ```
        curl 'https://api.bitbucket.org/2.0/teams/team_name/search/code'\
             '?search_query=foo&fields=%2Bvalues.file.commit.repository'
        {
          "size": 1,
          "page": 1,
          "pagelen": 10,
          "query_substituted": false,
          "values": [
            {
              "type": "code_search_result",
              "content_match_count": 1,
              "content_matches": [...],
              "path_matches": [...],
              "file": {
                "commit": {
                  "type": "commit",
                  "hash": "ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b",
                  "links": {
                    "self": {
                      "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b"
                    },
                    "html": {
                      "href": "https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b"
                    }
                  },
                  "repository": {
                    "name": "demo",
                    "type": "repository",
                    "full_name": "my-workspace/demo",
                    "links": {
                      "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo"
                      },
                      "html": {
                        "href": "https://bitbucket.org/my-workspace/demo"
                      },
                      "avatar": {
                        "href": "https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default"
                      }
                    },
                    "uuid": "{850e1749-781a-4115-9316-df39d0600e7a}"
                  }
                },
                "type": "commit_file",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py"
                  }
                },
                "path": "src/foo.py"
              }
            }
          ]
        }
        ```

        Try `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.
      operationId: searchTeam
      parameters:
        - description: The account to search in; either the username or the UUID in curly braces
          in: path
          name: username
          required: true
          schema:
            type: string
        - description: The search query
          in: query
          name: search_query
          required: true
          schema:
            type: string
        - description: Which page of the search results to retrieve
          in: query
          name: page
          required: false
          schema:
            default: 1
            format: int32
            type: integer
        - description: How many search results to retrieve per page
          in: query
          name: pagelen
          required: false
          schema:
            default: 10
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/search_result_page"
          description: Successful search
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the search request was invalid due to one of the
            following reasons:

            * the specified type of target account doesn''t match the actual
            account type;

            * malformed pagination properties;

            * missing or malformed search query, in the latter case an error
            key will be returned in `error.data.key` property.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Search is not enabled for the requested team, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on
        "429":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Too many requests, try again later
      summary: Search for code in a team's repositories
      tags:
        - Search
  /user:
    get:
      description: Returns the currently logged in user.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/account"
          description: The current user.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: When the request wasn't authenticated.
      security:
        - oauth2:
            - account
        - basic: []
        - api_key: []
      summary: Get current user
      tags:
        - Users
    parameters: []
  /user/emails:
    get:
      description: |-
        Returns all the authenticated user's email addresses. Both
        confirmed and unconfirmed.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Unexpected error.
      security:
        - oauth2:
            - email
        - basic: []
        - api_key: []
      summary: List email addresses for current user
      tags:
        - Users
    parameters: []
  "/user/emails/{email}":
    get:
      description: |-
        Returns details about a specific one of the authenticated user's
        email addresses.

        Details describe whether the address has been confirmed by the user and
        whether it is the user's primary address or not.
      responses:
        default:
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Unexpected error.
      security:
        - oauth2:
            - email
        - basic: []
        - api_key: []
      summary: Get an email address for current user
      tags:
        - Users
    parameters:
      - description: Email address of the user.
        in: path
        name: email
        required: true
        schema:
          type: string
  /user/permissions/repositories:
    get:
      description: |-
        Returns an object for each repository the caller has explicit access
        to and their effective permission — the highest level of permission the
        caller has. This does not return public repositories that the user was
        not granted any specific permission in, and does not distinguish between
        explicit and implicit privileges.

        Permissions can be:

        * `admin`
        * `write`
        * `read`

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/user/permissions/repositories

        {
          "pagelen": 10,
          "values": [
            {
              "type": "repository_permission",
              "user": {
                "type": "user",
                "nickname": "evzijst",
                "display_name": "Erik van Zijst",
                "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}"
              },
              "repository": {
                "type": "repository",
                "name": "geordi",
                "full_name": "bitbucket/geordi",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
              },
              "permission": "admin"
            }
          ],
          "page": 1,
          "size": 1
        }
        ```

        Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by
        repository or permission by adding the following query string
        parameters:

        * `q=repository.name="geordi"` or `q=permission>"read"`
        * `sort=repository.name`

        Note that the query parameter values need to be URL escaped so that `=`
        would become `%3D`.
      parameters:
        - description: |-
            
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |-
            
            Name of a response property sort the result by as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_repository_permissions"
          description: Repository permissions for the repositories a caller has explicit access to.
      security:
        - oauth2:
            - account
            - repository
        - basic: []
        - api_key: []
      summary: List repository permissions for a user
      tags:
        - Repositories
    parameters: []
  /user/permissions/workspaces:
    get:
      description: |-
        Returns an object for each workspace the caller is a member of, and
        their effective role - the highest level of privilege the caller has.
        If a user is a member of multiple groups with distinct roles, only the
        highest level is returned.

        Permissions can be:

        * `owner`
        * `collaborator`
        * `member`

        **The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,
        see the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/user/permissions/workspaces

        {
          "pagelen": 10,
          "page": 1,
          "size": 1,
          "values": [
            {
              "type": "workspace_membership",
              "permission": "owner",
              "last_accessed": "2019-03-07T12:35:02.900024+00:00",
              "added_on": "2018-10-11T17:42:02.961424+00:00",
              "user": {
                "type": "user",
                "uuid": "{470c176d-3574-44ea-bb41-89e8638bcca4}",
                "nickname": "evzijst",
                "display_name": "Erik van Zijst",
              },
              "workspace": {
                "type": "workspace",
                "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}",
                "slug": "bbworkspace1",
                "name": "Atlassian Bitbucket",
              }
            }
          ]
        }
        ```

        Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by
        workspace or permission by adding the following query string parameters:

        * `q=workspace.slug="bbworkspace1"` or `q=permission="owner"`
        * `sort=workspace.slug`

        Note that the query parameter values need to be URL escaped so that `=`
        would become `%3D`.
      parameters:
        - description: |-
            
            Query string to narrow down the response. See
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            
            Name of a response property to sort results. See
            [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results)
            for details.
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_workspace_memberships"
          description: All of the workspace memberships for the authenticated user.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
      security:
        - oauth2:
            - account
        - basic: []
        - api_key: []
      summary: List workspaces for the current user
      tags:
        - Workspaces
    parameters: []
  "/users/{selected_user}":
    get:
      description: |-
        Gets the public information associated with a user account.

        If the user's profile is private, `location`, `website` and
        `created_on` elements are omitted.

        Note that the user object returned by this operation is changing significantly, due to privacy changes.
        See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-bitbucket-user-objects) for details.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/account"
          description: The user object
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If no user exists for the specified UUID, or if the specified account is a team account, not a personal account.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Get a user
      tags:
        - Users
    parameters:
      - description: |
          This can either be the UUID of the account, surrounded by curly-braces, for
          example: `{account UUID}`, OR an Atlassian Account ID.
        in: path
        name: selected_user
        required: true
        schema:
          type: string
  "/users/{selected_user}/pipelines_config/variables":
    get:
      deprecated: true
      description: |-
        Find user level variables.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: getPipelineVariablesForUser
      parameters:
        - description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
          in: path
          name: selected_user
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipeline_variables"
          description: The found user level variables.
      summary: List variables for a user
      tags:
        - Pipelines
    post:
      deprecated: true
      description: |-
        Create a user level variable.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: createPipelineVariableForUser
      parameters:
        - description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
          in: path
          name: selected_user
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/pipeline_variable2"
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The created variable.
          headers:
            Location:
              description: The URL of the newly created pipeline variable.
              schema:
                type: string
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account does not exist.
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A variable with the provided key already exists.
      summary: Create a variable for a user
      tags:
        - Pipelines
  "/users/{selected_user}/pipelines_config/variables/{variable_uuid}":
    delete:
      deprecated: true
      description: |-
        Delete an account level variable.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: deletePipelineVariableForUser
      parameters:
        - description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
          in: path
          name: selected_user
          required: true
          schema:
            type: string
        - description: The UUID of the variable to delete.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The variable was deleted
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or the variable with the provided UUID does not exist.
      summary: Delete a variable for a user
      tags:
        - Pipelines
    get:
      deprecated: true
      description: |-
        Retrieve a user level variable.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: getPipelineVariableForUser
      parameters:
        - description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
          in: path
          name: selected_user
          required: true
          schema:
            type: string
        - description: The UUID of the variable to retrieve.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The variable.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or variable with the given UUID was not found.
      summary: Get a variable for a user
      tags:
        - Pipelines
    put:
      deprecated: true
      description: |-
        Update a user level variable.
        This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).
      operationId: updatePipelineVariableForUser
      parameters:
        - description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
          in: path
          name: selected_user
          required: true
          schema:
            type: string
        - description: The UUID of the variable.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/pipeline_variable"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The variable was updated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The account or the variable was not found.
      summary: Update a variable for a user
      tags:
        - Pipelines
  "/users/{selected_user}/properties/{app_key}/{property_name}":
    delete:
      description: Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a user.
      operationId: deleteUserHostedPropertyValue
      parameters:
        - description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
          in: path
          name: selected_user
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      responses:
        "204":
          description: An empty response.
      summary: Delete a user application property
      tags:
        - properties
    get:
      description: Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a user.
      operationId: retrieveUserHostedPropertyValue
      parameters:
        - description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
          in: path
          name: selected_user
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/application_property"
          description: The value of the property.
      summary: Get a user application property
      tags:
        - properties
    put:
      description: Update an [application property](/cloud/bitbucket/application-properties/) value stored against a user.
      operationId: updateUserHostedPropertyValue
      parameters:
        - description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
          in: path
          name: selected_user
          required: true
          schema:
            type: string
        - description: The key of the Connect app.
          in: path
          name: app_key
          required: true
          schema:
            type: string
        - description: The name of the property.
          in: path
          name: property_name
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/application_property"
      responses:
        "204":
          description: An empty response.
      summary: Update a user application property
      tags:
        - properties
  "/users/{selected_user}/search/code":
    get:
      description: |
        Search for code in the repositories of the specified user.

        Searching across all repositories:

        ```
        curl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code?search_query=foo'
        {
          "size": 1,
          "page": 1,
          "pagelen": 10,
          "query_substituted": false,
          "values": [
            {
              "type": "code_search_result",
              "content_match_count": 2,
              "content_matches": [
                {
                  "lines": [
                    {
                      "line": 2,
                      "segments": []
                    },
                    {
                      "line": 3,
                      "segments": [
                        {
                          "text": "def "
                        },
                        {
                          "text": "foo",
                          "match": true
                        },
                        {
                          "text": "():"
                        }
                      ]
                    },
                    {
                      "line": 4,
                      "segments": [
                        {
                          "text": "    print(\"snek\")"
                        }
                      ]
                    },
                    {
                      "line": 5,
                      "segments": []
                    }
                  ]
                }
              ],
              "path_matches": [
                {
                  "text": "src/"
                },
                {
                  "text": "foo",
                  "match": true
                },
                {
                  "text": ".py"
                }
              ],
              "file": {
                "path": "src/foo.py",
                "type": "commit_file",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py"
                  }
                }
              }
            }
          ]
        }
        ```

        Note that searches can match in the file's text (`content_matches`),
        the path (`path_matches`), or both as in the example above.

        You can use the same syntax for the search query as in the UI, e.g.
        to only search within a specific repository:

        ```
        curl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code?search_query=foo+repo:demo'
        # results from the "demo" repository
        ```

        Similar to other APIs, you can request more fields using a
        `fields` query parameter. E.g. to get some more information about
        the repository of matched files (the `%2B` is a URL-encoded `+`):

        ```
        curl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code'\
             '?search_query=foo&fields=%2Bvalues.file.commit.repository'
        {
          "size": 1,
          "page": 1,
          "pagelen": 10,
          "query_substituted": false,
          "values": [
            {
              "type": "code_search_result",
              "content_match_count": 1,
              "content_matches": [...],
              "path_matches": [...],
              "file": {
                "commit": {
                  "type": "commit",
                  "hash": "ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b",
                  "links": {
                    "self": {
                      "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b"
                    },
                    "html": {
                      "href": "https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b"
                    }
                  },
                  "repository": {
                    "name": "demo",
                    "type": "repository",
                    "full_name": "my-workspace/demo",
                    "links": {
                      "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo"
                      },
                      "html": {
                        "href": "https://bitbucket.org/my-workspace/demo"
                      },
                      "avatar": {
                        "href": "https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default"
                      }
                    },
                    "uuid": "{850e1749-781a-4115-9316-df39d0600e7a}"
                  }
                },
                "type": "commit_file",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py"
                  }
                },
                "path": "src/foo.py"
              }
            }
          ]
        }
        ```

        Try `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.
      operationId: searchAccount
      parameters:
        - description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
          in: path
          name: selected_user
          required: true
          schema:
            type: string
        - description: The search query
          in: query
          name: search_query
          required: true
          schema:
            type: string
        - description: Which page of the search results to retrieve
          in: query
          name: page
          required: false
          schema:
            default: 1
            format: int32
            type: integer
        - description: How many search results to retrieve per page
          in: query
          name: pagelen
          required: false
          schema:
            default: 10
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/search_result_page"
          description: Successful search
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the search request was invalid due to one of the
            following reasons:

            * the specified type of target account doesn''t match the actual
            account type;

            * malformed pagination properties;

            * missing or malformed search query, in the latter case an error
            key will be returned in `error.data.key` property.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Search is not enabled for the requested user, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on
        "429":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Too many requests, try again later
      summary: Search for code in a user's repositories
      tags:
        - Search
  "/users/{selected_user}/ssh-keys":
    get:
      description: |-
        Returns a paginated list of the user's SSH public keys.

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys
        {
            "page": 1,
            "pagelen": 10,
            "size": 1,
            "values": [
                {
                    "comment": "user@myhost",
                    "created_on": "2018-03-14T13:17:05.196003+00:00",
                    "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
                    "label": "",
                    "last_used": "2018-03-20T13:18:05.196003+00:00",
                    "links": {
                        "self": {
                            "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a"
                        }
                    },
                    "owner": {
                        "display_name": "Mark Adams",
                        "links": {
                            "avatar": {
                                "href": "https://bitbucket.org/account/markadams-atl/avatar/32/"
                            },
                            "html": {
                                "href": "https://bitbucket.org/markadams-atl/"
                            },
                            "self": {
                                "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}"
                            }
                        },
                        "type": "user",
                        "username": "markadams-atl",
                        "nickname": "markadams-atl",
                        "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}"
                    },
                    "type": "ssh_key",
                    "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}"
                }
            ]
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_ssh_user_keys"
          description: A list of the SSH keys associated with the account.
        "403":
          description: If the specified user's keys are not accessible to the current user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user does not exist
      security:
        - oauth2:
            - account
        - basic: []
        - api_key: []
      summary: List SSH keys
      tags:
        - Ssh
    parameters:
      - description: |
          This can either be the UUID of the account, surrounded by curly-braces, for
          example: `{account UUID}`, OR an Atlassian Account ID.
        in: path
        name: selected_user
        required: true
        schema:
          type: string
    post:
      description: |-
        Adds a new SSH public key to the specified user account and returns the resulting key.

        Example:
        ```
        $ curl -X POST -H "Content-Type: application/json" -d '{"key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY user@myhost"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys

        {
            "comment": "user@myhost",
            "created_on": "2018-03-14T13:17:05.196003+00:00",
            "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
            "label": "",
            "last_used": "2018-03-20T13:18:05.196003+00:00",
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a"
                }
            },
            "owner": {
                "display_name": "Mark Adams",
                "links": {
                    "avatar": {
                        "href": "https://bitbucket.org/account/markadams-atl/avatar/32/"
                    },
                    "html": {
                        "href": "https://bitbucket.org/markadams-atl/"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}"
                    }
                },
                "type": "user",
                "username": "markadams-atl",
                "nickname": "markadams-atl",
                "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}"
            },
            "type": "ssh_key",
            "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}"
        }
        ```
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ssh_account_key"
        description: The new SSH key object. Note that the username property has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis).
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ssh_account_key"
          description: The newly created SSH key.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the submitted key or related value is invalid
        "403":
          description: If the current user does not have permission to add a key for the specified user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user does not exist
      security:
        - oauth2:
            - account:write
        - basic: []
        - api_key: []
      summary: Add a new SSH key
      tags:
        - Ssh
  "/users/{selected_user}/ssh-keys/{key_id}":
    delete:
      description: |-
        Deletes a specific SSH public key from a user's account

        Example:
        ```
        $ curl -X DELETE https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}
        ```
      responses:
        "204":
          description: The key has been deleted
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the submitted key or related value is invalid
        "403":
          description: If the current user does not have permission to add a key for the specified user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user does not exist
      security:
        - oauth2:
            - account:write
        - basic: []
        - api_key: []
      summary: Delete a SSH key
      tags:
        - Ssh
    get:
      description: |-
        Returns a specific SSH public key belonging to a user.

        Example:
        ```
        $ curl https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{fbe4bbab-f6f7-4dde-956b-5c58323c54b3}

        {
            "comment": "user@myhost",
            "created_on": "2018-03-14T13:17:05.196003+00:00",
            "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
            "label": "",
            "last_used": "2018-03-20T13:18:05.196003+00:00",
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a"
                }
            },
            "owner": {
                "display_name": "Mark Adams",
                "links": {
                    "avatar": {
                        "href": "https://bitbucket.org/account/markadams-atl/avatar/32/"
                    },
                    "html": {
                        "href": "https://bitbucket.org/markadams-atl/"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}"
                    }
                },
                "type": "user",
                "username": "markadams-atl",
                "nickname": "markadams-atl",
                "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}"
            },
            "type": "ssh_key",
            "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}"
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ssh_account_key"
          description: The specific SSH key matching the user and UUID
        "403":
          description: If the specified user or key is not accessible to the current user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user or key does not exist
      security:
        - oauth2:
            - account
        - basic: []
        - api_key: []
      summary: Get a SSH key
      tags:
        - Ssh
    parameters:
      - description: The SSH key's UUID value.
        in: path
        name: key_id
        required: true
        schema:
          type: string
      - description: |
          This can either be the UUID of the account, surrounded by curly-braces, for
          example: `{account UUID}`, OR an Atlassian Account ID.
        in: path
        name: selected_user
        required: true
        schema:
          type: string
    put:
      description: |-
        Updates a specific SSH public key on a user's account

        Note: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again.

        Example:
        ```
        $ curl -X PUT -H "Content-Type: application/json" -d '{"label": "Work key"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}

        {
            "comment": "",
            "created_on": "2018-03-14T13:17:05.196003+00:00",
            "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY",
            "label": "Work key",
            "last_used": "2018-03-20T13:18:05.196003+00:00",
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a"
                }
            },
            "owner": {
                "display_name": "Mark Adams",
                "links": {
                    "avatar": {
                        "href": "https://bitbucket.org/account/markadams-atl/avatar/32/"
                    },
                    "html": {
                        "href": "https://bitbucket.org/markadams-atl/"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}"
                    }
                },
                "type": "user",
                "username": "markadams-atl",
                "nickname": "markadams-atl",
                "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}"
            },
            "type": "ssh_key",
            "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}"
        }
        ```
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ssh_account_key"
        description: The updated SSH key object
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ssh_account_key"
          description: The newly updated SSH key.
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the submitted key or related value is invalid
        "403":
          description: If the current user does not have permission to add a key for the specified user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user does not exist
      security:
        - oauth2:
            - account:write
        - basic: []
        - api_key: []
      summary: Update a SSH key
      tags:
        - Ssh
  /workspaces:
    get:
      description: |-
        Returns a list of workspaces accessible by the authenticated user.

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/workspaces

        {
          "pagelen": 10,
          "page": 1,
          "size": 1,
          "values": [
            {
                "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}",
                "links": {
                    "owners": {
                        "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members?q=permission%3D%22owner%22"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1"
                    },
                    "repositories": {
                        "href": "https://api.bitbucket.org/2.0/repositories/bbworkspace1"
                    },
                    "snippets": {
                        "href": "https://api.bitbucket.org/2.0/snippets/bbworkspace1"
                    },
                    "html": {
                        "href": "https://bitbucket.org/bbworkspace1/"
                    },
                    "avatar": {
                        "href": "https://bitbucket.org/workspaces/bbworkspace1/avatar/?ts=1543465801"
                    },
                    "members": {
                        "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members"
                    },
                    "projects": {
                        "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects"
                    }
                },
                "created_on": "2018-11-14T19:15:05.058566+00:00",
                "type": "workspace",
                "slug": "bbworkspace1",
                "is_private": true,
                "name": "Atlassian Bitbucket"
            }
          ]
        }
        ```

        Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by
        workspace or permission by adding the following query string parameters:

        * `q=slug="bbworkspace1"` or `q=is_private=true`
        * `sort=created_on`

        Note that the query parameter values need to be URL escaped so that `=`
        would become `%3D`.

        **The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,
        see the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**
      parameters:
        - description: "

            \            Filters the workspaces based on the authenticated user's role on each workspace.


            \            * **member**: returns a list of all the workspaces which the caller is a member of

            \                at least one workspace group or repository

            \            * **collaborator**: returns a list of workspaces which the caller has write access

            \                to at least one repository in the workspace

            \            * **owner**: returns a list of workspaces which the caller has administrator access

            \            "
          in: query
          name: role
          required: false
          schema:
            enum:
              - owner
              - collaborator
              - member
            type: string
        - description: |-
            
            Query string to narrow down the response. See
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            
            Name of a response property to sort results. See
            [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results)
            for details.
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_workspaces"
          description: The list of workspaces accessible by the authenticated user.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
      security:
        - oauth2:
            - account
        - basic: []
        - api_key: []
      summary: List workspaces for user
      tags:
        - Workspaces
    parameters: []
  "/workspaces/{workspace}":
    get:
      description: Returns the requested workspace.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/workspace"
          description: The workspace.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If no workspace exists for the specified name or UUID.
      security:
        - oauth2: []
        - basic: []
        - api_key: []
      summary: Get a workspace
      tags:
        - Workspaces
    parameters:
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/workspaces/{workspace}/hooks":
    get:
      description: Returns a paginated list of webhooks installed on this workspace.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_webhook_subscriptions"
          description: The paginated list of installed webhooks.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user is not an owner on the specified workspace.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified workspace does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: List webhooks for a workspace
      tags:
        - Workspaces
        - Webhooks
    parameters:
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new webhook on the specified workspace.

        Workspace webhooks are fired for events from all repositories contained
        by that workspace.

        Example:

        ```
        $ curl -X POST -u credentials -H 'Content-Type: application/json'
          https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks
          -d '
            {
              "description": "Webhook Description",
              "url": "https://example.com/",
              "active": true,
              "events": [
                "repo:push",
                "issue:created",
                "issue:updated"
              ]
            }'
        ```

        This call requires the webhook scope, as well as any scope
        that applies to the events that the webhook subscribes to. In the
        example above that means: `webhook`, `repository` and `issue`.

        The `url` must properly resolve and cannot be an internal, non-routed address.

        Only workspace owners can install webhooks on workspaces.
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/webhook_subscription"
          description: If the webhook was registered successfully.
          headers:
            Location:
              description: The URL of new newly created webhook.
              schema:
                type: string
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have permission to install webhooks on the specified workspace.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified workspace does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: Create a webhook for a workspace
      tags:
        - Workspaces
        - Webhooks
  "/workspaces/{workspace}/hooks/{uid}":
    delete:
      description: Deletes the specified webhook subscription from the given workspace.
      responses:
        "204":
          description: When the webhook was deleted successfully
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have permission to delete the webhook.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the webhook or workspace does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: Delete a webhook for a workspace
      tags:
        - Workspaces
        - Webhooks
    get:
      description: |-
        Returns the webhook with the specified id installed on the given
        workspace.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/webhook_subscription"
          description: The webhook subscription object.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the webhook or workspace does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: Get a webhook for a workspace
      tags:
        - Workspaces
        - Webhooks
    parameters:
      - description: Installed webhook's ID
        in: path
        name: uid
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Updates the specified webhook subscription.

        The following properties can be mutated:

        * `description`
        * `url`
        * `active`
        * `events`
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/webhook_subscription"
          description: The webhook subscription object.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have permission to update the webhook.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the webhook or workspace does not exist.
      security:
        - oauth2:
            - webhook
        - basic: []
        - api_key: []
      summary: Update a webhook for a workspace
      tags:
        - Workspaces
        - Webhooks
  "/workspaces/{workspace}/members":
    get:
      description: Returns all members of the requested workspace.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_workspace_memberships"
          description: The list of users that are part of a workspace.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
      security:
        - oauth2:
            - account
        - basic: []
        - api_key: []
      summary: List users in a workspace
      tags:
        - Workspaces
    parameters:
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/workspaces/{workspace}/members/{member}":
    get:
      description: |-
        Returns the workspace membership, which includes
        a `User` object for the member and a `Workspace` object
        for the requested workspace.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/workspace_membership"
          description: The user that is part of a workspace.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A workspace cannot be found, or a user cannot be found, or the user is not a a member of the workspace.
      security:
        - oauth2:
            - account
        - basic: []
        - api_key: []
      summary: Get user membership for a workspace
      tags:
        - Workspaces
    parameters:
      - description: Member's UUID or Atlassian ID.
        in: path
        name: member
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/workspaces/{workspace}/permissions":
    get:
      description: |-
        Returns the list of members in a workspace
        and their permission levels.
        Permission can be:
        * `owner`
        * `collaborator`
        * `member`

        **The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,
        see the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**

        Example:

        ```
        $ curl -X https://api.bitbucket.org/2.0/workspaces/bbworkspace1/permissions

        {
            "pagelen": 10,
            "values": [
                {
                    "permission": "owner",
                    "type": "workspace_membership",
                    "user": {
                        "type": "user",
                        "uuid": "{470c176d-3574-44ea-bb41-89e8638bcca4}",
                        "display_name": "Erik van Zijst",
                    },
                    "workspace": {
                        "type": "workspace",
                        "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}",
                        "slug": "bbworkspace1",
                        "name": "Atlassian Bitbucket",
                    }
                },
                {
                    "permission": "member",
                    "type": "workspace_membership",
                    "user": {
                        "type": "user",
                        "nickname": "seanaty",
                        "display_name": "Sean Conaty",
                        "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}"
                    },
                    "workspace": {
                        "type": "workspace",
                        "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}",
                        "slug": "bbworkspace1",
                        "name": "Atlassian Bitbucket",
                    }
                }
            ],
            "page": 1,
            "size": 2
        }
        ```

        Results may be further [filtered](/cloud/bitbucket/rest/intro/#filtering) by
        permission by adding the following query string parameters:

        * `q=permission="owner"`
      parameters:
        - description: |-
            
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_workspace_memberships"
          description: The list of users that are part of a workspace, along with their permission.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
      security:
        - oauth2:
            - account
        - basic: []
        - api_key: []
      summary: List user permissions in a workspace
      tags:
        - Workspaces
    parameters:
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/workspaces/{workspace}/permissions/repositories":
    get:
      description: |-
        Returns an object for each repository permission for all of a
        workspace's repositories.

        Permissions returned are effective permissions: the highest level of
        permission the user has. This does not distinguish between direct and
        indirect (group) privileges.

        Only users with admin permission for the team may access this resource.

        Permissions can be:

        * `admin`
        * `write`
        * `read`

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories

        {
          "pagelen": 10,
          "values": [
            {
              "type": "repository_permission",
              "user": {
                "type": "user",
                "display_name": "Erik van Zijst",
                "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}"
              },
              "repository": {
                "type": "repository",
                "name": "geordi",
                "full_name": "atlassian_tutorial/geordi",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
              },
              "permission": "admin"
            },
            {
              "type": "repository_permission",
              "user": {
                "type": "user",
                "display_name": "Sean Conaty",
                "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}"
              },
              "repository": {
                "type": "repository",
                "name": "geordi",
                "full_name": "atlassian_tutorial/geordi",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
              },
              "permission": "write"
            },
            {
              "type": "repository_permission",
              "user": {
                "type": "user",
                "display_name": "Jeff Zeng",
                "uuid": "{47f92a9a-c3a3-4d0b-bc4e-782a969c5c72}"
              },
              "repository": {
                "type": "repository",
                "name": "whee",
                "full_name": "atlassian_tutorial/whee",
                "uuid": "{30ba25e9-51ff-4555-8dd0-fc7ee2fa0895}"
              },
              "permission": "admin"
            }
          ],
          "page": 1,
          "size": 3
        }
        ```

        Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)
        by repository, user, or permission by adding the following query string
        parameters:

        * `q=repository.name="geordi"` or `q=permission>"read"`
        * `sort=user.display_name`

        Note that the query parameter values need to be URL escaped so that `=`
        would become `%3D`.
      parameters:
        - description: |-
            
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            
            Name of a response property sort the result by as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_repository_permissions"
          description: List of workspace's repository permissions.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the workspace.
      security:
        - oauth2:
            - account
        - basic: []
        - api_key: []
      summary: List all repository permissions for a workspace
      tags:
        - Workspaces
    parameters:
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/workspaces/{workspace}/permissions/repositories/{repo_slug}":
    get:
      description: |-
        Returns an object for the repository permission of each user in the
        requested repository.

        Permissions returned are effective permissions: the highest level of
        permission the user has. This does not distinguish between direct and
        indirect (group) privileges.

        Only users with admin permission for the repository may access this resource.

        Permissions can be:

        * `admin`
        * `write`
        * `read`

        Example:

        ```
        $ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories/geordi

        {
          "pagelen": 10,
          "values": [
            {
              "type": "repository_permission",
              "user": {
                "type": "user",
                "display_name": "Erik van Zijst",
                "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}"
              },
              "repository": {
                "type": "repository",
                "name": "geordi",
                "full_name": "atlassian_tutorial/geordi",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
              },
              "permission": "admin"
            },
            {
              "type": "repository_permission",
              "user": {
                "type": "user",
                "display_name": "Sean Conaty",
                "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}"
              },
              "repository": {
                "type": "repository",
                "name": "geordi",
                "full_name": "atlassian_tutorial/geordi",
                "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}"
              },
              "permission": "write"
            }
          ],
          "page": 1,
          "size": 2
        }
        ```

        Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)
        by user, or permission by adding the following query string parameters:

        * `q=permission>"read"`
        * `sort=user.display_name`

        Note that the query parameter values need to be URL escaped so that `=`
        would become `%3D`.
      parameters:
        - description: |-
            
            Query string to narrow down the response as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
          in: query
          name: q
          required: false
          schema:
            type: string
        - description: |
            
            Name of a response property sort the result by as per
            [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).
          in: query
          name: sort
          required: false
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_repository_permissions"
          description: The repository permission for all users in this repository.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't an admin of the repository.
      security:
        - oauth2:
            - repository
        - basic: []
        - api_key: []
      summary: List a repository permissions for a workspace
      tags:
        - Workspaces
    parameters:
      - description: |
          This can either be the repository slug or the UUID of the repository,
          surrounded by curly-braces, for example: `{repository UUID}`.
        in: path
        name: repo_slug
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/workspaces/{workspace}/pipelines-config/identity/oidc/.well-known/openid-configuration":
    get:
      description: This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/
      operationId: getOIDCConfiguration
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The OpenID configuration
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace was not found.
      summary: Get OpenID configuration for OIDC in Pipelines
      tags:
        - Pipelines
  "/workspaces/{workspace}/pipelines-config/identity/oidc/keys.json":
    get:
      description: This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/
      operationId: getOIDCKeys
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The keys in JSON web key format
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace was not found.
      summary: Get keys for OIDC in Pipelines
      tags:
        - Pipelines
  "/workspaces/{workspace}/pipelines-config/variables":
    get:
      description: Find workspace level variables.
      operationId: getPipelineVariablesForWorkspace
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_pipeline_variables"
          description: The found workspace level variables.
      summary: List variables for a workspace
      tags:
        - Pipelines
    post:
      description: Create a workspace level variable.
      operationId: createPipelineVariableForWorkspace
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/pipeline_variable2"
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The created variable.
          headers:
            Location:
              description: The URL of the newly created pipeline variable.
              schema:
                type: string
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace does not exist.
        "409":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A variable with the provided key already exists.
      summary: Create a variable for a workspace
      tags:
        - Pipelines
  "/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}":
    delete:
      description: Delete a workspace level variable.
      operationId: deletePipelineVariableForWorkspace
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The UUID of the variable to delete.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The variable was deleted
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace or the variable with the provided UUID does not exist.
      summary: Delete a variable for a workspace
      tags:
        - Pipelines
    get:
      description: Retrieve a workspace level variable.
      operationId: getPipelineVariableForWorkspace
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The UUID of the variable to retrieve.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The variable.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace or variable with the given UUID was not found.
      summary: Get variable for a workspace
      tags:
        - Pipelines
    put:
      description: Update a workspace level variable.
      operationId: updatePipelineVariableForWorkspace
      parameters:
        - description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The UUID of the variable.
          in: path
          name: variable_uuid
          required: true
          schema:
            type: string
      requestBody:
        $ref: "#/components/requestBodies/pipeline_variable"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/pipeline_variable"
          description: The variable was updated.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The workspace or the variable was not found.
      summary: Update variable for a workspace
      tags:
        - Pipelines
  "/workspaces/{workspace}/projects":
    get:
      description: Returns the list of projects in this workspace.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_projects"
          description: The list of projects in this workspace.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A workspace doesn't exist at this location.
      security:
        - oauth2:
            - project
        - basic: []
        - api_key: []
      summary: List projects in a workspace
      tags:
        - Workspaces
    parameters:
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Creates a new project.

        Note that the avatar has to be embedded as either a data-url
        or a URL to an external image as shown in the examples below:

        ```
        $ body=$(cat << EOF
        {
            "name": "Mars Project",
            "key": "MARS",
            "description": "Software for colonizing mars.",
            "links": {
                "avatar": {
                    "href": "data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/..."
                }
            },
            "is_private": false
        }
        EOF
        )
        $ curl -H "Content-Type: application/json" \
               -X POST \
               -d "$body" \
               https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .
        {
          // Serialized project document
        }
        ```

        or even:

        ```
        $ body=$(cat << EOF
        {
            "name": "Mars Project",
            "key": "MARS",
            "description": "Software for colonizing mars.",
            "links": {
                "avatar": {
                    "href": "http://i.imgur.com/72tRx4w.gif"
                }
            },
            "is_private": false
        }
        EOF
        )
        $ curl -H "Content-Type: application/json" \
               -X POST \
               -d "$body" \
               https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .
        {
          // Serialized project document
        }
        ```
      requestBody:
        $ref: "#/components/requestBodies/project"
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/project"
          description: A new project has been created.
          headers:
            Location:
              description: The location of the newly created project
              schema:
                type: string
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't authorized to create the project.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A workspace doesn't exist at this location.
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: Create a project in a workspace
      tags:
        - Projects
  "/workspaces/{workspace}/projects/{project_key}":
    delete:
      description: |-
        Deletes this project. This is an irreversible operation.

        You cannot delete a project that still contains repositories.
        To delete the project, [delete](/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-delete)
        or transfer the repositories first.

        Example:
        ```
        $ curl -X DELETE https://api.bitbucket.org/2.0/bbworkspace1/PROJ
        ```
      responses:
        "204":
          description: Successful deletion.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't authorized to delete the project or the project isn't empty.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A project isn't hosted at this location.
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: Delete a project for a workspace
      tags:
        - Projects
    get:
      description: Returns the requested project.
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/project"
          description: The project that is part of a workspace.
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The request wasn't authenticated.
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't authorized to access the project.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A project isn't hosted at this location.
      security:
        - oauth2:
            - project
        - basic: []
        - api_key: []
      summary: Get a project for a workspace
      tags:
        - Projects
        - Workspaces
    parameters:
      - description: |
          The project in question. This is the actual `key` assigned
          to the project.
        in: path
        name: project_key
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Since this endpoint can be used to both update and to create a
        project, the request body depends on the intent.

        #### Creation

        See the POST documentation for the project collection for an
        example of the request body.

        Note: The `key` should not be specified in the body of request
        (since it is already present in the URL). The `name` is required,
        everything else is optional.

        #### Update

        See the POST documentation for the project collection for an
        example of the request body.

        Note: The key is not required in the body (since it is already in
        the URL). The key may be specified in the body, if the intent is
        to change the key itself. In such a scenario, the location of the
        project is changed and is returned in the `Location` header of the
        response.
      requestBody:
        $ref: "#/components/requestBodies/project"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/project"
          description: The existing project is has been updated.
          headers:
            Location:
              description: |-
                The location of the project. This header is only provided
                when the project key is updated.
              schema:
                type: string
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/project"
          description: A new project has been created.
          headers:
            Location:
              description: The location of the newly created project
              schema:
                type: string
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: The requesting user isn't authorized to update or create the project.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: A workspace doesn't exist at the location. Note that the project's absence from this location doesn't raise a 404, since a PUT at a non-existent location can be used to create a new project.
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: Update a project for a workspace
      tags:
        - Projects
  "/workspaces/{workspace}/projects/{project_key}/branching-model":
    get:
      description: |-
        Return the branching model set at the project level. This view is
        read-only. The branching model settings can be changed using the
        [settings](#api-workspaces-workspace-projects-project-key-branching-model-settings-get)
        API.

        The returned object:

        1. Always has a `development` property. `development.name` is
           the user-specified branch that can be inherited by an individual repository's
           branching model.
        2. Might have a `production` property. `production` will not
           be present when `production` is disabled.
           `production.name` is the user-specified branch that can be
           inherited by an individual repository's branching model.
        3. Always has a `branch_types` array which contains all enabled branch
           types.

        Example body:

        ```
        {
          "development": {
            "name": "master",
            "use_mainbranch": true
          },
          "production": {
            "name": "production",
            "use_mainbranch": false
          },
          "branch_types": [
            {
              "kind": "release",
              "prefix": "release/"
            },
            {
              "kind": "hotfix",
              "prefix": "hotfix/"
            },
            {
              "kind": "feature",
              "prefix": "feature/"
            },
            {
              "kind": "bugfix",
              "prefix": "bugfix/"
            }
          ],
          "type": "project_branching_model",
          "links": {
            "self": {
              "href": "https://api.bitbucket.org/.../branching-model"
            }
          }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/project_branching_model"
          description: The branching model object
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have read access to the project
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the project does not exist
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: Get the branching model for a project
      tags:
        - Branching model
    parameters:
      - description: |
          The project in question. This is the actual `key` assigned
          to the project.
        in: path
        name: project_key
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/workspaces/{workspace}/projects/{project_key}/branching-model/settings":
    get:
      description: |-
        Return the branching model configuration for a project. The returned
        object:

        1. Always has a `development` property for the development branch.
        2. Always a `production` property for the production branch. The
           production branch can be disabled.
        3. The `branch_types` contains all the branch types.


        This is the raw configuration for the branching model. A client
        wishing to see the branching model with its actual current branches may find the
        [active model API](#api-workspaces-workspace-projects-project-key-branching-model-get)
        more useful.

        Example body:

        ```
        {
          "development": {
            "name": null,
            "use_mainbranch": true
          },
          "production": {
            "name": "production",
            "use_mainbranch": false,
            "enabled": false
          },
          "branch_types": [
            {
              "kind": "release",
              "enabled": true,
              "prefix": "release/"
            },
            {
              "kind": "hotfix",
              "enabled": true,
              "prefix": "hotfix/"
            },
            {
              "kind": "feature",
              "enabled": true,
              "prefix": "feature/"
            },
            {
              "kind": "bugfix",
              "enabled": false,
              "prefix": "bugfix/"
            }
          ],
          "type": "branching_model_settings",
          "links": {
            "self": {
              "href": "https://api.bitbucket.org/.../branching-model/settings"
            }
          }
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branching_model_settings"
          description: The branching model configuration
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the project
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the project does not exist
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: Get the branching model config for a project
      tags:
        - Branching model
    parameters:
      - description: |
          The project in question. This is the actual `key` assigned
          to the project.
        in: path
        name: project_key
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Update the branching model configuration for a project.

        The `development` branch can be configured to a specific branch or to
        track the main branch. Any branch name can be supplied, but will only
        successfully be applied to a repository via inheritance if that branch
        exists for that repository. Only the passed properties will be updated. The
        properties not passed will be left unchanged. A request without a
        `development` property will leave the development branch unchanged.

        The `production` branch can be a specific branch, the main
        branch or disabled. Any branch name can be supplied, but will only
        successfully be applied to a repository via inheritance if that branch
        exists for that repository. The `enabled` property can be used to enable (`true`)
        or disable (`false`) it. Only the passed properties will be updated. The
        properties not passed will be left unchanged. A request without a
        `production` property will leave the production branch unchanged.

        The `branch_types` property contains the branch types to be updated.
        Only the branch types passed will be updated. All updates will be
        rejected if it would leave the branching model in an invalid state.
        For branch types this means that:

        1. The prefixes for all enabled branch types are valid. For example,
           it is not possible to use '*' inside a Git prefix.
        2. A prefix of an enabled branch type must not be a prefix of another
           enabled branch type. This is to ensure that a branch can be easily
           classified by its prefix unambiguously.

        It is possible to store an invalid prefix if that branch type would be
        left disabled. Only the passed properties will be updated. The
        properties not passed will be left unchanged. Each branch type must
        have a `kind` property to identify it.

        Example Body:

        ```
            {
              "development": {
                "use_mainbranch": true
              },
              "production": {
                "enabled": true,
                "use_mainbranch": false,
                "name": "production"
              },
              "branch_types": [
                {
                  "kind": "bugfix",
                  "enabled": true,
                  "prefix": "bugfix/"
                },
                {
                  "kind": "feature",
                  "enabled": true,
                  "prefix": "feature/"
                },
                {
                  "kind": "hotfix",
                  "prefix": "hotfix/"
                },
                {
                  "kind": "release",
                  "enabled": false,
                }
              ]
            }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/branching_model_settings"
          description: The updated branching model configuration
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request contains an invalid branching model configuration
        "401":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the request was not authenticated
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the project
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the project does not exist
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: Update the branching model config for a project
      tags:
        - Branching model
  "/workspaces/{workspace}/projects/{project_key}/default-reviewers":
    get:
      description: |-
        Return a list of all default reviewers for a project. This is a list of users that will be added as default
        reviewers to pull requests for any repository within the project.

        Example:
        ```
        $ curl https://api.bitbucket.org/2.0/.../projects/.../default-reviewers | jq .
        {
            "pagelen": 10,
            "values": [
                {
                    "user": {
                        "display_name": "Davis Lee",
                        "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}"
                    },
                    "reviewer_type": "project",
                    "type": "default_reviewer"
                },
                {
                    "user": {
                        "display_name": "Jorge Rodriguez",
                        "uuid": "{1aa43376-260d-4a0b-9660-f62672b9655d}"
                    },
                    "reviewer_type": "project",
                    "type": "default_reviewer"
                }
            ],
            "page": 1,
            "size": 2
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_default_reviewer_and_type"
          description: The list of project default reviewers
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the project
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the workspace or project does not exist at this location
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: List the default reviewers in a project
      tags:
        - Projects
    parameters:
      - description: |
          The project in question. This is the actual `key` assigned
          to the project.
        in: path
        name: project_key
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}":
    delete:
      description: |-
        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
        ```
      responses:
        "204":
          description: The specified user was removed from the list of project default reviewers
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user is not a default reviewer for the project
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the project
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user, project, or workspace does not exist
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: Remove the specific user from the project's default reviewers
      tags:
        - Projects
    get:
      description: |-
        Returns the specified default reviewer.

        Example:
        ```
        $ curl https://api.bitbucket.org/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D
        {
            "display_name": "Davis Lee",
            "type": "user",
            "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}"
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/user"
          description: The specified user that is a default reviewer
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user is not a default reviewer for the project
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the project
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user, project, or workspace does not exist
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: Get a default reviewer
      tags:
        - Projects
    parameters:
      - description: |
          The project in question. This can either be the actual `key` assigned
          to the project or the `UUID` (surrounded by curly-braces (`{}`)).
        in: path
        name: project_key
        required: true
        schema:
          type: string
      - description: |
          This can either be the username or the UUID of the default reviewer,
          surrounded by curly-braces, for example: `{account UUID}`.
        in: path
        name: selected_user
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    put:
      description: |-
        Adds the specified user to the project's list of default reviewers. The method is
        idempotent. Accepts an optional body containing the `uuid` of the user to be added.

        Example:
        ```
        $ curl -XPUT https://api.bitbucket.org/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D
        -d { 'uuid': '{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}' }

        HTTP/1.1 204
        ```
      responses:
        "204":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/user"
          description: The specified user was added as a project default reviewer
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user cannot be added as a default reviewer for the project
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the authenticated user does not have admin access to the project
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified user, project, or workspace does not exist
      security:
        - oauth2:
            - project:admin
        - basic: []
        - api_key: []
      summary: Add the specific user as a default reviewer for the project
      tags:
        - Projects
  "/workspaces/{workspace}/projects/{project_key}/deploy-keys":
    get:
      description: |-
        Returns all deploy keys belonging to a project.

        Example:
        ```
        $ curl -H "Authorization <auth header>" \
        https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys

        Output:
        {
            "pagelen":10,
            "values":[
                {
                    "comment":"thakseth@C02W454JHTD8",
                    "last_used":null,
                    "links":{
                        "self":{
                            "href":"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234"
                        }
                    },
                    "label":"test",
                    "project":{
                        "links":{
                            "self":{
                                "href":"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT"
                            }
                        },
                        "type":"project",
                        "name":"cooperative standard",
                        "key":"TEST_PROJECT",
                        "uuid":"{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}"
                    },
                    "created_on":"2021-07-28T21:20:19.491721+00:00",
                    "key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r",
                    "type":"project_deploy_key",
                    "id":1234
                }
            ],
            "page":1,
            "size":1
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/paginated_project_deploy_keys"
          description: Deploy keys matching the project
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified workspace or project is not accessible to the current user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified workspace or project does not exist
      security:
        - oauth2:
            - project
            - project:admin
        - basic: []
        - api_key: []
      summary: List project deploy keys
      tags:
        - Deployments
    parameters:
      - description: |
          The project in question. This is the actual `key` assigned
          to the project.
        in: path
        name: project_key
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
    post:
      description: |-
        Create a new deploy key in a project.

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

        Output:
        {
            "comment": "mleu@C02W454JHTD8",
            "last_used": null,
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/workspaces/testadfsa/projects/ASDF/deploy-keys/5/"
                }
            },
            "label": "myprojectkey",
            "project": {
                ...
            },
            "created_on": "2021-08-10T05:28:00.570859+00:00",
            "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5",
            "type": "project_deploy_key",
            "id": 5
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/project_deploy_key"
          description: The project deploy key that was created
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Invalid deploy key inputs
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified workspace or project is not accessible to the current user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified workspace or project does not exist
      security:
        - oauth2:
            - project
            - project:admin
        - basic: []
        - api_key: []
      summary: Create a project deploy key
      tags:
        - Deployments
  "/workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}":
    delete:
      description: |-
        This deletes a deploy key from a project.

        Example:
        ```
        $ curl -XDELETE \
        -H "Authorization <auth header>" \
        https://api.bitbucket.org/2.0/workspaces/jzeng/projects/JZ/deploy-keys/1234
        ```
      responses:
        "204":
          description: The project deploy key has been deleted
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the current user does not have permission to delete a key for the specified project
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified workspace, project, or project deploy key does not exist
      security:
        - oauth2:
            - project
            - project:admin
        - basic: []
        - api_key: []
      summary: Delete a deploy key from a project
      tags:
        - Deployments
    get:
      description: |-
        Returns the deploy key belonging to a specific key ID.

        Example:
        ```
        $ curl -H "Authorization <auth header>" \
        https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234

        Output:
        {
            "pagelen":10,
            "values":[
                {
                    "comment":"thakseth@C02W454JHTD8",
                    "last_used":null,
                    "links":{
                        "self":{
                            "href":"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234"
                        }
                    },
                    "label":"test",
                    "project":{
                        "links":{
                            "self":{
                                "href":"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT"
                            }
                        },
                        "type":"project",
                        "name":"cooperative standard",
                        "key":"TEST_PROJECT",
                        "uuid":"{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}"
                    },
                    "created_on":"2021-07-28T21:20:19.491721+00:00",
                    "key":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r",
                    "type":"project_deploy_key",
                    "id":1234
                }
            ],
        }
        ```
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/project_deploy_key"
          description: Project deploy key matching the key ID
        "403":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified workspace or project is not accessible to the current user
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: If the specified workspace or project does not exist
      security:
        - oauth2:
            - project
            - project:admin
        - basic: []
        - api_key: []
      summary: Get a project deploy key
      tags:
        - Deployments
    parameters:
      - description: The key ID matching the project deploy key.
        in: path
        name: key_id
        required: true
        schema:
          type: string
      - description: |
          The project in question. This is the actual `key` assigned
          to the project.
        in: path
        name: project_key
        required: true
        schema:
          type: string
      - description: |
          This can either be the workspace ID (slug) or the workspace UUID
          surrounded by curly-braces, for example: `{workspace UUID}`.
        in: path
        name: workspace
        required: true
        schema:
          type: string
  "/workspaces/{workspace}/search/code":
    get:
      description: |
        Search for code in the repositories of the specified workspace.

        Searching across all repositories:

        ```
        curl 'https://api.bitbucket.org/2.0/workspaces/workspace_slug_or_uuid/search/code?search_query=foo'
        {
          "size": 1,
          "page": 1,
          "pagelen": 10,
          "query_substituted": false,
          "values": [
            {
              "type": "code_search_result",
              "content_match_count": 2,
              "content_matches": [
                {
                  "lines": [
                    {
                      "line": 2,
                      "segments": []
                    },
                    {
                      "line": 3,
                      "segments": [
                        {
                          "text": "def "
                        },
                        {
                          "text": "foo",
                          "match": true
                        },
                        {
                          "text": "():"
                        }
                      ]
                    },
                    {
                      "line": 4,
                      "segments": [
                        {
                          "text": "    print(\"snek\")"
                        }
                      ]
                    },
                    {
                      "line": 5,
                      "segments": []
                    }
                  ]
                }
              ],
              "path_matches": [
                {
                  "text": "src/"
                },
                {
                  "text": "foo",
                  "match": true
                },
                {
                  "text": ".py"
                }
              ],
              "file": {
                "path": "src/foo.py",
                "type": "commit_file",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py"
                  }
                }
              }
            }
          ]
        }
        ```

        Note that searches can match in the file's text (`content_matches`),
        the path (`path_matches`), or both as in the example above.

        You can use the same syntax for the search query as in the UI, e.g.
        to only search within a specific repository:

        ```
        curl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code?search_query=foo+repo:demo'
        # results from the "demo" repository
        ```

        Similar to other APIs, you can request more fields using a
        `fields` query parameter. E.g. to get some more information about
        the repository of matched files (the `%2B` is a URL-encoded `+`):

        ```
        curl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code'\
             '?search_query=foo&fields=%2Bvalues.file.commit.repository'
        {
          "size": 1,
          "page": 1,
          "pagelen": 10,
          "query_substituted": false,
          "values": [
            {
              "type": "code_search_result",
              "content_match_count": 1,
              "content_matches": [...],
              "path_matches": [...],
              "file": {
                "commit": {
                  "type": "commit",
                  "hash": "ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b",
                  "links": {
                    "self": {
                      "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b"
                    },
                    "html": {
                      "href": "https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b"
                    }
                  },
                  "repository": {
                    "name": "demo",
                    "type": "repository",
                    "full_name": "my-workspace/demo",
                    "links": {
                      "self": {
                        "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo"
                      },
                      "html": {
                        "href": "https://bitbucket.org/my-workspace/demo"
                      },
                      "avatar": {
                        "href": "https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default"
                      }
                    },
                    "uuid": "{850e1749-781a-4115-9316-df39d0600e7a}"
                  }
                },
                "type": "commit_file",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py"
                  }
                },
                "path": "src/foo.py"
              }
            }
          ]
        }
        ```

        Try `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.
      operationId: searchWorkspace
      parameters:
        - description: The workspace to search in; either the slug or the UUID in curly braces
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - description: The search query
          in: query
          name: search_query
          required: true
          schema:
            type: string
        - description: Which page of the search results to retrieve
          in: query
          name: page
          required: false
          schema:
            default: 1
            format: int32
            type: integer
        - description: How many search results to retrieve per page
          in: query
          name: pagelen
          required: false
          schema:
            default: 10
            format: int32
            type: integer
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/search_result_page"
          description: Successful search
        "400":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: |
            If the search request was invalid due to one of the
            following reasons:

            * the specified type of target account doesn''t match the actual
            account type;

            * malformed pagination properties;

            * missing or malformed search query, in the latter case an error
            key will be returned in `error.data.key` property.
        "404":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Search is not enabled for the requested workspace, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on
        "429":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/error"
          description: Too many requests, try again later
      summary: Search for code in a workspace
      tags:
        - Search
components:
  requestBodies:
    application_property:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/application_property"
      description: The application property to create or update.
      required: true
    pipeline_variable:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/pipeline_variable"
      description: The updated variable.
      required: true
    pipeline_variable2:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/pipeline_variable"
      description: The variable to create.
    project:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/project"
      required: true
    snippet:
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/snippet"
      description: The new snippet object.
      required: true
  schemas:
    account:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: An account object.
          properties:
            created_on:
              format: date-time
              type: string
            display_name:
              type: string
            links:
              $ref: "#/components/schemas/account_links"
            username:
              pattern: ^[a-zA-Z0-9_\-]+$
              type: string
            uuid:
              type: string
          title: Account
          type: object
    account_links:
      additionalProperties: true
      description: Links related to an Account.
      properties:
        avatar:
          $ref: "#/components/schemas/link"
      title: Account Links
      type: object
    app_user:
      allOf:
        - $ref: "#/components/schemas/account"
        - additionalProperties: true
          description: An app user object.
          properties:
            account_id:
              description: The user's Atlassian account ID.
              type: string
            account_status:
              description: The status of the account. Currently the only possible value is "active", but more values may be added in the future.
              type: string
            kind:
              description: The kind of App User.
              type: string
          title: App User
          type: object
    application_property:
      additionalProperties: true
      description: |
        An application property. It is a caller defined JSON object that Bitbucket will store and return. 
        The `_attributes` field at its top level can be used to control who is allowed to read and update the property. 
        The keys of the JSON object must match an allowed pattern. For details, 
        see [Application properties](/cloud/bitbucket/application-properties/).
      properties:
        _attributes:
          items:
            enum:
              - public
              - read_only
            type: string
          type: array
      title: Application Property
      type: object
    author:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: The author of a change in a repository
          properties:
            raw:
              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.
              type: string
            user:
              $ref: "#/components/schemas/account"
          title: Author
          type: object
    base_commit:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: The common base type for both repository and snippet commits.
          properties:
            author:
              $ref: "#/components/schemas/author"
            date:
              format: date-time
              type: string
            hash:
              pattern: "[0-9a-f]{7,}?"
              type: string
            message:
              type: string
            parents:
              items:
                $ref: "#/components/schemas/base_commit"
              minItems: 0
              type: array
            summary:
              additionalProperties: false
              properties:
                html:
                  description: The user's content rendered as HTML.
                  type: string
                markup:
                  description: The type of markup language the raw content is to be interpreted in.
                  enum:
                    - markdown
                    - creole
                    - plaintext
                  type: string
                raw:
                  description: The text as it was typed by a user.
                  type: string
              type: object
          title: Base Commit
          type: object
    branch:
      allOf:
        - $ref: "#/components/schemas/ref"
        - additionalProperties: true
          description: A branch object, representing a branch in a repository.
          properties:
            default_merge_strategy:
              description: The default merge strategy for pull requests targeting this branch.
              type: string
            merge_strategies:
              description: Available merge strategies for pull requests targeting this branch.
              items:
                enum:
                  - merge_commit
                  - squash
                  - fast_forward
                type: string
              type: array
          title: Branch
          type: object
    branching_model:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A repository's branching model
          properties:
            branch_types:
              description: The active branch types.
              items:
                additionalProperties: false
                properties:
                  kind:
                    description: The kind of branch.
                    enum:
                      - feature
                      - bugfix
                      - release
                      - hotfix
                    type: string
                  prefix:
                    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`.
                    type: string
                required:
                  - kind
                  - prefix
                type: object
              maxItems: 4
              minItems: 0
              type: array
              uniqueItems: true
            development:
              additionalProperties: false
              properties:
                branch:
                  $ref: "#/components/schemas/branch"
                name:
                  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.
                  type: string
                use_mainbranch:
                  description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
                  type: boolean
              required:
                - name
                - use_mainbranch
              type: object
            production:
              additionalProperties: false
              properties:
                branch:
                  $ref: "#/components/schemas/branch"
                name:
                  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.
                  type: string
                use_mainbranch:
                  description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
                  type: boolean
              required:
                - name
                - use_mainbranch
              type: object
          title: Branching Model
          type: object
    branching_model_settings:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A repository's branching model settings
          properties:
            branch_types:
              items:
                additionalProperties: false
                properties:
                  enabled:
                    description: Whether the branch type is enabled or not. A disabled branch type may contain an invalid `prefix`.
                    type: boolean
                  kind:
                    description: The kind of the branch type.
                    enum:
                      - feature
                      - bugfix
                      - release
                      - hotfix
                    type: string
                  prefix:
                    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.
                    type: string
                required:
                  - kind
                type: object
              maxItems: 4
              minItems: 0
              type: array
              uniqueItems: true
            development:
              additionalProperties: false
              properties:
                is_valid:
                  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.
                  type: boolean
                name:
                  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.
                  type: string
                use_mainbranch:
                  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.
                  type: boolean
              type: object
            links:
              additionalProperties: false
              properties:
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            production:
              additionalProperties: false
              properties:
                enabled:
                  description: Indicates if branch is enabled or not.
                  type: boolean
                is_valid:
                  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.
                  type: boolean
                name:
                  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.
                  type: string
                use_mainbranch:
                  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.
                  type: boolean
              type: object
          title: Branching Model Settings
          type: object
    branchrestriction:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A branch restriction rule.
          properties:
            groups:
              items:
                $ref: "#/components/schemas/group"
              minItems: 0
              type: array
            users:
              items:
                $ref: "#/components/schemas/account"
              minItems: 0
              type: array
          title: Branch Restriction
          type: object
    comment:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          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`).
          properties:
            content:
              additionalProperties: false
              properties:
                html:
                  description: The user's content rendered as HTML.
                  type: string
                markup:
                  description: The type of markup language the raw content is to be interpreted in.
                  enum:
                    - markdown
                    - creole
                    - plaintext
                  type: string
                raw:
                  description: The text as it was typed by a user.
                  type: string
              type: object
            created_on:
              format: date-time
              type: string
            deleted:
              type: boolean
            id:
              type: integer
            inline:
              additionalProperties: false
              properties:
                from:
                  description: The comment's anchor line in the old version of the file.
                  minimum: 1
                  type: integer
                path:
                  description: The path of the file this comment is anchored to.
                  type: string
                to:
                  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.
                  minimum: 1
                  type: integer
              required:
                - path
              type: object
            links:
              additionalProperties: false
              properties:
                code:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                html:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            parent:
              $ref: "#/components/schemas/comment"
            updated_on:
              format: date-time
              type: string
            user:
              $ref: "#/components/schemas/account"
          title: Comment
          type: object
    comment_resolution:
      additionalProperties: true
      description: The resolution object for a Comment.
      properties:
        created_on:
          description: The ISO8601 timestamp the resolution was created.
          format: date-time
          type: string
        type:
          type: string
        user:
          $ref: "#/components/schemas/account"
      required:
        - type
      title: Comment Resolution
      type: object
    commit:
      allOf:
        - $ref: "#/components/schemas/base_commit"
        - additionalProperties: true
          description: A repository commit object.
          properties:
            participants:
              items:
                $ref: "#/components/schemas/participant"
              minItems: 0
              type: array
            repository:
              $ref: "#/components/schemas/repository"
          title: Commit
          type: object
    commit_comment:
      allOf:
        - $ref: "#/components/schemas/comment"
        - additionalProperties: true
          description: A commit comment.
          properties:
            commit:
              $ref: "#/components/schemas/commit"
          title: Commit Comment
          type: object
    commit_file:
      additionalProperties: true
      description: A file object, representing a file at a commit in a repository
      properties:
        attributes:
          enum:
            - link
            - executable
            - subrepository
            - binary
            - lfs
          type: string
        commit:
          $ref: "#/components/schemas/commit"
        escaped_path:
          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.
          type: string
        path:
          description: The path in the repository
          type: string
        type:
          type: string
      required:
        - type
      title: Commit File
      type: object
    commitstatus:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A commit status object.
          properties:
            created_on:
              format: date-time
              type: string
            description:
              description: A description of the build (e.g. "Unit tests in Bamboo")
              type: string
            key:
              description: |-
                An identifier for the status that's unique to
                        its type (current "build" is the only supported type) and the vendor,
                        e.g. BB-DEPLOY
              type: string
            links:
              additionalProperties: false
              properties:
                commit:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            name:
              description: An identifier for the build itself, e.g. BB-DEPLOY-1
              type: string
            refname:
              description: |-
                
                The name of the ref that pointed to this commit at the time the status
                object was created. Note that this the ref may since have moved off of
                the commit. This optional field can be useful for build systems whose
                build triggers and configuration are branch-dependent (e.g. a Pipeline
                build).
                It is legitimate for this field to not be set, or even apply (e.g. a
                static linting job).
              type: string
            state:
              description: Provides some indication of the status of this commit
              enum:
                - INPROGRESS
                - SUCCESSFUL
                - FAILED
                - STOPPED
              type: string
            updated_on:
              format: date-time
              type: string
            url:
              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.
              type: string
            uuid:
              description: The commit status' id.
              type: string
          title: Commit Status
          type: object
    component:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A component as defined in a repository's issue tracker.
          properties:
            id:
              type: integer
            links:
              additionalProperties: false
              properties:
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            name:
              type: string
          title: Component
          type: object
    ddev_report:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A report for a commit.
          type: object
      x-bb-default-fields:
        - uuid
        - commitHash
      x-bb-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}
    default_reviewer_and_type:
      additionalProperties: true
      description: Object containing a user that is a default reviewer and the type of reviewer
      properties:
        reviewer_type:
          type: string
        type:
          type: string
        user:
          $ref: "#/components/schemas/user"
      required:
        - type
      title: Default Reviewer and Type
      type: object
    deploy_key:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: Represents deploy key for a repository.
          properties:
            added_on:
              format: date-time
              type: string
            comment:
              description: The comment parsed from the deploy key (if present)
              type: string
            key:
              description: The deploy key value.
              type: string
            label:
              description: The user-defined label for the deploy key
              type: string
            last_used:
              format: date-time
              type: string
            links:
              additionalProperties: false
              properties:
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            owner:
              $ref: "#/components/schemas/account"
            repository:
              $ref: "#/components/schemas/repository"
          title: Deploy Key
          type: object
    deployment:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket Deployment.
          properties:
            environment:
              $ref: "#/components/schemas/deployment_environment"
            release:
              $ref: "#/components/schemas/deployment_release"
            state:
              $ref: "#/components/schemas/deployment_state"
            uuid:
              description: The UUID identifying the deployment.
              type: string
          title: Deployment
          type: object
    deployment_environment:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket Deployment Environment.
          properties:
            name:
              description: The name of the environment.
              type: string
            uuid:
              description: The UUID identifying the environment.
              type: string
          title: Deployment Environment
          type: object
      x-bb-batch-max-size: 100
      x-bb-batch-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch
      x-bb-default-fields:
        - uuid
      x-bb-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}
    deployment_environment_lock:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket Deployment Environment Lock.
          properties:
            environmentUuid:
              description: The UUID identifying the environment.
              type: string
          title: Deployment Environment Lock
          type: object
      x-bb-batch-max-size: 100
      x-bb-batch-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch
      x-bb-default-fields:
        - "*"
        - lock_opener.*
        - owner.*
    deployment_release:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket Deployment Release.
          properties:
            commit:
              $ref: "#/components/schemas/commit"
            created_on:
              description: The timestamp when the release was created.
              format: date-time
              type: string
            name:
              description: The name of the release.
              type: string
            url:
              description: Link to the pipeline that produced the release.
              format: uri
              type: string
            uuid:
              description: The UUID identifying the release.
              type: string
          title: Deployment Release
          type: object
    deployment_state:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: The representation of the progress state of a deployment.
          properties: {}
          title: Deployment State
          type: object
    deployment_state_completed:
      allOf:
        - $ref: "#/components/schemas/deployment_state"
        - additionalProperties: true
          description: A Bitbucket Deployment COMPLETED deployment state.
          properties:
            completion_date:
              description: The timestamp when the deployment completed.
              format: date-time
              type: string
            deployer:
              $ref: "#/components/schemas/account"
            name:
              description: The name of deployment state (COMPLETED).
              enum:
                - COMPLETED
              type: string
            start_date:
              description: The timestamp when the deployment was started.
              format: date-time
              type: string
            status:
              $ref: "#/components/schemas/deployment_state_completed_status"
            url:
              description: Link to the deployment result.
              format: uri
              type: string
          type: object
    deployment_state_completed_status:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: The status of a completed deployment.
          properties: {}
          title: Completed Deployment
          type: object
    deployment_state_completed_status_failed:
      allOf:
        - $ref: "#/components/schemas/deployment_state_completed_status"
        - additionalProperties: true
          description: A FAILED completed deployment status.
          properties:
            name:
              description: The name of the completed deployment status (FAILED).
              enum:
                - FAILED
              type: string
          type: object
    deployment_state_completed_status_stopped:
      allOf:
        - $ref: "#/components/schemas/deployment_state_completed_status"
        - additionalProperties: true
          description: A STOPPED completed deployment status.
          properties:
            name:
              description: The name of the completed deployment status (STOPPED).
              enum:
                - STOPPED
              type: string
          type: object
    deployment_state_completed_status_successful:
      allOf:
        - $ref: "#/components/schemas/deployment_state_completed_status"
        - additionalProperties: true
          description: A SUCCESSFUL completed deployment status.
          properties:
            name:
              description: The name of the completed deployment status (SUCCESSFUL).
              enum:
                - SUCCESSFUL
              type: string
          type: object
    deployment_state_in_progress:
      allOf:
        - $ref: "#/components/schemas/deployment_state"
        - additionalProperties: true
          description: A Bitbucket Deployment IN_PROGRESS deployment state.
          properties:
            deployer:
              $ref: "#/components/schemas/account"
            name:
              description: The name of deployment state (IN_PROGRESS).
              enum:
                - IN_PROGRESS
              type: string
            start_date:
              description: The timestamp when the deployment was started.
              format: date-time
              type: string
            url:
              description: Link to the deployment result.
              format: uri
              type: string
          type: object
    deployment_state_undeployed:
      allOf:
        - $ref: "#/components/schemas/deployment_state"
        - additionalProperties: true
          description: A Bitbucket Deployment UNDEPLOYED deployment state.
          properties:
            name:
              description: The name of deployment state (UNDEPLOYED).
              enum:
                - UNDEPLOYED
              type: string
            trigger_url:
              description: Link to trigger the deployment.
              format: uri
              type: string
          type: object
    deployment_variable:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Pipelines deployment variable.
          properties:
            key:
              description: The unique name of the variable.
              type: string
            secured:
              description: If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
              type: boolean
            uuid:
              description: The UUID identifying the variable.
              type: string
            value:
              description: The value of the variable. If the variable is secured, this will be empty.
              type: string
          title: Deployment Variable
          type: object
    deployments_ddev_deployment_environment:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket Deployment Environment.
          properties:
            name:
              description: The name of the environment.
              type: string
            uuid:
              description: The UUID identifying the environment.
              type: string
          title: Deployment Environment
          type: object
      x-bb-batch-max-size: 100
      x-bb-batch-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch
      x-bb-default-fields:
        - uuid
      x-bb-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}
    deployments_ddev_deployment_environment_lock:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket Deployment Environment Lock.
          properties:
            environmentUuid:
              description: The UUID identifying the environment.
              type: string
          title: Deployment Environment Lock
          type: object
      x-bb-batch-max-size: 100
      x-bb-batch-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch
      x-bb-default-fields:
        - "*"
        - lock_opener.*
        - owner.*
    deployments_ddev_paginated_environments:
      description: A paged list of environments
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/deployments_ddev_deployment_environment"
          minItems: 0
          type: array
      title: Paginated Deployment Environments
      type: object
    deployments_stg_west_deployment_environment:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket Deployment Environment.
          properties:
            name:
              description: The name of the environment.
              type: string
            uuid:
              description: The UUID identifying the environment.
              type: string
          title: Deployment Environment
          type: object
      x-bb-batch-max-size: 100
      x-bb-batch-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch
      x-bb-default-fields:
        - uuid
      x-bb-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}
    deployments_stg_west_deployment_environment_lock:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket Deployment Environment Lock.
          properties:
            environmentUuid:
              description: The UUID identifying the environment.
              type: string
          title: Deployment Environment Lock
          type: object
      x-bb-batch-max-size: 100
      x-bb-batch-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/locks_batch
      x-bb-default-fields:
        - "*"
        - lock_opener.*
        - owner.*
    deployments_stg_west_paginated_environments:
      description: A paged list of environments
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/deployments_stg_west_deployment_environment"
          minItems: 0
          type: array
      title: Paginated Deployment Environments
      type: object
    diffstat:
      additionalProperties: true
      description: A diffstat object that includes a summary of changes made to a file between two commits.
      properties:
        lines_added:
          type: integer
        lines_removed:
          type: integer
        new:
          $ref: "#/components/schemas/commit_file"
        old:
          $ref: "#/components/schemas/commit_file"
        status:
          enum:
            - added
            - removed
            - modified
            - renamed
          type: string
        type:
          type: string
      required:
        - type
      title: Diff Stat
      type: object
    effective_repo_branching_model:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A repository's effective branching model
          properties:
            branch_types:
              description: The active branch types.
              items:
                additionalProperties: false
                properties:
                  kind:
                    description: The kind of branch.
                    enum:
                      - feature
                      - bugfix
                      - release
                      - hotfix
                    type: string
                  prefix:
                    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`.
                    type: string
                required:
                  - kind
                  - prefix
                type: object
              maxItems: 4
              minItems: 0
              type: array
              uniqueItems: true
            development:
              additionalProperties: false
              properties:
                branch:
                  $ref: "#/components/schemas/branch"
                name:
                  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.
                  type: string
                use_mainbranch:
                  description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
                  type: boolean
              required:
                - name
                - use_mainbranch
              type: object
            production:
              additionalProperties: false
              properties:
                branch:
                  $ref: "#/components/schemas/branch"
                name:
                  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.
                  type: string
                use_mainbranch:
                  description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
                  type: boolean
              required:
                - name
                - use_mainbranch
              type: object
          title: Effective Repository Branching Model
          type: object
    error:
      additionalProperties: true
      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`.
      properties:
        error:
          additionalProperties: false
          properties:
            data:
              additionalProperties: true
              description: Optional structured data that is endpoint-specific.
              properties: {}
              type: object
            detail:
              type: string
            message:
              type: string
          required:
            - message
          type: object
        type:
          type: string
      required:
        - type
      title: Error
      type: object
    export_options:
      additionalProperties: true
      description: Options for issue export.
      properties:
        include_attachments:
          type: boolean
        project_key:
          type: string
        project_name:
          type: string
        send_email:
          type: boolean
        type:
          type: string
      required:
        - type
      title: Export Options
      type: object
    group:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A group object
          properties:
            full_slug:
              description: |
                The concatenation of the workspace's slug and the group's slug,
                separated with a colon (e.g. `acme:developers`)
              type: string
            links:
              additionalProperties: false
              properties:
                html:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            name:
              type: string
            owner:
              $ref: "#/components/schemas/account"
            slug:
              description: |-
                The "sluggified" version of the group's name. This contains only ASCII
                characters and can therefore be slightly different than the name
              type: string
            workspace:
              $ref: "#/components/schemas/workspace"
          title: Group
          type: object
    hook_event:
      additionalProperties: false
      description: An event, associated with a resource or subject type.
      properties:
        category:
          description: The category this event belongs to.
          type: string
        description:
          description: More detailed description of the webhook event type.
          type: string
        event:
          description: The event identifier.
          enum:
            - pullrequest:changes_request_removed
            - issue:comment_created
            - repo:push
            - repo:commit_status_updated
            - repo:imported
            - pullrequest:unapproved
            - repo:updated
            - pullrequest:rejected
            - pullrequest:fulfilled
            - pullrequest:created
            - pullrequest:approved
            - repo:transfer
            - repo:commit_status_created
            - repo:fork
            - issue:updated
            - project:updated
            - repo:created
            - issue:created
            - repo:commit_comment_created
            - pullrequest:updated
            - repo:deleted
            - pullrequest:comment_updated
            - pullrequest:changes_request_created
            - pullrequest:comment_deleted
            - pullrequest:comment_created
          type: string
        label:
          description: Summary of the webhook event type.
          type: string
      title: Hook Event
      type: object
    issue:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: An issue.
          properties:
            assignee:
              $ref: "#/components/schemas/account"
            component:
              $ref: "#/components/schemas/component"
            content:
              additionalProperties: false
              properties:
                html:
                  description: The user's content rendered as HTML.
                  type: string
                markup:
                  description: The type of markup language the raw content is to be interpreted in.
                  enum:
                    - markdown
                    - creole
                    - plaintext
                  type: string
                raw:
                  description: The text as it was typed by a user.
                  type: string
              type: object
            created_on:
              format: date-time
              type: string
            edited_on:
              format: date-time
              type: string
            id:
              type: integer
            kind:
              enum:
                - bug
                - enhancement
                - proposal
                - task
              type: string
            links:
              additionalProperties: false
              properties:
                attachments:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                comments:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                html:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                vote:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                watch:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            milestone:
              $ref: "#/components/schemas/milestone"
            priority:
              enum:
                - trivial
                - minor
                - major
                - critical
                - blocker
              type: string
            reporter:
              $ref: "#/components/schemas/account"
            repository:
              $ref: "#/components/schemas/repository"
            state:
              enum:
                - submitted
                - new
                - open
                - resolved
                - on hold
                - invalid
                - duplicate
                - wontfix
                - closed
              type: string
            title:
              type: string
            updated_on:
              format: date-time
              type: string
            version:
              $ref: "#/components/schemas/version"
            votes:
              type: integer
          title: Issue
          type: object
    issue_attachment:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: An issue file attachment's meta data. Note this does not contain the file's actual contents.
          properties:
            links:
              additionalProperties: false
              properties:
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            name:
              type: string
          title: Issue Attachment
          type: object
    issue_change:
      additionalProperties: true
      description: An issue change.
      properties:
        changes:
          additionalProperties: false
          properties:
            assignee:
              additionalProperties: false
              properties:
                new:
                  type: string
                old:
                  type: string
              type: object
            component:
              additionalProperties: false
              properties:
                new:
                  type: string
                old:
                  type: string
              type: object
            content:
              additionalProperties: false
              properties:
                new:
                  type: string
                old:
                  type: string
              type: object
            kind:
              additionalProperties: false
              properties:
                new:
                  type: string
                old:
                  type: string
              type: object
            milestone:
              additionalProperties: false
              properties:
                new:
                  type: string
                old:
                  type: string
              type: object
            priority:
              additionalProperties: false
              properties:
                new:
                  type: string
                old:
                  type: string
              type: object
            state:
              additionalProperties: false
              properties:
                new:
                  type: string
                old:
                  type: string
              type: object
            title:
              additionalProperties: false
              properties:
                new:
                  type: string
                old:
                  type: string
              type: object
            version:
              additionalProperties: false
              properties:
                new:
                  type: string
                old:
                  type: string
              type: object
          type: object
        created_on:
          format: date-time
          type: string
        issue:
          $ref: "#/components/schemas/issue"
        links:
          additionalProperties: false
          properties:
            issue:
              additionalProperties: false
              description: A link to a resource related to this object.
              properties:
                href:
                  format: uri
                  type: string
                name:
                  type: string
              title: Link
              type: object
            self:
              additionalProperties: false
              description: A link to a resource related to this object.
              properties:
                href:
                  format: uri
                  type: string
                name:
                  type: string
              title: Link
              type: object
          type: object
        message:
          additionalProperties: false
          properties:
            html:
              description: The user's content rendered as HTML.
              type: string
            markup:
              description: The type of markup language the raw content is to be interpreted in.
              enum:
                - markdown
                - creole
                - plaintext
              type: string
            raw:
              description: The text as it was typed by a user.
              type: string
          type: object
        name:
          type: string
        type:
          type: string
        user:
          $ref: "#/components/schemas/account"
      required:
        - type
      title: Issue Change
      type: object
    issue_comment:
      allOf:
        - $ref: "#/components/schemas/comment"
        - additionalProperties: true
          description: A issue comment.
          properties:
            issue:
              $ref: "#/components/schemas/issue"
          title: Issue Comment
          type: object
    issue_job_status:
      additionalProperties: false
      description: The status of an import or export job
      properties:
        count:
          description: The total number of issues already imported/exported
          type: integer
        pct:
          description: The percentage of issues already imported/exported
          maximum: 100
          minimum: 0
          type: number
        phase:
          description: The phase of the import/export job
          type: string
        status:
          description: The status of the import/export job
          enum:
            - ACCEPTED
            - STARTED
            - RUNNING
            - FAILURE
          type: string
        total:
          description: The total number of issues being imported/exported
          type: integer
        type:
          type: string
      title: Issue Job Status
      type: object
    jira_project:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Jira Project.
          type: object
      x-bb-default-fields:
        - type
        - cloudId
        - id
      x-bb-detail-fields:
        - key
        - name
        - url
        - avatarUrls.*
        - site
      x-bb-url: /api/{target_user.uuid}/jira/sites/{cloudId}/projects/{id}?atlassian_account_id={user.account_id}
    jira_site:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Jira Site.
          type: object
      x-bb-default-fields:
        - type
        - cloudId
        - cloudUrl
        - cloudName
      x-bb-detail-fields:
        - connected
      x-bb-url: /api/{target_user.uuid}/jira/sites/{cloudId}?atlassian_account_id={user.account_id}
    link:
      additionalProperties: false
      description: A link to a resource related to this object.
      properties:
        href:
          format: uri
          type: string
        name:
          type: string
      title: Link
      type: object
    milestone:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A milestone as defined in a repository's issue tracker.
          properties:
            id:
              type: integer
            links:
              additionalProperties: false
              properties:
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            name:
              type: string
          title: Milestone
          type: object
    object:
      additionalProperties: true
      description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.
      discriminator:
        propertyName: type
      properties:
        type:
          type: string
      required:
        - type
      type: object
    page:
      additionalProperties: false
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
      title: Page
      type: object
    paginated_accounts:
      additionalProperties: false
      description: A paginated list of accounts.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/account"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Accounts
      type: object
    paginated_annotations:
      description: A paginated list of annotations.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/report_annotation"
          minItems: 0
          type: array
      title: Paginated Annotations
      type: object
    paginated_branches:
      additionalProperties: false
      description: A paginated list of branches.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/branch"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Branches
      type: object
    paginated_branchrestrictions:
      additionalProperties: false
      description: A paginated list of branch restriction rules.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/branchrestriction"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Branch Restrictions
      type: object
    paginated_changeset:
      additionalProperties: false
      description: A paginated list of commits.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/base_commit"
          minItems: 0
          type: array
          uniqueItems: true
      title: Page
      type: object
    paginated_commit_comments:
      additionalProperties: false
      description: A paginated list of commit comments.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/commit_comment"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Commit Comments
      type: object
    paginated_commitstatuses:
      additionalProperties: false
      description: A paginated list of commit status objects.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/commitstatus"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Commit Statuses
      type: object
    paginated_components:
      additionalProperties: false
      description: A paginated list of issue tracker components.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/component"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Components
      type: object
    paginated_default_reviewer_and_type:
      additionalProperties: false
      description: A paginated list of default reviewers with reviewer type.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/default_reviewer_and_type"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Default Reviewer and Type
      type: object
    paginated_deploy_keys:
      additionalProperties: false
      description: A paginated list of deploy keys.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/deploy_key"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Deploy Keys
      type: object
    paginated_deployment_variable:
      description: A paged list of deployment variables.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/deployment_variable"
          minItems: 0
          type: array
      title: Paginated Deployment Variables
      type: object
    paginated_deployments:
      description: A paged list of deployments
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/deployment"
          minItems: 0
          type: array
      title: Paginated Deployments
      type: object
    paginated_diffstats:
      additionalProperties: false
      description: A paginated list of diffstats.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          description: Current number of objects on the existing page. The default value is 500 with 5000 being the maximum allowed value.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/diffstat"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Diff Stat
      type: object
    paginated_environments:
      description: A paged list of environments
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/deployment_environment"
          minItems: 0
          type: array
      title: Paginated Deployment Environments
      type: object
    paginated_files:
      additionalProperties: false
      description: A paginated list of commit_file objects.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/commit_file"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Files
      type: object
    paginated_hook_events:
      additionalProperties: false
      description: A paginated list of webhook types available to subscribe on.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/hook_event"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Hook Events
      type: object
    paginated_issue_attachments:
      additionalProperties: false
      description: A paginated list of issue attachments.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/issue_attachment"
          minItems: 0
          type: array
      title: Paginated Issue Attachment
      type: object
    paginated_issue_comments:
      additionalProperties: false
      description: A paginated list of issue comments.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/issue_comment"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Issue Comments
      type: object
    paginated_issues:
      additionalProperties: false
      description: A paginated list of issues.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/issue"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Issues
      type: object
    paginated_log_entries:
      additionalProperties: false
      description: A paginated list of issue changes.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/issue_change"
          minItems: 0
          type: array
      title: Paginated Log Entries
      type: object
    paginated_milestones:
      additionalProperties: false
      description: A paginated list of issue tracker milestones.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/milestone"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Milestones
      type: object
    paginated_pipeline_caches:
      description: A paged list of pipeline caches
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/pipeline_cache"
          minItems: 0
          type: array
      title: Paginated Pipeline Cache
      type: object
    paginated_pipeline_known_hosts:
      description: A paged list of known hosts.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/pipeline_known_host"
          minItems: 0
          type: array
      title: Paginated Pipeline Known Hosts
      type: object
    paginated_pipeline_schedule_executions:
      description: A paged list of the executions of a schedule.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/pipeline_schedule_execution"
          minItems: 0
          type: array
      title: Paginated Pipeline Schedule Executions
      type: object
    paginated_pipeline_schedules:
      description: A paged list of schedules
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/pipeline_schedule"
          minItems: 0
          type: array
      title: Paginated Pipeline Schedule
      type: object
    paginated_pipeline_steps:
      description: A paged list of pipeline steps.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/pipeline_step"
          minItems: 0
          type: array
      title: Paginated Pipeline Steps
      type: object
    paginated_pipeline_variables:
      description: A paged list of variables.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/pipeline_variable"
          minItems: 0
          type: array
      title: Paginated Pipeline Variables
      type: object
    paginated_pipelines:
      description: A paged list of pipelines
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/pipeline"
          minItems: 0
          type: array
      title: Paginated Pipelines
      type: object
    paginated_project_deploy_keys:
      additionalProperties: false
      description: A paginated list of project deploy keys.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/project_deploy_key"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Project Deploy Keys
      type: object
    paginated_projects:
      additionalProperties: false
      description: A paginated list of projects
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/project"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Projects
      type: object
    paginated_pullrequest_comments:
      additionalProperties: false
      description: A paginated list of pullrequest comments.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/pullrequest_comment"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Pull Request Comments
      type: object
    paginated_pullrequests:
      additionalProperties: false
      description: A paginated list of pullrequests.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/pullrequest"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Pull Requests
      type: object
    paginated_refs:
      additionalProperties: false
      description: A paginated list of refs.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/ref"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Refs
      type: object
    paginated_reports:
      description: A paginated list of reports.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          type: integer
        pagelen:
          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.
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          type: integer
        values:
          description: The values of the current page.
          items:
            $ref: "#/components/schemas/report"
          minItems: 0
          type: array
      title: Paginated Reports
      type: object
    paginated_repositories:
      additionalProperties: false
      description: A paginated list of repositories.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/repository"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Repositories
      type: object
    paginated_repository_group_permissions:
      additionalProperties: false
      description: A paginated list of repository group permissions.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/repository_group_permission"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Repository Group Permissions
      type: object
    paginated_repository_permissions:
      additionalProperties: false
      description: A paginated list of repository permissions.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/repository_permission"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Repository Permissions
      type: object
    paginated_repository_user_permissions:
      additionalProperties: false
      description: A paginated list of repository user permissions.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/repository_user_permission"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Repository User Permissions
      type: object
    paginated_snippet_comments:
      additionalProperties: false
      description: A paginated list of snippet comments.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/snippet_comment"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Snippet Comments
      type: object
    paginated_snippet_commit:
      additionalProperties: false
      description: A paginated list of snippet commits.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/snippet_commit"
          minItems: 0
          type: array
      title: Paginated Snippet Commits
      type: object
    paginated_snippets:
      additionalProperties: false
      description: A paginated list of snippets.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/snippet"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Snippets
      type: object
    paginated_ssh_user_keys:
      additionalProperties: false
      description: A paginated list of SSH keys.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/ssh_account_key"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated SSH User Keys
      type: object
    paginated_tags:
      additionalProperties: false
      description: A paginated list of tags.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/tag"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Tags
      type: object
    paginated_treeentries:
      additionalProperties: false
      description: A paginated list of commit_file and/or commit_directory objects.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/treeentry"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Tree Entry
      type: object
    paginated_versions:
      additionalProperties: false
      description: A paginated list of issue tracker versions.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/version"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Versions
      type: object
    paginated_webhook_subscriptions:
      additionalProperties: false
      description: A paginated list of webhook subscriptions
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/webhook_subscription"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Webhook Subscriptions
      type: object
    paginated_workspace_memberships:
      additionalProperties: false
      description: A paginated list of workspace memberships.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/workspace_membership"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Workspace Memberships
      type: object
    paginated_workspaces:
      additionalProperties: false
      description: A paginated list of workspaces.
      properties:
        next:
          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.
          format: uri
          type: string
        page:
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          minimum: 1
          type: integer
        pagelen:
          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.
          minimum: 1
          type: integer
        previous:
          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.
          format: uri
          type: string
        size:
          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.
          minimum: 0
          type: integer
        values:
          items:
            $ref: "#/components/schemas/workspace"
          minItems: 0
          type: array
          uniqueItems: true
      title: Paginated Workspaces
      type: object
    participant:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: Object describing a user's role on resources like commits or pull requests.
          properties:
            approved:
              type: boolean
            participated_on:
              description: The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.
              format: date-time
              type: string
            role:
              enum:
                - PARTICIPANT
                - REVIEWER
              type: string
            state:
              enum:
                - approved
                - changes_requested
                - null
              type: string
            user:
              $ref: "#/components/schemas/account"
          title: Participant
          type: object
    pipeline:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket Pipeline. This represents an actual pipeline result.
          properties:
            build_number:
              description: The build number of the pipeline.
              type: integer
            build_seconds_used:
              description: The number of build seconds used by this pipeline.
              type: integer
            completed_on:
              description: The timestamp when the Pipeline was completed. This is not set if the pipeline is still in progress.
              format: date-time
              type: string
            created_on:
              description: The timestamp when the pipeline was created.
              format: date-time
              type: string
            creator:
              $ref: "#/components/schemas/account"
            repository:
              $ref: "#/components/schemas/repository"
            state:
              $ref: "#/components/schemas/pipeline_state"
            target:
              $ref: "#/components/schemas/pipeline_target"
            trigger:
              $ref: "#/components/schemas/pipeline_trigger"
            uuid:
              description: The UUID identifying the pipeline.
              type: string
          title: Pipeline
          type: object
    pipeline_build_number:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Pipelines build number.
          properties:
            next:
              description: The next number that will be used as build number.
              type: integer
          title: Pipeline Build Number
          type: object
    pipeline_cache:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A representation of metadata for a pipeline cache for given repository.
          properties:
            created_on:
              description: The timestamp when the cache was created.
              format: date-time
              type: string
            file_size_bytes:
              description: The size of the file containing the archive of the cache.
              type: integer
            key_hash:
              description: The key hash of the cache version.
              type: string
            name:
              description: The name of the cache.
              type: string
            path:
              description: The path where the cache contents were retrieved from.
              type: string
            pipeline_uuid:
              description: The UUID of the pipeline that created the cache.
              type: string
            step_uuid:
              description: The uuid of the step that created the cache.
              type: string
            uuid:
              description: The UUID identifying the pipeline cache.
              type: string
          title: Pipeline Cache
          type: object
    pipeline_cache_content_uri:
      description: A representation of the location of pipeline cache content.
      properties:
        uri:
          description: The uri for pipeline cache content.
          format: uri
          type: string
      title: Pipeline Cache Content URI
      type: object
    pipeline_command:
      description: An executable pipeline command.
      properties:
        command:
          description: The executable command.
          type: string
        name:
          description: The name of the command.
          type: string
      title: Pipeline Command
      type: object
    pipeline_commit_target:
      allOf:
        - $ref: "#/components/schemas/pipeline_target"
        - additionalProperties: true
          description: A Bitbucket Pipelines commit target.
          properties:
            commit:
              $ref: "#/components/schemas/commit"
            selector:
              $ref: "#/components/schemas/pipeline_selector"
          title: Pipeline Commit Target
          type: object
    pipeline_error:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: An error causing a pipeline failure.
          properties:
            key:
              description: The error key.
              type: string
            message:
              description: The error message.
              type: string
          title: Pipeline Error
          type: object
    pipeline_image:
      description: The definition of a Docker image that can be used for a Bitbucket Pipelines step execution context.
      properties:
        email:
          description: The email needed to authenticate with the Docker registry. Only required when using a private Docker image.
          type: string
        name:
          description: The name of the image. If the image is hosted on DockerHub the short name can be used, otherwise the fully qualified name is required here.
          type: string
        password:
          description: The password needed to authenticate with the Docker registry. Only required when using a private Docker image.
          type: string
        username:
          description: The username needed to authenticate with the Docker registry. Only required when using a private Docker image.
          type: string
      title: Pipeline Image
      type: object
    pipeline_known_host:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Pipelines known host.
          properties:
            hostname:
              description: The hostname of the known host.
              type: string
            public_key:
              $ref: "#/components/schemas/pipeline_ssh_public_key"
            uuid:
              description: The UUID identifying the known host.
              type: string
          title: Pipeline Known Host
          type: object
    pipeline_ref_target:
      allOf:
        - $ref: "#/components/schemas/pipeline_target"
        - additionalProperties: true
          description: A Bitbucket Pipelines reference target.
          properties:
            commit:
              $ref: "#/components/schemas/commit"
            ref_name:
              description: The name of the reference.
              type: string
            ref_type:
              description: The type of reference (branch/tag).
              enum:
                - branch
                - tag
                - named_branch
                - bookmark
              type: string
            selector:
              $ref: "#/components/schemas/pipeline_selector"
          title: Pipeline Ref Target
          type: object
    pipeline_schedule:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Pipelines schedule.
          properties:
            created_on:
              description: The timestamp when the schedule was created.
              format: date-time
              type: string
            cron_pattern:
              description: "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day."
              type: string
            enabled:
              description: Whether the schedule is enabled.
              type: boolean
            target:
              $ref: "#/components/schemas/pipeline_ref_target"
            updated_on:
              description: The timestamp when the schedule was updated.
              format: date-time
              type: string
            uuid:
              description: The UUID identifying the schedule.
              type: string
          title: Pipeline Schedule
          type: object
    pipeline_schedule_execution:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Pipelines schedule execution.
          properties: {}
          title: Pipeline Schedule Execution
          type: object
    pipeline_schedule_execution_errored:
      allOf:
        - $ref: "#/components/schemas/pipeline_schedule_execution"
        - additionalProperties: true
          description: A Pipelines schedule execution that failed to be executed.
          properties:
            error:
              $ref: "#/components/schemas/pipeline_error"
          type: object
    pipeline_schedule_execution_executed:
      allOf:
        - $ref: "#/components/schemas/pipeline_schedule_execution"
        - additionalProperties: true
          description: A Pipelines executed schedule execution.
          properties:
            pipeline:
              $ref: "#/components/schemas/pipeline"
          type: object
    pipeline_schedule_post_request_body:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          properties:
            cron_pattern:
              description: "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day."
              type: string
            enabled:
              description: Whether the schedule is enabled.
              type: boolean
            target:
              description: The target on which the schedule will be executed.
              properties:
                ref_name:
                  description: The name of the reference.
                  type: string
                ref_type:
                  description: The type of reference (branch only).
                  enum:
                    - branch
                  type: string
                selector:
                  $ref: "#/components/schemas/pipeline_selector"
              required:
                - selector
                - ref_name
                - ref_type
              type: object
          required:
            - target
            - cron_pattern
          title: Request body for Pipeline Schedule POST request
          type: object
    pipeline_schedule_put_request_body:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          properties:
            enabled:
              description: Whether the schedule is enabled.
              type: boolean
          title: Request body for Pipeline Schedule PUT request
          type: object
    pipeline_selector:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A representation of the selector that was used to identify the pipeline in the YML file.
          properties:
            pattern:
              description: The name of the matching pipeline definition.
              type: string
            type:
              description: The type of selector.
              enum:
                - branches
                - tags
                - bookmarks
                - default
                - custom
              type: string
          title: Pipeline Selector
          type: object
    pipeline_ssh_key_pair:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Pipelines SSH key pair.
          properties:
            private_key:
              description: The SSH private key. This value will be empty when retrieving the SSH key pair.
              type: string
            public_key:
              description: The SSH public key.
              type: string
          title: Pipeline SSH Key Pair
          type: object
    pipeline_ssh_public_key:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Pipelines known host public key.
          properties:
            key:
              description: The base64 encoded public key.
              type: string
            key_type:
              description: The type of the public key.
              type: string
            md5_fingerprint:
              description: The MD5 fingerprint of the public key.
              type: string
            sha256_fingerprint:
              description: The SHA-256 fingerprint of the public key.
              type: string
          title: Pipeline SSH Public Key
          type: object
    pipeline_state:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: The representation of the progress state of a pipeline.
          properties: {}
          title: Pipeline State
          type: object
    pipeline_state_completed:
      allOf:
        - $ref: "#/components/schemas/pipeline_state"
        - additionalProperties: true
          description: A Bitbucket Pipelines COMPLETED pipeline state.
          properties:
            name:
              description: The name of pipeline state (COMPLETED).
              enum:
                - COMPLETED
              type: string
            result:
              $ref: "#/components/schemas/pipeline_state_completed_result"
          title: Pipeline Completed State
          type: object
    pipeline_state_completed_error:
      allOf:
        - $ref: "#/components/schemas/pipeline_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines ERROR pipeline result.
          properties:
            error:
              $ref: "#/components/schemas/pipeline_error"
            name:
              description: The name of the result (ERROR)
              enum:
                - ERROR
              type: string
          title: Pipeline Completed Error
          type: object
    pipeline_state_completed_expired:
      allOf:
        - $ref: "#/components/schemas/pipeline_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines EXPIRED pipeline result.
          properties:
            name:
              description: The name of the stopped result (EXPIRED).
              enum:
                - EXPIRED
              type: string
          type: object
    pipeline_state_completed_failed:
      allOf:
        - $ref: "#/components/schemas/pipeline_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines FAILED pipeline result.
          properties:
            name:
              description: The name of the failed result (FAILED).
              enum:
                - FAILED
              type: string
          type: object
    pipeline_state_completed_result:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A result of a completed pipeline state.
          properties: {}
          title: Pipeline Completed Result
          type: object
    pipeline_state_completed_stopped:
      allOf:
        - $ref: "#/components/schemas/pipeline_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines STOPPED pipeline result.
          properties:
            name:
              description: The name of the stopped result (STOPPED).
              enum:
                - STOPPED
              type: string
          type: object
    pipeline_state_completed_successful:
      allOf:
        - $ref: "#/components/schemas/pipeline_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines SUCCESSFUL pipeline result.
          properties:
            name:
              description: The name of the successful result (SUCCESSFUL).
              enum:
                - SUCCESSFUL
              type: string
          type: object
    pipeline_state_in_progress:
      allOf:
        - $ref: "#/components/schemas/pipeline_state"
        - additionalProperties: true
          description: A Bitbucket Pipelines IN_PROGRESS pipeline state.
          properties:
            name:
              description: The name of pipeline state (IN_PROGRESS).
              enum:
                - IN_PROGRESS
              type: string
            stage:
              $ref: "#/components/schemas/pipeline_state_in_progress_stage"
          title: Pipeline In-Progress State
          type: object
    pipeline_state_in_progress_paused:
      allOf:
        - $ref: "#/components/schemas/pipeline_state_in_progress_stage"
        - additionalProperties: true
          description: A Bitbucket Pipelines PAUSED stage of a pipeline that is in progress.
          properties:
            name:
              description: The name of the stage (PAUSED)
              enum:
                - PAUSED
              type: string
          type: object
    pipeline_state_in_progress_running:
      allOf:
        - $ref: "#/components/schemas/pipeline_state_in_progress_stage"
        - additionalProperties: true
          description: A Bitbucket Pipelines RUNNING stage of a pipeline that is in progress.
          properties:
            name:
              description: The name of the stage (RUNNING)
              enum:
                - RUNNING
              type: string
          type: object
    pipeline_state_in_progress_stage:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A result of an in progress pipeline state.
          properties: {}
          title: Pipeline In-Progress Stage
          type: object
    pipeline_state_pending:
      allOf:
        - $ref: "#/components/schemas/pipeline_state"
        - additionalProperties: true
          description: A Bitbucket Pipelines PENDING pipeline state.
          properties:
            name:
              description: The name of pipeline state (PENDING).
              enum:
                - PENDING
              type: string
          title: Pipeline Pending State
          type: object
    pipeline_step:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A step of a Bitbucket pipeline. This represents the actual result of the step execution.
          properties:
            completed_on:
              description: The timestamp when the step execution was completed. This is not set if the step is still in progress.
              format: date-time
              type: string
            image:
              $ref: "#/components/schemas/pipeline_image"
            script_commands:
              description: The list of build commands. These commands are executed in the build container.
              items:
                $ref: "#/components/schemas/pipeline_command"
              type: array
            setup_commands:
              description: The list of commands that are executed as part of the setup phase of the build. These commands are executed outside the build container.
              items:
                $ref: "#/components/schemas/pipeline_command"
              type: array
            started_on:
              description: The timestamp when the step execution was started. This is not set when the step hasn't executed yet.
              format: date-time
              type: string
            state:
              $ref: "#/components/schemas/pipeline_step_state"
            uuid:
              description: The UUID identifying the step.
              type: string
          title: Pipeline Step
          type: object
      x-bb-batch-max-size: 100
      x-bb-batch-url: /rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch
      x-bb-default-fields:
        - uuid
      x-bb-url: /rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}
    pipeline_step_error:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: An error causing a step failure.
          properties:
            key:
              description: The error key.
              type: string
            message:
              description: The error message.
              type: string
          title: Pipeline Step Error
          type: object
    pipeline_step_state:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: The representation of the progress state of a pipeline step.
          properties: {}
          title: Pipeline Step State
          type: object
    pipeline_step_state_completed:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state"
        - additionalProperties: true
          description: A Bitbucket Pipelines COMPLETED pipeline step state.
          properties:
            name:
              description: The name of pipeline step state (COMPLETED).
              enum:
                - COMPLETED
              type: string
            result:
              $ref: "#/components/schemas/pipeline_step_state_completed_result"
          type: object
    pipeline_step_state_completed_error:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines ERROR pipeline step result.
          properties:
            error:
              $ref: "#/components/schemas/pipeline_step_error"
            name:
              description: The name of the result (ERROR)
              enum:
                - ERROR
              type: string
          type: object
    pipeline_step_state_completed_expired:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines EXPIRED pipeline step result.
          properties:
            name:
              description: The name of the result (EXPIRED)
              enum:
                - EXPIRED
              type: string
          type: object
    pipeline_step_state_completed_failed:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines FAILED pipeline step result.
          properties:
            name:
              description: The name of the result (FAILED)
              enum:
                - FAILED
              type: string
          type: object
    pipeline_step_state_completed_not_run:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines NOT_RUN pipeline step result.
          properties:
            name:
              description: The name of the result (NOT_RUN)
              enum:
                - NOT_RUN
              type: string
          type: object
    pipeline_step_state_completed_result:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A result of a completed pipeline step state.
          properties: {}
          title: Pipeline Completed Step Result
          type: object
    pipeline_step_state_completed_stopped:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines STOPPED pipeline step result.
          properties:
            name:
              description: The name of the result (STOPPED)
              enum:
                - STOPPED
              type: string
          type: object
    pipeline_step_state_completed_successful:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state_completed_result"
        - additionalProperties: true
          description: A Bitbucket Pipelines SUCCESSFUL pipeline step result.
          properties:
            name:
              description: The name of the result (SUCCESSFUL)
              enum:
                - SUCCESSFUL
              type: string
          type: object
    pipeline_step_state_in_progress:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state"
        - additionalProperties: true
          description: A Bitbucket Pipelines IN_PROGRESS pipeline step state.
          properties:
            name:
              description: The name of pipeline step state (IN_PROGRESS).
              enum:
                - IN_PROGRESS
              type: string
          type: object
    pipeline_step_state_pending:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state"
        - additionalProperties: true
          description: A Bitbucket Pipelines PENDING pipeline step state.
          properties:
            name:
              description: The name of pipeline step state (PENDING).
              enum:
                - PENDING
              type: string
          type: object
    pipeline_step_state_ready:
      allOf:
        - $ref: "#/components/schemas/pipeline_step_state"
        - additionalProperties: true
          description: A Bitbucket Pipelines READY pipeline step state.
          properties:
            name:
              description: The name of pipeline step state (READY).
              enum:
                - READY
              type: string
          type: object
    pipeline_target:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A representation of the target that a pipeline executes on.
          properties: {}
          title: Pipeline Target
          type: object
    pipeline_trigger:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A representation of the trigger used for a pipeline.
          properties: {}
          title: Pipeline Trigger
          type: object
    pipeline_trigger_manual:
      allOf:
        - $ref: "#/components/schemas/pipeline_trigger"
        - additionalProperties: true
          description: A Bitbucket Pipelines MANUAL trigger.
          properties: {}
          title: Pipeline Manual Trigger
          type: object
    pipeline_trigger_push:
      allOf:
        - $ref: "#/components/schemas/pipeline_trigger"
        - additionalProperties: true
          description: A Bitbucket Pipelines PUSH trigger.
          properties: {}
          title: Pipeline Push Trigger
          type: object
    pipeline_variable:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Pipelines variable.
          properties:
            key:
              description: The unique name of the variable.
              type: string
            secured:
              description: If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
              type: boolean
            uuid:
              description: The UUID identifying the variable.
              type: string
            value:
              description: The value of the variable. If the variable is secured, this will be empty.
              type: string
          title: Pipeline Variable
          type: object
    pipelines_config:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: The Pipelines configuration for a repository.
          properties:
            enabled:
              description: Whether Pipelines is enabled for the repository.
              type: boolean
            repository:
              $ref: "#/components/schemas/repository"
          title: Pipelines Configuration
          type: object
    pipelines_ddev_pipeline_step:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A step of a Bitbucket pipeline. This represents the actual result of the step execution.
          type: object
      x-bb-batch-max-size: 100
      x-bb-batch-url: /rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch
      x-bb-default-fields:
        - uuid
      x-bb-url: /rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}
    pipelines_stg_west_pipeline_step:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A step of a Bitbucket pipeline. This represents the actual result of the step execution.
          type: object
      x-bb-batch-max-size: 100
      x-bb-batch-url: /rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch
      x-bb-default-fields:
        - uuid
      x-bb-url: /rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}
    project:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: |-
            A Bitbucket project.
                        Projects are used by teams to organize repositories.
          properties:
            created_on:
              format: date-time
              type: string
            description:
              type: string
            has_publicly_visible_repos:
              description: |-
                
                Indicates whether the project contains publicly visible repositories.
                Note that private projects cannot contain public repositories.
              type: boolean
            is_private:
              description: |-
                
                Indicates whether the project is publicly accessible, or whether it is
                private to the team and consequently only visible to team members.
                Note that private projects cannot contain public repositories.
              type: boolean
            key:
              description: The project's key.
              type: string
            links:
              additionalProperties: false
              properties:
                avatar:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                html:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            name:
              description: The name of the project.
              type: string
            owner:
              $ref: "#/components/schemas/team"
            updated_on:
              format: date-time
              type: string
            uuid:
              description: The project's immutable id.
              type: string
          title: Project
          type: object
    project_branching_model:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A project's branching model
          properties:
            branch_types:
              description: The active branch types.
              items:
                additionalProperties: false
                properties:
                  kind:
                    description: The kind of branch.
                    enum:
                      - feature
                      - bugfix
                      - release
                      - hotfix
                    type: string
                  prefix:
                    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`.
                    type: string
                required:
                  - kind
                  - prefix
                type: object
              maxItems: 4
              minItems: 0
              type: array
              uniqueItems: true
            development:
              additionalProperties: false
              properties:
                name:
                  description: Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist.
                  type: string
                use_mainbranch:
                  description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
                  type: boolean
              required:
                - name
                - use_mainbranch
              type: object
            production:
              additionalProperties: false
              properties:
                name:
                  description: Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist.
                  type: string
                use_mainbranch:
                  description: Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`).
                  type: boolean
              required:
                - name
                - use_mainbranch
              type: object
          title: Project Branching Model
          type: object
    project_deploy_key:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: Represents deploy key for a project.
          properties:
            added_on:
              format: date-time
              type: string
            comment:
              description: The comment parsed from the deploy key (if present)
              type: string
            created_by:
              $ref: "#/components/schemas/account"
            key:
              description: The deploy key value.
              type: string
            label:
              description: The user-defined label for the deploy key
              type: string
            last_used:
              format: date-time
              type: string
            links:
              additionalProperties: false
              properties:
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            project:
              $ref: "#/components/schemas/project"
          title: Project Deploy Key
          type: object
    pullrequest:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A pull request object.
          properties:
            author:
              $ref: "#/components/schemas/account"
            close_source_branch:
              description: A boolean flag indicating if merging the pull request closes the source branch.
              type: boolean
            closed_by:
              $ref: "#/components/schemas/account"
            comment_count:
              description: The number of comments for a specific pull request.
              minimum: 0
              type: integer
            created_on:
              description: The ISO8601 timestamp the request was created.
              format: date-time
              type: string
            destination:
              $ref: "#/components/schemas/pullrequest_endpoint"
            id:
              description: The pull request's unique ID. Note that pull request IDs are only unique within their associated repository.
              type: integer
            links:
              additionalProperties: false
              properties:
                activity:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                approve:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                comments:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                commits:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                decline:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                diff:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                diffstat:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                html:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                merge:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            merge_commit:
              additionalProperties: false
              properties:
                hash:
                  pattern: "[0-9a-f]{7,}?"
                  type: string
              title: Pull Request Commit
              type: object
            participants:
              description: "        The list of users that are collaborating on this pull request.

                \        Collaborators are user that:


                \        * are added to the pull request as a reviewer (part of the reviewers

                \          list)

                \        * are not explicit reviewers, but have commented on the pull request

                \        * are not explicit reviewers, but have approved the pull request


                \        Each user is wrapped in an object that indicates the user's role and

                \        whether they have approved the pull request. For performance reasons,

                \        the API only returns this list when an API requests a pull request by

                \        id.

                \        "
              items:
                $ref: "#/components/schemas/participant"
              type: array
            reason:
              description: Explains why a pull request was declined. This field is only applicable to pull requests in rejected state.
              type: string
            rendered:
              additionalProperties: false
              description: User provided pull request text, interpreted in a markup language and rendered in HTML
              properties:
                description:
                  additionalProperties: false
                  properties:
                    html:
                      description: The user's content rendered as HTML.
                      type: string
                    markup:
                      description: The type of markup language the raw content is to be interpreted in.
                      enum:
                        - markdown
                        - creole
                        - plaintext
                      type: string
                    raw:
                      description: The text as it was typed by a user.
                      type: string
                  type: object
                reason:
                  additionalProperties: false
                  properties:
                    html:
                      description: The user's content rendered as HTML.
                      type: string
                    markup:
                      description: The type of markup language the raw content is to be interpreted in.
                      enum:
                        - markdown
                        - creole
                        - plaintext
                      type: string
                    raw:
                      description: The text as it was typed by a user.
                      type: string
                  type: object
                title:
                  additionalProperties: false
                  properties:
                    html:
                      description: The user's content rendered as HTML.
                      type: string
                    markup:
                      description: The type of markup language the raw content is to be interpreted in.
                      enum:
                        - markdown
                        - creole
                        - plaintext
                      type: string
                    raw:
                      description: The text as it was typed by a user.
                      type: string
                  type: object
              title: Rendered Pull Request Markup
              type: object
            reviewers:
              description: The list of users that were added as reviewers on this pull request when it was created. For performance reasons, the API only includes this list on a pull request's `self` URL.
              items:
                $ref: "#/components/schemas/account"
              type: array
            source:
              $ref: "#/components/schemas/pullrequest_endpoint"
            state:
              description: The pull request's current status.
              enum:
                - OPEN
                - MERGED
                - DECLINED
                - SUPERSEDED
              type: string
            summary:
              additionalProperties: false
              properties:
                html:
                  description: The user's content rendered as HTML.
                  type: string
                markup:
                  description: The type of markup language the raw content is to be interpreted in.
                  enum:
                    - markdown
                    - creole
                    - plaintext
                  type: string
                raw:
                  description: The text as it was typed by a user.
                  type: string
              type: object
            task_count:
              description: The number of open tasks for a specific pull request.
              minimum: 0
              type: integer
            title:
              description: Title of the pull request.
              type: string
            updated_on:
              description: The ISO8601 timestamp the request was last updated.
              format: date-time
              type: string
          title: Pull Request
          type: object
    pullrequest_comment:
      allOf:
        - $ref: "#/components/schemas/comment"
        - additionalProperties: true
          description: A pullrequest comment.
          properties:
            pullrequest:
              $ref: "#/components/schemas/pullrequest"
          title: Pull Request Comment
          type: object
    pullrequest_endpoint:
      additionalProperties: false
      properties:
        branch:
          additionalProperties: false
          properties:
            default_merge_strategy:
              description: The default merge strategy, when this endpoint is the destination of the pull request.
              type: string
            merge_strategies:
              description: Available merge strategies, when this endpoint is the destination of the pull request.
              items:
                enum:
                  - merge_commit
                  - squash
                  - fast_forward
                type: string
              type: array
            name:
              type: string
          title: Pull Request Branch
          type: object
        commit:
          additionalProperties: false
          properties:
            hash:
              pattern: "[0-9a-f]{7,}?"
              type: string
          title: Pull Request Commit
          type: object
        repository:
          $ref: "#/components/schemas/repository"
      title: Pull Request Endpoint
      type: object
    pullrequest_merge_parameters:
      additionalProperties: true
      description: The metadata that describes a pull request merge.
      properties:
        close_source_branch:
          description: Whether the source branch should be deleted. If this is not provided, we fallback to the value used when the pull request was created, which defaults to False
          type: boolean
        merge_strategy:
          default: merge_commit
          description: The merge strategy that will be used to merge the pull request.
          enum:
            - merge_commit
            - squash
            - fast_forward
          type: string
        message:
          description: The commit message that will be used on the resulting commit.
          type: string
        type:
          type: string
      required:
        - type
      title: Pull Request Merge Parameters
      type: object
    ref:
      additionalProperties: true
      description: A ref object, representing a branch or tag in a repository.
      properties:
        links:
          additionalProperties: false
          properties:
            commits:
              additionalProperties: false
              description: A link to a resource related to this object.
              properties:
                href:
                  format: uri
                  type: string
                name:
                  type: string
              title: Link
              type: object
            html:
              additionalProperties: false
              description: A link to a resource related to this object.
              properties:
                href:
                  format: uri
                  type: string
                name:
                  type: string
              title: Link
              type: object
            self:
              additionalProperties: false
              description: A link to a resource related to this object.
              properties:
                href:
                  format: uri
                  type: string
                name:
                  type: string
              title: Link
              type: object
          type: object
        name:
          description: The name of the ref.
          type: string
        target:
          $ref: "#/components/schemas/commit"
        type:
          type: string
      required:
        - type
      title: Ref
      type: object
    report:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A report for a commit.
          properties:
            created_on:
              description: The timestamp when the report was created.
              format: date-time
              type: string
            data:
              description: An array of data fields to display information on the report. Maximum 10.
              items:
                $ref: "#/components/schemas/report_data"
              type: array
            details:
              description: A string to describe the purpose of the report.
              type: string
            external_id:
              description: ID of the report provided by the report creator. It can be used to identify the report as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the report creator for updating or deleting this specific report. Needs to be unique.
              type: string
            link:
              description: A URL linking to the results of the report in an external tool.
              format: uri
              type: string
            logo_url:
              description: A URL to the report logo. If none is provided, the default insights logo will be used.
              format: uri
              type: string
            remote_link_enabled:
              description: If enabled, a remote link is created in Jira for the issue associated with the commit the report belongs to.
              type: boolean
            report_type:
              description: The type of the report.
              enum:
                - SECURITY
                - COVERAGE
                - TEST
                - BUG
              type: string
            reporter:
              description: A string to describe the tool or company who created the report.
              type: string
            result:
              description: The state of the report. May be set to PENDING and later updated.
              enum:
                - PASSED
                - FAILED
                - PENDING
              type: string
            title:
              description: The title of the report.
              type: string
            updated_on:
              description: The timestamp when the report was updated.
              format: date-time
              type: string
            uuid:
              description: The UUID that can be used to identify the report.
              type: string
          title: Commit Report
          type: object
      x-bb-default-fields:
        - uuid
        - commitHash
      x-bb-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}
    report_annotation:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A report for a commit.
          properties:
            annotation_type:
              description: The type of the report.
              enum:
                - VULNERABILITY
                - CODE_SMELL
                - BUG
              type: string
            created_on:
              description: The timestamp when the report was created.
              format: date-time
              type: string
            details:
              description: The details to show to users when clicking on the annotation.
              type: string
            external_id:
              description: ID of the annotation provided by the annotation creator. It can be used to identify the annotation as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the annotation creator for updating or deleting this specific annotation. Needs to be unique.
              type: string
            line:
              description: The line number that the annotation should belong to. If no line number is provided, then it will default to 0 and in a pull request it will appear at the top of the file specified by the path field.
              minimum: 1
              type: integer
            link:
              description: A URL linking to the annotation in an external tool.
              format: uri
              type: string
            path:
              description: The path of the file on which this annotation should be placed. This is the path of the file relative to the git repository. If no path is provided, then it will appear in the overview modal on all pull requests where the tip of the branch is the given commit, regardless of which files were modified.
              type: string
            result:
              description: The state of the report. May be set to PENDING and later updated.
              enum:
                - PASSED
                - FAILED
                - SKIPPED
                - IGNORED
              type: string
            severity:
              description: The severity of the annotation.
              enum:
                - CRITICAL
                - HIGH
                - MEDIUM
                - LOW
              type: string
            summary:
              description: The message to display to users.
              type: string
            updated_on:
              description: The timestamp when the report was updated.
              format: date-time
              type: string
            uuid:
              description: The UUID that can be used to identify the annotation.
              type: string
          title: Report Annotation
          type: object
      x-bb-default-fields:
        - uuid
      x-bb-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commit.hash}/reports/{reportUuid}/annotations/{uuid}
    report_data:
      description: A key-value element that will be displayed along with the report.
      properties:
        title:
          description: A string describing what this data field represents.
          type: string
        type:
          description: The type of data contained in the value field. If not provided, then the value will be detected as a boolean, number or string.
          enum:
            - BOOLEAN
            - DATE
            - DURATION
            - LINK
            - NUMBER
            - PERCENTAGE
            - TEXT
          type: string
        value:
          description: The value of the data element.
          type: object
      title: Report Data
      type: object
    repository:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Bitbucket repository.
          properties:
            created_on:
              format: date-time
              type: string
            description:
              type: string
            fork_policy:
              description: |
                
                Controls the rules for forking this repository.

                * **allow_forks**: unrestricted forking
                * **no_public_forks**: restrict forking to private forks (forks cannot
                  be made public later)
                * **no_forks**: deny all forking
              enum:
                - allow_forks
                - no_public_forks
                - no_forks
              type: string
            full_name:
              description: The concatenation of the repository owner's username and the slugified name, e.g. "evzijst/interruptingcow". This is the same string used in Bitbucket URLs.
              type: string
            has_issues:
              type: boolean
            has_wiki:
              type: boolean
            is_private:
              type: boolean
            language:
              type: string
            links:
              additionalProperties: false
              properties:
                avatar:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                clone:
                  items:
                    additionalProperties: false
                    description: A link to a resource related to this object.
                    properties:
                      href:
                        format: uri
                        type: string
                      name:
                        type: string
                    title: Link
                    type: object
                  type: array
                commits:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                downloads:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                forks:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                hooks:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                html:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                pullrequests:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                watchers:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            mainbranch:
              $ref: "#/components/schemas/branch"
            name:
              type: string
            owner:
              $ref: "#/components/schemas/account"
            parent:
              $ref: "#/components/schemas/repository"
            project:
              $ref: "#/components/schemas/project"
            scm:
              enum:
                - git
              type: string
            size:
              type: integer
            updated_on:
              format: date-time
              type: string
            uuid:
              description: The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
              type: string
          title: Repository
          type: object
    repository_group_permission:
      additionalProperties: true
      description: A group's permission for a given repository.
      properties:
        group:
          $ref: "#/components/schemas/group"
        links:
          additionalProperties: false
          properties:
            self:
              additionalProperties: false
              description: A link to a resource related to this object.
              properties:
                href:
                  format: uri
                  type: string
                name:
                  type: string
              title: Link
              type: object
          type: object
        permission:
          enum:
            - read
            - write
            - admin
            - none
          type: string
        repository:
          $ref: "#/components/schemas/repository"
        type:
          type: string
      required:
        - type
      title: Repository Group Permission
      type: object
    repository_inheritance_state:
      additionalProperties: true
      description: A json object representing the repository's inheritance state values
      properties:
        override_settings:
          type: object
        type:
          type: string
      required:
        - type
      title: Repository Inheritance State
      type: object
    repository_permission:
      additionalProperties: true
      description: A user's permission for a given repository.
      properties:
        permission:
          enum:
            - read
            - write
            - admin
            - none
          type: string
        repository:
          $ref: "#/components/schemas/repository"
        type:
          type: string
        user:
          $ref: "#/components/schemas/user"
      required:
        - type
      title: Repository Permission
      type: object
    repository_user_permission:
      additionalProperties: true
      description: A user's direct permission for a given repository.
      properties:
        links:
          additionalProperties: false
          properties:
            self:
              additionalProperties: false
              description: A link to a resource related to this object.
              properties:
                href:
                  format: uri
                  type: string
                name:
                  type: string
              title: Link
              type: object
          type: object
        permission:
          enum:
            - read
            - write
            - admin
            - none
          type: string
        repository:
          $ref: "#/components/schemas/repository"
        type:
          type: string
        user:
          $ref: "#/components/schemas/user"
      required:
        - type
      title: Repository User Permission
      type: object
    search_code_search_result:
      properties:
        content_match_count:
          format: int64
          readOnly: true
          type: integer
        content_matches:
          items:
            $ref: "#/components/schemas/search_content_match"
          readOnly: true
          type: array
        file:
          $ref: "#/components/schemas/commit_file"
        path_matches:
          items:
            $ref: "#/components/schemas/search_segment"
          readOnly: true
          type: array
        type:
          readOnly: true
          type: string
      type: object
    search_content_match:
      properties:
        lines:
          items:
            $ref: "#/components/schemas/search_line"
          readOnly: true
          type: array
      type: object
    search_line:
      properties:
        line:
          format: int32
          readOnly: true
          type: integer
        segments:
          items:
            $ref: "#/components/schemas/search_segment"
          readOnly: true
          type: array
      type: object
    search_result_page:
      properties:
        next:
          format: uri
          readOnly: true
          type: string
        page:
          format: int32
          readOnly: true
          type: integer
        pagelen:
          format: int32
          readOnly: true
          type: integer
        previous:
          format: uri
          readOnly: true
          type: string
        query_substituted:
          readOnly: true
          type: boolean
        size:
          format: int64
          readOnly: true
          type: integer
        values:
          items:
            $ref: "#/components/schemas/search_code_search_result"
          readOnly: true
          type: array
      type: object
    search_segment:
      properties:
        match:
          readOnly: true
          type: boolean
        text:
          readOnly: true
          type: string
      type: object
    snippet:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A snippet object.
          properties:
            created_on:
              format: date-time
              type: string
            creator:
              $ref: "#/components/schemas/account"
            id:
              minimum: 0
              type: integer
            is_private:
              type: boolean
            owner:
              $ref: "#/components/schemas/account"
            scm:
              description: The DVCS used to store the snippet.
              enum:
                - git
              type: string
            title:
              type: string
            updated_on:
              format: date-time
              type: string
          title: Snippet
          type: object
    snippet_comment:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A comment on a snippet.
          properties:
            links:
              additionalProperties: false
              properties:
                html:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            snippet:
              $ref: "#/components/schemas/snippet"
          title: Snippet Comment
          type: object
    snippet_commit:
      allOf:
        - $ref: "#/components/schemas/base_commit"
        - additionalProperties: true
          description: ""
          properties:
            links:
              additionalProperties: false
              properties:
                diff:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                html:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            snippet:
              $ref: "#/components/schemas/snippet"
          title: Snippet Commit
          type: object
    ssh_account_key:
      allOf:
        - $ref: "#/components/schemas/ssh_key"
        - additionalProperties: true
          description: Represents an SSH public key for a user.
          properties:
            owner:
              $ref: "#/components/schemas/account"
          title: SSH Account Key
          type: object
    ssh_key:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: Base type for representing SSH public keys.
          properties:
            comment:
              description: The comment parsed from the SSH key (if present)
              type: string
            created_on:
              format: date-time
              type: string
            key:
              description: The SSH public key value in OpenSSH format.
              type: string
            label:
              description: The user-defined label for the SSH key
              type: string
            last_used:
              format: date-time
              type: string
            links:
              additionalProperties: false
              properties:
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            uuid:
              description: The SSH key's immutable ID.
              type: string
          title: SSH Key
          type: object
    stg_west_report:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A report for a commit.
          type: object
      x-bb-default-fields:
        - uuid
        - commitHash
      x-bb-url: /rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}
    subject_types:
      additionalProperties: false
      description: The mapping of resource/subject types pointing to their individual event types.
      properties:
        repository:
          additionalProperties: false
          properties:
            events:
              additionalProperties: false
              description: A link to a resource related to this object.
              properties:
                href:
                  format: uri
                  type: string
                name:
                  type: string
              title: Link
              type: object
          type: object
        workspace:
          additionalProperties: false
          properties:
            events:
              additionalProperties: false
              description: A link to a resource related to this object.
              properties:
                href:
                  format: uri
                  type: string
                name:
                  type: string
              title: Link
              type: object
          type: object
      title: Subject Types
      type: object
    tag:
      allOf:
        - $ref: "#/components/schemas/ref"
        - additionalProperties: true
          description: A tag object, representing a tag in a repository.
          properties:
            date:
              description: The date that the tag was created, if available
              format: date-time
              type: string
            message:
              description: The message associated with the tag, if available.
              type: string
            tagger:
              $ref: "#/components/schemas/author"
          title: Tag
          type: object
    team:
      allOf:
        - $ref: "#/components/schemas/account"
        - additionalProperties: true
          description: A team object.
          properties:
            links:
              $ref: "#/components/schemas/team_links"
          title: Team
          type: object
    team_links:
      allOf:
        - $ref: "#/components/schemas/account_links"
        - additionalProperties: true
          description: Links related to a Team.
          properties:
            html:
              $ref: "#/components/schemas/link"
            members:
              $ref: "#/components/schemas/link"
            projects:
              $ref: "#/components/schemas/link"
            repositories:
              $ref: "#/components/schemas/link"
            self:
              $ref: "#/components/schemas/link"
          title: Team Links
          type: object
    treeentry:
      additionalProperties: true
      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`.
      properties:
        commit:
          $ref: "#/components/schemas/commit"
        path:
          description: The path in the repository
          type: string
        type:
          type: string
      required:
        - type
      title: Tree Entry
      type: object
    user:
      allOf:
        - $ref: "#/components/schemas/account"
        - additionalProperties: true
          description: A user object.
          properties:
            account_id:
              description: The user's Atlassian account ID.
              type: string
            account_status:
              description: The status of the account. Currently the only possible value is "active", but more values may be added in the future.
              type: string
            has_2fa_enabled:
              type: boolean
            is_staff:
              type: boolean
            links:
              $ref: "#/components/schemas/user_links"
            nickname:
              description: Account name defined by the owner. Should be used instead of the "username" field. Note that "nickname" cannot be used in place of "username" in URLs and queries, as "nickname" is not guaranteed to be unique.
              type: string
            website:
              type: string
          title: User
          type: object
    user_links:
      allOf:
        - $ref: "#/components/schemas/account_links"
        - additionalProperties: true
          description: Links related to a User.
          properties:
            html:
              $ref: "#/components/schemas/link"
            repositories:
              $ref: "#/components/schemas/link"
            self:
              $ref: "#/components/schemas/link"
          title: User Links
          type: object
    version:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A version as defined in a repository's issue tracker.
          properties:
            id:
              type: integer
            links:
              additionalProperties: false
              properties:
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            name:
              type: string
          title: Version
          type: object
    webhook_subscription:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: A Webhook subscription.
          properties:
            active:
              type: boolean
            created_at:
              format: date-time
              type: string
            description:
              description: A user-defined description of the webhook.
              type: string
            events:
              description: The events this webhook is subscribed to.
              items:
                enum:
                  - pullrequest:changes_request_removed
                  - issue:comment_created
                  - repo:push
                  - repo:commit_status_updated
                  - repo:imported
                  - pullrequest:unapproved
                  - repo:updated
                  - pullrequest:rejected
                  - pullrequest:fulfilled
                  - pullrequest:created
                  - pullrequest:approved
                  - repo:transfer
                  - repo:commit_status_created
                  - repo:fork
                  - issue:updated
                  - project:updated
                  - repo:created
                  - issue:created
                  - repo:commit_comment_created
                  - pullrequest:updated
                  - repo:deleted
                  - pullrequest:comment_updated
                  - pullrequest:changes_request_created
                  - pullrequest:comment_deleted
                  - pullrequest:comment_created
                type: string
              minItems: 1
              type: array
              uniqueItems: true
            subject:
              $ref: "#/components/schemas/object"
            subject_type:
              description: The type of entity. Set to either `repository` or `workspace` based on where the subscription is defined.
              enum:
                - repository
                - workspace
              type: string
            url:
              description: The URL events get delivered to.
              format: uri
              type: string
            uuid:
              description: The webhook's id
              type: string
          title: Webhook Subscription
          type: object
    workspace:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: |-
            A Bitbucket workspace.
                        Workspaces are used to organize repositories.
          properties:
            created_on:
              format: date-time
              type: string
            is_private:
              description: |-
                Indicates whether the workspace is publicly accessible, or whether it is
                private to the members and consequently only visible to members.
              type: boolean
            links:
              additionalProperties: false
              properties:
                avatar:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                html:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                members:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                owners:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                projects:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                repositories:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
                snippets:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            name:
              description: The name of the workspace.
              type: string
            slug:
              description: The short label that identifies this workspace.
              type: string
            updated_on:
              format: date-time
              type: string
            uuid:
              description: The workspace's immutable id.
              type: string
          title: Workspace
          type: object
    workspace_membership:
      allOf:
        - $ref: "#/components/schemas/object"
        - additionalProperties: true
          description: |-
            A Bitbucket workspace membership.
                        Links a user to a workspace.
          properties:
            links:
              additionalProperties: false
              properties:
                self:
                  additionalProperties: false
                  description: A link to a resource related to this object.
                  properties:
                    href:
                      format: uri
                      type: string
                    name:
                      type: string
                  title: Link
                  type: object
              type: object
            user:
              $ref: "#/components/schemas/account"
            workspace:
              $ref: "#/components/schemas/workspace"
          title: Workspace Membership
          type: object
  securitySchemes:
    api_key:
      description: API Keys can be used as Basic HTTP Authentication credentials and provide a substitute for the account's actual username and password. API Keys are only available to team accounts and there is only 1 key per account. API Keys do not support scopes and have therefore access to all contents of the account.
      in: header
      name: Authorization
      type: apiKey
    basic:
      description: Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth is available only with username and app password as credentials.
      scheme: basic
      type: http
    oauth2:
      description: OAuth 2 as per [RFC-6749](https://tools.ietf.org/html/rfc6749).
      flows:
        authorizationCode:
          authorizationUrl: https://bitbucket.org/site/oauth2/authorize
          scopes:
            account: Read your account information
            account:write: Read and modify your account information
            email: Read your account's primary email address
            issue: Read your repositories' issues
            issue:write: Read and modify your repositories' issues
            pipeline: Access your repositories' build pipelines
            pipeline:variable: Access your repositories' build pipelines and configure their variables
            pipeline:write: Access and rerun your repositories' build pipelines
            project: Read your workspace's project settings and read repositories contained within your workspace's projects
            project:admin: Read and modify settings for projects in your workspace
            pullrequest: Read your repositories and their pull requests
            pullrequest:write: Read and modify your repositories and their pull requests
            repository: Read your repositories
            repository:admin: Administer your repositories
            repository:delete: Delete your repositories
            repository:write: Read and modify your repositories
            runner: Access your workspaces/repositories' runners
            runner:write: Access and edit your workspaces/repositories' runners
            snippet: Read your snippets
            snippet:write: Read and modify your snippets
            team: Read your team membership information
            team:write: Read and modify your team membership information
            webhook: Read and modify your repositories' webhooks
            wiki: Read and modify your repositories' wikis
          tokenUrl: https://bitbucket.org/site/oauth2/access_token
      type: oauth2
x-atlassian-narrative:
  documents:
    - anchor: authentication
      body: |
        
        The purpose of this section is to describe how to authenticate when making API calls using the Bitbucket REST API.

        -----

        * [Oauth 2](#oauth-2)
          * [Making requests](#making-requests)
          * [Repository cloning](#repository-cloning)
          * [Refresh tokens](#refresh-tokens)
        * [Scopes](#scopes)
        * [Basic auth](#basic-auth)
        * [Access Tokens](#access-tokens)
          * [Repository Access Tokens](#repository-access-tokens)
          * [Project Access Tokens](#project-access-tokens)
          * [Workspace Access Tokens](#workspace-access-tokens)
        * [App passwords](#app-passwords)

        ---

        ### OAuth 2.0

        Our OAuth 2 implementation is merged in with our existing OAuth 1 in
        such a way that existing OAuth 1 consumers automatically become
        valid OAuth 2 clients. The only thing you need to do is edit your
        existing consumer and configure a callback URL.

        Once that is in place, you'll have the following 2 URLs:

            https://bitbucket.org/site/oauth2/authorize
            https://bitbucket.org/site/oauth2/access_token

        For obtaining access/bearer tokens, we support three of RFC-6749's grant
        flows, plus a custom Bitbucket flow for exchanging JWT tokens for access tokens.
        Note that Resource Owner Password Credentials Grant (4.3) is no longer supported.


        #### 1. Authorization Code Grant (4.1)

        The full-blown 3-LO flow. Request authorization from the end user by
        sending their browser to:

            https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code

        The callback includes the `?code={}` query parameter that you can swap
        for an access token:

            $ curl -X POST -u "client_id:secret" \
              https://bitbucket.org/site/oauth2/access_token \
              -d grant_type=authorization_code -d code={code}


        #### 2. Implicit Grant (4.2)

        This flow is useful for browser-based add-ons that operate without server-side backends.

        Request the end user for authorization by directing the browser to:

            https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=token

        That will redirect to your preconfigured callback URL with a fragment
        containing the access token
        (`#access_token={token}&token_type=bearer`) where your page's js can
        pull it out of the URL.


        #### 3. Client Credentials Grant (4.4)

        Somewhat like our existing "2-LO" flow for OAuth 1. Obtain an access
        token that represents not an end user, but the owner of the
        client/consumer:

            $ curl -X POST -u "client_id:secret" \
              https://bitbucket.org/site/oauth2/access_token \
              -d grant_type=client_credentials


        #### 4. Bitbucket Cloud JWT Grant (urn:bitbucket:oauth2:jwt)

        If your Atlassian Connect add-on uses JWT authentication, you can swap a
        JWT for an OAuth access token. The resulting access token represents the
        account for which the add-on is installed.

        Make sure you send the JWT token in the Authorization request header
        using the "JWT" scheme (case sensitive). Note that this custom scheme
        makes this different from HTTP Basic Auth (and so you cannot use "curl
        -u").

            $ curl -X POST -H "Authorization: JWT {jwt_token}" \
              https://bitbucket.org/site/oauth2/access_token \
              -d grant_type=urn:bitbucket:oauth2:jwt


        #### Making Requests

        Once you have an access token, as per RFC-6750, you can use it in a request in any of
        the following ways (in decreasing order of desirability):

        1. Send it in a request header: `Authorization: Bearer {access_token}`
        2. Include it in a (application/x-www-form-urlencoded) POST body as `access_token={access_token}`
        3. Put it in the query string of a non-POST: `?access_token={access_token}`


        #### Repository Cloning

        Since add-ons will not be able to upload their own SSH keys to clone
        with, access tokens can be used as Basic HTTP Auth credentials to
        clone securely over HTTPS. This is much like GitHub, yet slightly
        different:

            $ git clone https://x-token-auth:{access_token}@bitbucket.org/user/repo.git

        The literal string `x-token-auth` as a substitute for username is
        required (note the difference with GitHub where the actual token is in
        the username field).


        #### Refresh Tokens

        Our access tokens expire in one hour. When this happens you'll get 401
        responses.

        Most access tokens grant responses (Implicit and JWT excluded). Therefore, you should include a
        refresh token that can then be used to generate a new access token,
        without the need for end user participation:

            $ curl -X POST -u "client_id:secret" \
              https://bitbucket.org/site/oauth2/access_token \
              -d grant_type=refresh_token -d refresh_token={refresh_token}


        ### Scopes

        Bitbucket's API applies a number of privilege scopes to endpoints. In order to access an endpoint, a request will need to have the necessary scopes.

        Scopes are declared in the descriptor as a list of strings, with each string being the name of a unique scope.

        A descriptor lacking the `scopes` element is implicitly assumed to require all scopes and as a result, Bitbucket will require end users authorizing/installing the add-on
        to explicitly accept all scopes.

        Our best practice suggests you add the scopes your add-on needs, but no more than it needs.

        Invalid scope strings will cause the descriptor to be rejected and the installation to fail.

        The available scopes are:

        - [project](#project)
        - [project:write](#project-write)
        - [project:admin](#project-admin)
        - [repository](#repository)
        - [repository:write](#repository-write)
        - [repository:admin](#repository-admin)
        - [repository:delete](#repository-delete)
        - [pullrequest](#pullrequest)
        - [pullrequest:write](#pullrequest-write)
        - [issue](#issue)
        - [issue:write](#issue-write)
        - [wiki](#wiki)
        - [webhook](#webhook)
        - [snippet](#snippet)
        - [snippet:write](#snippet-write)
        - [email](#email)
        - [account](#account)
        - [account:write](#account-write)
        - [pipeline](#pipeline)
        - [pipeline:write](#pipeline-write)
        - [pipeline:variable](#pipeline-variable)
        - [runner](#runner)
        - [runner:write](#runner-write)

        #### project

        Provides access to view the project or projects.
        This scope implies the [`repository`](#repository) scope, giving read access to all the repositories in a project or projects.

        #### project:write

        This scope is deprecated, and has been made obsolete by `project:admin`. Please see the deprecation notice [here](/cloud/bitbucket/deprecation-notice-project-write-scope).

        #### project:admin

        Provides admin access to a project or projects. No distinction is made between public and private projects. This scope doesn't implicitly grant the [`project`](#project) scope or the [`repository:write`](#repository-write) scope on any repositories under the project. It gives access to the admin features of a project only, not direct access to its repositories' contents.

        * ability to create the project
        * ability to update the project
        * ability to delete the project

        #### repository

        Provides read access to a repository or repositories.
        Note that this scope does not give access to a repository's pull requests.

        * access to the repo's source code
        * clone over HTTPS
        * access the file browsing API
        * download zip archives of the repo's contents
        * the ability to view and use the issue tracker on any repo (created issues, comment, vote, etc)
        * the ability to view and use the wiki on any repo (create/edit pages)

        #### repository:write

        Provides write (not admin) access to a repository or repositories. No distinction is made between public and private repositories. This scope implicitly grants the [`repository`](#repository) scope, which does not need to be requested separately.
        This scope alone does not give access to the pull requests API.

        * push access over HTTPS
        * fork repos

        #### repository:admin

        Provides admin access to a repository or repositories. No distinction is made between public and private repositories. This scope doesn't implicitly grant the [`repository`](#repository) or the [`repository:write`](#repository-write) scopes. It gives access to the admin features of a repo only, not direct access to its contents. This scope can be used or misused to grant read access to other users, who can then clone the repo, but users that need to read and write source code would also request explicit read or write.
        This scope comes with access to the following functionality:

        * View and manipulate committer mappings
        * List and edit deploy keys
        * Ability to delete the repo
        * View and edit repo permissions
        * View and edit branch permissions
        * Import and export the issue tracker
        * Enable and disable the issue tracker
        * List and edit issue tracker version, milestones and components
        * Enable and disable the wiki
        * List and edit default reviewers
        * List and edit repo links (Jira/Bamboo/Custom)
        * List and edit the repository webhooks
        * Initiate a repo ownership transfer

        #### repository:delete

        Provides access to delete a repository or repositories.

        #### pullrequest

        Provides read access to pull requests.
        This scope implies the [`repository`](#repository) scope, giving read access to the pull request's destination repository.

        * see and list pull requests
        * create and resolve tasks
        * comment on pull requests

        #### pullrequest:write

        Implicitly grants the [`pullrequest`](#pullrequest) scope and adds the ability to create, merge and decline pull requests.
        This scope also implicitly grants the [`repository:write`](#repository-write) scope, giving write access to the pull request's destination repository. This is necessary to allow merging.

        * merge pull requests
        * decline pull requests
        * create pull requests
        * approve pull requests

        #### issue

        Ability to interact with issue trackers the way non-repo members can.
        This scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.

        * view, list and search issues
        * create new issues
        * comment on issues
        * watch issues
        * vote for issues

        #### issue:write

        This scope implicitly grants the [`issue`](#issue) scope and adds the ability to transition and delete issues.
        This scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.

        * transition issues
        * delete issues

        #### wiki

        Provides access to wikis. This scope provides both read and write access (wikis are always editable by anyone with access to them).
        This scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.

        * view wikis
        * create pages
        * edit pages
        * push to wikis
        * clone wikis

        #### webhook

        Gives access to webhooks. This scope is required for any webhook-related operation.

        This scope gives read access to existing webhook subscriptions on all
        resources the authorization mechanism can access, without needing further scopes.
        For example:

        - A client can list all existing webhook subscriptions on a repository. The [`repository`](#repository) scope is not required.
        - Existing webhook subscriptions for the issue tracker on a repo can be retrieved without the [`issue`](#issue) scope. All that is required is the `webhook` scope.

        To create webhooks, the client will need read access to the resource. Such as: for [`issue:created`](#issue-created), the client will need to
        have both the `webhook` and the [`issue`](#issue) scope.

        * list webhook subscriptions on any accessible repository, user, team, or snippet
        * create/update/delete webhook subscriptions.

        #### snippet

        Provides read access to snippets.
        No distinction is made between public and private snippets (public snippets are accessible without any form of authentication).

        * view any snippet
        * create snippet comments

        #### snippet:write

        Provides write access to snippets.
        No distinction is made between public and private snippets (public snippets are accessible without any form of authentication).
        This scope implicitly grants the [`snippet`](#snippet) scope which does not need to be requested separately.

        * create snippets
        * edit snippets
        * delete snippets

        #### email

        Ability to see the user's primary email address. This should make it easier to use Bitbucket Cloud as a login provider for apps or external applications.

        #### account

        When used for:
        * **user-related APIs** — Gives read-only access to the user's account information.
        Note that this doesn't include any ability to change any of the data. This scope allows you to view the user's:
          * email addresses
          * language
          * location
          * website
          * full name
          * SSH keys
          * user groups
        * **workspace-related APIs** — Grants access to view the workspace's:
          * users
          * user permissions
          * projects

        #### account:write

        Ability to change properties on the user's account.

        * delete the authorizing user's account
        * manage the user's groups
        * change a user's email addresses
        * change username, display name and avatar

        #### pipeline

        Gives read-only access to pipelines, steps, deployment environments and variables.

        #### pipeline:write

        Gives write access to pipelines. This scope allows a user to:
        * Stop pipelines
        * Rerun failed pipelines
        * Resume halted pipelines
        * Trigger manual pipelines.

        This scope is not needed to trigger a build using a push. Performing a `git push` (or equivalent actions) will trigger the build. The token doing the push only needs the [`repository:write`](#repository-write) scope.

        This doesn't give write access to create variables.

        #### pipeline:variable

        Gives write access to create variables in pipelines at the various levels:
        * Workspace
        * Repository
        * Deployment

        #### runner

        Gives read-only access to pipelines runners setup against a workspace or repository.

        #### runner:write

        Gives write access to create/edit/disable/delete pipelines runners setup against a workspace or repository.

        ### Basic auth

        Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported).
        Note that Basic Auth is available only with username and [app password](https://bitbucket.org/account/settings/app-passwords/) as credentials.

        ### Access Tokens

        Access Tokens are passwords (or tokens) that provide access to a _single_ repository, project or workspace.
        These tokens can authenticate with Bitbucket APIs for scripting, CI/CD tools, Bitbucket Cloud-connected apps,
        and Bitbucket Cloud integrations.

        Access Tokens are linked to a repository, project, or workspace, not a user account.
        The level of access provided by the token is set when a repository, or workspace admin creates it,
        by setting permission scopes.

        There are three types of Access Token:

        * **Repository Access Tokens** can connect to a single repository, preventing them from accessing any other repositories or workspaces.
        * **Project Access Tokens** can connect to a project, providing access to any repositories within the project.
        * **Workspace Access Tokens** can connect to a single workspace and have access to any projects and repositories within that workspace.

        When using Bitbucket APIs with an Access Token, the token will be treated as the "user" in the
        Bitbucket UI and Bitbucket logs. This includes when using the Access Token to leave a comment on a pull request,
        push a commit, or merge a pull request. The Bitbucket UI and API responses will show the
        Repository/Project/Workspace Access Token as a user. The username shown in the Bitbucket UI is the Access
        Token _name_, and a custom icon is used to differentiate it from a regular user in the UI.

        #### Considerations for using Access Tokens

        * After creation, an Access Token can't be viewed or modified. The token's name, created date,
        last accessed date, and scopes are visible on the repository, project, or workspace **Access Tokens** page.
        * Access Tokens can access a limited set of Bitbucket's permission scopes.
        * Provided you set the correct permission scopes, you can use an Access Token to clone (`repository`)
        and push (`repository:write`) code to the token's repository or the repositories the token can access.
        * You can't use an Access Token to log into the Bitbucket website.
        * Access Tokens don't require two-step verification.
        * You can set permission scopes (specific access rights) for each Access Token.
        * You can't use an Access Token to manipulate or query repository, project, or workspace permissions.
        * Access Tokens are not listed in any repository or workspace permission API response.
        * Access Tokens are deactivated when deleting the resource tied to it (a repository, project, or workspace).
        Repository Access Tokens are also revoked when transferring the repository to another workspace.
        * Any content created by the Access Token will persist after the Access Token has been revoked.
        * Access Tokens can interact with branch restriction APIs, but the token can't be configured as a user with merge access when using branch restrictions.

        There are some APIs which are inaccessible for Access Tokens, these are:

        * [Add a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-post)
        * [Update a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-put)
        * [Delete a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-delete)

        #### Repository Access Tokens

        For details on creating, managing, and using Repository Access Tokens, visit
        [Repository Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/).

        The available scopes for Repository Access Tokens are:

        - [`repository`](#repository)
        - [`repository:write`](#repository-write)
        - [`repository:admin`](#repository-admin)
        - [`repository:delete`](#repository-delete)
        - [`pullrequest`](#pullrequest)
        - [`pullrequest:write`](#pullrequest-write)
        - [`webhook`](#webhook)
        - [`pipeline`](#pipeline)
        - [`pipeline:write`](#pipeline-write)
        - [`pipeline:variable`](#pipeline-variable)
        - [`runner`](#runner)
        - [`runner:write`](#runner-write)

        #### Project Access Tokens

        For details on creating, managing, and using Project Access Tokens, visit
        [Project Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/project-access-tokens/).

        The available scopes for Project Access Tokens are:

        - [`project`](#project)
        - [`repository`](#repository)
        - [`repository:write`](#repository-write)
        - [`repository:admin`](#repository-admin)
        - [`repository:delete`](#repository-delete)
        - [`pullrequest`](#pullrequest)
        - [`pullrequest:write`](#pullrequest-write)
        - [`webhook`](#webhook)
        - [`pipeline`](#pipeline)
        - [`pipeline:write`](#pipeline-write)
        - [`pipeline:variable`](#pipeline-variable)
        - [`runner`](#runner)
        - [`runner:write`](#runner-write)

        #### Workspace Access Tokens

        For details on creating, managing, and using Workspace Access Tokens, visit
        [Workspace Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/workspace-access-tokens/).

        The available scopes for Workspace Access Tokens are:

        - [`project`](#project)
        - [`project:admin`](#project-admin)
        - [`repository`](#repository)
        - [`repository:write`](#repository-write)
        - [`repository:admin`](#repository-admin)
        - [`repository:delete`](#repository-delete)
        - [`pullrequest`](#pullrequest)
        - [`pullrequest:write`](#pullrequest-write)
        - [`webhook`](#webhook)
        - [`account`](#account)
        - [`pipeline`](#pipeline)
        - [`pipeline:write`](#pipeline-write)
        - [`pipeline:variable`](#pipeline-variable)
        - [`runner`](#runner)
        - [`runner:write`](#runner-write)

        ### App passwords

        App passwords allow users to make API calls to their Bitbucket account through apps such as Sourcetree.

        Some important points about app passwords:

        * You cannot view an app password or adjust permissions after you create the app password. Because app passwords are encrypted on our database and cannot be viewed by anyone. They are essentially designed to be disposable. If you need to change the scopes or lost the password just create a new one.
        * You cannot use them to log into your Bitbucket account.
        * You cannot use app passwords to manage team actions.

            App passwords are tied to an individual account's credentials and should not be shared. If you're sharing your app password you're essentially giving direct, authenticated, access to everything that password has been scoped to do with the Bitbucket API's.

        * You can use them for API call authentication, even if you don't have two-step verification enabled.
        * You can set permission scopes (specific access rights) for each app password.

        For details on creating, managing, and using App passwords, visit
        [App passwords](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/).
      description: How to authenticate API actions
      icon: data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTcuNjQ3MyAxODYuODEzOCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgaXNvbGF0aW9uOiBpc29sYXRlOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6ICNkZTM1MGI7CiAgICAgIH0KCiAgICAgIC5jbHMtMyB7CiAgICAgICAgZmlsbDogI2ZmNTYzMDsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBmaWxsOiAjZGZlMWU1OwogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmFmYmZjOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIGZpbGw6ICNlYmVjZjA7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDY1ZmY7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICAgIHN0cm9rZS13aWR0aDogMnB4OwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6ICM1ZTZjODQ7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogIzI1Mzg1ODsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogIzI2ODRmZjsKICAgICAgfQoKICAgICAgLmNscy0xMSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPlNlY3VyaXR5IHdpdGggS2V5PC90aXRsZT4KICA8ZyBjbGFzcz0iY2xzLTEiPgogICAgPGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+CiAgICAgIDxnIGlkPSJPYmplY3RzIj4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik00Mi4wNjcyLDBoLjYxMTRhOCw4LDAsMCwxLDgsOFYyMy4yMzM4YTAsMCwwLDAsMSwwLDBIMzQuMDY3MmEwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDQyLjA2NzIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xMDguMjIsMGguNjExNGE4LDgsMCwwLDEsOCw4VjIzLjIzMzhhMCwwLDAsMCwxLDAsMEgxMDAuMjJhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSwxMDguMjIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xNzQuMzcyMiwwaC42MTE0YTgsOCwwLDAsMSw4LDhWMjMuMjMzOGEwLDAsMCwwLDEsMCwwSDE2Ni4zNzIyYTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMTc0LjM3MjIsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM0LjA2NzIiIHk9IjIzLjIzMzgiIHdpZHRoPSIxNjMuNTgiIGhlaWdodD0iMTYzLjU4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNDIuMDY3MiwwSDU5LjI5YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDM0LjA2NzJhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTA3LjI0NTgsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDk5LjI0NThhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTcyLjQyNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDE2NC40MjQ0YTAsMCwwLDAsMSwwLDBWOGE4LDgsMCwwLDEsOC04WiIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTcuNDU1OCIgeT0iMjMuMjMzOCIgd2lkdGg9IjE2My41OCIgaGVpZ2h0PSIxNjMuNTgiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM1Ljc1OTYiIHk9IjU2LjgwNjUiIHdpZHRoPSIzMy4yMjI4IiBoZWlnaHQ9IjE1LjYwMzgiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjEzMS4yMDE2IiB5PSIxMzYuOTYxNSIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNCIgZD0iTTU3LjM3MDksNzEuNjAzNmg3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwYTQ0LjM3NDgsNDQuMzc0OCwwLDAsMS00NC4zNzQ4LTQ0LjM3NDhWODAuNjAzNkE5LDksMCwwLDEsNTcuMzcwOSw3MS42MDM2WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNSIgZD0iTTY2LjM3MSw2Ni42NjE3aDcwLjc1YTksOSwwLDAsMSw5LDl2MzUuMzc0OWE0NC4zNzQ4LDQ0LjM3NDgsMCwwLDEtNDQuMzc0OCw0NC4zNzQ4aDBBNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLDU3LjM3MSwxMTEuMDM2NlY3NS42NjE3YTksOSwwLDAsMSw5LTlaIi8+CiAgICAgICAgPHBhdGggaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIGQ9Ik02MS4zNzEsNjYuNjYxN2g3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwQTQ0LjM3NDgsNDQuMzc0OCwwLDAsMSw1Mi4zNzEsMTExLjAzNjZWNzUuNjYxN0E5LDksMCwwLDEsNjEuMzcxLDY2LjY2MTdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNOTYuNzQ1OSwxNDcuNzQ0MWEzNi43NDg3LDM2Ljc0ODcsMCwwLDEtMzYuNzA3NC0zNi43MDc0Vjc4LjA1ODRhMy43MzMzLDMuNzMzMywwLDAsMSwzLjcyOS0zLjcyOWg2NS45NTYzYTMuNzMzMywzLjczMzMsMCwwLDEsMy43MjksMy43Mjl2MzIuOTc4NEEzNi43NDg2LDM2Ljc0ODYsMCwwLDEsOTYuNzQ1OSwxNDcuNzQ0MVoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik0xMDAuNjg5MywxNjMuMzE2N1YxMTEuMDk3M2EzLjk0NDMsMy45NDQzLDAsMCwwLTcuODg4NywwdjUyLjIyYTIyLjUyNTIsMjIuNTI1MiwwLDAsMC0xOC41NDc5LDIyLjE0YzAsLjQ1Ni4wMTc4LjkwNzguMDQ0NywxLjM1NzFIODIuMjFjLS4wNDE0LS40NDc0LS4wNjg4LS44OTktLjA2ODgtMS4zNTcxYTE0LjYyLDE0LjYyLDAsMCwxLDE0LjU5NzQtMTQuNjA0MWwuMDA2MS4wMDA2LjAwNjgtLjAwMDdBMTQuNjIxMSwxNC42MjExLDAsMCwxLDExMS4zNSwxODUuNDU2NmMwLC40NTgxLS4wMjczLjkxLS4wNjg4LDEuMzU3MWg3LjkxMjhjLjAyNjktLjQ0OTMuMDQ0Ny0uOTAxMS4wNDQ3LTEuMzU3MUEyMi41MjU5LDIyLjUyNTksMCwwLDAsMTAwLjY4OTMsMTYzLjMxNjdaIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIzNi40NzAyIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIxNTguMTIxNyIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTQ3LjgxMyIgeT0iMzYuNDcwMiIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTUwLjA2NDMiIHk9IjE1Ny41NTEzIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHBhdGggaWQ9Il9QYXRoXyIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtOCIgZD0iTTEwNy41MjU0LDEwMS4wMDI3YTExLjc3OTQsMTEuNzc5NCwwLDEsMC0xOS44Niw4LjU1NDhBNC4wNDE3LDQuMDQxNywwLDAsMSw4OC44NSwxMTMuNjJsLTIuMTA0LDcuMjY4MWEzLDMsMCwwLDAsMi44ODE3LDMuODM0MmgxMi4yMzcxYTMsMywwLDAsMCwyLjg4MTctMy44MzQybC0yLjA5NTktNy4yNGE0LjA3NDMsNC4wNzQzLDAsMCwxLDEuMTgwOC00LjA5NDVBMTEuNzE3MiwxMS43MTcyLDAsMCwwLDEwNy41MjU0LDEwMS4wMDI3WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTEwNC43NDYxLDEyMC44ODc3bC0yLjA5NTktNy4yNGE0LjA3NDQsNC4wNzQ0LDAsMCwxLDEuMTgwOC00LjA5NDUsMTEuNzYyOSwxMS43NjI5LDAsMCwwLTUuMDYtMTkuOTMxMywxMS45MSwxMS45MSwwLDAsMC04Ljc5OCwxMC45OTQ5LDExLjcxODUsMTEuNzE4NSwwLDAsMCwzLjY5MjksOC45NDFBNC4wNDE2LDQuMDQxNiwwLDAsMSw5NC44NSwxMTMuNjJsLTMuMjE0LDExLjEwMjNoMTAuMjI4OEEzLDMsMCwwLDAsMTA0Ljc0NjEsMTIwLjg4NzdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTgxLjc5NzUsMTAwLjMxYTMuOTQzOSwzLjk0MzksMCwwLDAtMy45NDQzLTMuOTQ0M0g0MS4wNDE3YTMuOTQ0MywzLjk0NDMsMCwwLDAsMCw3Ljg4ODdINzcuODUzMkEzLjk0MzksMy45NDM5LDAsMCwwLDgxLjc5NzUsMTAwLjMxWiIvPgogICAgICAgIDxwYXRoIGlkPSJfUGF0aF8yIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy0xMSIgZD0iTTQxLjA0MTYsMTA0LjI1MzlIOTYuODUzMmEzLjk0NDMsMy45NDQzLDAsMCwwLDAtNy44ODg3SDQxLjA0MTZhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N1oiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTEwIiBkPSJNODEuNzk3NSwxMDAuMzFhMy45NDM5LDMuOTQzOSwwLDAsMC0zLjk0NDMtMy45NDQzSDQxLjA0MTdhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N0g3Ny44NTMyQTMuOTQzOSwzLjk0MzksMCwwLDAsODEuNzk3NSwxMDAuMzFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTIyLjQ5MzIsMTIyLjgwMjlBMjIuNDkyOSwyMi40OTI5LDAsMSwxLDQ0Ljk4NTgsMTAwLjMxLDIyLjUxODUsMjIuNTE4NSwwLDAsMSwyMi40OTMyLDEyMi44MDI5Wm0wLTM3LjA5NzJBMTQuNjA0MiwxNC42MDQyLDAsMSwwLDM3LjA5NzIsMTAwLjMxLDE0LjYyMDcsMTQuNjIwNywwLDAsMCwyMi40OTMyLDg1LjcwNTdaIi8+CiAgICAgIDwvZz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo='
      title: Authentication methods
    - anchor: filtering
      body: |+
        
        You can query the 2.0 API for specific objects using a simple language which resembles SQL.

        Note that filtering and querying by username has been deprecated, due to privacy changes. 
        See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-querying) 
        for details.

        ---

        * [Supported endpoints](#supported-endpoints)
        * [Operators](#operators)
        * [Data types](#data-types)
        * [Querying](#querying)
        * [Sorting query results](#sorting-query-results)

        ----

        ### Supported endpoints

        Most 2.0 API resources that return paginated collections of objects support a single, shared, generic querying language that is used to filter down a result set.

        This includes, but is in no way limited to:

            /2.0/repositories/{username}
            /2.0/repositories/{username}/{slug}/refs
            /2.0/repositories/{username}/{slug}/refs/branches
            /2.0/repositories/{username}/{slug}/refs/tags
            /2.0/repositories/{username}/{slug}/forks
            /2.0/repositories/{username}/{slug}/src
            /2.0/repositories/{username}/{slug}/issues
            /2.0/repositories/{username}/{slug}/pullrequests

        Filtering and sorting supports several distinct operators and data types as well as basic features, like logical operators (AND, OR).
        As examples, the following queries could be used on the issue tracker endpoint (`/2.0/repositories/{workspace}/{slug}/issues/`):

        	(state = "open" OR state = "new") AND assignee = null
        	reporter.nickname != "evzijst" AND priority >= "major"
        	(title ~ "unicode" OR content.raw ~ "unicode") AND created_on > 2015-10-04T14:00:00-07:00

        Filter queries can be added to the URL using the q=<query> query parameter. To sort the response, add sort=<field>. Note that the entire query string is put in the q parameter and hence needs to be URL-encoded as shown in the following example:

        	/2.0/repositories/foo/bar/issues?q=state="new"&sort=-updated_on


        ### Operators

        Filtering and sorting supports the following operators:

        | Operator | Definition                     | Example                    |
        |----------|--------------------------------|----------------------------|
        | "="      | test for equality              | `nickname = "evzijst"`     |
        | "!="     | not equal                      | `is_private != true`       |
        | "~"      | case-insensitive text contains | `description ~ "beef"`     |
        | "!~"     | case-insensitive not contains  | `description !~ "fubar"`   |
        | ">"      | greater than                   | `priority > "major"`       |
        | ">="     | greater than or equal          | `priority <= "trivial"`    |
        | "<"      | less than                      | `id < 1234`                |
        | "<="     | less than or equal             | `updated_on <= 2015-03-04` |

        ### Data types

        Filtering and sorting supports the following data types:

        | Type         | Description                             | Example       |
        |--------------|-----------------------------------------|---------------|
        | **String**   | any text inside double quotes           | `"foo"`       |
        | **Number**   | arbitrary precision integers and floats | `1, -10.302`  |
        | **Null**     | to test for the absence of a value      | `null`        |
        | **boolean**  | the unquoted strings true or false      | `true, false` |
        | **datetime** | an unquoted [ISO-8601][iso-8601] date time string with the timezone offset, milliseconds and entire time component being optional | `2015-03-04T14:08:59.123+02:00`, `2015-03-04T14:08:59` Date time strings are assumed to be in UTC, unless an explicit timezone offset is provided |

        [https://en.wikipedia.org/wiki/ISO_8601]: /iso-8601

        ### Querying

        Objects can be filtered based on their properties. In principle, every element in an object's JSON document schema can be used as a filter criterion.

        Note that while the array of objects in a paginated response is wrapped in an
        envelope with a `values` element, this prefix should not be included in the
        query fields (so use `/2.0/repositories/foo/bar/issues?q=state="new"`, not
        `/2.0/repositories/foo/bar/issues?q=values.state="new"`).


        ### Examples

        Fields that contain embedded instances of other object types (e.g. owner is an embedded user object, while parent is an embedded repository) can be traversed recursively. For instance:

        	parent.owner.nickname = "bitbucket"

        To find pull requests which merge into master, come from a fork of the repo rather than a branch inside the repo, and on which I am a reviewer:

        ```
        source.repository.full_name != "main/repo" AND state = "OPEN" AND reviewers.nickname = "evzijst" AND destination.branch.name = "master"
        ```
        ```
        /2.0/repositories/main/repo/pullrequests?q=source.repository.full_name+%21%3D+%22main%2Frepo%22+AND+state+%3D+%22OPEN%22+AND+reviewers.nickname+%3D+%22evzijst%22+AND+destination.branch.name+%3D+%22master%22
        ```

        To find new or on-hold issues related to the UI, created or updated in the last day (SF local time), that have not yet been assigned to anyone:

        ```
        (state = "new" OR state = "on hold") AND assignee = null AND component = "UI" and updated_on > 2015-11-11T00:00:00-07:00
        ```
        ```
        /2.0/repositories/main/repo/issues?q=%28state+%3D+%22new%22+OR+state+%3D+%22on+hold%22%29+AND+assignee+%3D+null+AND+component+%3D+%22UI%22+and+updated_on+%3E+2015-11-11T00%3A00%3A00-07%3A00
        ```

        To find all tags with the string "2015" in the name:

        ```
        name ~ "2015"
        ```
        ```
        /2.0/repositories/{username}/{slug}/refs/tags?q=name+%7E+%222015%22
        ```
        Or all my branches:

        ```
        name ~ "erik/"
        ```
        ```
        /2.0/repositories/{username}/{slug}/refs/?q=name+%7E+%22erik%2F%22
        ```
        ### Sorting query results

        You can sort result sets using the ?sort=<field> query parameter, available on the same resources that support filtering:

        * In principle, every field that can be queried can also be used as a key for sorting.
        * By default the sort order is ascending. To reverse the order, prefix the field name with a hyphen (e.g. ?sort=-updated_on).
        * Only one field can be sorted on. Compound fields (e.g. sort on state first, followed by updated_on) are not supported.


      description: Query the 2.0 API for specific objects
      icon: data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTk0LjE5MTkgMTQ3LjYwOTIiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjY2ZkNGRiOwogICAgICB9CgogICAgICAuY2xzLTMsIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzg3NzdkOTsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC5jbHMtNSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQoKICAgICAgLmNscy02IHsKICAgICAgICBmaWxsOiAjY2NlMGZmOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIGZpbGw6IHVybCgjbGluZWFyLWdyYWRpZW50KTsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB4MT0iNDE2LjMwODIiIHkxPSI3NS4wNDc5IiB4Mj0iNTg0Ljg1NTYiIHkyPSI3NS4wNDc5IiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKC00NDMuOTQ2NyAxMjMuMDY4Nikgcm90YXRlKC0xMy43OTc2KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIwLjY5MDgiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMC4xIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8dGl0bGU+TWFnbmlmeWluZyBHbGFzczwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTMxLjExMjUsOTQuOTMwN2wtOS44ODc4LTUuOTg4OC04LjMyOTIsMTMuNzUxOSw5Ljg4NzgsNS45ODg4YTE1LjYwMywxNS42MDMsMCwwLDEsNS44OCw2LjM4MzVoMGExNS42MDMsMTUuNjAzLDAsMCwwLDUuODgsNi4zODM1bDQwLjExNDMsMjQuMjk2NGExMi44NjY0LDEyLjg2NjQsMCwwLDAsMTcuNjcwOS00LjM0aDBhMTIuODY2NCwxMi44NjY0LDAsMCwwLTQuMzQtMTcuNjcwOUwxNDcuODc0OSw5OS40MzkyYTE1LjYwMywxNS42MDMsMCwwLDAtOC4zODEyLTIuMjU0MmgwQTE1LjYwMywxNS42MDMsMCwwLDEsMTMxLjExMjUsOTQuOTMwN1oiLz4KICAgICAgICA8cGF0aCBpZD0iX1BhdGhfIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy0zIiBkPSJNMTMxLjExMjUsOTQuOTMwN2wtMy4wMTE4LTEuODI0MkE4LjAzODgsOC4wMzg4LDAsMCwwLDExNy4wNiw5NS44MTc4aDBhOC4wMzg4LDguMDM4OCwwLDAsMCwyLjcxMTMsMTEuMDQwNWwzLjAxMTgsMS44MjQyYTE1LjYwMywxNS42MDMsMCwwLDEsNS44OCw2LjM4MzVoMGExNS42MDMsMTUuNjAzLDAsMCwwLDUuODgsNi4zODM1bDQwLjExNDMsMjQuMjk2NGExMi44NjY0LDEyLjg2NjQsMCwwLDAsMTcuNjcwOS00LjM0aDBhMTIuODY2NCwxMi44NjY0LDAsMCwwLTQuMzQtMTcuNjcwOUwxNDcuODc0OSw5OS40MzkyYTE1LjYwMywxNS42MDMsMCwwLDAtOC4zODEyLTIuMjU0M2gwQTE1LjYwMywxNS42MDMsMCwwLDEsMTMxLjExMjUsOTQuOTMwN1oiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik0xMzkuMTQzNyw5Ny4xNzkyYTE1LjU5NzMsMTUuNTk3MywwLDAsMS04LjAzMTItMi4yNDg1bC0zLjAxMTgtMS44MjQyQTguMDM4OCw4LjAzODgsMCwwLDAsMTE3LjA2LDk1LjgxNzhoMGE4LjAzODgsOC4wMzg4LDAsMCwwLDIuNzExMywxMS4wNDA1bDMuMDExOCwxLjgyNDJhMTUuNTk3LDE1LjU5NywwLDAsMSw1LjcwNjksNi4wNjQ4LDY3Ljg0ODEsNjcuODQ4MSwwLDAsMCwxMC42NTM2LTE3LjU2ODFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy01IiBkPSJNODMuMjUzNywxMzIuNTU2QTY3LjIzNDgsNjcuMjM0OCwwLDAsMSw5LjcxLDMyLjQyOTUsNjYuNzk3NCw2Ni43OTc0LDAsMCwxLDUxLjE4MzcsMS45NjY2bC4wMDA3LDBBNjYuNzk2Miw2Ni43OTYyLDAsMCwxLDEwMi4wNTEsOS43NTI1aDBBNjcuMjM0Niw2Ny4yMzQ2LDAsMCwxLDgzLjI1MzcsMTMyLjU1NloiLz4KICAgICAgICA8cGF0aCBpZD0iX1BhdGhfMiIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtNiIgZD0iTTIzLjQzOSw0MC43NDgyQTUxLjE5MDgsNTEuMTkwOCwwLDAsMCwxMTEuMDEsOTMuNzg4OSw1MS4xOTA4LDUxLjE5MDgsMCwwLDAsMjMuNDM5LDQwLjc0ODJaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNNzkuNDMzLDExNi45ODJBNTEuMjE2Miw1MS4yMTYyLDAsMCwwLDExOC40MjQxLDY3LjAzN2E0OS4xMzkxLDQ5LjEzOTEsMCwwLDEtNS4wODY3LDIuMjc4OWMtMTUuNzAyOSw1Ljk2MDktMjkuNjg5NSwyLjExLTM2LjQ5ODcuMTMwOC0yMC40MzA3LTUuOTM5LTI0Ljc5LTE3LjM3ODUtMzkuMDQxNC0yNC41ODIzYTQ4LjMwOTIsNDguMzA5MiwwLDAsMC0xNC4wOTM5LTQuNTNjLS4wODYyLjEzOTUtLjE3OTMuMjczLS4yNjQ0LjQxMzVBNTEuMTkwNyw1MS4xOTA3LDAsMCwwLDc5LjQzMywxMTYuOTgyWiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'
      title: Filter and sort API objects
    - anchor: pagination
      body: |
        
        Endpoints that return collections of objects should always apply pagination.
        Paginated collections are always wrapped in the following wrapper object:

        ```json
        {
          "size": 5421,
          "page": 2,
          "pagelen": 10,
          "next": "https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=3",
          "previous": "https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=1",
          "values": [
            ...
          ]
        }
        ```

        Pagination is often page-bound, with a query parameter page indicating which
        page is to be returned.

        However, clients are not expected to construct URLs themselves by manipulating
        the page number query parameter. Instead, the response contains a link to the
        next page. This link should be treated as an opaque location that is not to be
        constructed by clients or even assumed to be predictable. The only contract
        around the next link is that it will return the next chunk of results.

        Lack of a next link in the response indicates the end of the collection.

        The paginated response contains the following fields:

        | Field      | Value    |
        |------------|----------|
        | `size`     | 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. |
        | `page`     | Page number of the current results. This is an optional element that is not provided in all responses. |
        | `pagelen`  | Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. |
        | `next`     | 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. |
        | `previous` | 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. |
        | `values`   | The list of objects. This contains at most `pagelen` objects. |

        The link to the next page is included such that you don't have to hardcode or construct any links.  Only values and next are guaranteed (except the last page, which lacks next). This is because the previous and size values can be expensive for some data sets.

        It is important to realize that Bitbucket support both list-based pagination and iterator-based pagination. List-based pagination assumes that the collection is a discrete, immutable, consistently ordered, finite array of objects with a fixed size. Clients navigate a list-based collection by requesting offset-based chunks. In Bitbucket Cloud, list-based responses include the optional size, page, and previous element. The the next and previous links typically resemble something like /foo/bar?page=4.

        However, not all result sets can be treated as immutable and finite – much like how programming languages tend to distinguish between lists and arrays on one hand and iterators or stream on the other. Where an list-based pagination offers random access into any point in a collection, iterator-based pagination can only navigate forward one element at a time. In Bitbucket such iterator-based pagination contains the next link and pagelen elements, but not necessarily anything else. In these cases, the next link's value often contains an unpredictable hash instead of an explicit page number. The commits resource uses iterator-based pagination.
      description: Learn more about pagination
      icon: data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM4LjgyIDE1MS42Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2IyZDRmZjt9LmNscy0ye2ZpbGw6IzRjOWFmZjt9LmNscy0ze2ZpbGw6IzAwNTJjYzt9LmNscy00e29wYWNpdHk6MC42O30uY2xzLTV7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudCk7fS5jbHMtNntmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTIpO30uY2xzLTd7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudC0zKTt9LmNscy04e2ZpbGw6dXJsKCNsaW5lYXItZ3JhZGllbnQtNCk7fS5jbHMtOXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTUpO30uY2xzLTEwLC5jbHMtMTEsLmNscy0xMntmaWxsOm5vbmU7fS5jbHMtMTB7c3Ryb2tlOiMzMzg0ZmY7fS5jbHMtMTAsLmNscy0xMSwuY2xzLTEyLC5jbHMtMTN7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOjJweDt9LmNscy0xMXtzdHJva2U6I2ZmYWIwMDt9LmNscy0xMntzdHJva2U6I2ZhZmJmYzt9LmNscy0xM3tmaWxsOiNmZmFiMDA7c3Ryb2tlOiMyNjg0ZmY7fTwvc3R5bGU+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHkxPSI2NS4xNyIgeDI9Ijg2LjM4IiB5Mj0iNjUuMTciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM0YzlhZmYiLz48c3RvcCBvZmZzZXQ9IjAuMDgiIHN0b3AtY29sb3I9IiM0YzlhZmYiIHN0b3Atb3BhY2l0eT0iMC45NCIvPjxzdG9wIG9mZnNldD0iMC4yNCIgc3RvcC1jb2xvcj0iIzRjOWFmZiIgc3RvcC1vcGFjaXR5PSIwLjc4Ii8+PHN0b3Agb2Zmc2V0PSIwLjQ1IiBzdG9wLWNvbG9yPSIjNGM5YWZmIiBzdG9wLW9wYWNpdHk9IjAuNTMiLz48c3RvcCBvZmZzZXQ9IjAuNTUiIHN0b3AtY29sb3I9IiM0YzlhZmYiIHN0b3Atb3BhY2l0eT0iMC40Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudC0yIiB4MT0iMTUyLjQ0IiB5MT0iNjUuMTciIHgyPSIyMzguODIiIHkyPSI2NS4xNyIgeGxpbms6aHJlZj0iI2xpbmVhci1ncmFkaWVudCIvPjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50LTMiIHgxPSIxOC44NSIgeTE9IjExOC43OCIgeDI9IjEyNi4wOCIgeTI9IjExLjU2IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwLjA2IiBzdG9wLWNvbG9yPSIjMDA2NWZmIi8+PHN0b3Agb2Zmc2V0PSIwLjE5IiBzdG9wLWNvbG9yPSIjMDA2NWZmIiBzdG9wLW9wYWNpdHk9IjAuOTQiLz48c3RvcCBvZmZzZXQ9IjAuNDYiIHN0b3AtY29sb3I9IiMwMDY1ZmYiIHN0b3Atb3BhY2l0eT0iMC43OCIvPjxzdG9wIG9mZnNldD0iMC44MiIgc3RvcC1jb2xvcj0iIzAwNjVmZiIgc3RvcC1vcGFjaXR5PSIwLjUzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDA2NWZmIiBzdG9wLW9wYWNpdHk9IjAuNCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtNCIgeDE9IjExMi43NSIgeTE9IjExOC43OCIgeDI9IjIxOS45NyIgeTI9IjExLjU2IiB4bGluazpocmVmPSIjbGluZWFyLWdyYWRpZW50LTMiLz48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudC01IiB4MT0iNTAuOTciIHkxPSIxMzMuNjEiIHgyPSIxODcuODYiIHkyPSItMy4yOCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMC42NiIgc3RvcC1jb2xvcj0iIzI1Mzg1OCIvPjxzdG9wIG9mZnNldD0iMC44OCIgc3RvcC1jb2xvcj0iIzI1Mzg1OCIgc3RvcC1vcGFjaXR5PSIwLjgzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMjUzODU4IiBzdG9wLW9wYWNpdHk9IjAuNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjx0aXRsZT5WaWV3IFZlcnNpb25zPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iU29mdHdhcmUiPjxjaXJjbGUgY2xhc3M9ImNscy0xIiBjeD0iOTQuNTMiIGN5PSIxNDcuOTMiIHI9IjMuNjciLz48Y2lyY2xlIGNsYXNzPSJjbHMtMiIgY3g9IjEwNi45NCIgY3k9IjE0Ny45MyIgcj0iMy42NyIvPjxjaXJjbGUgY2xhc3M9ImNscy0zIiBjeD0iMTE5LjM0IiBjeT0iMTQ3LjkzIiByPSIzLjY3Ii8+PGNpcmNsZSBjbGFzcz0iY2xzLTIiIGN4PSIxMzEuNzUiIGN5PSIxNDcuOTMiIHI9IjMuNjciLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE0NC4xNiIgY3k9IjE0Ny45MyIgcj0iMy42NyIvPjxnIGNsYXNzPSJjbHMtNCI+PHJlY3QgaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTUiIHk9IjI1LjkyIiB3aWR0aD0iODYuMzgiIGhlaWdodD0iNzguNDkiLz48L2c+PGcgY2xhc3M9ImNscy00Ij48cmVjdCBpZD0iX1JlY3RhbmdsZV8yIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIHg9IjE1Mi40NCIgeT0iMjUuOTIiIHdpZHRoPSI4Ni4zOCIgaGVpZ2h0PSI3OC40OSIvPjwvZz48cmVjdCBpZD0iX1JlY3RhbmdsZV8zIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTciIHg9IjE2LjI4IiB5PSIxNC4xMiIgd2lkdGg9IjExMi4zNiIgaGVpZ2h0PSIxMDIuMDkiLz48cmVjdCBpZD0iX1JlY3RhbmdsZV80IiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTgiIHg9IjExMC4xOCIgeT0iMTQuMTIiIHdpZHRoPSIxMTIuMzYiIGhlaWdodD0iMTAyLjA5Ii8+PHJlY3QgaWQ9Il9SZWN0YW5nbGVfNSIgZGF0YS1uYW1lPSImbHQ7UmVjdGFuZ2xlJmd0OyIgY2xhc3M9ImNscy05IiB4PSI0Ny42OSIgd2lkdGg9IjE0My40NSIgaGVpZ2h0PSIxMzAuMzQiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNzkuMTYiIHkxPSIxNi4xOCIgeDI9IjExNy4yNCIgeTI9IjE2LjE4Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iMTYuMTgiIHgyPSI3Mi42IiB5Mj0iMTYuMTgiLz48bGluZSBjbGFzcz0iY2xzLTExIiB4MT0iNzkuMTYiIHkxPSIyNi45NSIgeDI9IjExNy4yNCIgeTI9IjI2Ljk1Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iMjYuOTUiIHgyPSI3Mi42IiB5Mj0iMjYuOTUiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNzkuMTYiIHkxPSIzNy43MiIgeDI9IjE1MC43IiB5Mj0iMzcuNzIiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSIzNy43MiIgeDI9IjcyLjYiIHkyPSIzNy43MiIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSIxNTAuNyIgeTE9IjQ4LjQ5IiB4Mj0iMTc1LjU5IiB5Mj0iNDguNDkiLz48bGluZSBjbGFzcz0iY2xzLTEyIiB4MT0iMTEwLjMyIiB5MT0iNDguNDkiIHgyPSIxNDMuMDUiIHkyPSI0OC40OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSI3OS4xNiIgeTE9IjQ4LjQ5IiB4Mj0iMTAxLjM3IiB5Mj0iNDguNDkiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSI0OC40OSIgeDI9IjcyLjYiIHkyPSI0OC40OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI3OS4xNiIgeTE9IjU5LjI2IiB4Mj0iMTUwLjciIHkyPSI1OS4yNiIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjU5LjI2IiB4Mj0iNzIuNiIgeTI9IjU5LjI2Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9Ijc5LjE2IiB5MT0iNzAuMDMiIHgyPSIxNzUuNTkiIHkyPSI3MC4wMyIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjcwLjAzIiB4Mj0iNzIuNiIgeTI9IjcwLjAzIi8+PGxpbmUgY2xhc3M9ImNscy0xMSIgeDE9Ijc5LjE2IiB5MT0iODAuNzkiIHgyPSIxMTcuMjQiIHkyPSI4MC43OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjgwLjc5IiB4Mj0iNzIuNiIgeTI9IjgwLjc5Ii8+PGxpbmUgY2xhc3M9ImNscy0xMyIgeDE9Ijc5LjE2IiB5MT0iOTEuNTYiIHgyPSIxNDkuMDYiIHkyPSI5MS41NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjkxLjU2IiB4Mj0iNzIuNiIgeTI9IjkxLjU2Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iODAuNzkiIHgyPSI3Mi42IiB5Mj0iODAuNzkiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSI5MS41NiIgeDI9IjcyLjYiIHkyPSI5MS41NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSI3OS4xNiIgeTE9IjEwMi4zMyIgeDI9IjExNy4yNCIgeTI9IjEwMi4zMyIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjEwMi4zMyIgeDI9IjcyLjYiIHkyPSIxMDIuMzMiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iMTI1Ljk4IiB5MT0iMTEzLjEiIHgyPSIxNDkuMDYiIHkyPSIxMTMuMSIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSI3OS4xNiIgeTE9IjExMy4xIiB4Mj0iMTE3LjI0IiB5Mj0iMTEzLjEiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSIxMTMuMSIgeDI9IjcyLjYiIHkyPSIxMTMuMSIvPjwvZz48L2c+PC9zdmc+'
      title: Pagination
    - anchor: partial-response
      body: |
        
        By default, each endpoint returns the full representation of a resource and in
        some cases that can be a lot of data. For example, retrieving a list of pull
        requests can amount to quite a large document.

        For better performance, you can ask the server to only return the fields you
        really need and to omit unwanted data. To request a partial response and to
        add or remove specific fields from a response, use the `fields` query
        parameter.


        ### Example

        Most API resources embed a substantial list of links pointing to related
        resources. This saves the client from constructing its own URLs, but is
        somewhat wasteful when the client doesn't need them.

        To significantly reduce the size of the response, use `?fields=-links`:

        ```json
        $ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links
        {
          "nickname": "evzijst",
          "account_status": "active",
          "website": "",
          "display_name": "Erik van Zijst",
          "uuid": "{a288a0ab-e13b-43f0-a689-c4ef0a249875}",
          "created_on": "2010-07-07T05:16:36+00:00",
          "location": null,
          "type": "user"
        }
        ```

        ### Fields parameter syntax

        The `fields` parameter supports 3 modes of operation:

        1. Removal of select fields (e.g. `-links`)
        2. Pulling in additional fields not normally returned by an endpoint, while
           still getting all the default fields (e.g. `+reviewers`)
        3. Omitting all fields, except those specified (e.g. `owner.display_name`)

        The fields parameter can contain a list of multiple comma-separated field names
        (e.g. `fields=owner.display_name,uuid,links.self.href`). The parameter itself is
        not repeated.

        As discussed at [Condensed Versus Full Objects](serialization#representations),
        most objects that are embedded inside other objects (like how `owner` is an
        embedded `user` object in `repository`) appear in "condensed" form that omits
        many fields. The `fields` parameter allows us to pull in additional fields in
        such cases.

        For example, the embedded repository object in a pull request does not normally
        contain its `owner`. To add that in we can use:
        `+values.destination.repository.owner`.


        ### Wildcards

        The asterisk can be used to match all fields on a particular level. For
        example, removing all entries from the `links` element can be done like this:

        ```json
        $ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links.*
        {
          "nickname": "evzijst",
          "account_status": "active",
          "website": "",
          "display_name": "Erik van Zijst",
          "uuid": "{a288a0ab-e13b-43f0-a689-c4ef0a249875}",
          "links": {},
          "created_on": "2010-07-07T05:16:36+00:00",
          "location": null,
          "type": "user"
        }
        ```

        Wildcards can be used in combination with exclusion and inclusion. For
        instance, `-*,+foo,+bar` will remove all elements from the root level and then
        add in `foo` and `bar`.


        ### URL encoding

        Be aware that when using the `+foo.bar` syntax in the query string, that the
        "+" must be URL encoded as "%2B" and so the URL will be:

        ```
        https://api.bitbucket.org/2.0/repositories/evzijst/interruptingcow?fields=%2Bowner.created_on
        ```

        Without URL escaping, "+" is interpreted as an encoded space which will not
        match any fields.


        ### Field discovery

        While a resource's `self` URL, as well its "collection" URL typically return
        the full object with all its fields, there are some exceptions for fields that
        are overly verbose or costly to generate.

        For instance, a pull request contains the embedded lists of reviewers and
        participants. These fields are included from the `self` URL, but not from the
        `/pullrequests` collections resource, as it would impact performance too much.

        To discover any additional fields that might not be included by default,
        `fields=*` can be used.


        ### More examples

        If we want to get a list of all reviewer nicknames on pull requests I created,
        we could combine a [filter](filtering) with a partial response. This will omit
        all other data from the response:

        ```
        /2.0/repositories/bitbucket/bitbucket/pullrequests?fields=values.id,values.reviewers.nickname,values.state&q=author.uuid%3D%22%7Bd301aafa-d676-4ee0-88be-962be7417567%7D%22
        {
          "values": [
            {
              "reviewers": [
                {
                  "nickname": "abhin"
                },
                {
                  "nickname": "dtao"
                },
                {
                  "nickname": "csomme"
                }
              ],
              "state": "OPEN",
              "id": 11355
            },
            {
              "reviewers": [
                {
                  "nickname": "csomme"
                },
                {
                  "nickname": "abhin"
                },
                {
                  "nickname": "dstevens"
                }
              ],
              "state": "MERGED",
              "id": 11347
            },
            {
              "reviewers": [
                {
                  "nickname": "csomme"
                },
                {
                  "nickname": "jmooring"
                },
                {
                  "nickname": "zdavis"
                },
                {
                  "nickname": "flexbox"
                }
              ],
              "state": "OPEN",
              "id": 11344
            }
          ]
        }
        ```
      description: Tweak which fields are returned
      icon: data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTYyLjQ0ODcgMjEwLjExMTUiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTYsIC5jbHMtOCB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTggewogICAgICAgIHN0cm9rZTogIzAwNjVmZjsKICAgICAgICBzdHJva2Utd2lkdGg6IDJweDsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBzdHJva2UtbGluZWpvaW46IHJvdW5kOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICNlN2U4ZWM7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogI2ZmZTM4MDsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmZmMGIyOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIHN0cm9rZTogI2ZmOTkxZjsKICAgICAgICBzdHJva2Utd2lkdGg6IDEuODE1NnB4OwogICAgICB9CgogICAgICAuY2xzLTYsIC5jbHMtOCB7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgICBmaWxsOiB1cmwoI2xpbmVhci1ncmFkaWVudCk7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogI2Y0ZjVmNzsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB4MT0iMTEzLjM4MTgiIHkxPSI0OS40MyIgeDI9IjE1My43ODkzIiB5Mj0iOS4wMjI1IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZhZmJmYyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjAuMjc4NiIgc3RvcC1jb2xvcj0iI2VmZjFmMyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjAuNzY4OCIgc3RvcC1jb2xvcj0iI2QxZDZkZCIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjMWM3ZDAiLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgogIDx0aXRsZT5Eb2N1bWVudCBUYWJsZTwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0yIiB4MT0iMTcuNDcxIiB5MT0iMTcxLjc1NzMiIHgyPSI3OS4yOTgiIHkyPSIxNzEuNzU3MyIvPgogICAgICAgIDxwb2x5Z29uIGlkPSJfUGF0aF8iIGRhdGEtbmFtZT0iJmx0O1BhdGgmZ3Q7IiBjbGFzcz0iY2xzLTMiIHBvaW50cz0iMTYyLjQ0NSAzOC43MTEgMTYyLjQ0NSAyMTAuMTExIDAgMjEwLjExMSAwIDAgMTIzLjcwNCAwIDE2Mi40MTUgMzguNzExIDE2Mi40NDUgMzguNzExIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy00IiB4PSIxOC45MTE3IiB5PSI3OC4xNTQyIiB3aWR0aD0iNDcuODQ4NSIgaGVpZ2h0PSI3OS42NTM3Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy01IiB4PSIxOC45MTE3IiB5PSI1MS42MDMiIHdpZHRoPSIxMjMuNDUyOSIgaGVpZ2h0PSIyNi41NTEyIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy02IiB4PSIxOC45MTE3IiB5PSI1MS42MDMiIHdpZHRoPSIxMjMuNDUyOSIgaGVpZ2h0PSIxMDYuMjA0OSIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNiIgeDE9IjY2Ljc2MDEiIHkxPSI1MS42MDMiIHgyPSI2Ni43NjAxIiB5Mj0iMTU3LjgwNzkiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTYiIHgxPSI5MS4zMjg0IiB5MT0iNTEuNjAzIiB4Mj0iOTEuMzI4NCIgeTI9IjE1Ny44MDc5Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTE1Ljg5NjciIHkxPSI1MS42MDMiIHgyPSIxMTUuODk2NyIgeTI9IjE1Ny44MDc5Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTguOTExNyIgeTE9Ijc4LjE1NDIiIHgyPSIxNDIuMzY0NiIgeTI9Ijc4LjE1NDIiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTYiIHgxPSIxOC45MTE3IiB5MT0iMTA0LjcwNTUiIHgyPSIxNDIuMzY0NiIgeTI9IjEwNC43MDU1Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTguOTExNyIgeTE9IjEzMS4yNTY3IiB4Mj0iMTQyLjM2NDYiIHkyPSIxMzEuMjU2NyIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSIxNjIuNDQ1IDM4LjcxMSAxNjIuNDE1IDM4LjcxMSAxMjMuODcyIDAuMTY5IDEyMy44NzIgNTkuOTIxIDE2Mi40NDUgMzkuMTM3IDE2Mi40NDUgMzguNzExIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy04IiB4MT0iMTguMzk3MyIgeTE9IjE4MS4zNDQiIHgyPSI3OS4xMTM1IiB5Mj0iMTgxLjM0NCIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIxOTAuOTMwNiIgeDI9IjUxLjMwNDkiIHkyPSIxOTAuOTMwNiIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIxNzEuNzU3MyIgeDI9Ijc5LjExMzUiIHkyPSIxNzEuNzU3MyIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIzNi4xNzA1IiB4Mj0iNzkuMTEzNSIgeTI9IjM2LjE3MDUiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTgiIHgxPSIxOC4zOTczIiB5MT0iMjYuNTgzOCIgeDI9Ijc5LjExMzUiIHkyPSIyNi41ODM4Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy05IiBwb2ludHM9IjE2Mi40NDkgMzguNzQyIDEyMy43MDcgMzguNzQyIDEyMy43MDcgMCAxNjIuNDQ5IDM4Ljc0MiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'
      title: Partial responses
    - anchor: serialization
      body: |
        
        ----

        * [Open API Specification](#open-api-specification)
        * [JSON Schema](#json-schema)
        * [Condensed Versus Full Objects](#condensed-versus-full-objects)

        ____


        ### Open API Specification

        Bitbucket uses the [Open API Specification](https://openapis.org) (OAI,
        formerly known as Swagger) to describe its APIs. Our OAI specification schema
        is hosted at [https://api.bitbucket.org/swagger.json](https://api.bitbucket.org/swagger.json)
        and serves as the canonical definition and comprehensive declaration of all
        available endpoints.

        The OAI specification makes writing client applications easier by:
        auto-generating boilerplate code (like data object classes) and dealing with
        authentication and error handling.

        You can find a comprehensive set of open tools for the OAI specification at:
        [https://github.com/swagger-api](https://github.com/swagger-api).


        ### JSON Schema

        Bitbucket uses JSON Schema to describe the layout of every type of object
        consumed or produced by the API. These schemas are collected under the
        `#definitions` element of our swagger.json file.

        When an endpoint expects an object as part of a POST or PUT, it also expects
        the object to validate against the JSON schemas. The same applies to objects
        returned by an endpoint.


        ### Condensed Versus Full Objects

        Most objects in Bitbucket come both in "full" and "partial" representation.
        The full representation is when all elements are included. This is the layout
        returned by a resource's `self` location (e.g. `/2.0/repositories/foo/bar`),
        as well as resource collection endpoints (e.g. `/2.0/repositories`).

        However, Bitbucket objects often embed other objects. For example, a `repository`
        object embeds a `user` object for its owner. Likewise, a `pullrequest` object
        embeds its `repository` object.

        These related objects are embedded, or inlined, to reduce the "chatter" when
        clients make frequent followup API calls to collect information on common,
        related information.

        Embedded related objects are typically limited in their fields to avoid such
        object graphs from becoming too deep and noisy. They often exclude their own
        nested objects in an attempt to strike a balance between performance and
        utility.

        An object's embedded or condensed representation tends to be standardized,
        meaning the fields included is the same set, regardless of where the object
        was embedded.
      description: Learn more about object representations
      icon: data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMjAuNzYyNCAyMDUuNTg2Ij4KICA8ZGVmcz4KICAgIDxzdHlsZT4KICAgICAgLmNscy0xIHsKICAgICAgICBpc29sYXRpb246IGlzb2xhdGU7CiAgICAgIH0KCiAgICAgIC5jbHMtMiwgLmNscy02IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC5jbHMtMTMsIC5jbHMtMywgLmNscy00LCAuY2xzLTYgewogICAgICAgIGZpbGw6IG5vbmU7CiAgICAgICAgc3Ryb2tlOiAjYzFjN2QwOwogICAgICAgIHN0cm9rZS1saW5lY2FwOiByb3VuZDsKICAgICAgICBzdHJva2UtbWl0ZXJsaW1pdDogMTA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMy43ODE2IDUuMjk0MzsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjMDA2NWZmOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIHN0cm9rZS1kYXNoYXJyYXk6IDMuOTIxOSA1LjQ5MDc7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogIzAwNTJjYzsKICAgICAgfQoKICAgICAgLmNscy04IHsKICAgICAgICBmaWxsOiAjNGM5YWZmOwogICAgICB9CgogICAgICAuY2xzLTkgewogICAgICAgIGZpbGw6ICMwMDQ5YjA7CiAgICAgIH0KCiAgICAgIC5jbHMtMTAgewogICAgICAgIGZpbGw6ICM1N2Q5YTM7CiAgICAgIH0KCiAgICAgIC5jbHMtMTEgewogICAgICAgIGZpbGw6ICM3OWYyYzA7CiAgICAgIH0KCiAgICAgIC5jbHMtMTIgewogICAgICAgIGZpbGw6ICMzNmIzN2U7CiAgICAgIH0KCiAgICAgIC5jbHMtMTMgewogICAgICAgIHN0cm9rZS1kYXNoYXJyYXk6IDMuODY4MSA1LjQxNTQ7CiAgICAgIH0KCiAgICAgIC5jbHMtMTQgewogICAgICAgIGZpbGw6ICM0MjUyNmU7CiAgICAgIH0KCiAgICAgIC5jbHMtMTUgewogICAgICAgIGZpbGw6ICMzNDQ1NjM7CiAgICAgIH0KCiAgICAgIC5jbHMtMTYgewogICAgICAgIGZpbGw6ICM1MDVmNzk7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDx0aXRsZT5JbnRlZ3JhdGlvbnM8L3RpdGxlPgogIDxnIGNsYXNzPSJjbHMtMSI+CiAgICA8ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj4KICAgICAgPGcgaWQ9Ik9iamVjdHMiPgogICAgICAgIDxnIGNsYXNzPSJjbHMtMiI+CiAgICAgICAgICA8Zz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iNzUuMjExNCIgeTE9IjE4Ny44NTczIiB4Mj0iNzcuMDI0OCIgeTI9IjE4Ny4xMTA5Ii8+CiAgICAgICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNCIgeDE9IjgxLjkyMDUiIHkxPSIxODUuMDk1NiIgeDI9IjEzOC4yMjEyIiB5Mj0iMTYxLjkyMDMiLz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMTQwLjY2OSIgeTE9IjE2MC45MTI2IiB4Mj0iMTQyLjQ4MjQiIHkyPSIxNjAuMTY2MiIvPgogICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTUiIHBvaW50cz0iMTk0LjUyNiAyNi41NTIgMTc2LjkwMSAzOC4yNDEgMTU5LjI3IDI2LjU1MiAxNzYuOTAxIDE0Ljg3IDE5NC41MjYgMjYuNTUyIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTgzLjcxMzUiIHkxPSI0My4yMTg4IiB4Mj0iMTgzLjcxMzUiIHkyPSI5Ny44ODMyIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy03IiBwb2ludHM9IjE3Ni45MDEgMzguMjQxIDE3Ni45MDEgNTguMTY2IDE1OS4yNyA0Ni40NzcgMTU5LjI3IDI2LjU1MiAxNzYuOTAxIDM4LjI0MSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtOCIgcG9pbnRzPSIxOTQuNTI2IDI2LjU1MiAxOTQuNTI2IDQ2LjQ3NyAxNzYuOTAxIDU4LjE2NiAxNzYuOTAxIDM4LjI0MSAxOTQuNTI2IDI2LjU1MiIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNiIgeDE9IjQ3Ljk0ODgiIHkxPSI0Mi4yMTg4IiB4Mj0iMTU5LjExNzIiIHkyPSI0Mi4yMTg4Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy01IiBwb2ludHM9IjIyMC43NjIgOTkuNzUyIDE2Ny44MTcgMTM0Ljg2NCAxMTQuODU0IDk5Ljc1MiAxNjcuODE3IDY0LjY1NyAyMjAuNzYyIDk5Ljc1MiIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtOSIgcG9pbnRzPSIxNjcuODE3IDEzNC44NjQgMTY3LjgxNyAxOTQuNzE4IDExNC44NTQgMTU5LjYwNiAxMTQuODU0IDk5Ljc1MiAxNjcuODE3IDEzNC44NjQiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTgiIHBvaW50cz0iMjIwLjc2MiA5OS43NTIgMjIwLjc2MiAxNTkuNjA2IDE2Ny44MTcgMTk0LjcxOCAxNjcuODE3IDEzNC44NjQgMjIwLjc2MiA5OS43NTIiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTEwIiBwb2ludHM9IjExMC41NDEgMjEuNjA0IDc3Ljk0OSA0My4yMTkgNDUuMzQ1IDIxLjYwNCA3Ny45NDkgMCAxMTAuNTQxIDIxLjYwNCIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTEiIHBvaW50cz0iMTEwLjU0MSAyMS42MDQgMTEwLjU0MSA1OC40NDkgNzcuOTQ5IDgwLjA2NCA3Ny45NDkgNDMuMjE5IDExMC41NDEgMjEuNjA0Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy01IiBwb2ludHM9IjE0MS4xOSAxNDguMDczIDE2Ny44MTMgMTMwLjQxNyAxOTQuNDQ0IDE0OC4wNzMgMTY3LjgxMyAxNjUuNzE5IDE0MS4xOSAxNDguMDczIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy05IiBwb2ludHM9IjE2Ny44MTMgMTMwLjQxNyAxNjcuODEzIDEwMC4zMjEgMTk0LjQ0NCAxMTcuOTc2IDE5NC40NDQgMTQ4LjA3MyAxNjcuODEzIDEzMC40MTciLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTgiIHBvaW50cz0iMTQxLjE5IDE0OC4wNzMgMTQxLjE5IDExNy45NzYgMTY3LjgxMyAxMDAuMzIxIDE2Ny44MTMgMTMwLjQxNyAxNDEuMTkgMTQ4LjA3MyIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTIiIHBvaW50cz0iNDUuMzQ1IDIxLjYwNCA0NS4zNDUgNDQuOTg0IDU3LjIzMSA1Mi44NjQgNTcuMjMxIDY2LjI5NiA3Ny45NDkgODAuMDY0IDc3Ljk0OSA0My4yMTkgNDUuMzQ1IDIxLjYwNCIvPgogICAgICAgIDxnIGNsYXNzPSJjbHMtMiI+CiAgICAgICAgICA8Zz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjQuNjQzOCIgeTE9Ijg2Ljk1NDQiIHgyPSIyNi4wMTU3IiB5Mj0iODUuNTUzMSIvPgogICAgICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTEzIiB4MT0iMjkuODA0IiB5MT0iODEuNjgzNCIgeDI9IjYwLjM4MTEiIHkyPSI1MC40NDkyIi8+CiAgICAgICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjYyLjI3NTIiIHkxPSI0OC41MTQzIiB4Mj0iNjMuNjQ3IiB5Mj0iNDcuMTEzIi8+CiAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNSIgcG9pbnRzPSIzNS4yNTUgODkuNjQ1IDE3LjczNiAxMDEuNDkyIDAgODkuOTYyIDE3LjUyNSA3OC4xMjEgMzUuMjU1IDg5LjY0NSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSIxNy43MzYgMTAxLjQ5MiAxNy45MTUgMTIxLjQxNiAwLjE3OSAxMDkuODg3IDAgODkuOTYyIDE3LjczNiAxMDEuNDkyIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMjAuNTg0OSIgeTE9IjEwNS41MzA1IiB4Mj0iNjUuODc0OSIgeTI9IjE3MS4zNjgxIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy04IiBwb2ludHM9IjM1LjI1NSA4OS42NDUgMzUuNDM0IDEwOS41NjkgMTcuOTE1IDEyMS40MTYgMTcuNzM2IDEwMS40OTIgMzUuMjU1IDg5LjY0NSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTQiIHBvaW50cz0iOTIuMzk0IDE3My44MTUgNzQuODc1IDE4NS42NjIgNTcuMTM5IDE3NC4xMzIgNzQuNjY0IDE2Mi4yOTEgOTIuMzk0IDE3My44MTUiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTE1IiBwb2ludHM9Ijc0Ljg3NSAxODUuNjYyIDc1LjA1NCAyMDUuNTg2IDU3LjMxOSAxOTQuMDU3IDU3LjEzOSAxNzQuMTMyIDc0Ljg3NSAxODUuNjYyIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy0xNiIgcG9pbnRzPSI5Mi4zOTQgMTczLjgxNSA5Mi41NzQgMTkzLjczOSA3NS4wNTQgMjA1LjU4NiA3NC44NzUgMTg1LjY2MiA5Mi4zOTQgMTczLjgxNSIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'
      title: Schemas and Serialization
    - anchor: uri-uuid
      body: |
        
        You should be familiar with REST architecture before writing an integration. Read this overview page to gain a good understanding of Bitbucket's REST implementation.

        ----

        * [URI structure](#uri-structure)
        * [HTTP methods](#http-methods)
        * [UUID](#universally-unique-identifier)
            * [User object and UUID](#user-object-and-uuid)
            * [Repository object and UUID](#repository-object-and-uuid)
            * [Team object and UUID](#team-object-and-uuid)
        * [Standard error responses](#standardized-error-responses)
        * [Standard ISO-8601 timestamps](#standard-iso-8601-timestamps)

        ----


        ### URI structure

        All Bitbucket Cloud requests start with the `https://api.bitbucket.org/2.0` prefix (for the 2.0 API) and `https://api.bitbucket.org/1.0` prefix (1.0 API).

        The next segment of the URI path depends on the endpoint of the request. For example, using the curl command and the repositories endpoint you can list all the issues on Bitbucket's tutorial repository:

        ```
        curl https://api.bitbucket.org/2.0/repositories/tutorials/tutorials.bitbucket.org
        ```
        Given a specific endpoint, you can then drill down to a particular aspect or resource of that endpoint. The issues resource on a repository is an example:

        ```
        curl https://api.bitbucket.org/1.0/repositories/tutorials/tutorials.bitbucket.org/issues
        ```

        #### HTTP methods

        A given endpoint or resource has a series of actions (or methods) associated with it. The Bitbucket service supports these standard HTTP methods:

        | Call | Description |
        |------|-------------|
        | GET    | Retrieves information. |
        | PUT    | Updates existing information. |
        | POST   | Creates new information. |
        | DELETE | Removes existing information. |

        For example, you can call use the POST action on the issues resource and create an issue on the issue tracker.

        **Specifying content length**

        You can get a `411 Length Required` response. If this happens, the API requires a Content-Length header but the client is not sending it. You should add the header yourself, for example using the curl client:

        ```
        curl -r PUT --header "Content-Length: 0" -u user:app_password https://api.bitbucket.org/1.0/emails/rap@atlassian.com
        ```

        ### Universally Unique Identifier

        UUID's provide a single point of recognition for users, teams, and repositories. The UUID is distinct from the username, team name, and repository name fields and remains the same even when those fields change. For example when a user changes their username or moves a repository you will need to modify calls which use those identifiers but not if you are pointing to the UUID.

        #### UUID examples and structure

        UUID's work with both the 1.0 and 2.0 APIs for the user, team, and repository objects. The following examples the following characters are replacements for curly brackets: `%7B` replaces `{`  and `%7D` replaces `}`. You will see this structure in the following example sections.

        #### User object and UUID

        When you make a call using either the username or the UUID for that user the response is the same.

        **Call with username**:

        ```
        curl https://api.bitbucket.org/2.0/users/tutorials
        ```

        ***Call with UUID for the user**:

        ```
        curl https://api.bitbucket.org/2.0/users/%7Bc788b2da-b7a2-404c-9e26-d3f077557007%7D
        ```

        **Response**
        ```JSON
        {
            "username": "tutorials",
            "nickname": "tutorials",
            "account_status": "active",
            "website": "https://tutorials.bitbucket.org/",
            "display_name": "tutorials account",
            "uuid": "{c788b2da-b7a2-404c-9e26-d3f077557007}",
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/users/tutorials"
                },
                "repositories": {
                    "href": "https://api.bitbucket.org/2.0/repositories/tutorials"
                },
                "html": {
                    "href": "https://bitbucket.org/tutorials"
                },
                "followers": {
                    "href": "https://api.bitbucket.org/2.0/users/tutorials/followers"
                },
                "avatar": {
                    "href": "https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png"
                },
                "following": {
                    "href": "https://api.bitbucket.org/2.0/users/tutorials/following"
                }
            },
            "created_on": "2011-12-20T16:34:07.132459+00:00",
            "location": "Santa Monica, CA",
            "type": "user"
        }
        ```

        #### Repository object and UUID

        Once you have the UUID for a repository you no longer need a username or team name to make the API call so long as you use an empty field. This helps you resolve repositories no matter if the username or team name changes.

        **Call with team name (1team) and repository name (moxie)**:

        ```
        curl https://api.bitbucket.org/2.0/repositories/1team/moxie
        ```
        **Call with UUID and empty field**:

        ```
        curl https://api.bitbucket.org/2.0/repositories/%7B%7D/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D
        ```

        **Call with UUID and teamname**:

        ```
        curl https://api.bitbucket.org/2.0/repositories/1team/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D
        ```

        **Response**

        ```JSON
        {
            "created_on": "2013-11-08T01:11:03.222520+00:00",
            "description": "",
            "fork_policy": "allow_forks",
            "full_name": "1team/moxie",
            "has_issues": false,
            "has_wiki": false,
            "is_private": false,
            "language": "",
            "links": {
                "avatar": {
                    "href": "https://bitbucket.org/1team/moxie/avatar/32/"
                },
                "branches": {
                    "href": "https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/branches"
                },
                "clone": [
                    {
                        "href": "https://bitbucket.org/1team/moxie.git",
                        "name": "https"
                    },
                    {
                        "href": "ssh://git@bitbucket.org/1team/moxie.git",
                        "name": "ssh"
                    }
                ],
                "commits": {
                    "href": "https://api.bitbucket.org/2.0/repositories/1team/moxie/commits"
                },
                "downloads": {
                    "href": "https://api.bitbucket.org/2.0/repositories/1team/moxie/downloads"
                },
                "forks": {
                    "href": "https://api.bitbucket.org/2.0/repositories/1team/moxie/forks"
                },
                "hooks": {
                    "href": "https://api.bitbucket.org/2.0/repositories/1team/moxie/hooks"
                },
                "html": {
                    "href": "https://bitbucket.org/1team/moxie"
                },
                "pullrequests": {
                    "href": "https://api.bitbucket.org/2.0/repositories/1team/moxie/pullrequests"
                },
                "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/1team/moxie"
                },
                "tags": {
                    "href": "https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/tags"
                },
                "watchers": {
                    "href": "https://api.bitbucket.org/2.0/repositories/1team/moxie/watchers"
                }
            },
            "name": "moxie",
            "owner": {
                "display_name": "the team",
                "links": {
                    "avatar": {
                        "href": "https://bitbucket.org/account/1team/avatar/32/"
                    },
                    "html": {
                        "href": "https://bitbucket.org/1team/"
                    },
                    "self": {
                        "href": "https://api.bitbucket.org/2.0/teams/1team"
                    }
                },
                "type": "team",
                "username": "1team",
                "uuid": "{aa559944-83c9-4963-a9a8-69ac8d9cf5d2}"
            },
            "project": {
                "key": "PROJ",
                "links": {
                    "avatar": {
                        "href": "https://bitbucket.org/account/user/1team/projects/PROJ/avatar/32"
                    },
                    "html": {
                        "href": "https://bitbucket.org/account/user/1team/projects/PROJ"
                    }
                },
                "name": "Untitled project",
                "type": "project",
                "uuid": "{ab52aaeb-16ad-4fb0-bb1d-47e4f00367ff}"
            },
            "scm": "git",
            "size": 33348,
            "type": "repository",
            "updated_on": "2013-11-08T01:11:03.263237+00:00",
            "uuid": "{21fa9bf8-b5b2-4891-97ed-d590bad0f871}",
            "website": ""
        }
        ```

        #### Team object and UUID

        This example shows a call for a list of team members using both the team name and with the UUID for the team object. As the call is unauthenticated in the following example the response object will only show members with public profiles. The response is the same in either case.

        **Call with teamname**

        ```
        curl https://api.bitbucket.org/2.0/teams/1team/members
        ```
        **Call with UUID for team object**

        ```
        curl https://api.bitbucket.org/2.0/teams/%7Baa559944-83c9-4963-a9a8-69ac8d9cf5d2%7D/members
        ```

        **Response**

        ```JSON
        {
            "page": 1,
            "pagelen": 50,
            "size": 2,
            "values": [
                {
                    "created_on": "2011-12-20T16:34:07.132459+00:00",
                    "display_name": "tutorials account",
                    "links": {
                        "avatar": {
                            "href": "https://bitbucket.org/account/tutorials/avatar/32/"
                        },
                        "followers": {
                            "href": "https://api.bitbucket.org/2.0/users/tutorials/followers"
                        },
                        "following": {
                            "href": "https://api.bitbucket.org/2.0/users/tutorials/following"
                        },
                        "hooks": {
                            "href": "https://api.bitbucket.org/2.0/users/tutorials/hooks"
                        },
                        "html": {
                            "href": "https://bitbucket.org/tutorials/"
                        },
                        "repositories": {
                            "href": "https://api.bitbucket.org/2.0/repositories/tutorials"
                        },
                        "self": {
                            "href": "https://api.bitbucket.org/2.0/users/tutorials"
                        },
                        "snippets": {
                            "href": "https://api.bitbucket.org/2.0/snippets/tutorials"
                        }
                    },
                    "location": null,
                    "type": "user",
                    "username": "tutorials",
                    "nickname": "tutorials",
                    "account_status": "active",
                    "uuid": "{c788b2da-b7a2-404c-9e26-d3f077557007}",
                    "website": "https://tutorials.bitbucket.org/"
                },
                {
                    "created_on": "2013-12-10T14:44:13+00:00",
                    "display_name": "Dan Stevens [Atlassian]",
                    "links": {
                        "avatar": {
                            "href": "https://bitbucket.org/account/dans9190/avatar/32/"
                        },
                        "followers": {
                            "href": "https://api.bitbucket.org/2.0/users/dans9190/followers"
                        },
                        "following": {
                            "href": "https://api.bitbucket.org/2.0/users/dans9190/following"
                        },
                        "hooks": {
                            "href": "https://api.bitbucket.org/2.0/users/dans9190/hooks"
                        },
                        "html": {
                            "href": "https://bitbucket.org/dans9190/"
                        },
                        "repositories": {
                            "href": "https://api.bitbucket.org/2.0/repositories/dans9190"
                        },
                        "self": {
                            "href": "https://api.bitbucket.org/2.0/users/dans9190"
                        },
                        "snippets": {
                            "href": "https://api.bitbucket.org/2.0/snippets/dans9190"
                        }
                    },
                    "location": null,
                    "type": "user",
                    "username": "dans9190",
                    "nickname": "dans9190",
                    "account_status": "active",
                    "uuid": "{1cd06601-cd0e-4fce-be03-e9ac226978b7}",
                    "website": ""
                }
            ]
        }
        ```

        ### Standardized error responses

        The 2.0 API standardizes the error response layout. The 2.0 API serves a JSON
        object along with the appropriate HTTP status code. The JSON object provides a
        detailed  problem description.

        ```json
        {
            "type": "error",
            "error": {
                "message": "Bad request",
                "fields": {
                    "src": [
                        "This field is required."
                    ]
                },
                "detail": "You must specify a valid source branch when creating a pull request.",
                "id": "d23a1cc5178f7637f3d9bf2d13824258",
                "data": {
                  "extra": "Optional, endpoint-specific data to further augment the error."
                }
            }
        }
        ```

        This object contains an error element which contains the following nested
        elements:

        | Element | Description |
        |---------|-------------|
        | message | A short description of the problem. This element is always present. Its value may be localized. |
        | fields  | This optional element is used in response to POST or PUT operations in which clients have provided invalid input. It contains a list of one or more client-provided fields that failed validation. The values may be localized. |
        | detail  | An optional detailed explanation of the failure. Its value may be localized.
        | id      | An optional unique error identifier that identifies the error in Bitbucket's logging system. If you feel you hit a bug in an API and this field is provided, please mention it if you decide to contact support as it will greatly help us narrow down the problem. |

        ### Standard ISO-8601 timestamps

        All 2.0 APIs use standardized ISO-8601 timestamps. In most cases, our APIs return UTC timestamps and for these, the timezone offset part will be 00:00. In rare cases where the original localized timestamp has significance, the timezone offset may identify the event's original timezone.
      description: URL's, UUID's, errors, and timestamps
      icon: data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTc5LjI2IDE3Ny42NSI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50KTt9LmNscy0ye2ZpbGw6IzA5MWU0Mjt9LmNscy0xMCwuY2xzLTExLC5jbHMtMywuY2xzLTQsLmNscy05e2ZpbGw6bm9uZTt9LmNscy0ze3N0cm9rZTojOTljMWZmO30uY2xzLTMsLmNscy00e3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MDt9LmNscy0xMiwuY2xzLTQsLmNscy05e3N0cm9rZTojZTVlOGVjO30uY2xzLTV7ZmlsbDojMzQ0NTYzO30uY2xzLTZ7ZmlsbDojZmY4YjAwO30uY2xzLTd7ZmlsbDojZmZjNDAwO30uY2xzLTh7ZmlsbDojMDA2NWZmO30uY2xzLTEwLC5jbHMtMTEsLmNscy0xMiwuY2xzLTEzLC5jbHMtOXtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2Utd2lkdGg6MnB4O30uY2xzLTEwe3N0cm9rZTojZmZhYjAwO30uY2xzLTExLC5jbHMtMTN7c3Ryb2tlOiMwMDY1ZmY7fS5jbHMtMTJ7ZmlsbDojOTljMWZmO30uY2xzLTEze2ZpbGw6I2U1ZThlYzt9PC9zdHlsZT48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudCIgeDE9IjAuNCIgeTE9IjE3OC4wNSIgeDI9IjE3OC44NSIgeTI9Ii0wLjQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMwOTFlNDIiLz48c3RvcCBvZmZzZXQ9IjAuMDciIHN0b3AtY29sb3I9IiMwZDIyNDUiLz48c3RvcCBvZmZzZXQ9IjAuNDkiIHN0b3AtY29sb3I9IiMxZjMyNTMiLz48c3RvcCBvZmZzZXQ9IjAuNzkiIHN0b3AtY29sb3I9IiMyNTM4NTgiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48dGl0bGU+Q29kZTwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IlNvZnR3YXJlIj48cmVjdCBpZD0iX1JlY3RhbmdsZV8iIGRhdGEtbmFtZT0iJmx0O1JlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtMSIgd2lkdGg9IjE3OS4yNiIgaGVpZ2h0PSIxNzcuNjUiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xNzkuMjYsMjYuNjRIMFY3MS43NUExNjYuNDEsMTY2LjQxLDAsMCwwLDYzLjI0LDU5LjUxYTE4OC40MSwxODguNDEsMCwwLDAsMTcuMzktOC4zNmMxOC40NC05LjQzLDQ4LjM3LTE3LjksOTguNjItMTNabS0xNTkuNDQsMzRoMFptMC0xNC4wOGgwWiIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjE5LjgxIiB5MT0iNDYuNTgiIHgyPSIyNS4wNyIgeTI9IjQ2LjU4Ii8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSI2MC42NiIgeDI9IjE5LjgxIiB5Mj0iNjAuNjYiLz48bGluZSBjbGFzcz0iY2xzLTMiIHgxPSIxOS44MSIgeTE9Ijc0Ljc0IiB4Mj0iMjUuMDciIHkyPSI3NC43NCIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iODguODIiIHgyPSIxOS44MSIgeTI9Ijg4LjgyIi8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSIxMDIuODkiIHgyPSIxOS44MSIgeTI9IjEwMi44OSIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iMTE2Ljk3IiB4Mj0iMTkuODEiIHkyPSIxMTYuOTciLz48bGluZSBjbGFzcz0iY2xzLTMiIHgxPSIyNS4wNyIgeTE9IjEzMS4wNSIgeDI9IjE5LjgxIiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSIxNDUuMTMiIHgyPSIxOS44MSIgeTI9IjE0NS4xMyIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iMTU5LjIxIiB4Mj0iMTkuODEiIHkyPSIxNTkuMjEiLz48bGluZSBjbGFzcz0iY2xzLTQiIHgxPSI1NS44OSIgeTE9IjEzMS4wNSIgeDI9IjkzLjk5IiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy00IiB4MT0iNTUuODkiIHkxPSIxNDUuMTMiIHgyPSIxMzkuNjciIHkyPSIxNDUuMTMiLz48cmVjdCBjbGFzcz0iY2xzLTUiIHdpZHRoPSIxNzkuMjYiIGhlaWdodD0iMjYuNjQiLz48Y2lyY2xlIGNsYXNzPSJjbHMtNiIgY3g9IjEzLjUiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxjaXJjbGUgY2xhc3M9ImNscy03IiBjeD0iMzAuMTgiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxjaXJjbGUgY2xhc3M9ImNscy04IiBjeD0iNDYuODYiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTc1LjQxLDg4LjgyIi8+PHBhdGggY2xhc3M9ImNscy05IiBkPSJNMzIuODksODguODIiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iMzIuODkiIHkxPSI3NC43NCIgeDI9Ijc1LjQxIiB5Mj0iNzQuNzQiLz48bGluZSBjbGFzcz0iY2xzLTExIiB4MT0iMzIuODkiIHkxPSI2MC42NiIgeDI9Ijc1LjQxIiB5Mj0iNjAuNjYiLz48bGluZSBjbGFzcz0iY2xzLTkiIHgxPSIzMi44OSIgeTE9IjQ2LjU4IiB4Mj0iNTUuODkiIHkyPSI0Ni41OCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjQ2LjU4IiB4Mj0iMjUuMDciIHkyPSI0Ni41OCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjYwLjY2IiB4Mj0iMjUuMDciIHkyPSI2MC42NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9Ijc0Ljc0IiB4Mj0iMjUuMDciIHkyPSI3NC43NCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9Ijg4LjgyIiB4Mj0iMjUuMDciIHkyPSI4OC44MiIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjEwMi44OSIgeDI9IjI1LjA3IiB5Mj0iMTAyLjg5Ii8+PGxpbmUgY2xhc3M9ImNscy0xMiIgeDE9IjE5LjgxIiB5MT0iMTE2Ljk3IiB4Mj0iMjUuMDciIHkyPSIxMTYuOTciLz48bGluZSBjbGFzcz0iY2xzLTEyIiB4MT0iMTkuODEiIHkxPSIxMzEuMDUiIHgyPSIyNS4wNyIgeTI9IjEzMS4wNSIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjE0NS4xMyIgeDI9IjI1LjA3IiB5Mj0iMTQ1LjEzIi8+PGxpbmUgY2xhc3M9ImNscy0xMiIgeDE9IjE5LjgxIiB5MT0iMTU5LjIxIiB4Mj0iMjUuMDciIHkyPSIxNTkuMjEiLz48bGluZSBpZD0iX0xpbmVfIiBkYXRhLW5hbWU9IiZsdDtMaW5lJmd0OyIgY2xhc3M9ImNscy0xMCIgeDE9Ijg0LjI0IiB5MT0iMTE2Ljk3IiB4Mj0iMTU2LjY1IiB5Mj0iMTE2Ljk3Ii8+PHBhdGggY2xhc3M9ImNscy05IiBkPSJNMzIuODksMTE3aDBaIi8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjEwMiIgeTE9IjEzMS4wNSIgeDI9IjE2My42MiIgeTI9IjEzMS4wNSIvPjxsaW5lIGNsYXNzPSJjbHMtMTMiIHgxPSI1NS44OSIgeTE9IjEzMS4wNSIgeDI9IjkzLjk5IiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy0xMyIgeDE9IjU1Ljg5IiB5MT0iMTQ1LjEzIiB4Mj0iMTM5LjY3IiB5Mj0iMTQ1LjEzIi8+PGxpbmUgY2xhc3M9ImNscy05IiB4MT0iNzguOSIgeTE9IjE1OS4yMSIgeDI9IjExMy41MSIgeTI9IjE1OS4yMSIvPjxsaW5lIGNsYXNzPSJjbHMtOSIgeDE9IjU5LjYxIiB5MT0iODguODIiIHgyPSI5OS4zMyIgeTI9Ijg4LjgyIi8+PGxpbmUgY2xhc3M9ImNscy05IiB4MT0iNTkuNjEiIHkxPSIxMDIuODkiIHgyPSI5OS4zMyIgeTI9IjEwMi44OSIvPjxjaXJjbGUgY2xhc3M9ImNscy02IiBjeD0iMTMuNSIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTciIGN4PSIzMC4xOCIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTgiIGN4PSI0Ni44NiIgY3k9IjEyLjA4IiByPSI1LjExIi8+PC9nPjwvZz48L3N2Zz4='
      title: URI, UUID, and structures
    - anchor: cors-hypermedia
      body: |
        
        This section describes [Cross-origin resource sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) (CORS), what content types we support in requests and responses, and hyperlinking resources in each json responses.


        ----

        * [CORS](#cors)
        * [Supported content types](#supported-content-types)
        * [Resource links](#resource-links)

        ----

        ### Cors

        The Bitbucket API supports Cross-origin resource sharing to allow requests for restricted resources across domains. For more information you can refer to:

        * [Wikipedia article on CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)
        * [W3C CORS recommendation](https://www.w3.org/TR/cors/)

        Sending a general request from the api to bitbucket.com:

        `curl -i https://api.bitbucket.org -H "origin: http://bitbucket.com"`

        Gives this result:

            HTTP/1.1 302 FOUND
            Server: nginx/1.6.2
            Vary: Cookie
            Cache-Control: max-age=900
            Content-Type: text/html; charset=utf-8
            Strict-Transport-Security: max-age=31536000
            Date: Tue, 21 Jun 2016 17:54:37 GMT
            Location: http://confluence.atlassian.com/x/IYBGDQ
            X-Served-By: app-110
            X-Static-Version: 2c820eb0d2b3
            ETag: "d41d8cd98f00b204e9800998ecf8427e"
            X-Content-Type-Options: nosniff
            X-Render-Time: 0.00379920005798
            Connection: Keep-Alive
            X-Version: 2c820eb0d2b3
            X-Frame-Options: SAMEORIGIN
            X-Request-Count: 383
            X-Cache-Info: cached
            Content-Length: 0

        Sending the same request with the CORS check -X OPTIONS in the call:

        `curl -i https://api.bitbucket.org -H "origin: http://bitbucket.com" -X OPTIONS`

        Gives this result:

            HTTP/1.1 302 FOUND
            Server: nginx/1.6.2
            Vary: Cookie
            Cache-Control: max-age=900
            Content-Type: text/html; charset=utf-8
            Access-Control-Expose-Headers: Accept-Ranges, Content-Encoding, Content-Length, Content-Type, ETag, Last-Modified
            Strict-Transport-Security: max-age=31536000
            Date: Tue, 21 Jun 2016 18:04:30 GMT
            Access-Control-Max-Age: 86400
            Location: http://confluence.atlassian.com/x/IYBGDQ
            X-Served-By: app-111
            Access-Control-Allow-Origin: *
            X-Static-Version: 2c820eb0d2b3
            ETag: "d41d8cd98f00b204e9800998ecf8427e"
            X-Content-Type-Options: nosniff
            X-Render-Time: 0.00371098518372
            Connection: keep-alive
            X-Version: 2c820eb0d2b3
            X-Frame-Options: SAMEORIGIN
            X-Request-Count: 357
            Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
            Access-Control-Allow-Headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, Range, X-CsrftokenX-Requested-With
            X-Cache-Info: not cacheable; request wasn't a GET or HEAD
            Content-Length: 0



        ### Supported content types

        The default and primary content type for 2.0 APIs is JSON. This applies both to responses from the server and to the request bodies provided by the client.

        Unless documented otherwise, whenever creating a new (POST) or modifying an existing (PUT) object, your client must provide the object's normal representation. Not every object element can be mutated. For example, a repository's created_on date is an auto-generated, immutable field. Your client can omit immutable fields from a request body.

        In some cases, a resource might also accept regular application/x-www-url-form-encoded POST and PUT bodies. Such bodies can be more convenient in scripts and command line usage. Requests bodies can contain contain nested elements or they can be flat (without nested elements). Clients can send flat request bodies as either as application/json or as application/x-www-url-form-encoded. Nested objects always require JSON.

        ### Resource links

        Every 2.0 object contains a links element that points to related resources or alternate representations. Use links to quickly discover and traverse to related objects. Links serve a "self-documenting" function for each endpoint. For example, the following request for a specific user:


        `$ curl https://api.bitbucket.org/2.0/users/tutorials`

        ```json
        {
            "username": "tutorials",
            "nickname": "tutorials",
            "account_status": "active",
            "website": "https://tutorials.bitbucket.org/",
            "display_name": "tutorials account",
            "uuid": "{c788b2da-b7a2-404c-9e26-d3f077557007}",
            "links": {
                "self": {
                    "href": "https://api.bitbucket.org/2.0/users/tutorials"
                },
                "repositories": {
                    "href": "https://api.bitbucket.org/2.0/repositories/tutorials"
                },
                "html": {
                    "href": "https://bitbucket.org/tutorials"
                },
                "followers": {
                    "href": "https://api.bitbucket.org/2.0/users/tutorials/followers"
                },
                "avatar": {
                    "href": "https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png"
                },
                "following": {
                    "href": "https://api.bitbucket.org/2.0/users/tutorials/following"
                }
            },
            "created_on": "2011-12-20T16:34:07.132459+00:00",
            "location": "Santa Monica, CA",
            "type": "user"
        }
        ```
        Links can be actual REST API resources or they can be informational. In this example, informative resources include the user's avatar and the HTML URL for the user's Bitbucket account. Your client should avoid hardcoding an API's URL and instead use the URLs returned in API responses.

        A link's key is its `rel` (relationship) attribute and it contains a mandatory href element. For example, the following link:

        ```json
        "self": {
              "href": "https://api.bitbucket.org/api/2.0/users/tutorials"
        }
        ```

        The rel for this link is self and the href is https://api.bitbucket.org/api/2.0/users/tutorials. A single rel key can contain an list (array) of href objects. Your client should anticipate that any rel key can contain one or more href objects.

        Finally, links can also contain optional elements. Two common optional elements are the name element and the title element. They are often used to disambiguate links that share the same rel key. In the example below, the repository object that contains a clone link with two href objects. Each object contains the optional name element to clarify its use.

        ```json
        "links": {
          "self": {
            "href": "https://api.bitbucket.org/2.0/repositories/evzijst/bitbucket"
          },
          "clone": [
            {
              "href": "https://api.bitbucket.org/evzijst/bitbucket.git",
              "name": "https"
            },
            {
              "href": "ssh://git@bitbucket.org/erik/bitbucket.git",
              "name": "ssh"
            }
          ],
          ...
        }
        ```
        Links can support [URI Templates](https://tools.ietf.org/html/rfc6570); Those that do contain a `"templated": "true"` element.
      description: Learn about resources and linking
      icon: data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM2LjYgMjE4LjQzIj48ZGVmcz48c3R5bGU+LmNscy0xe2lzb2xhdGlvbjppc29sYXRlO30uY2xzLTIsLmNscy0zLC5jbHMtNHtmaWxsOm5vbmU7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOjExcHg7fS5jbHMtMntzdHJva2U6dXJsKCNsaW5lYXItZ3JhZGllbnQpO30uY2xzLTN7c3Ryb2tlOnVybCgjTmV3X0dyYWRpZW50X1N3YXRjaF8xNCk7fS5jbHMtNHtzdHJva2U6dXJsKCNOZXdfR3JhZGllbnRfU3dhdGNoXzEpO30uY2xzLTV7ZmlsbDojNDI1MjZlO30uY2xzLTZ7ZmlsbDojZmY1NjMwO30uY2xzLTEwLC5jbHMtNywuY2xzLTh7bWl4LWJsZW5kLW1vZGU6bXVsdGlwbHk7fS5jbHMtN3tmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTIpO30uY2xzLTh7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudC0zKTt9LmNscy05e2ZpbGw6IzAwNjVmZjt9LmNscy0xMHtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTQpO308L3N0eWxlPjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB5MT0iMTY3Ljg3IiB4Mj0iMTkxLjU2IiB5Mj0iMTY3Ljg3IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjNTA1Zjc5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMzQ0NTYzIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9Ik5ld19HcmFkaWVudF9Td2F0Y2hfMTQiIHgxPSIxMTIuODMiIHkxPSIxMzEuNzIiIHgyPSIyMzYuNiIgeTI9IjEzMS43MiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzAwNTJjYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzI2ODRmZiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJOZXdfR3JhZGllbnRfU3dhdGNoXzEiIHgxPSI0NS4wNiIgeTE9Ijg2LjY5IiB4Mj0iMTY4Ljg4IiB5Mj0iODYuNjkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNkZTM1MGIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZjc0NTIiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50LTIiIHgxPSIzNDQ3LjkzIiB5MT0iLTkxOC43OSIgeDI9IjM0NTEuNCIgeTI9Ii0xMDMyLjc2IiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKC01NzIuMzggMzcwNC4yOSkgcm90YXRlKC02NC4zNCkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAuMzEiIHN0b3AtY29sb3I9IiNjMWM3ZDAiIHN0b3Atb3BhY2l0eT0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2MxYzdkMCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtMyIgeDE9IjM1MDYuNiIgeTE9Ii03OTYuNjYiIHgyPSIzNTEwLjA3IiB5Mj0iLTkxMC42MyIgeGxpbms6aHJlZj0iI2xpbmVhci1ncmFkaWVudC0yIi8+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtNCIgeDE9IjM1ODEuNjgiIHkxPSItOTA2LjgyIiB4Mj0iMzU4NS4xNiIgeTI9Ii0xMDIwLjc5IiB4bGluazpocmVmPSIjbGluZWFyLWdyYWRpZW50LTIiLz48L2RlZnM+PHRpdGxlPldlYmhvb2tzPC90aXRsZT48ZyBjbGFzcz0iY2xzLTEiPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGlkPSJTb2Z0d2FyZSI+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTg2LjA2LDE2Ny44N0gxMTcuNzJBMjcuNTgsMjcuNTgsMCwwLDAsOTIuMjQsMTg1YTQ1LjA2LDQ1LjA2LDAsMSwxLTQxLjY4LTYyLjE5Ii8+PHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTE4LjMzLDUwLjUybDM0LjE1LDU5LjE4YTI3LjU5LDI3LjU5LDAsMCwwLDI3LjU4LDEzLjUxLDQ1LjA2LDQ1LjA2LDAsMSwxLTMzLDY3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy00IiBkPSJNNTAuNTYsMTY3Ljg3bDM0LjE4LTU5LjE2YTI3LjU5LDI3LjU5LDAsMCwwLTIuMDktMzAuNjQsNDUuMDYsNDUuMDYsMCwxLDEsNzQuNy01Ii8+PHBhdGggY2xhc3M9ImNscy01IiBkPSJNMTg2LjA2LDE5OS42NmEzMS43OSwzMS43OSwwLDEsMSwzMS43OS0zMS43OUEzMS44MiwzMS44MiwwLDAsMSwxODYuMDYsMTk5LjY2WiIvPjxnIGlkPSJfR3JvdXBfIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPjxwYXRoIGNsYXNzPSJjbHMtNiIgZD0iTTQ5LjU2LDE5OS42NGEzMS43OSwzMS43OSwwLDEsMSwzMi43Ny0zMC43N0EzMS44MiwzMS44MiwwLDAsMSw0OS41NiwxOTkuNjRaIi8+PC9nPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0iTTU0LjEyLDE4MC4zNmE1OC45LDU4LjksMCwwLDAtMS41OS0xMS4yN3MtMi4zNS05LjQ0LTcuMzMtMTYuODNhNDMuODksNDMuODksMCwwLDAtMTEuNzMtMTEuMTcsMzEuNzcsMzEuNzcsMCwwLDAsMjkuMjgsNTYuMTNDNTguMjksMTkyLjQ0LDU0LjY4LDE4Ni45LDU0LjEyLDE4MC4zNloiLz48cGF0aCBjbGFzcz0iY2xzLTgiIGQ9Ik0xODkuNjIsMTgwLjM2QTU4LjksNTguOSwwLDAsMCwxODgsMTY5LjA4cy0yLjM1LTkuNDQtNy4zMy0xNi44M0E0My44OSw0My44OSwwLDAsMCwxNjksMTQxLjA4YTMxLjc3LDMxLjc3LDAsMCwwLDI5LjI4LDU2LjEzQzE5My43OSwxOTIuNDQsMTkwLjE4LDE4Ni45LDE4OS42MiwxODAuMzZaIi8+PGcgaWQ9Il9Hcm91cF8yIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPjxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTg5LjksMzMuNzhhMzIuNDYsMzIuNDYsMCwxLDEsMTEuODgsNDQuMzRBMzIuNDksMzIuNDksMCwwLDEsODkuOSwzMy43OFoiLz48L2c+PHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTEyMi4yMyw2Ni4xM2E1OC45LDU4LjksMCwwLDAtMS41OS0xMS4yN3MtMi4zNS05LjQ0LTcuMzMtMTYuODNjLTMuMzctNS05LjA2LTkuNzktMTUuNDMtMTMuNDhBMzIuNDQsMzIuNDQsMCwwLDAsMTI4Ljc3LDgwLjZDMTI1LjMxLDc2LjM5LDEyMi43LDcxLjYxLDEyMi4yMyw2Ni4xM1oiLz48L2c+PC9nPjwvZz48L3N2Zz4='
      title: Cors and hypermedia
    - anchor: bb-connect
      body: |
        
        You can use the Atlassian Connect for Bitbucket Cloud to build add-ons which
        can connect with the Bitbucket UI and your own application set. An add-on could
        be an integration with another existing service, new features for the Atlassian
        application, or even a new product that runs within the Atlassian application.

        For complete information see:
        [Atlassian Connect for Bitbucket Cloud](https://developer.atlassian.com/bitbucket/index.html)
      description: Build Bitbucket add-ons with Connect
      icon: data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjU3LjMxNjMgMTYyLjU5OTQiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjMzQ0NTYzOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICMxZGI5ZDQ7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzAwNTdkODsKICAgICAgfQoKICAgICAgLmNscy01LCAuY2xzLTcsIC5jbHMtOSB7CiAgICAgICAgbWl4LWJsZW5kLW1vZGU6IG11bHRpcGx5OwogICAgICB9CgogICAgICAuY2xzLTUgewogICAgICAgIGZpbGw6IHVybCgjTjc1KTsKICAgICAgfQoKICAgICAgLmNscy02IHsKICAgICAgICBmaWxsOiAjMDA2NWZmOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIGZpbGw6IHVybCgjTjc1LTIpOwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6IHVybCgjbGluZWFyLWdyYWRpZW50KTsKICAgICAgfQoKICAgICAgLmNscy05IHsKICAgICAgICBmaWxsOiB1cmwoI043NS0zKTsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogdXJsKCNUMjAwLVQ3NSk7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9Ik43NSIgeDE9Ii0yMTg5LjU1NiIgeTE9IjI4MDguMjI4NCIgeDI9Ii0yMDkxLjE1NTEiIHkyPSIyODA4LjIyODQiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMC4xNjgxLCAwLjk4NTgsIDAuOTg1OCwgLTAuMTY4MSwgLTIzNzMuNzM2LCAyNzIyLjEyNzgpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2U1ZThlYyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNlNWU4ZWMiIHN0b3Atb3BhY2l0eT0iMC4xIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJONzUtMiIgZGF0YS1uYW1lPSJONzUiIHgxPSItMjE2OC41OTQ3IiB5MT0iMjkzNS4wNTU2IiB4Mj0iLTIwNzAuMTkzNyIgeTI9IjI5MzUuMDU1NiIgeGxpbms6aHJlZj0iI043NSIvPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgxPSIxOTAuMzU0NyIgeTE9IjE1OS45NjciIHgyPSIyNTkuOTQ4NyIgeTI9IjkwLjM3MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMzNDQ1NjMiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNWU2Yzg0Ii8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJONzUtMyIgZGF0YS1uYW1lPSJONzUiIHgxPSItMjI1Ny4zOTc3IiB5MT0iMjg4NC4yMjYzIiB4Mj0iLTIxNTguOTk2NyIgeTI9IjI4ODQuMjI2MyIgeGxpbms6aHJlZj0iI043NSIvPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJUMjAwLVQ3NSIgeDE9IjEyNi4wMjU3IiB5MT0iODUuMTA4IiB4Mj0iMTk1LjYxOTciIHkyPSIxNS41MTQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjM2RjN2RjIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzljZTNlZSIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHRpdGxlPkFkZCBPbiBCbG9ja3MgMjwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPHJlY3QgaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTIiIHg9IjEyOC42NTgxIiB5PSI4Ny43NDA1IiB3aWR0aD0iNjQuMzI5MSIgaGVpZ2h0PSI3NC44NTkiLz4KICAgICAgICA8cmVjdCBpZD0iX1JlY3RhbmdsZV8yIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTMiIHg9IjY0LjMyOTEiIHk9IjEyLjg4MTUiIHdpZHRoPSI2NC4zMjkxIiBoZWlnaHQ9Ijc0Ljg1OSIvPgogICAgICAgIDxyZWN0IGlkPSJfUmVjdGFuZ2xlXzMiIGRhdGEtbmFtZT0iJmx0O1JlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtNCIgeT0iODcuNzQwNSIgd2lkdGg9IjY0LjMyOTEiIGhlaWdodD0iNzQuODU5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy01IiBkPSJNNjQuMzI5MSw4Ny43NEg1OC42NTIzYTYyLjc4NzcsNjIuNzg3NywwLDAsMC0yNC41Njg0LDIwLjc2MjFjLTguMjYwNywxMi4xOTYtNC4zNDM3LDE4LjI0MTUtMTEuNjYzNywzMS42Mzk1QzE2LjUxLDE1MC45Niw4LjA1MSwxNTcuODIsMCwxNjIuNTU2di4wNDM1aDY0LjMyOVoiLz4KICAgICAgICA8cmVjdCBpZD0iX1JlY3RhbmdsZV80IiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIHg9IjY0LjMyOTEiIHk9Ijg3Ljc0MDUiIHdpZHRoPSI2NC4zMjkxIiBoZWlnaHQ9Ijc0Ljg1OSIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNyIgZD0iTTE5Mi45ODcyLDg3Ljc0SDE4My4zNDNhNjIuNzg3Nyw2Mi43ODc3LDAsMCwwLTI0LjU2ODQsMjAuNzYyMWMtOC4yNjA3LDEyLjE5Ni00LjM0MzgsMTguMjQxNS0xMS42NjM3LDMxLjYzOTVhNTYuNzI0Niw1Ni43MjQ2LDAsMCwxLTE4LjQ1MjcsMTkuOTF2Mi41NDc0aDY0LjMyOVoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTgiIHg9IjE5Mi45ODcyIiB5PSI4Ny43NDA1IiB3aWR0aD0iNjQuMzI5MSIgaGVpZ2h0PSI3NC44NTkiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTkiIGQ9Ik0xMjguNjU4MiwxMi44ODE1SDExNi41OUE2MS45NjQ2LDYxLjk2NDYsMCwwLDAsMTAxLjMyMzMsMjguMjE1QzkzLjA2MjUsNDAuNDEwOSw5Ni45Nzk0LDQ2LjQ1NjUsODkuNjYsNTkuODU0NCw4My4wMzE2LDcxLjk4NTcsNzMuMTk3LDc5LjE1MTQsNjQuMzI5MSw4My45MTA4djMuODNoNjQuMzI5MVoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTEwIiB4PSIxMjguNjU4MSIgeT0iMTIuODgxNSIgd2lkdGg9IjY0LjMyOTEiIGhlaWdodD0iNzQuODU5Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy00IiB4PSIxMC4xNjA1IiB5PSI3NC44NTkiIHdpZHRoPSIyNC43NTM2IiBoZWlnaHQ9IjEyLjg4MTUiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjUxLjk1MjMiIHk9Ijc0Ljg1OSIgd2lkdGg9IjI0Ljc1MzYiIGhlaWdodD0iMTIuODgxNSIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iOTMuNzQ0MSIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxMzguODE4NiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxODAuNjEwNCIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIyMjIuNDAyMiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSI3NC40ODk1IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSIxMTYuMjgxNCIgd2lkdGg9IjI0Ljc1MzYiIGhlaWdodD0iMTIuODgxNSIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTU4LjA3MzIiIHdpZHRoPSIyNC43NTM2IiBoZWlnaHQ9IjEyLjg4MTUiLz4KICAgICAgPC9nPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg=='
      title: Atlassian Connect
x-revision: 823a155d590f
