openapi: 3.0.0
info:
  title: Bitbucket
  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.
  contact:
    name: Bitbucket Support
    url: https://support.atlassian.com/bitbucket
    email: support@bitbucket.org
  version: '2.0'
servers:
- url: https://api.bitbucket.org/2.0
  variables: {}
- url: https://bitbucket.org/site/oauth2
  variables: {}
paths:
  /teams/{username}/repositories:
    get:
      tags:
      - users
      - teams
      summary: TeamsRepositoriesByUsername_GET
      description: >-
        All repositories owned by a user/team. This includes private

        repositories, but filtered down to the ones that the calling user has

        access to.
      operationId: TeamsRepositoriesByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /user:
    get:
      tags:
      - users
      summary: User_GET
      description: Returns the currently logged in user.
      operationId: User_GET
      parameters: []
      responses:
        '200':
          description: The current user.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user'
        '401':
          description: When the request wasn't authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - account
  /user/emails:
    get:
      tags:
      - users
      summary: UserEmails_GET
      description: >-
        Returns all the authenticated user's email addresses. Both

        confirmed and unconfirmed.
      operationId: UserEmails_GET
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - email
  /user/emails/{email}:
    get:
      tags:
      - users
      summary: UserEmailsByEmail_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.
      operationId: UserEmailsByEmail_GET
      parameters:
      - name: email
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - email
  /users/{username}:
    get:
      tags:
      - users
      summary: UsersByUsername_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.
      operationId: UsersByUsername_GET
      parameters:
      - name: username
        in: path
        description: The account's username or UUID.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The user object
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user'
        '404':
          description: If no user exists for the specified name or UUID, or if the specified account is a team account, not a personal account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /users/{username}/followers:
    get:
      tags:
      - users
      summary: UsersFollowersByUsername_GET
      description: Returns the list of accounts that are following this team.
      operationId: UsersFollowersByUsername_GET
      parameters:
      - name: username
        in: path
        description: The account's username
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of user objects.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_users'
                - description: A paginated list of users.
        '404':
          description: If no account exists for the specified name, or if the specified account is a team account, not a personal account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /users/{username}/following:
    get:
      tags:
      - users
      summary: UsersFollowingByUsername_GET
      description: Returns the list of accounts this user is following.
      operationId: UsersFollowingByUsername_GET
      parameters:
      - name: username
        in: path
        description: The user's username
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of user objects.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_users'
                - description: A paginated list of users.
        '404':
          description: If no user exists for the specified name, or if the specified account is a team account, not a personal account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - account
  /users/{username}/hooks:
    get:
      tags:
      - users
      - webhooks
      summary: UsersHooksByUsername_GET
      description: Returns a paginated list of webhooks installed on this user account.
      operationId: UsersHooksByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The paginated list of installed webhooks.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_webhook_subscriptions'
                - description: A paginated list of webhook subscriptions
        '403':
          description: If the authenticated user is accessing an account other than their own.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the specified account does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
    post:
      tags:
      - users
      - webhooks
      summary: UsersHooksByUsername_POST
      description: >-
        Creates a new webhook on the specified user account.

        Account-level webhooks are fired for events from all repositories

        belonging to that account.

        Note that one can only register webhooks on one's own account, not that

        of others.
      operationId: UsersHooksByUsername_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '201':
          description: The newly installed webhook.
          headers:
            Location:
              description: The URL of new newly created webhook.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of new newly created webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '403':
          description: If the authenticated user is accessing an account other than their own.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the specified account does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
  /users/{username}/hooks/{uid}:
    delete:
      tags:
      - users
      - webhooks
      summary: UsersHooksByUsernameAndUid_DELETE
      description: >-
        Deletes the specified webhook subscription from the given user

        account.
      operationId: UsersHooksByUsernameAndUid_DELETE
      parameters:
      - name: uid
        in: path
        description: The installed webhook's id
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: When the webhook was deleted successfully
          headers: {}
          content: {}
        '403':
          description: If the authenticated user does not have permission to delete the webhook.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the webhook or user does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
    get:
      tags:
      - users
      - webhooks
      summary: UsersHooksByUsernameAndUid_GET
      description: >-
        Returns the webhook with the specified id installed on the given

        user account.
      operationId: UsersHooksByUsernameAndUid_GET
      parameters:
      - name: uid
        in: path
        description: The installed webhook's id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The webhook subscription object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '404':
          description: If the webhook or user does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
    put:
      tags:
      - users
      - webhooks
      summary: UsersHooksByUsernameAndUid_PUT
      description: >-
        Updates the specified webhook subscription.

        The following properties can be mutated:

        * `description`

        * `url`

        * `active`

        * `events`
      operationId: UsersHooksByUsernameAndUid_PUT
      parameters:
      - name: uid
        in: path
        description: The installed webhook's id
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The webhook subscription object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '403':
          description: If the authenticated user does not have permission to update the webhook.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the webhook or user does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
  /users/{username}/repositories:
    get:
      tags:
      - users
      - teams
      summary: UsersRepositoriesByUsername_GET
      description: >-
        All repositories owned by a user/team. This includes private

        repositories, but filtered down to the ones that the calling user has

        access to.
      operationId: UsersRepositoriesByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /teams:
    get:
      tags:
      - teams
      summary: Teams_GET
      description: >-
        Returns all the teams that the authenticated user is associated

        with.
      operationId: Teams_GET
      parameters:
      - name: role
        in: query
        description: >-
          Filters the teams based on the authenticated user's role on each team.

          * **member**: returns a list of all the teams which the caller is a member of
            at least one team group or repository owned by the team
          * **contributor**: returns a list of teams which the caller has write access
            to at least one repository owned by the team
          * **admin**: returns a list teams which the caller has team administrator access
        style: form
        explode: true
        schema:
          allOf:
          - $ref: '#/components/schemas/role4'
          - description: >-
              Filters the teams based on the authenticated user's role on each team.

              * **member**: returns a list of all the teams which the caller is a member of
                at least one team group or repository owned by the team
              * **contributor**: returns a list of teams which the caller has write access
                to at least one repository owned by the team
              * **admin**: returns a list teams which the caller has team administrator access
      responses:
        '200':
          description: A paginated list of teams.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_teams'
                - description: A paginated list of teams.
        '401':
          description: When the request wasn't authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - team
  /teams/{username}:
    get:
      tags:
      - teams
      summary: TeamsByUsername_GET
      description: >-
        Gets the public information associated with a team.

        If the team's profile is private, `location`, `website` and

        `created_on` elements are omitted.
      operationId: TeamsByUsername_GET
      parameters:
      - name: username
        in: path
        description: The team's username or UUID.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The team object
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/account'
        '404':
          description: If no team exists for the specified name or UUID, or if the specified account is a personal account, not a team account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /teams/{username}/followers:
    get:
      tags:
      - teams
      summary: TeamsFollowersByUsername_GET
      description: Returns the list of accounts that are following this team.
      operationId: TeamsFollowersByUsername_GET
      parameters:
      - name: username
        in: path
        description: The team's username
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of user objects.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_users'
                - description: A paginated list of users.
        '404':
          description: If no team exists for the specified name, or if the specified account is a personal account, not a team account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /teams/{username}/following:
    get:
      tags:
      - teams
      summary: TeamsFollowingByUsername_GET
      description: Returns the list of accounts this team is following.
      operationId: TeamsFollowingByUsername_GET
      parameters:
      - name: username
        in: path
        description: The team's username
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of user objects.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_users'
                - description: A paginated list of users.
        '404':
          description: If no team exists for the specified name, or if the specified account is a personal account, not a team account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - account
  /teams/{username}/hooks:
    get:
      tags:
      - teams
      - webhooks
      summary: TeamsHooksByUsername_GET
      description: Returns a paginated list of webhooks installed on this team.
      operationId: TeamsHooksByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The paginated list of installed webhooks.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_webhook_subscriptions'
                - description: A paginated list of webhook subscriptions
        '403':
          description: If the authenticated user is not an admin on the specified team.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the specified team does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
    post:
      tags:
      - teams
      - webhooks
      summary: TeamsHooksByUsername_POST
      description: >-
        Creates a new webhook on the specified team.

        Team webhooks are fired for events from all repositories belonging to

        that team account.

        Note that only admins can install webhooks on teams.
      operationId: TeamsHooksByUsername_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '201':
          description: The newly installed webhook.
          headers:
            Location:
              description: The URL of new newly created webhook.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of new newly created webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '403':
          description: If the authenticated user is not an admin on the specified team.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the specified team does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
  /teams/{username}/hooks/{uid}:
    delete:
      tags:
      - teams
      - webhooks
      summary: TeamsHooksByUsernameAndUid_DELETE
      description: >-
        Deletes the specified webhook subscription from the given team

        account.
      operationId: TeamsHooksByUsernameAndUid_DELETE
      parameters:
      - name: uid
        in: path
        description: The installed webhook's id
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: When the webhook was deleted successfully
          headers: {}
          content: {}
        '403':
          description: If the authenticated user does not have permission to delete the webhook.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the webhook or team does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
    get:
      tags:
      - teams
      - webhooks
      summary: TeamsHooksByUsernameAndUid_GET
      description: >-
        Returns the webhook with the specified id installed on the given

        team account.
      operationId: TeamsHooksByUsernameAndUid_GET
      parameters:
      - name: uid
        in: path
        description: The installed webhook's id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The webhook subscription object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '404':
          description: If the webhook or team does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
    put:
      tags:
      - teams
      - webhooks
      summary: TeamsHooksByUsernameAndUid_PUT
      description: >-
        Updates the specified webhook subscription.

        The following properties can be mutated:

        * `description`

        * `url`

        * `active`

        * `events`
      operationId: TeamsHooksByUsernameAndUid_PUT
      parameters:
      - name: uid
        in: path
        description: The installed webhook's id
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The webhook subscription object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '403':
          description: If the authenticated user does not have permission to update the webhook.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the webhook or team does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
  /teams/{username}/members:
    get:
      tags:
      - teams
      summary: TeamsMembersByUsername_GET
      description: >-
        All members of a team.

        Returns all members of the specified team. Any member of any of the

        team's groups is considered a member of the team. This includes users

        in groups that may not actually have access to any of the team's

        repositories.

        Note that members using the "private profile" feature are not included.
      operationId: TeamsMembersByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: All members
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/user'
        '404':
          description: When the team does not exist, or multiple teams with the same name exist that differ only in casing and the URL did not match the exact casing of a particular one.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - account
  /repositories:
    get:
      tags:
      - repositories
      summary: 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](../meta/filtering) for more details.
      operationId: Repositories_GET
      parameters:
      - name: after
        in: query
        description: >-
          Filter the results to include only repositories create on or

          after this [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)
           timestamp. Example: `YYYY-MM-DDTHH:mm:ss.sssZ`
        style: form
        explode: true
        schema:
          type: string
      responses:
        '200':
          description: All public repositories.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_repositories'
                - description: A paginated list of repositories.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}:
    get:
      tags:
      - repositories
      summary: RepositoriesByUsername_GET
      description: >-
        Returns a paginated list of all repositories owned by the specified

        account or UUID.

        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](../../meta/filtering) for more details.
      operationId: RepositoriesByUsername_GET
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: role
        in: query
        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
        style: form
        explode: true
        schema:
          allOf:
          - $ref: '#/components/schemas/role1'
          - 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
      responses:
        '200':
          description: The repositories owned by the specified account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_repositories'
                - description: A paginated list of repositories.
        '404':
          description: If the specified account does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}:
    delete:
      tags:
      - repositories
      summary: RepositoriesByUsernameAndRepoSlug_DELETE
      description: >-
        Deletes the repository. This is an irreversible operation.

        This does not affect its forks.
      operationId: RepositoriesByUsernameAndRepoSlug_DELETE
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: Indicates successful deletion.
          headers: {}
          content: {}
        '403':
          description: If the caller either does not have admin access to the repository, or the repository is set to read-only.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:delete
    get:
      tags:
      - repositories
      summary: RepositoriesByUsernameAndRepoSlug_GET
      description: Returns the object describing this repository.
      operationId: RepositoriesByUsernameAndRepoSlug_GET
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The repository object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/repository'
        '403':
          description: If the repository is private and the authenticated user does not have access to it.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If no repository exists at this location.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
    post:
      tags:
      - repositories
      summary: RepositoriesByUsernameAndRepoSlug_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 only be assigned for repositories belonging to a team.

        If the repository owner is a team and the project is not provided, the

        repository is automatically assigned to the oldest project in the team.

        Note: In the examples above, the username `teamsinspace`,

        and/or the repository name `hablanding` can be replaced by UUIDs.
      operationId: RepositoriesByUsernameAndRepoSlug_POST
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        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.
        content:
          application/json:
            schema:
              allOf:
              - $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.
        required: false
      responses:
        '200':
          description: The newly created repository.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/repository'
        '400':
          description: If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '401':
          description: If the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
    put:
      tags:
      - repositories
      summary: RepositoriesByUsernameAndRepoSlug_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.
      operationId: RepositoriesByUsernameAndRepoSlug_PUT
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: >-
          The repository that is to be updated.

          Note that the elements "owner" and "full_name" are ignored since the

          URL implies them.
        content:
          application/json:
            schema:
              allOf:
              - $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.
        required: false
      responses:
        '200':
          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.
              content:
                text/plain:
                  schema:
                    type: string
                    description: >-
                      The location of the repository. This header is only

                      provided when the repository's name is changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/repository'
        '400':
          description: If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '401':
          description: If the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
  /repositories/{username}/{repo_slug}/commit/{node}/statuses:
    get:
      tags:
      - repositories
      - commitstatuses
      summary: RepositoriesCommitNodeStatusesByUsername_GET
      description: Returns all statuses (e.g. build results) for a specific commit.
      operationId: RepositoriesCommitNodeStatusesByUsername_GET
      parameters:
      - name: node
        in: path
        description: The commit's SHA1
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of all commit statuses for this commit.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_commitstatuses'
                - description: A paginated list of commit status objects.
        '401':
          description: If the repository is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the repository or commit does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/commit/{node}/statuses/build:
    post:
      tags:
      - repositories
      - commitstatuses
      summary: RepositoriesCommitNodeStatusesBuild_POST
      description: >-
        Creates a new build status against the specified commit.

        If the specified key already exists, the existing status object will

        be overwritten.

        When creating a new commit status, you can use a URI template for the URL.

        Templates are URLs that contain variable names that Bitbucket will

        evaluate at runtime whenever the URL is displayed anywhere similar to

        parameter substitution in

        [Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html).

        For example, one could use `https://foo.com/builds/{repository.full_name}`

        which Bitbucket will turn into `https://foo.com/builds/foo/bar` at render time.

        The context variables available are `repository` and `commit`.
      operationId: RepositoriesCommitNodeStatusesBuild_POST
      parameters:
      - name: node
        in: path
        description: The commit's SHA1
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '201':
          description: The newly created build status object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commitstatus'
        '401':
          description: If the repository is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the repository, commit, or build status key does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/commit/{node}/statuses/build/{key}:
    get:
      tags:
      - repositories
      - commitstatuses
      summary: RepositoriesCommitNodeStatusesBuildKey_GET
      description: Returns the specified build status for a commit.
      operationId: RepositoriesCommitNodeStatusesBuildKey_GET
      parameters:
      - name: node
        in: path
        description: The commit's SHA1
        required: true
        style: simple
        schema:
          type: string
      - name: key
        in: path
        description: The build status' unique key
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The build status object with the specified key.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commitstatus'
        '401':
          description: If the repository is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the repository, commit, or build status key does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
    put:
      tags:
      - repositories
      - commitstatuses
      summary: RepositoriesCommitNodeStatusesBuildKey_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.
      operationId: RepositoriesCommitNodeStatusesBuildKey_PUT
      parameters:
      - name: node
        in: path
        description: The commit's SHA1
        required: true
        style: simple
        schema:
          type: string
      - name: key
        in: path
        description: The commit status' unique key
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The updated build status object
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/commitstatus'
              - description: The updated build status object
        required: false
      responses:
        '200':
          description: The updated build status object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commitstatus'
        '401':
          description: If the repository is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the repository or build does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/forks:
    get:
      tags:
      - repositories
      summary: RepositoriesForksByUsernameAndRepoSlug_GET
      description: >-
        Returns a paginated list of all the forks of the specified

        repository.
      operationId: RepositoriesForksByUsernameAndRepoSlug_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: All forks.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_repositories'
                - description: A paginated list of repositories.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/hooks:
    get:
      tags:
      - repositories
      - webhooks
      summary: RepositoriesHooksByUsernameAndRepoSlug_GET
      description: Returns a paginated list of webhooks installed on this repository.
      operationId: RepositoriesHooksByUsernameAndRepoSlug_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The paginated list of installed webhooks.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_webhook_subscriptions'
                - description: A paginated list of webhook subscriptions
        '403':
          description: If the authenticated user does not have permission to access the webhooks.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
    post:
      tags:
      - repositories
      - webhooks
      summary: RepositoriesHooksByUsernameAndRepoSlug_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/username/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.
      operationId: RepositoriesHooksByUsernameAndRepoSlug_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '201':
          description: If the webhook was registered successfully.
          headers:
            Location:
              description: The URL of new newly created webhook.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of new newly created webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '403':
          description: If the authenticated user does not have permission to install webhooks on the specified repository.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
  /repositories/{username}/{repo_slug}/hooks/{uid}:
    delete:
      tags:
      - repositories
      - webhooks
      summary: RepositoriesHooksUidByUsername_DELETE
      description: >-
        Deletes the specified webhook subscription from the given

        repository.
      operationId: RepositoriesHooksUidByUsername_DELETE
      parameters:
      - name: uid
        in: path
        description: The installed webhook's id
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: When the webhook was deleted successfully
          headers: {}
          content: {}
        '403':
          description: If the authenticated user does not have permission to delete the webhook.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the webhook or repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
    get:
      tags:
      - repositories
      - webhooks
      summary: RepositoriesHooksUidByUsername_GET
      description: >-
        Returns the webhook with the specified id installed on the specified

        repository.
      operationId: RepositoriesHooksUidByUsername_GET
      parameters:
      - name: uid
        in: path
        description: The installed webhook's id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The webhook subscription object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '404':
          description: If the webhook or repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
    put:
      tags:
      - repositories
      - webhooks
      summary: RepositoriesHooksUidByUsername_PUT
      description: >-
        Updates the specified webhook subscription.

        The following properties can be mutated:

        * `description`

        * `url`

        * `active`

        * `events`
      operationId: RepositoriesHooksUidByUsername_PUT
      parameters:
      - name: uid
        in: path
        description: The installed webhook's id
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The webhook subscription object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/webhook_subscription'
        '403':
          description: If the authenticated user does not have permission to update the webhook.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the webhook or repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - webhook
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/statuses:
    get:
      tags:
      - repositories
      - pullrequests
      - commitstatuses
      summary: RepositoriesPullrequestsPullRequestIdStatuses_GET
      description: >-
        Returns all statuses (e.g. build results) for the given pull

        request.
      operationId: RepositoriesPullrequestsPullRequestIdStatuses_GET
      parameters:
      - name: pull_request_id
        in: path
        description: The pull request's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of all commit statuses for this pull request.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_commitstatuses'
                - description: A paginated list of commit status objects.
        '401':
          description: If the repository is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the specified repository or pull request does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
  /repositories/{username}/{repo_slug}/watchers:
    get:
      tags:
      - repositories
      summary: RepositoriesWatchersByUsername_GET
      description: >-
        Returns a paginated list of all the watchers on the specified

        repository.
      operationId: RepositoriesWatchersByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/src/{node}/{path}:
    get:
      tags:
      - source
      - repositories
      summary: RepositoriesSrcNodePathByUsername_GET
      description: ''
      operationId: RepositoriesSrcNodePathByUsername_GET
      parameters:
      - name: format
        in: query
        description: Instead of returning the file's contents, return the (json) meta data for it.
        style: form
        explode: true
        schema:
          allOf:
          - $ref: '#/components/schemas/format'
          - description: Instead of returning the file's contents, return the (json) meta data for it.
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: node
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: path
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          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).
          headers: {}
          content: {}
        '404':
          description: If the path or commit in the URL does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/refs:
    get:
      tags:
      - refs
      summary: RepositoriesRefsByUsernameAndRepoSlug_GET
      description: ''
      operationId: RepositoriesRefsByUsernameAndRepoSlug_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/refs/branches:
    get:
      tags:
      - refs
      summary: RepositoriesRefsBranchesByUsername_GET
      description: ''
      operationId: RepositoriesRefsBranchesByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/refs/branches/{name}:
    get:
      tags:
      - refs
      summary: RepositoriesRefsBranchesNameByUsername_GET
      description: ''
      operationId: RepositoriesRefsBranchesNameByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: name
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/refs/tags:
    get:
      tags:
      - refs
      summary: RepositoriesRefsTagsByUsername_GET
      description: ''
      operationId: RepositoriesRefsTagsByUsername_GET
      parameters:
      - name: username
        in: path
        description: >-
          The username for the owner of the repository. This can either be the

          `username` of the owner or the `UUID` of the owner (surrounded by

          curly-braces (`{}`)). Owners can be users or teams.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          The repo slug for the repository.  This can either be the `repo_slug` of

          the repository or the `UUID` of the repository (surrounded by

          curly-braces (`{}`))
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
    post:
      tags:
      - refs
      summary: RepositoriesRefsTagsByUsername_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.

        ```

        {
            "name" : "new tag name",
            "target" : {
                "hash" : "target commit hash",
            }
        }

        ```

        This endpoint does support using short hash prefixes for the commit

        hash, but it may return a 400 response if the provided prefix is

        ambiguous. Using a full commit hash is the preferred approach.
      operationId: RepositoriesRefsTagsByUsername_POST
      parameters:
      - name: username
        in: path
        description: >-
          The username for the owner of the repository. This can either be the

          `username` of the owner or the `UUID` of the owner (surrounded by

          curly-braces (`{}`)). Owners can be users or teams.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          The repo slug for the repository.  This can either be the `repo_slug` of

          the repository or the `UUID` of the repository (surrounded by

          curly-braces (`{}`))
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tag'
        required: true
      responses:
        '201':
          description: The newly created tag.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/tag'
                - description: A tag object, representing a tag in a repository.
        '400':
          description: If the target hash is missing, ambiguous, or invalid, or if the name is not provided.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:write
  /repositories/{username}/{repo_slug}/refs/tags/{name}:
    get:
      tags:
      - refs
      summary: RepositoriesRefsTagsNameByUsername_GET
      description: ''
      operationId: RepositoriesRefsTagsNameByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: name
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/commit/{node}/approve:
    delete:
      tags:
      - commits
      summary: RepositoriesCommitNodeApproveByUsername_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.
      operationId: RepositoriesCommitNodeApproveByUsername_DELETE
      parameters:
      - name: node
        in: path
        description: The commit's SHA1.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: An empty response indicating the authenticated user's approval has been withdrawn.
          headers: {}
          content: {}
        '404':
          description: If the specified commit, or the repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:write
    post:
      tags:
      - commits
      summary: RepositoriesCommitNodeApproveByUsername_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.
      operationId: RepositoriesCommitNodeApproveByUsername_POST
      parameters:
      - name: node
        in: path
        description: The commit's SHA1.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The `participant` object recording that the authenticated user approved the commit.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/participant'
        '404':
          description: If the specified commit, or the repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:write
  /repositories/{username}/{repo_slug}/commit/{revision}:
    get:
      tags:
      - commits
      summary: RepositoriesCommitRevisionByUsername_GET
      description: Returns the specified commit.
      operationId: RepositoriesCommitRevisionByUsername_GET
      parameters:
      - name: revision
        in: path
        description: The commit's SHA1.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The commit object
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commit'
        '404':
          description: If the specified commit or repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/commit/{sha}/comments:
    get:
      tags:
      - commits
      summary: RepositoriesCommitShaCommentsByUsername_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.
      operationId: RepositoriesCommitShaCommentsByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: sha
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/commit/{sha}/comments/{comment_id}:
    get:
      tags:
      - commits
      summary: RepositoriesCommitShaCommentsCommentId_GET
      description: Returns the specified commit comment.
      operationId: RepositoriesCommitShaCommentsCommentId_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: sha
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: comment_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/commits:
    get:
      tags:
      - commits
      summary: RepositoriesCommitsByUsernameAndRepoSlug_GET
      description: >-
        These are the repository's commits. They are paginated and returned

        in reverse chronological order, similar to the output of `git log` and

        `hg log`. Like these tools, the DAG can be filtered.

        ## GET /repositories/{username}/{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` and `hg log`).

        ## GET /repositories/{username}/{repo_slug}/commits/master

        Returns all commits on rev `master` (similar to `git log master`,

        `hg log master`).

        ## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master

        Returns all commits on ref `dev`, except those that are reachable on

        `master` (similar to `git log dev ^master`).

        ## GET /repositories/{username}/{repo_slug}/commits/?exclude=master

        Returns all commits in the repo that are not on master

        (similar to `git log --all ^master`).

        ## GET /repositories/{username}/{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`).

        Because the response could include a very large number of commits, it

        is paginated. Follow the 'next' link in the response to navigate to the

        next page of commits. As with other paginated resources, do not

        construct your own links.

        When the include and exclude parameters are more than can fit in a

        query string, clients can use a `x-www-form-urlencoded` POST instead.
      operationId: RepositoriesCommitsByUsernameAndRepoSlug_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
    post:
      tags:
      - commits
      summary: RepositoriesCommitsByUsernameAndRepoSlug_POST
      description: >-
        Identical to `GET /repositories/{username}/{repo_slug}/commits`,

        except that POST allows clients to place the include and exclude

        parameters in the request body to avoid URL length issues.

        **Note that this resource does NOT support new commit creation.**
      operationId: RepositoriesCommitsByUsernameAndRepoSlug_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/commits/{revision}:
    get:
      tags:
      - commits
      summary: RepositoriesCommitsRevisionByUsername_GET
      description: >-
        These are the repository's commits. They are paginated and returned

        in reverse chronological order, similar to the output of `git log` and

        `hg log`. Like these tools, the DAG can be filtered.

        ## GET /repositories/{username}/{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` and `hg log`).

        ## GET /repositories/{username}/{repo_slug}/commits/master

        Returns all commits on rev `master` (similar to `git log master`,

        `hg log master`).

        ## GET /repositories/{username}/{repo_slug}/commits/dev?exclude=master

        Returns all commits on ref `dev`, except those that are reachable on

        `master` (similar to `git log dev ^master`).

        ## GET /repositories/{username}/{repo_slug}/commits/?exclude=master

        Returns all commits in the repo that are not on master

        (similar to `git log --all ^master`).

        ## GET /repositories/{username}/{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`).

        Because the response could include a very large number of commits, it

        is paginated. Follow the 'next' link in the response to navigate to the

        next page of commits. As with other paginated resources, do not

        construct your own links.

        When the include and exclude parameters are more than can fit in a

        query string, clients can use a `x-www-form-urlencoded` POST instead.
      operationId: RepositoriesCommitsRevisionByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: revision
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
    post:
      tags:
      - commits
      summary: RepositoriesCommitsRevisionByUsername_POST
      description: >-
        Identical to `GET /repositories/{username}/{repo_slug}/commits`,

        except that POST allows clients to place the include and exclude

        parameters in the request body to avoid URL length issues.

        **Note that this resource does NOT support new commit creation.**
      operationId: RepositoriesCommitsRevisionByUsername_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: revision
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/diff/{spec}:
    get:
      tags:
      - commits
      summary: RepositoriesDiffSpecByUsername_GET
      description: >-
        Produces a raw, git-style diff for either a single commit (diffed

        against its first parent), or 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 3-way diff, or merge diff,

        is computed. This shows the changes introduced by the left branch

        (`3a8b42` in our example) as compared againt the right branch

        (`9ff173`).

        This is equivalent to merging the left branch into the right branch and

        then computing the diff of the merge commit against its first parent

        (the right branch). This follows the same behavior as pull requests

        that also show this style of 3-way, or merge diff.

        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
        The raw diff is returned as-is, in whatever encoding the files in the

        repository use. It is not decoded into unicode. As such, the

        content-type is `text/plain`.
      operationId: RepositoriesDiffSpecByUsername_GET
      parameters:
      - name: context
        in: query
        description: Generate diffs with <n> lines of context instead of the usual three
        style: form
        explode: true
        schema:
          type: integer
          format: int32
      - name: path
        in: query
        description: Limit the diff to a single file
        style: form
        explode: true
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: spec
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The raw diff
          headers: {}
          content: {}
        '555':
          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.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/patch/{spec}:
    get:
      tags:
      - commits
      summary: RepositoriesPatchSpecByUsername_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). For Mercurial, a single patch is returned that combines

        the changes of all commits on the source branch.

        While similar to diffs, patches:

        * Have a commit header (username, commit message, etc)

        * Do not support the `path=foo/bar.py` query parameter

        The raw patch is returned as-is, in whatever encoding the files in the

        repository use. It is not decoded into unicode. As such, the

        content-type is `text/plain`.
      operationId: RepositoriesPatchSpecByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: spec
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The raw patches
          headers: {}
          content: {}
        '555':
          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.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /repositories/{username}/{repo_slug}/default-reviewers:
    get:
      tags:
      - pullrequests
      summary: RepositoriesDefaultReviewersByUsername_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.
      operationId: RepositoriesDefaultReviewersByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The paginated list of default reviewers
          headers: {}
          content: {}
      deprecated: false
      security:
      - oauth2:
        - repository:admin
  /repositories/{username}/{repo_slug}/default-reviewers/{target_username}:
    delete:
      tags:
      - pullrequests
      summary: RepositoriesDefaultReviewersTargetUsername_DELETE
      description: Removes a default reviewer from the repository.
      operationId: RepositoriesDefaultReviewersTargetUsername_DELETE
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: target_username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
    get:
      tags:
      - pullrequests
      summary: RepositoriesDefaultReviewersTargetUsername_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.
      operationId: RepositoriesDefaultReviewersTargetUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: target_username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
    put:
      tags:
      - pullrequests
      summary: RepositoriesDefaultReviewersTargetUsername_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.
      operationId: RepositoriesDefaultReviewersTargetUsername_PUT
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: target_username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
  /repositories/{username}/{repo_slug}/pullrequests:
    get:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsByUsername_GET
      description: >-
        Returns a paginated list of 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](../../../../meta/filtering) for more details.
      operationId: RepositoriesPullrequestsByUsername_GET
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: state
        in: query
        description: Only return pull requests that are in this state. This parameter can be repeated.
        style: form
        explode: true
        schema:
          allOf:
          - $ref: '#/components/schemas/state3'
          - description: Only return pull requests that are in this state. This parameter can be repeated.
      responses:
        '200':
          description: All pull requests on the specified repository.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_pullrequests'
                - description: A paginated list of pullrequests.
        '401':
          description: If the repository is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the specified repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
    post:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsByUsername_POST
      description: Creates a new pull request.
      operationId: RepositoriesPullrequestsByUsername_POST
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        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.
        content:
          application/json:
            schema:
              allOf:
              - $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.
        required: false
      responses:
        '201':
          description: The newly created pull request.
          headers:
            Location:
              description: The URL of new newly created pull request.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of new newly created pull request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pullrequest'
        '400':
          description: If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '401':
          description: If the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest:write
  /repositories/{username}/{repo_slug}/pullrequests/activity:
    get:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsActivity_GET
      description: >-
        Returns a paginated list of the pull request's activity log.

        This includes comments that were made by the reviewers, updates and

        approvals.
      operationId: RepositoriesPullrequestsActivity_GET
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The pull request activity log
          headers: {}
          content: {}
        '401':
          description: If the repository is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the specified repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}:
    get:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestId_GET
      description: Returns the specified pull request.
      operationId: RepositoriesPullrequestsPullRequestId_GET
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the account,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: The id of the pull request.
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: The pull request object
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pullrequest'
        '401':
          description: If the repository is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the repository or pull request does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
    put:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestId_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.
      operationId: RepositoriesPullrequestsPullRequestId_PUT
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: The id of the open pull request.
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      requestBody:
        description: The pull request that is to be updated.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pullrequest'
              - description: The pull request that is to be updated.
        required: false
      responses:
        '200':
          description: The updated pull request
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pullrequest'
        '400':
          description: If the input document was invalid.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '401':
          description: If the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the repository or pull request id does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest:write
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/activity:
    get:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdActivity_GET
      description: >-
        Returns a paginated list of the pull request's activity log.

        This includes comments that were made by the reviewers, updates and

        approvals.
      operationId: RepositoriesPullrequestsPullRequestIdActivity_GET
      parameters:
      - name: username
        in: path
        description: >-
          This can either be the username or the UUID of the user,

          surrounded by curly-braces, for example: `{user UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: >-
          This can either be the repository slug or the UUID of the repository,

          surrounded by curly-braces, for example: `{repository UUID}`.
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: The id of the pull request.
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: The pull request activity log
          headers: {}
          content: {}
        '401':
          description: If the repository is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the specified repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/approve:
    delete:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdApprove_DELETE
      description: >-
        Redact the authenticated user's approval of the specified pull

        request.
      operationId: RepositoriesPullrequestsPullRequestIdApprove_DELETE
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest:write
    post:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdApprove_POST
      description: Approve the specified pull request as the authenticated user.
      operationId: RepositoriesPullrequestsPullRequestIdApprove_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest:write
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments:
    get:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdComments_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](../../../../../../meta/filtering) for more

        details.
      operationId: RepositoriesPullrequestsPullRequestIdComments_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}:
    get:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdCommentsCommentId_GET
      description: Returns a specific pull request comment.
      operationId: RepositoriesPullrequestsPullRequestIdCommentsCommentId_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: comment_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/commits:
    get:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdCommits_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.
      operationId: RepositoriesPullrequestsPullRequestIdCommits_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/decline:
    post:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdDecline_POST
      description: Declines the pull request.
      operationId: RepositoriesPullrequestsPullRequestIdDecline_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The pull request object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pullrequest'
      deprecated: false
      security:
      - oauth2:
        - pullrequest:write
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/diff:
    get:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdDiff_GET
      description: ''
      operationId: RepositoriesPullrequestsPullRequestIdDiff_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/merge:
    post:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdMerge_POST
      description: Merges the pull request.
      operationId: RepositoriesPullrequestsPullRequestIdMerge_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pullrequest_merge_parameters'
        required: false
      responses:
        '200':
          description: The pull request object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pullrequest'
      deprecated: false
      security:
      - oauth2:
        - pullrequest:write
  /repositories/{username}/{repo_slug}/pullrequests/{pull_request_id}/patch:
    get:
      tags:
      - pullrequests
      summary: RepositoriesPullrequestsPullRequestIdPatch_GET
      description: ''
      operationId: RepositoriesPullrequestsPullRequestIdPatch_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: pull_request_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - pullrequest
  /repositories/{username}/{repo_slug}/components:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesComponentsByUsername_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.
      operationId: RepositoriesComponentsByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The components that have been defined in the issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_components'
                - description: A paginated list of issue tracker components.
        '404':
          description: If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/components/{component_id}:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesComponentsComponentId_GET
      description: Returns the specified issue tracker component object.
      operationId: RepositoriesComponentsComponentId_GET
      parameters:
      - name: component_id
        in: path
        description: The component's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The specified component object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/component'
        '404':
          description: If the specified repository or component does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/issues:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesByUsernameAndRepoSlug_GET
      description: Returns the issues in the issue tracker.
      operationId: RepositoriesIssuesByUsernameAndRepoSlug_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of the issues matching any filter criteria that were provided.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_issues'
                - description: A paginated list of issues.
        '404':
          description: If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
    post:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesByUsernameAndRepoSlug_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 authorisation.

        The authenticated user is used for the issue's `reporter` field.
      operationId: RepositoriesIssuesByUsernameAndRepoSlug_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The new issue. Note that the only required element is `title`. All other elements can be omitted from the body.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/issue'
              - description: The new issue. Note that the only required element is `title`. All other elements can be omitted from the body.
        required: true
      responses:
        '201':
          description: The newly created issue.
          headers:
            Location:
              description: The (absolute) URL of the newly created issue.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The (absolute) URL of the newly created issue.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/issue'
        '401':
          description: When the request wasn't authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: When the authenticated user lacks the privilege to create issues in the issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue:write
  /repositories/{username}/{repo_slug}/issues/{issue_id}:
    delete:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdByUsername_DELETE
      description: >-
        Deletes the specified issue. This requires write access to the

        repository.
      operationId: RepositoriesIssuesIssueIdByUsername_DELETE
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: issue_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The issue object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/issue'
        '403':
          description: When the authenticated user lacks isn't authorized to delete the issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue:write
    get:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdByUsername_GET
      description: Returns the specified issue.
      operationId: RepositoriesIssuesIssueIdByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: issue_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The issue object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/issue'
        '403':
          description: When the authenticated user lacks isn't authorized to access the issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/issues/{issue_id}/attachments:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdAttachments_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.
      operationId: RepositoriesIssuesIssueIdAttachments_GET
      parameters:
      - name: issue_id
        in: path
        description: The issue's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of all attachments for this issue.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_issue_attachments'
                - description: A paginated list of issue attachments.
        '401':
          description: If the issue tracker is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
    post:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdAttachments_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.
      operationId: RepositoriesIssuesIssueIdAttachments_POST
      parameters:
      - name: issue_id
        in: path
        description: The issue's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '201':
          description: An empty response document.
          headers:
            Location:
              description: The URL to the issue's collection of attachments.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL to the issue's collection of attachments.
          content: {}
        '400':
          description: If no files were uploaded, or if the wrong `Content-Type` was used.
          headers: {}
          content: {}
        '401':
          description: If the issue tracker is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue:write
  /repositories/{username}/{repo_slug}/issues/{issue_id}/attachments/{path}:
    delete:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdAttachmentsPath_DELETE
      description: Deletes an attachment.
      operationId: RepositoriesIssuesIssueIdAttachmentsPath_DELETE
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: path
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: issue_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: Indicates that the deletion was successful
          headers: {}
          content: {}
        '401':
          description: If the issue tracker is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the specified repository, issue, or attachment does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue:write
    get:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdAttachmentsPath_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.
      operationId: RepositoriesIssuesIssueIdAttachmentsPath_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: path
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: issue_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        '401':
          description: If the issue tracker is private and the request was not authenticated.
          headers: {}
          content: {}
        '404':
          description: If the specified repository or issue does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/issues/{issue_id}/comments:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdComments_GET
      description: >-
        Returns 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.
      operationId: RepositoriesIssuesIssueIdComments_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: issue_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/issues/{issue_id}/comments/{comment_id}:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdCommentsCommentId_GET
      description: Returns the specified issue comment object.
      operationId: RepositoriesIssuesIssueIdCommentsCommentId_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: comment_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: issue_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/issues/{issue_id}/vote:
    delete:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdVoteByUsername_DELETE
      description: Retract your vote.
      operationId: RepositoriesIssuesIssueIdVoteByUsername_DELETE
      parameters:
      - name: issue_id
        in: path
        description: The issue's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue:write
        - account:write
    get:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdVoteByUsername_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.
      operationId: RepositoriesIssuesIssueIdVoteByUsername_GET
      parameters:
      - name: issue_id
        in: path
        description: The issue's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: If the authenticated user has not voted for this issue.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '401':
          description: When the request wasn't authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          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.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
        - account
    put:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdVoteByUsername_PUT
      description: >-
        Vote for this issue.

        To cast your vote, do an empty PUT. The 204 status code indicates that

        the operation was successful.
      operationId: RepositoriesIssuesIssueIdVoteByUsername_PUT
      parameters:
      - name: issue_id
        in: path
        description: The issue's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: Indicating the authenticated user has cast their vote successfully.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '401':
          description: When the request wasn't authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: When the issue does not exist, the repo does not exist, or when the repos does not have an issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
        - account:write
  /repositories/{username}/{repo_slug}/issues/{issue_id}/watch:
    delete:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdWatchByUsername_DELETE
      description: Stop watching this issue.
      operationId: RepositoriesIssuesIssueIdWatchByUsername_DELETE
      parameters:
      - name: issue_id
        in: path
        description: The issue's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: Indicates that the authenticated user successfully stopped watching this issue.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '401':
          description: When the request wasn't authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the issue or the repo does not exist, or the repository does not have an issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue:write
        - account:write
    get:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdWatchByUsername_GET
      description: >-
        Indicated whether or not the authenticated user is watching this

        issue.
      operationId: RepositoriesIssuesIssueIdWatchByUsername_GET
      parameters:
      - name: issue_id
        in: path
        description: The issue's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: If the authenticated user is watching this issue.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '401':
          description: When the request wasn't authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
        - account
    put:
      tags:
      - issue_tracker
      summary: RepositoriesIssuesIssueIdWatchByUsername_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.
      operationId: RepositoriesIssuesIssueIdWatchByUsername_PUT
      parameters:
      - name: issue_id
        in: path
        description: The issue's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: Indicates that the authenticated user successfully started watching this issue.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '401':
          description: When the request wasn't authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
        - account:write
  /repositories/{username}/{repo_slug}/milestones:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesMilestonesByUsername_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.
      operationId: RepositoriesMilestonesByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The milestones that have been defined in the issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_milestones'
                - description: A paginated list of issue tracker milestones.
        '404':
          description: If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/milestones/{milestone_id}:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesMilestonesMilestoneId_GET
      description: Returns the specified issue tracker milestone object.
      operationId: RepositoriesMilestonesMilestoneId_GET
      parameters:
      - name: milestone_id
        in: path
        description: The milestone's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The specified milestone object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/milestone'
        '404':
          description: If the specified repository or milestone does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/versions:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesVersionsByUsername_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.
      operationId: RepositoriesVersionsByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The versions that have been defined in the issue tracker.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_versions'
                - description: A paginated list of issue tracker versions.
        '404':
          description: If the specified repository does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/versions/{version_id}:
    get:
      tags:
      - issue_tracker
      summary: RepositoriesVersionsVersionIdByUsername_GET
      description: Returns the specified issue tracker version object.
      operationId: RepositoriesVersionsVersionIdByUsername_GET
      parameters:
      - name: version_id
        in: path
        description: The version's id
        required: true
        style: simple
        schema:
          type: integer
          format: int32
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The specified version object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/version'
        '404':
          description: If the specified repository or version does not exist, or if the repository doesn't have the issue tracker enabled.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - issue
  /repositories/{username}/{repo_slug}/downloads:
    get:
      tags:
      - downloads
      summary: RepositoriesDownloadsByUsername_GET
      description: Returns a list of download links associated with the repository.
      operationId: RepositoriesDownloadsByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
    post:
      tags:
      - downloads
      summary: RepositoriesDownloadsByUsername_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.
      operationId: RepositoriesDownloadsByUsername_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:write
  /repositories/{username}/{repo_slug}/downloads/{filename}:
    delete:
      tags:
      - downloads
      summary: RepositoriesDownloadsFilenameByUsername_DELETE
      description: Deletes the specified download artifact from the repository.
      operationId: RepositoriesDownloadsFilenameByUsername_DELETE
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: filename
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:write
    get:
      tags:
      - downloads
      summary: RepositoriesDownloadsFilenameByUsername_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
      operationId: RepositoriesDownloadsFilenameByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: filename
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository
  /snippets:
    get:
      tags:
      - snippets
      summary: Snippets_GET
      description: >-
        Returns all snippets. Like pull requests, repositories and teams, the

        full set of snippets is defined by what the current user has access to.

        This includes all snippets owned by the current user, but also all snippets

        owned by any of the teams 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`: owned by the user, their teams, or watched by the current user

        When no role is specified, all public snippets are returned, as well as all

        privately owned snippets watched or commented on.

        The returned response is a normal paginated JSON list. This endpoint

        only supports `application/json` responses and no

        `multipart/form-data` or `multipart/related`. As a result, it is not

        possible to include the file contents.
      operationId: Snippets_GET
      parameters:
      - name: role
        in: query
        description: Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).
        style: form
        explode: true
        schema:
          allOf:
          - $ref: '#/components/schemas/role2'
          - description: Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).
      responses:
        '200':
          description: A paginated list of snippets.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_snippets'
                - description: A paginated list of snippets.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
    post:
      tags:
      - snippets
      summary: Snippets_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": "hg",
              "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 the owner, creator

        and members of the team in case the snippet is owned by a team). 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 the owner and team members (for team
          snippets) can view it
        To create the snippet under a team account, just append the team name

        to the URL (see `/2.0/snippets/{username}`).
      operationId: Snippets_POST
      parameters: []
      requestBody:
        description: The new snippet object.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/snippet'
              - description: The new snippet object.
        required: true
      responses:
        '201':
          description: The newly created snippet object.
          headers:
            Location:
              description: The URL of the newly created snippet.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of the newly created snippet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/snippet'
        '401':
          description: If the request was not authenticated
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet:write
  /snippets/{username}:
    get:
      tags:
      - snippets
      summary: SnippetsByUsername_GET
      description: >-
        Identical to `/snippets`, except that the result is further filtered

        by the snippet owner and only those that are owned by `{username}` are

        returned.
      operationId: SnippetsByUsername_GET
      parameters:
      - name: role
        in: query
        description: Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).
        style: form
        explode: true
        schema:
          allOf:
          - $ref: '#/components/schemas/role2'
          - description: Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).
      - name: username
        in: path
        description: Limits the result to snippets owned by this user.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of snippets.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_snippets'
                - description: A paginated list of snippets.
        '404':
          description: If the user does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
    post:
      tags:
      - snippets
      summary: SnippetsByUsername_POST
      description: >-
        Identical to `/snippets`, except that the new snippet will be

        created under the account specified in the path parameter `{username}`.
      operationId: SnippetsByUsername_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The new snippet object.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/snippet'
              - description: The new snippet object.
        required: true
      responses:
        '201':
          description: The newly created snippet object.
          headers:
            Location:
              description: The URL of the newly created snippet.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of the newly created snippet.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/snippet'
        '401':
          description: If the request was not authenticated
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If the authenticated user does not have permission to create snippets under the specified account.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet:write
  /snippets/{username}/{encoded_id}:
    delete:
      tags:
      - snippets
      summary: SnippetsByUsernameAndEncodedId_DELETE
      description: Deletes a snippet and returns an empty response.
      operationId: SnippetsByUsernameAndEncodedId_DELETE
      parameters:
      - name: encoded_id
        in: path
        description: The snippet's id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: If the snippet was deleted successfully.
          headers: {}
          content: {}
        '401':
          description: If the snippet is private and the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If authenticated user does not have permission to delete the private snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet:write
    get:
      tags:
      - snippets
      summary: SnippetsByUsernameAndEncodedId_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",
                "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",
                "display_name": "Erik van Zijst",
                "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/users/evzijst"
                  },
                  "html": {
                    "href": "https://bitbucket.org/evzijst"
                  },
                  "avatar": {
                    "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png"
                  }
                }
              }
            }
            --===============1438169132528273974==
            Content-Type: text/plain; charset="us-ascii"
            MIME-Version: 1.0
            Content-Transfer-Encoding: 7bit
            Content-ID: "foo.txt"
            Content-Disposition: attachment; filename="foo.txt"
            foo
            --===============1438169132528273974==
            Content-Type: image/png
            MIME-Version: 1.0
            Content-Transfer-Encoding: base64
            Content-ID: "image.png"
            Content-Disposition: attachment; filename="image.png"
            iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m
            TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB
            cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5
            EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ
            73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN
            AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==
            --===============1438169132528273974==--
        multipart/form-data

        -------------------

        As with creating new snippets, `multipart/form-data` can be used as an

        alternative to `multipart/related`. However, the inherently flat

        structure of form-data means that only basic, root-level properties

        can be returned, while nested elements like `links` are omitted:
            $ curl -H "Accept: multipart/form-data" https://api.bitbucket.org/2.0/snippets/evzijst/kypj
        Response:
            HTTP/1.1 200 OK
            Content-Length: 951
            Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f
            ------------------------------63a4b224c59f
            Content-Disposition: form-data; name="title"
            Content-Type: text/plain; charset="utf-8"
            My snippet
            ------------------------------63a4b224c59f--
            Content-Disposition: attachment; name="file"; filename="foo.txt"
            Content-Type: text/plain
            foo
            ------------------------------63a4b224c59f
            Content-Disposition: attachment; name="file"; filename="image.png"
            Content-Transfer-Encoding: base64
            Content-Type: application/octet-stream
            iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m
            TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB
            cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5
            EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ
            73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN
            AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==
            ------------------------------5957323a6b76--
      operationId: SnippetsByUsernameAndEncodedId_GET
      parameters:
      - name: encoded_id
        in: path
        description: The snippet's id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The snippet object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/snippet'
        '401':
          description: If the snippet is private and the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If authenticated user does not have access to the private snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
    put:
      tags:
      - snippets
      summary: SnippetsByUsernameAndEncodedId_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.
      operationId: SnippetsByUsernameAndEncodedId_PUT
      parameters:
      - name: encoded_id
        in: path
        description: The snippet's id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The updated snippet object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/snippet'
        '401':
          description: If the snippet is private and the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If authenticated user does not have permission to update the private snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet:write
  /snippets/{username}/{encoded_id}/comments:
    get:
      tags:
      - snippets
      summary: SnippetsCommentsByUsernameAndEncodedId_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.
      operationId: SnippetsCommentsByUsernameAndEncodedId_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: encoded_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of snippet comments, ordered by creation date.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_snippet_comments'
                - description: A paginated list of snippet comments.
        '403':
          description: If the authenticated user does not have access to the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
    post:
      tags:
      - snippets
      summary: SnippetsCommentsByUsernameAndEncodedId_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`.
      operationId: SnippetsCommentsByUsernameAndEncodedId_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: encoded_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The contents of the new comment.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/snippet'
              - description: The contents of the new comment.
        required: true
      responses:
        '201':
          description: The newly created comment.
          headers:
            Location:
              description: The URL of the new comment
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of the new comment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/snippet'
        '403':
          description: If the authenticated user does not have access to the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
  /snippets/{username}/{encoded_id}/comments/{comment_id}:
    delete:
      tags:
      - snippets
      summary: SnippetsCommentsCommentIdByUsername_DELETE
      description: >-
        Deletes a snippet comment.

        Comments can only be removed by their author.
      operationId: SnippetsCommentsCommentIdByUsername_DELETE
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: comment_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: encoded_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: Indicates the comment was deleted successfully.
          headers: {}
          content: {}
        '403':
          description: If the authenticated user is not the author of the comment.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the comment or the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
    get:
      tags:
      - snippets
      summary: SnippetsCommentsCommentIdByUsername_GET
      description: Returns the specific snippet comment.
      operationId: SnippetsCommentsCommentIdByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: comment_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: encoded_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The specified comment.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/snippet_comment'
        '403':
          description: If the authenticated user does not have access to the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the comment or snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
    put:
      tags:
      - snippets
      summary: SnippetsCommentsCommentIdByUsername_PUT
      description: >-
        Updates a comment.

        Comments can only be updated by their author.
      operationId: SnippetsCommentsCommentIdByUsername_PUT
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: comment_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: encoded_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The updated comment object.
          headers: {}
          content: {}
        '403':
          description: If the authenticated user does not have access to the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the comment or snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
  /snippets/{username}/{encoded_id}/commits:
    get:
      tags:
      - snippets
      summary: SnippetsCommitsByUsernameAndEncodedId_GET
      description: Returns the changes (commits) made on this snippet.
      operationId: SnippetsCommitsByUsernameAndEncodedId_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: encoded_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The paginated list of snippet commits.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_snippet_commit'
                - description: A paginated list of snippet commits.
        '403':
          description: If the authenticated user does not have access to the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
  /snippets/{username}/{encoded_id}/commits/{revision}:
    get:
      tags:
      - snippets
      summary: SnippetsCommitsRevisionByUsername_GET
      description: ''
      operationId: SnippetsCommitsRevisionByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: encoded_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: revision
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The specified snippet commit.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/snippet_commit'
        '403':
          description: If the authenticated user does not have access to the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the commit or the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
  /snippets/{username}/{encoded_id}/watch:
    delete:
      tags:
      - snippets
      summary: SnippetsWatchByUsernameAndEncodedId_DELETE
      description: >-
        Used to stop watching a specific snippet. Returns 204 (No Content)

        to indicate success.
      operationId: SnippetsWatchByUsernameAndEncodedId_DELETE
      parameters:
      - name: encoded_id
        in: path
        description: The snippet id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: Indicates the user stopped watching the snippet successfully.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_users'
                - description: A paginated list of users.
        '401':
          description: If the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet:write
    get:
      tags:
      - snippets
      summary: SnippetsWatchByUsernameAndEncodedId_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.
      operationId: SnippetsWatchByUsernameAndEncodedId_GET
      parameters:
      - name: encoded_id
        in: path
        description: The snippet id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: If the authenticated user is watching the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_users'
                - description: A paginated list of users.
        '404':
          description: If the snippet does not exist, or if the authenticated user is not watching the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
    put:
      tags:
      - snippets
      summary: SnippetsWatchByUsernameAndEncodedId_PUT
      description: Used to start watching a specific snippet. Returns 204 (No Content).
      operationId: SnippetsWatchByUsernameAndEncodedId_PUT
      parameters:
      - name: encoded_id
        in: path
        description: The snippet id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: Indicates the authenticated user is now watching the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_users'
                - description: A paginated list of users.
        '401':
          description: If the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet:write
  /snippets/{username}/{encoded_id}/watchers:
    get:
      tags:
      - snippets
      summary: SnippetsWatchersByUsernameAndEncodedId_GET
      description: Returns a paginated list of all users watching a specific snippet.
      operationId: SnippetsWatchersByUsernameAndEncodedId_GET
      parameters:
      - name: encoded_id
        in: path
        description: The snippet id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The paginated list of users watching this snippet
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_users'
                - description: A paginated list of users.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: true
      security:
      - oauth2:
        - snippet
  /snippets/{username}/{encoded_id}/{node_id}:
    delete:
      tags:
      - snippets
      summary: SnippetsNodeIdByUsernameAndEncodedId_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.
      operationId: SnippetsNodeIdByUsernameAndEncodedId_DELETE
      parameters:
      - name: encoded_id
        in: path
        description: The snippet's id.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: node_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: If the snippet was deleted successfully.
          headers: {}
          content: {}
        '401':
          description: If the snippet is private and the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If authenticated user does not have permission to delete the private snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '405':
          description: If `{node_id}` is not the latest revision.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet:write
    get:
      tags:
      - snippets
      summary: SnippetsNodeIdByUsernameAndEncodedId_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.
      operationId: SnippetsNodeIdByUsernameAndEncodedId_GET
      parameters:
      - name: encoded_id
        in: path
        description: The snippet's id.
        required: true
        style: simple
        schema:
          type: string
      - name: node_id
        in: path
        description: A commit revision (SHA1).
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The snippet object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/snippet'
        '401':
          description: If the snippet is private and the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If authenticated user does not have access to the private snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet, or the revision does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
    put:
      tags:
      - snippets
      summary: SnippetsNodeIdByUsernameAndEncodedId_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.
      operationId: SnippetsNodeIdByUsernameAndEncodedId_PUT
      parameters:
      - name: encoded_id
        in: path
        description: The snippet's id.
        required: true
        style: simple
        schema:
          type: string
      - name: node_id
        in: path
        description: A commit revision (SHA1).
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The updated snippet object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/snippet'
        '401':
          description: If the snippet is private and the request was not authenticated.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If authenticated user does not have permission to update the private snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet or the revision does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '405':
          description: If `{node_id}` is not the latest revision.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet:write
  /snippets/{username}/{encoded_id}/{node_id}/files/{path}:
    get:
      tags:
      - snippets
      summary: SnippetsNodeIdFilesPathByUsername_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.
      operationId: SnippetsNodeIdFilesPathByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: path
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: node_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: encoded_id
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: Returns the contents of the specified file.
          headers:
            Content-Disposition:
              description: attachment
              content:
                text/plain:
                  schema:
                    type: string
                    description: attachment
          content: {}
        '403':
          description: If the authenticated user does not have access to the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the file or snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
  /snippets/{username}/{encoded_id}/{revision}/diff:
    get:
      tags:
      - snippets
      summary: SnippetsRevisionDiffByUsername_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 and Mercurial do not track this, making it hard for

        Bitbucket to reliably determine this.
      operationId: SnippetsRevisionDiffByUsername_GET
      parameters:
      - name: path
        in: query
        description: When used, only one the diff of the specified file will be returned.
        style: form
        explode: true
        schema:
          type: string
      - name: encoded_id
        in: path
        description: The snippet id.
        required: true
        style: simple
        schema:
          type: string
      - name: revision
        in: path
        description: A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The raw diff contents.
          headers: {}
          content: {}
        '403':
          description: If the authenticated user does not have access to the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
  /snippets/{username}/{encoded_id}/{revision}/patch:
    get:
      tags:
      - snippets
      summary: SnippetsRevisionPatchByUsername_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 and Mercurial do not track this, making it hard for

        Bitbucket to reliably determine this.
      operationId: SnippetsRevisionPatchByUsername_GET
      parameters:
      - name: encoded_id
        in: path
        description: The snippet id.
        required: true
        style: simple
        schema:
          type: string
      - name: revision
        in: path
        description: A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`.
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The raw patch contents.
          headers: {}
          content: {}
        '403':
          description: If the authenticated user does not have access to the snippet.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the snippet does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - snippet
  /hook_events:
    get:
      tags:
      - webhooks
      summary: HookEvents_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"
                    }
                }
            },
            "team": {
                "links": {
                    "events": {
                        "href": "https://api.bitbucket.org/2.0/hook_events/team"
                    }
                }
            },
            "user": {
                "links": {
                    "events": {
                        "href": "https://api.bitbucket.org/2.0/hook_events/user"
                    }
                }
            }
        }

        ```
      operationId: HookEvents_GET
      parameters: []
      responses:
        '200':
          description: A mapping of resource/subject types pointing to their individual event types.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/subject_types'
                - description: The mapping of resource/subject types pointing to their individual event types.
      deprecated: false
  /hook_events/{subject_type}:
    get:
      tags:
      - webhooks
      summary: HookEventsBySubjectType_GET
      description: >-
        Returns a paginated list of all valid webhook events for the

        specified entity.

        This is public data that does not require any scopes or authentication.

        Example:

        NOTE: The following example is a truncated response object for the `team` `subject_type`.

        We return the same structure for the other `subject_type` objects.

        ```

        $ curl https://api.bitbucket.org/2.0/hook_events/team

        {
            "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"
                }
            ]
        }

        ```
      operationId: HookEventsBySubjectType_GET
      parameters:
      - name: subject_type
        in: path
        description: A resource or subject type.
        required: true
        style: simple
        schema:
          allOf:
          - $ref: '#/components/schemas/subject_type1'
          - description: A resource or subject type.
      responses:
        '200':
          description: A paginated list of webhook types available to subscribe on.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_hook_events'
                - description: A paginated list of webhook types available to subscribe on.
        '404':
          description: If an invalid `{subject_type}` value was specified.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/branch-restrictions:
    get:
      tags:
      - branchrestrictions
      summary: RepositoriesBranchRestrictionsByUsername_GET
      description: >-
        Returns a paginated list of all branch restrictions on the

        repository.
      operationId: RepositoriesBranchRestrictionsByUsername_GET
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of branch restrictions
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_branchrestrictions'
                - description: A paginated list of branch restriction rules.
        '401':
          description: If the request was not authenticated
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If the authenticated user does not have admin access to the repository
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the repository does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
    post:
      tags:
      - branchrestrictions
      summary: RepositoriesBranchRestrictionsByUsername_POST
      description: >-
        Creates a new branch restriction rule for a repository.

        `kind` describes what will be restricted. Allowed values are: `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.
        * `force` can not be specified in a Mercurial repository.

        `pattern` is used to determine which branches will be restricted.

        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.

        `users` and `groups` are lists of user names and group names.

        `kind` and `pattern` must be unique within a repository; adding new

        users or groups to an existing restriction should be done via `PUT`.

        Note that branch restrictions with overlapping patterns are allowed,

        but the resulting behavior may be surprising.
      operationId: RepositoriesBranchRestrictionsByUsername_POST
      parameters:
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The new rule
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/branchrestriction'
              - description: The new rule
        required: true
      responses:
        '201':
          description: A paginated list of branch restrictions
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/branchrestriction'
        '401':
          description: If the request was not authenticated
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If the authenticated user does not have admin access to the repository
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the repository does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
  /repositories/{username}/{repo_slug}/branch-restrictions/{id}:
    delete:
      tags:
      - branchrestrictions
      summary: RepositoriesBranchRestrictionsId_DELETE
      description: Deletes an existing branch restriction rule.
      operationId: RepositoriesBranchRestrictionsId_DELETE
      parameters:
      - name: id
        in: path
        description: The restriction rule's id
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: ''
          headers: {}
          content: {}
        '401':
          description: If the request was not authenticated
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If the authenticated user does not have admin access to the repository
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the repository or branch restriction id does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
    get:
      tags:
      - branchrestrictions
      summary: RepositoriesBranchRestrictionsId_GET
      description: Returns a specific branch restriction rule.
      operationId: RepositoriesBranchRestrictionsId_GET
      parameters:
      - name: id
        in: path
        description: The restriction rule's id
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The branch restriction rule
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/branchrestriction'
        '401':
          description: If the request was not authenticated
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If the authenticated user does not have admin access to the repository
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the repository or branch restriction id does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
    put:
      tags:
      - branchrestrictions
      summary: RepositoriesBranchRestrictionsId_PUT
      description: >-
        Updates an existing branch restriction rule.

        Fields not present in the request body are ignored.

        See [`POST`](../../branch-restrictions#post) for details.
      operationId: RepositoriesBranchRestrictionsId_PUT
      parameters:
      - name: id
        in: path
        description: The restriction rule's id
        required: true
        style: simple
        schema:
          type: string
      - name: username
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The new version of the existing rule
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/branchrestriction'
              - description: The new version of the existing rule
        required: true
      responses:
        '200':
          description: The updated branch restriction rule
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/branchrestriction'
        '401':
          description: If the request was not authenticated
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '403':
          description: If the authenticated user does not have admin access to the repository
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: If the repository or branch restriction id does not exist
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - repository:admin
  /teams/{owner}/projects/:
    get:
      tags:
      - projects
      summary: TeamsProjectsByOwner_GET
      description: ''
      operationId: TeamsProjectsByOwner_GET
      parameters:
      - name: owner
        in: path
        description: >-
          The team which owns the project. This can either be the `username` of

          the team or the `UUID` of the team (surrounded by curly-braces (`{}`)).
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: A paginated list of projects that belong to the specified team.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_projects'
                - description: A paginated list of projects
        '403':
          description: The requesting user isn't authorized to read the list of projects for the specified team.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: A team doesn't exist at this location.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - project
    post:
      tags:
      - projects
      summary: TeamsProjectsByOwner_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
        }

        ```
      operationId: TeamsProjectsByOwner_POST
      parameters:
      - name: owner
        in: path
        description: >-
          The team which owns the project. This can either be the `username` of

          the team or the `UUID` of the team (surrounded by curly-braces (`{}`)).
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/project'
        required: true
      responses:
        '201':
          description: A new project has been created.
          headers:
            Location:
              description: The location of the newly created project
              content:
                text/plain:
                  schema:
                    type: string
                    description: The location of the newly created project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/project'
        '403':
          description: The requesting user isn't authorized to create the project.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: A team doesn't exist at this location.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - project:write
  /teams/{owner}/projects/{project_key}:
    delete:
      tags:
      - projects
      summary: TeamsProjectsByOwnerAndProjectKey_DELETE
      description: ''
      operationId: TeamsProjectsByOwnerAndProjectKey_DELETE
      parameters:
      - name: owner
        in: path
        description: >-
          The team which owns the project. This can either be the `username` of

          the team or the `UUID` of the team (surrounded by curly-braces (`{}`)).
        required: true
        style: simple
        schema:
          type: string
      - name: project_key
        in: path
        description: >-
          The project in question. This can either be the actual `key` assigned

          to the project or the `UUID` (surrounded by curly-braces (`{}`)).
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: Successful deletion.
          headers: {}
          content: {}
        '403':
          description: The requesting user isn't authorized to delete the project or the project isn't empty.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: A project isn't hosted at this location.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - project:write
    get:
      tags:
      - projects
      summary: TeamsProjectsByOwnerAndProjectKey_GET
      description: ''
      operationId: TeamsProjectsByOwnerAndProjectKey_GET
      parameters:
      - name: owner
        in: path
        description: >-
          The team which owns the project. This can either be the `username` of

          the team or the `UUID` of the team (surrounded by curly-braces (`{}`)).
        required: true
        style: simple
        schema:
          type: string
      - name: project_key
        in: path
        description: >-
          The project in question. This can either be the actual `key` assigned

          to the project or the `UUID` (surrounded by curly-braces (`{}`)).
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The project object.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/project'
        '403':
          description: The requesting user isn't authorized to access the project.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: A project isn't hosted at this location.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - project
    put:
      tags:
      - projects
      summary: TeamsProjectsByOwnerAndProjectKey_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.
      operationId: TeamsProjectsByOwnerAndProjectKey_PUT
      parameters:
      - name: owner
        in: path
        description: >-
          The team which owns the project. This can either be the `username` of

          the team or the `UUID` of the team (surrounded by curly-braces (`{}`)).
        required: true
        style: simple
        schema:
          type: string
      - name: project_key
        in: path
        description: >-
          The project in question. This can either be the actual `key` assigned

          to the project or the `UUID` (surrounded by curly-braces (`{}`)).
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/project'
        required: true
      responses:
        '200':
          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.
              content:
                text/plain:
                  schema:
                    type: string
                    description: >-
                      The location of the project. This header is only provided

                      when the project key is updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/project'
        '403':
          description: The requesting user isn't authorized to update or create the project.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: A team 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.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
      security:
      - oauth2:
        - project:write
  /repositories/{username}/{repo_slug}/pipelines/:
    get:
      tags:
      - pipelines
      summary: getPipelinesForRepository
      description: Find pipelines
      operationId: getPipelinesForRepository
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The matching pipelines.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_pipelines'
                - description: A paged list of pipelines
      deprecated: false
    post:
      tags:
      - pipelines
      summary: createPipelineForRepository
      description: "Endpoint to create and initiate a pipeline. \nThere 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.\n# Trigger a Pipeline for a branch or tag\nOne way to trigger pipelines is by specifying the reference for which you want to trigger a pipeline (e.g. a branch or tag). \nThe 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 then do a clone of the repository and checkout the latest revision of the specified reference.\n### Example\n```\n$ curl -X POST -is -u username:password \\\n  -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n  -d '\n  {\n    \"target\": {\n      \"ref_type\": \"branch\", \n      \"type\": \"pipeline_ref_target\", \n      \"ref_name\": \"master\"\n    }\n  }'\n```\n# Trigger a Pipeline for a commit on a branch or tag\nYou can initiate a pipeline for a specific commit and in the context of a specified reference (e.g. a branch, tag or bookmark).\nThe 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. \nThe following reference types are supported:\n* `branch` \n* `named_branch`\n* `bookmark` \n * `tag`\n### Example\n```\n$ curl -X POST -is -u username:password \\\n  -H 'Content-Type: application/json' \\\n  https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n  -d '\n  {\n    \"target\": {\n      \"commit\": {\n        \"type\": \"commit\", \n        \"hash\": \"ce5b7431602f7cbba007062eeb55225c6e18e956\"\n      }, \n      \"ref_type\": \"branch\", \n      \"type\": \"pipeline_ref_target\", \n      \"ref_name\": \"master\"\n    }\n  }'\n```\n# Trigger a specific pipeline definition for a commit\nYou can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit. \nIn 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.\n### Example\n```\n$ curl -X POST -is -u username:password \\\n  -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n  {\n     \"target\": {\n      \"commit\": {\n         \"hash\":\"a3c4e02c9a3755eccdc3764e6ea13facdf30f923\",\n         \"type\":\"commit\"\n       },\n        \"selector\": {\n           \"type\":\"custom\",\n              \"pattern\":\"Deploy to production\"\n          },\n        \"type\":\"pipeline_commit_target\"\n   }\n  }'\n```\n# Trigger a specific pipeline definition for a commit on a branch or tag\nYou 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. \nIn 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.\n### Example\n```\n$ curl -X POST -is -u username:password \\\n  -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n  {\n     \"target\": {\n      \"commit\": {\n         \"hash\":\"a3c4e02c9a3755eccdc3764e6ea13facdf30f923\",\n         \"type\":\"commit\"\n       },\n       \"selector\": {\n          \"type\": \"custom\",\n          \"pattern\": \"Deploy to production\"\n       },\n       \"type\": \"pipeline_ref_target\",\n       \"ref_name\": \"master\",\n       \"ref_type\": \"branch\"\n     }\n  }'\n```\n"
      operationId: createPipelineForRepository
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The pipeline to initiate.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline'
              - description: The pipeline to initiate.
        required: true
      responses:
        '201':
          description: The initiated pipeline.
          headers:
            Location:
              description: The URL of the newly created pipeline.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of the newly created pipeline.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline'
        '400':
          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.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: The account or repository was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines/{pipeline_uuid}:
    get:
      tags:
      - pipelines
      summary: getPipelineForRepository
      description: Retrieve a specified pipeline
      operationId: getPipelineForRepository
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: pipeline_uuid
        in: path
        description: The pipeline UUID.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The pipeline.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline'
        '404':
          description: No account, repository or pipeline with the UUID provided exists.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines/{pipeline_uuid}/steps/:
    get:
      tags:
      - pipelines
      summary: getPipelineStepsForRepository
      description: Find steps for the given pipeline.
      operationId: getPipelineStepsForRepository
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: pipeline_uuid
        in: path
        description: The UUID of the pipeline.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The steps.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_pipeline_steps'
                - description: A paged list of pipeline steps.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}:
    get:
      tags:
      - pipelines
      summary: getPipelineStepForRepository
      description: Retrieve a given step of a pipeline.
      operationId: getPipelineStepForRepository
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: pipeline_uuid
        in: path
        description: The UUID of the pipeline.
        required: true
        style: simple
        schema:
          type: string
      - name: step_uuid
        in: path
        description: The UUID of the step.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The step.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_step'
        '404':
          description: No account, repository, pipeline or step with the UUID provided exists for the pipeline with the UUID provided.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log:
    get:
      tags:
      - pipelines
      summary: getPipelineStepLogForRepository
      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:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: pipeline_uuid
        in: path
        description: The UUID of the pipeline.
        required: true
        style: simple
        schema:
          type: string
      - name: step_uuid
        in: path
        description: The UUID of the step.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The raw log file for this pipeline step.
          headers: {}
          content: {}
        '404':
          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.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '416':
          description: The requested range does not exist for requests that specified the [HTTP Range header](https://tools.ietf.org/html/rfc7233#section-3.1).
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline:
    post:
      tags:
      - pipelines
      summary: stopPipeline
      description: Signal the stop of a pipeline and all of its steps that not have completed yet.
      operationId: stopPipeline
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: pipeline_uuid
        in: path
        description: The UUID of the pipeline.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: The pipeline has been signaled to stop.
          headers: {}
          content: {}
        '400':
          description: The specified pipeline has already completed.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '404':
          description: Either the account, repository or pipeline with the given UUID does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines_config:
    get:
      tags:
      - pipelines
      summary: getRepositoryPipelineConfig
      description: Retrieve the repository pipelines configuration.
      operationId: getRepositoryPipelineConfig
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The repository pipelines configuration.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipelines_config'
      deprecated: false
    put:
      tags:
      - pipelines
      summary: updateRepositoryPipelineConfig
      description: Update the pipelines configuration for a repository.
      operationId: updateRepositoryPipelineConfig
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The updated repository pipelines configuration.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipelines_config'
              - description: The updated repository pipelines configuration.
        required: true
      responses:
        '200':
          description: The repository pipelines configuration was updated.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipelines_config'
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines_config/ssh/key_pair:
    delete:
      tags:
      - pipelines
      summary: deleteRepositoryPipelineKeyPair
      description: Delete the repository SSH key pair.
      operationId: deleteRepositoryPipelineKeyPair
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: The SSH key pair was deleted.
          headers: {}
          content: {}
        '404':
          description: The account, repository or SSH key pair was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    get:
      tags:
      - pipelines
      summary: getRepositoryPipelineSshKeyPair
      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:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The SSH key pair.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_ssh_key_pair'
        '404':
          description: The account, repository or SSH key pair was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    put:
      tags:
      - pipelines
      summary: updateRepositoryPipelineKeyPair
      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:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The created or updated SSH key pair.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline_ssh_key_pair'
              - description: The created or updated SSH key pair.
        required: true
      responses:
        '200':
          description: The SSH key pair was created or updated.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_ssh_key_pair'
        '404':
          description: The account, repository or SSH key pair was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines_config/ssh/known_hosts/:
    get:
      tags:
      - pipelines
      summary: getRepositoryPipelineKnownHosts
      description: Find repository level known hosts.
      operationId: getRepositoryPipelineKnownHosts
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The retrieved known hosts.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_pipeline_known_hosts'
                - description: A paged list of known hosts.
      deprecated: false
    post:
      tags:
      - pipelines
      summary: createRepositoryPipelineKnownHost
      description: Create a repository level known host.
      operationId: createRepositoryPipelineKnownHost
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The known host to create.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline_known_host'
              - description: The known host to create.
        required: true
      responses:
        '201':
          description: The known host was created.
          headers:
            Location:
              description: The URL of the newly created pipeline known host.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of the newly created pipeline known host.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_known_host'
        '404':
          description: The account or repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '409':
          description: A known host with the provided hostname already exists.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}:
    delete:
      tags:
      - pipelines
      summary: deleteRepositoryPipelineKnownHost
      description: Delete a repository level known host.
      operationId: deleteRepositoryPipelineKnownHost
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: known_host_uuid
        in: path
        description: The UUID of the known host to delete.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: The known host was deleted.
          headers: {}
          content: {}
        '404':
          description: The account, repository or known host with given UUID was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    get:
      tags:
      - pipelines
      summary: getRepositoryPipelineKnownHost
      description: Retrieve a repository level known host.
      operationId: getRepositoryPipelineKnownHost
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: known_host_uuid
        in: path
        description: The UUID of the known host to retrieve.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The known host.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_known_host'
        '404':
          description: The account, repository or known host with the specified UUID was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    put:
      tags:
      - pipelines
      summary: updateRepositoryPipelineKnownHost
      description: Update a repository level known host.
      operationId: updateRepositoryPipelineKnownHost
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: known_host_uuid
        in: path
        description: The UUID of the known host to update.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The updated known host.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline_known_host'
              - description: The updated known host.
        required: true
      responses:
        '200':
          description: The known host was updated.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_known_host'
        '404':
          description: The account, repository or known host with the given UUID was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines_config/variables/:
    get:
      tags:
      - pipelines
      summary: getRepositoryPipelineVariables
      description: Find repository level variables.
      operationId: getRepositoryPipelineVariables
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The retrieved variables.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_pipeline_variables'
                - description: A paged list of variables.
      deprecated: false
    post:
      tags:
      - pipelines
      summary: createRepositoryPipelineVariable
      description: Create a repository level variable.
      operationId: createRepositoryPipelineVariable
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The variable to create.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline_variable'
              - description: The variable to create.
        required: true
      responses:
        '201':
          description: The variable was created.
          headers:
            Location:
              description: The URL of the newly created pipeline variable.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of the newly created pipeline variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_variable'
        '404':
          description: The account or repository does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '409':
          description: A variable with the provided key already exists.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /repositories/{username}/{repo_slug}/pipelines_config/variables/{variable_uuid}:
    delete:
      tags:
      - pipelines
      summary: deleteRepositoryPipelineVariable
      description: Delete a repository level variable.
      operationId: deleteRepositoryPipelineVariable
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: variable_uuid
        in: path
        description: The UUID of the variable to delete.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: The variable was deleted.
          headers: {}
          content: {}
        '404':
          description: The account, repository or variable with given UUID was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    get:
      tags:
      - pipelines
      summary: getRepositoryPipelineVariable
      description: Retrieve a repository level variable.
      operationId: getRepositoryPipelineVariable
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: variable_uuid
        in: path
        description: The UUID of the variable to retrieve.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The variable.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_variable'
        '404':
          description: The account, repository or variable with the specified UUID was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    put:
      tags:
      - pipelines
      summary: updateRepositoryPipelineVariable
      description: Update a repository level variable.
      operationId: updateRepositoryPipelineVariable
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: repo_slug
        in: path
        description: The repository.
        required: true
        style: simple
        schema:
          type: string
      - name: variable_uuid
        in: path
        description: The UUID of the variable to update.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The updated variable
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline_variable'
              - description: The updated variable
        required: true
      responses:
        '200':
          description: The variable was updated.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_variable'
        '404':
          description: The account, repository or variable with the given UUID was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /teams/{username}/pipelines_config/variables/:
    get:
      tags:
      - pipelines
      summary: getPipelineVariablesForTeam
      description: Find account level variables.
      operationId: getPipelineVariablesForTeam
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The found account level variables.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_pipeline_variables'
                - description: A paged list of variables.
      deprecated: false
    post:
      tags:
      - pipelines
      summary: createPipelineVariableForTeam
      description: Create an account level variable.
      operationId: createPipelineVariableForTeam
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The variable to create.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline_variable'
              - description: The variable to create.
        required: false
      responses:
        '201':
          description: The created variable.
          headers:
            Location:
              description: The URL of the newly created pipeline variable.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of the newly created pipeline variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_variable'
        '404':
          description: The account does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '409':
          description: A variable with the provided key already exists.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /teams/{username}/pipelines_config/variables/{variable_uuid}:
    delete:
      tags:
      - pipelines
      summary: deletePipelineVariableForTeam
      description: Delete a team level variable.
      operationId: deletePipelineVariableForTeam
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: variable_uuid
        in: path
        description: The UUID of the variable to delete.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: The variable was deleted
          headers: {}
          content: {}
        '404':
          description: The account or the variable with the provided UUID does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    get:
      tags:
      - pipelines
      summary: getPipelineVariableForTeam
      description: Retrieve a team level variable.
      operationId: getPipelineVariableForTeam
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: variable_uuid
        in: path
        description: The UUID of the variable to retrieve.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The variable.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_variable'
        '404':
          description: The account or variable with the given UUID was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    put:
      tags:
      - pipelines
      summary: updatePipelineVariableForTeam
      description: Update a team level variable.
      operationId: updatePipelineVariableForTeam
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: variable_uuid
        in: path
        description: The UUID of the variable.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The updated variable.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline_variable'
              - description: The updated variable.
        required: true
      responses:
        '200':
          description: The variable was updated.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_variable'
        '404':
          description: The account or the variable was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /users/{username}/pipelines_config/variables/:
    get:
      tags:
      - pipelines
      summary: getPipelineVariablesForUser
      description: Find user level variables.
      operationId: getPipelineVariablesForUser
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The found user level variables.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/paginated_pipeline_variables'
                - description: A paged list of variables.
      deprecated: false
    post:
      tags:
      - pipelines
      summary: createPipelineVariableForUser
      description: Create a user level variable.
      operationId: createPipelineVariableForUser
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The variable to create.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline_variable'
              - description: The variable to create.
        required: false
      responses:
        '201':
          description: The created variable.
          headers:
            Location:
              description: The URL of the newly created pipeline variable.
              content:
                text/plain:
                  schema:
                    type: string
                    description: The URL of the newly created pipeline variable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_variable'
        '404':
          description: The account does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
        '409':
          description: A variable with the provided key already exists.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /users/{username}/pipelines_config/variables/{variable_uuid}:
    delete:
      tags:
      - pipelines
      summary: deletePipelineVariableForUser
      description: Delete an account level variable.
      operationId: deletePipelineVariableForUser
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: variable_uuid
        in: path
        description: The UUID of the variable to delete.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '204':
          description: The variable was deleted
          headers: {}
          content: {}
        '404':
          description: The account or the variable with the provided UUID does not exist.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    get:
      tags:
      - pipelines
      summary: getPipelineVariableForUser
      description: Retrieve a user level variable.
      operationId: getPipelineVariableForUser
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: variable_uuid
        in: path
        description: The UUID of the variable to retrieve.
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: The variable.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_variable'
        '404':
          description: The account or variable with the given UUID was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    put:
      tags:
      - pipelines
      summary: updatePipelineVariableForUser
      description: Update a user level variable.
      operationId: updatePipelineVariableForUser
      parameters:
      - name: username
        in: path
        description: The account.
        required: true
        style: simple
        schema:
          type: string
      - name: variable_uuid
        in: path
        description: The UUID of the variable.
        required: true
        style: simple
        schema:
          type: string
      requestBody:
        description: The updated variable.
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/pipeline_variable'
              - description: The updated variable.
        required: true
      responses:
        '200':
          description: The variable was updated.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pipeline_variable'
        '404':
          description: The account or the variable was not found.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /addon:
    delete:
      tags:
      - addon
      summary: Addon_DELETE
      description: ''
      operationId: Addon_DELETE
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    put:
      tags:
      - addon
      summary: Addon_PUT
      description: ''
      operationId: Addon_PUT
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /addon/linkers:
    get:
      tags:
      - addon
      summary: AddonLinkers_GET
      description: ''
      operationId: AddonLinkers_GET
      parameters: []
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /addon/linkers/{linker_key}:
    get:
      tags:
      - addon
      summary: AddonLinkersByLinkerKey_GET
      description: ''
      operationId: AddonLinkersByLinkerKey_GET
      parameters:
      - name: linker_key
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /addon/linkers/{linker_key}/values:
    delete:
      tags:
      - addon
      summary: AddonLinkersValuesByLinkerKey_DELETE
      description: ''
      operationId: AddonLinkersValuesByLinkerKey_DELETE
      parameters:
      - name: linker_key
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    get:
      tags:
      - addon
      summary: AddonLinkersValuesByLinkerKey_GET
      description: ''
      operationId: AddonLinkersValuesByLinkerKey_GET
      parameters:
      - name: linker_key
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    post:
      tags:
      - addon
      summary: AddonLinkersValuesByLinkerKey_POST
      description: ''
      operationId: AddonLinkersValuesByLinkerKey_POST
      parameters:
      - name: linker_key
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    put:
      tags:
      - addon
      summary: AddonLinkersValuesByLinkerKey_PUT
      description: ''
      operationId: AddonLinkersValuesByLinkerKey_PUT
      parameters:
      - name: linker_key
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
  /addon/linkers/{linker_key}/values/:
    delete:
      tags:
      - addon
      summary: AddonLinkersValuesByLinkerKey_DELETE1
      description: ''
      operationId: AddonLinkersValuesByLinkerKey_DELETE1
      parameters:
      - name: linker_key
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
    get:
      tags:
      - addon
      summary: AddonLinkersValuesByLinkerKey_GET1
      description: ''
      operationId: AddonLinkersValuesByLinkerKey_GET1
      parameters:
      - name: linker_key
        in: path
        description: ''
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: ''
          headers: {}
          content: {}
        default:
          description: Unexpected error.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/error'
                - 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`.
      deprecated: false
components:
  schemas:
    account:
      title: account
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          created_on:
            type: string
            format: date-time
          display_name:
            type: string
          links:
            $ref: '#/components/schemas/Links'
          username:
            pattern: ^[a-zA-Z0-9_\-]+$
            type: string
          uuid:
            type: string
          website:
            type: string
    author:
      title: author
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          raw:
            type: string
            description: The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket.
          user:
            $ref: '#/components/schemas/account'
    base_commit:
      title: base_commit
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          author:
            $ref: '#/components/schemas/author'
          date:
            type: string
            format: date-time
          hash:
            pattern: '[0-9a-f]{7,}?'
            type: string
          message:
            type: string
          parents:
            minItems: 0
            type: array
            items:
              $ref: '#/components/schemas/base_commit'
            description: ''
    branchrestriction:
      title: branchrestriction
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          groups:
            minItems: 0
            type: array
            items:
              $ref: '#/components/schemas/group'
            description: ''
          id:
            type: integer
            description: The branch restriction status' id.
            format: int32
          kind:
            allOf:
            - $ref: '#/components/schemas/Kind'
            - description: The type of restriction that is being applied
          links:
            $ref: '#/components/schemas/Links2'
          users:
            minItems: 0
            type: array
            items:
              $ref: '#/components/schemas/account'
            description: ''
          value:
            type: integer
            description: 'Value with kind-specific semantics: "require_approvals_to_merge" uses it to require a minimum number of approvals on a PR; "require_passing_builds_to_merge" uses it to require a minimum number of passing builds.'
            format: int32
    commit:
      title: commit
      allOf:
      - $ref: '#/components/schemas/base_commit'
      - type: object
        properties:
          links:
            $ref: '#/components/schemas/Links3'
          participants:
            minItems: 0
            type: array
            items:
              $ref: '#/components/schemas/participant'
            description: ''
          repository:
            $ref: '#/components/schemas/repository'
    commitstatus:
      title: commitstatus
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          created_on:
            type: string
            format: date-time
          description:
            type: string
            description: A description of the build (e.g. "Unit tests in Bamboo")
          key:
            type: string
            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
          links:
            $ref: '#/components/schemas/Links6'
          name:
            type: string
            description: An identifier for the build itself, e.g. BB-DEPLOY-1
          refname:
            type: string
            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).
          state:
            allOf:
            - $ref: '#/components/schemas/State'
            - description: Provides some indication of the status of this commit
          updated_on:
            type: string
            format: date-time
          url:
            type: string
            description: A URL linking back to the vendor or build system, for providing more information about whatever process produced this status. Accepts context variables `repository` and `commit` that Bitbucket will evaluate at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name} which Bitbucket will turn into https://foo.com/builds/foo/bar at render time.
          uuid:
            type: string
            description: The commit status' id.
    component:
      title: component
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          id:
            type: integer
            format: int32
          links:
            $ref: '#/components/schemas/Links2'
          name:
            type: string
    error:
      title: error
      required:
      - type
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error1'
        type:
          type: string
      description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.
    group:
      title: group
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          full_slug:
            type: string
            description: >-
              The concatenation of the owner's username and the group's slug,

              separated with a colon (e.g. `acme:developers`)
          links:
            $ref: '#/components/schemas/Links1'
          members:
            type: integer
            description: The number of members in this group
            format: int32
          name:
            type: string
          owner:
            $ref: '#/components/schemas/account'
          slug:
            type: string
            description: >-
              The "sluggified" version of the group's name. This contains only ASCII

              characters and can therefore be slightly different than the name
    hook_event:
      title: hook_event
      type: object
      properties:
        category:
          type: string
          description: The category this event belongs to.
        description:
          type: string
          description: More detailed description of the webhook event type.
        event:
          allOf:
          - $ref: '#/components/schemas/Event'
          - description: The event identifier.
        label:
          type: string
          description: Summary of the webhook event type.
      description: An event, associated with a resource or subject type.
    issue:
      title: issue
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          assignee:
            $ref: '#/components/schemas/user'
          component:
            $ref: '#/components/schemas/component'
          content:
            $ref: '#/components/schemas/Content'
          created_on:
            type: string
            format: date-time
          edited_on:
            type: string
            format: date-time
          id:
            type: integer
            format: int32
          kind:
            $ref: '#/components/schemas/Kind1'
          links:
            $ref: '#/components/schemas/Links8'
          milestone:
            $ref: '#/components/schemas/milestone'
          priority:
            $ref: '#/components/schemas/Priority'
          reporter:
            $ref: '#/components/schemas/user'
          repository:
            $ref: '#/components/schemas/repository'
          state:
            $ref: '#/components/schemas/State1'
          title:
            type: string
          updated_on:
            type: string
            format: date-time
          version:
            $ref: '#/components/schemas/version'
          votes:
            type: integer
            format: int32
    issue_attachment:
      title: issue_attachment
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          links:
            $ref: '#/components/schemas/Links2'
          name:
            type: string
    milestone:
      title: milestone
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          id:
            type: integer
            format: int32
          links:
            $ref: '#/components/schemas/Links2'
          name:
            type: string
    object:
      title: object
      required:
      - type
      type: object
      properties:
        type:
          type: string
      description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.
      discriminator:
        propertyName: type
        mapping:
          account: account
          author: author
          base_commit: base_commit
          branchrestriction: branchrestriction
          commitstatus: commitstatus
          component: component
          group: group
          issue: issue
          issue_attachment: issue_attachment
          milestone: milestone
          participant: participant
          pipeline: pipeline
          pipeline_commit_target: pipeline_commit_target
          pipeline_error: pipeline_error
          pipeline_known_host: pipeline_known_host
          pipeline_ref_target: pipeline_ref_target
          pipeline_selector: pipeline_selector
          pipeline_ssh_key_pair: pipeline_ssh_key_pair
          pipeline_ssh_public_key: pipeline_ssh_public_key
          pipeline_state_completed: pipeline_state_completed
          pipeline_state_completed_error: pipeline_state_completed_error
          pipeline_state_completed_failed: pipeline_state_completed_failed
          pipeline_state_completed_stopped: pipeline_state_completed_stopped
          pipeline_state_completed_successful: pipeline_state_completed_successful
          pipeline_state_in_progress: pipeline_state_in_progress
          pipeline_state_pending: pipeline_state_pending
          pipeline_step: pipeline_step
          pipeline_step_error: pipeline_step_error
          pipeline_step_state_completed: pipeline_step_state_completed
          pipeline_step_state_completed_error: pipeline_step_state_completed_error
          pipeline_step_state_completed_failed: pipeline_step_state_completed_failed
          pipeline_step_state_completed_stopped: pipeline_step_state_completed_stopped
          pipeline_step_state_completed_successful: pipeline_step_state_completed_successful
          pipeline_step_state_in_progress: pipeline_step_state_in_progress
          pipeline_step_state_pending: pipeline_step_state_pending
          pipeline_variable: pipeline_variable
          pipelines_config: pipelines_config
          project: project
          pullrequest: pullrequest
          repository: repository
          snippet: snippet
          snippet_comment: snippet_comment
          version: version
          webhook_subscription: webhook_subscription
          user: user
          commit: commit
    page:
      title: page
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
    paginated_branchrestrictions:
      title: paginated_branchrestrictions
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/branchrestriction'
          description: ''
      description: A paginated list of branch restriction rules.
    paginated_commitstatuses:
      title: paginated_commitstatuses
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/commitstatus'
          description: ''
      description: A paginated list of commit status objects.
    paginated_components:
      title: paginated_components
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/component'
          description: ''
      description: A paginated list of issue tracker components.
    paginated_hook_events:
      title: paginated_hook_events
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/hook_event'
          description: ''
      description: A paginated list of webhook types available to subscribe on.
    paginated_issue_attachments:
      title: paginated_issue_attachments
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/issue_attachment'
          description: ''
      description: A paginated list of issue attachments.
    paginated_issues:
      title: paginated_issues
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/issue'
          description: ''
      description: A paginated list of issues.
    paginated_milestones:
      title: paginated_milestones
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/milestone'
          description: ''
      description: A paginated list of issue tracker milestones.
    paginated_pipeline_known_hosts:
      title: paginated_pipeline_known_hosts
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/pipeline_known_host'
          description: The values of the current page.
      description: A paged list of known hosts.
    paginated_pipeline_steps:
      title: paginated_pipeline_steps
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/pipeline_step'
          description: The values of the current page.
      description: A paged list of pipeline steps.
    paginated_pipeline_variables:
      title: paginated_pipeline_variables
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/pipeline_variable'
          description: The values of the current page.
      description: A paged list of variables.
    paginated_pipelines:
      title: paginated_pipelines
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/pipeline'
          description: The values of the current page.
      description: A paged list of pipelines
    paginated_projects:
      title: paginated_projects
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/project'
          description: ''
      description: A paginated list of projects
    paginated_pullrequests:
      title: paginated_pullrequests
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/pullrequest'
          description: ''
      description: A paginated list of pullrequests.
    paginated_repositories:
      title: paginated_repositories
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/repository'
          description: ''
      description: A paginated list of repositories.
    paginated_snippet_comments:
      title: paginated_snippet_comments
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/snippet_comment'
          description: ''
      description: A paginated list of snippet comments.
    paginated_snippet_commit:
      title: paginated_snippet_commit
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/snippet_commit'
          description: ''
      description: A paginated list of snippet commits.
    paginated_snippets:
      title: paginated_snippets
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/snippet'
          description: ''
      description: A paginated list of snippets.
    paginated_teams:
      title: paginated_teams
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/account'
          description: ''
      description: A paginated list of teams.
    paginated_users:
      title: paginated_users
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/user'
          description: ''
      description: A paginated list of users.
    paginated_versions:
      title: paginated_versions
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/version'
          description: ''
      description: A paginated list of issue tracker versions.
    paginated_webhook_subscriptions:
      title: paginated_webhook_subscriptions
      type: object
      properties:
        next:
          type: string
          description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.
        page:
          minimum: 1
          type: integer
          description: Page number of the current results. This is an optional element that is not provided in all responses.
          format: int32
        pagelen:
          minimum: 1
          type: integer
          description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.
          format: int32
        previous:
          type: string
          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.
        size:
          minimum: 0
          type: integer
          description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.
          format: int32
        values:
          minItems: 0
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/webhook_subscription'
          description: ''
      description: A paginated list of webhook subscriptions
    participant:
      title: participant
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          approved:
            type: boolean
          role:
            $ref: '#/components/schemas/Role'
          user:
            $ref: '#/components/schemas/user'
    pipeline:
      title: pipeline
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          build_seconds_used:
            type: integer
            description: The number of build seconds used by this pipeline.
            format: int32
          completed_on:
            type: string
            description: The timestamp when the Pipeline was completed. This is not set if the pipeline is still in progress.
            format: date-time
          created_on:
            type: string
            description: The timestamp when the pipeline was created.
            format: date-time
          creator:
            $ref: '#/components/schemas/account'
          repository:
            $ref: '#/components/schemas/repository'
          state:
            $ref: '#/components/schemas/object'
          target:
            $ref: '#/components/schemas/object'
          trigger:
            $ref: '#/components/schemas/object'
          uuid:
            type: string
            description: The UUID identifying the pipeline.
    pipeline_command:
      title: pipeline_command
      type: object
      properties:
        command:
          type: string
          description: The executable command.
        log_range:
          allOf:
          - $ref: '#/components/schemas/pipeline_log_range'
          - description: A reference to a range of bytes in a log file (does not contain the actual bytes).
        name:
          type: string
          description: The name of the command.
      description: An executable pipeline command.
    pipeline_commit_target:
      title: pipeline_commit_target
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          commit:
            $ref: '#/components/schemas/commit'
          selector:
            $ref: '#/components/schemas/pipeline_selector'
    pipeline_error:
      title: pipeline_error
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          key:
            type: string
            description: The error key.
          message:
            type: string
            description: The error message.
    pipeline_image:
      title: pipeline_image
      type: object
      properties:
        email:
          type: string
          description: The email needed to authenticate with the Docker registry. Only required when using a private Docker image.
        name:
          type: string
          description: The name of the image. If the image is hosted on DockerHub the short name can be used, otherwise the fully qualified name is required here.
        password:
          type: string
          description: The password needed to authenticate with the Docker registry. Only required when using a private Docker image.
        username:
          type: string
          description: The username needed to authenticate with the Docker registry. Only required when using a private Docker image.
      description: The definition of a Docker image that can be used for a Bitbucket Pipelines step execution context.
    pipeline_known_host:
      title: pipeline_known_host
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          hostname:
            type: string
            description: The hostname of the known host.
          public_key:
            $ref: '#/components/schemas/pipeline_ssh_public_key'
          uuid:
            type: string
            description: The UUID identifying the known host.
    pipeline_log_range:
      title: pipeline_log_range
      type: object
      properties:
        first_byte_position:
          type: integer
          description: The position of the first byte of the range in the log.
          format: int32
        last_byte_position:
          type: integer
          description: The position of the last byte of the range in the log.
          format: int32
      description: A reference to a range of bytes in a log file (does not contain the actual bytes).
    pipeline_ref_target:
      title: pipeline_ref_target
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          commit:
            $ref: '#/components/schemas/commit'
          ref_name:
            type: string
            description: The name of the reference.
          ref_type:
            allOf:
            - $ref: '#/components/schemas/RefType'
            - description: The type of reference (branch/tag).
          selector:
            $ref: '#/components/schemas/pipeline_selector'
    pipeline_selector:
      title: pipeline_selector
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          pattern:
            type: string
            description: The name of the matching pipeline definition.
          type:
            allOf:
            - $ref: '#/components/schemas/Type'
            - description: The type of selector.
    pipeline_ssh_key_pair:
      title: pipeline_ssh_key_pair
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          private_key:
            type: string
            description: The SSH private key. This value will be empty when retrieving the SSH key pair.
          public_key:
            type: string
            description: The SSH public key.
    pipeline_ssh_public_key:
      title: pipeline_ssh_public_key
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          key:
            type: string
            description: The base64 encoded public key.
          key_type:
            type: string
            description: The type of the public key.
          md5_fingerprint:
            type: string
            description: The MD5 fingerprint of the public key.
          sha256_fingerprint:
            type: string
            description: The SHA-256 fingerprint of the public key.
    pipeline_state_completed:
      title: pipeline_state_completed
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name'
            - description: The name of pipeline state (COMPLETED).
          result:
            $ref: '#/components/schemas/object'
    pipeline_state_completed_error:
      title: pipeline_state_completed_error
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          error:
            $ref: '#/components/schemas/pipeline_error'
          name:
            allOf:
            - $ref: '#/components/schemas/Name1'
            - description: The name of the result (ERROR)
    pipeline_state_completed_failed:
      title: pipeline_state_completed_failed
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name2'
            - description: The name of the failed result (FAILED).
    pipeline_state_completed_stopped:
      title: pipeline_state_completed_stopped
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name3'
            - description: The name of the stopped result (STOPPED).
    pipeline_state_completed_successful:
      title: pipeline_state_completed_successful
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name4'
            - description: The name of the successful result (SUCCESSFUL).
    pipeline_state_in_progress:
      title: pipeline_state_in_progress
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name5'
            - description: The name of pipeline state (IN_PROGRESS).
    pipeline_state_pending:
      title: pipeline_state_pending
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name6'
            - description: The name of pipeline state (PENDING).
    pipeline_step:
      title: pipeline_step
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          completed_on:
            type: string
            description: The timestamp when the step execution was completed. This is not set if the step is still in progress.
            format: date-time
          image:
            allOf:
            - $ref: '#/components/schemas/pipeline_image'
            - description: The definition of a Docker image that can be used for a Bitbucket Pipelines step execution context.
          logByteCount:
            type: integer
            description: The amount of bytes of the log file that is available.
            format: int32
          script_commands:
            type: array
            items:
              $ref: '#/components/schemas/pipeline_command'
            description: The list of build commands. These commands are executed in the build container.
          setup_commands:
            type: array
            items:
              $ref: '#/components/schemas/pipeline_command'
            description: The list of commands that are executed as part of the setup phase of the build. These commands are executed outside the build container.
          started_on:
            type: string
            description: The timestamp when the step execution was started. This is not set when the step hasn't executed yet.
            format: date-time
          state:
            $ref: '#/components/schemas/object'
          uuid:
            type: string
            description: The UUID identifying the step.
    pipeline_step_error:
      title: pipeline_step_error
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          key:
            type: string
            description: The error key.
          message:
            type: string
            description: The error message.
    pipeline_step_state_completed:
      title: pipeline_step_state_completed
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name7'
            - description: The name of pipeline step state (COMPLETED).
          result:
            $ref: '#/components/schemas/object'
    pipeline_step_state_completed_error:
      title: pipeline_step_state_completed_error
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          error:
            $ref: '#/components/schemas/pipeline_step_error'
          name:
            allOf:
            - $ref: '#/components/schemas/Name1'
            - description: The name of the result (ERROR)
    pipeline_step_state_completed_failed:
      title: pipeline_step_state_completed_failed
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name9'
            - description: The name of the result (FAILED)
    pipeline_step_state_completed_stopped:
      title: pipeline_step_state_completed_stopped
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name10'
            - description: The name of the result (STOPPED)
    pipeline_step_state_completed_successful:
      title: pipeline_step_state_completed_successful
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name11'
            - description: The name of the result (SUCCESSFUL)
    pipeline_step_state_in_progress:
      title: pipeline_step_state_in_progress
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name12'
            - description: The name of pipeline step state (IN_PROGRESS).
    pipeline_step_state_pending:
      title: pipeline_step_state_pending
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          name:
            allOf:
            - $ref: '#/components/schemas/Name13'
            - description: The name of pipeline step state (PENDING).
    pipeline_variable:
      title: pipeline_variable
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          key:
            type: string
            description: The unique name of the variable.
          secured:
            type: boolean
            description: If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API.
          uuid:
            type: string
            description: The UUID identifying the variable.
          value:
            type: string
            description: The value of the variable. If the variable is secured, this will be empty.
    pipelines_config:
      title: pipelines_config
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          enabled:
            type: boolean
            description: Whether Pipelines is enabled for the repository.
          repository:
            $ref: '#/components/schemas/repository'
    project:
      title: project
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          created_on:
            type: string
            format: date-time
          description:
            type: string
          is_private:
            type: boolean
            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.
          key:
            type: string
            description: The project's key.
          links:
            $ref: '#/components/schemas/Links5'
          name:
            type: string
            description: The name of the project.
          owner:
            $ref: '#/components/schemas/account'
          updated_on:
            type: string
            format: date-time
          uuid:
            type: string
            description: The project's immutable id.
    pullrequest:
      title: pullrequest
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          author:
            $ref: '#/components/schemas/account'
          close_source_branch:
            type: boolean
            description: A boolean flag indicating if merging the pull request closes the source branch.
          closed_by:
            $ref: '#/components/schemas/account'
          comment_count:
            minimum: 0
            type: integer
            description: The number of comments for a specific pull request.
            format: int32
          created_on:
            type: string
            description: The ISO8601 timestamp the request was created.
            format: date-time
          destination:
            $ref: '#/components/schemas/pullrequest_endpoint'
          id:
            type: integer
            description: The pull request's unique ID. Note that pull request IDs are only unique within their associated repository.
            format: int32
          links:
            $ref: '#/components/schemas/Links12'
          merge_commit:
            $ref: '#/components/schemas/MergeCommit'
          participants:
            type: array
            items:
              $ref: '#/components/schemas/participant'
            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.
          reason:
            type: string
            description: Explains why a pull request was declined. This field is only applicable to pull requests in rejected state.
          reviewers:
            type: array
            items:
              $ref: '#/components/schemas/account'
            description: The list of users that were added as reviewers on this pull request when it was created. For performance reasons, the API only includes this list on a pull request's `self` URL.
          source:
            $ref: '#/components/schemas/pullrequest_endpoint'
          state:
            allOf:
            - $ref: '#/components/schemas/State2'
            - description: The pull request's current status.
          task_count:
            minimum: 0
            type: integer
            description: The number of open tasks for a specific pull request.
            format: int32
          title:
            type: string
            description: Title of the pull request.
          updated_on:
            type: string
            description: The ISO8601 timestamp the request was last updated.
            format: date-time
    pullrequest_endpoint:
      title: pullrequest_endpoint
      type: object
      properties:
        branch:
          $ref: '#/components/schemas/Branch'
        commit:
          $ref: '#/components/schemas/Commit2'
        repository:
          $ref: '#/components/schemas/repository'
    pullrequest_merge_parameters:
      title: pullrequest_merge_parameters
      required:
      - type
      type: object
      properties:
        close_source_branch:
          type: boolean
          description: Whether the source branch should be deleted. If this is not provided, we fallback to the value used when the pull request was created, which defaults to False
        merge_strategy:
          allOf:
          - $ref: '#/components/schemas/MergeStrategy'
          - description: The merge strategy that will be used to merge the pull request.
        message:
          type: string
          description: The commit message that will be used on the resulting commit.
        type:
          type: string
      description: The metadata that describes a pull request merge.
    repository:
      title: repository
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          created_on:
            type: string
            format: date-time
          description:
            type: string
          fork_policy:
            allOf:
            - $ref: '#/components/schemas/ForkPolicy'
            - 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
          full_name:
            type: string
            description: The concatenation of the repository owner's username and the slugified name, e.g. "evzijst/interruptingcow". This is the same string used in Bitbucket URLs.
          has_issues:
            type: boolean
          has_wiki:
            type: boolean
          is_private:
            type: boolean
          language:
            type: string
          links:
            $ref: '#/components/schemas/Links4'
          name:
            type: string
          owner:
            $ref: '#/components/schemas/account'
          parent:
            $ref: '#/components/schemas/repository'
          project:
            $ref: '#/components/schemas/project'
          scm:
            $ref: '#/components/schemas/Scm'
          size:
            type: integer
            format: int32
          updated_on:
            type: string
            format: date-time
          uuid:
            type: string
            description: The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.
    snippet:
      title: snippet
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          created_on:
            type: string
            format: date-time
          creator:
            $ref: '#/components/schemas/account'
          id:
            minimum: 0
            type: integer
            format: int32
          is_private:
            type: boolean
          owner:
            $ref: '#/components/schemas/account'
          scm:
            allOf:
            - $ref: '#/components/schemas/Scm1'
            - description: The DVCS used to store the snippet.
          title:
            type: string
          updated_on:
            type: string
            format: date-time
    snippet_comment:
      title: snippet_comment
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          links:
            $ref: '#/components/schemas/Links1'
          snippet:
            $ref: '#/components/schemas/snippet'
    snippet_commit:
      title: snippet_commit
      type: object
      properties:
        author:
          $ref: '#/components/schemas/author'
        date:
          type: string
          format: date-time
        hash:
          pattern: '[0-9a-f]{7,}?'
          type: string
        message:
          type: string
        parents:
          minItems: 0
          type: array
          items:
            $ref: '#/components/schemas/base_commit'
          description: ''
        links:
          $ref: '#/components/schemas/Links14'
        snippet:
          $ref: '#/components/schemas/snippet'
    subject_types:
      title: subject_types
      type: object
      properties:
        repository:
          $ref: '#/components/schemas/Repository1'
        team:
          $ref: '#/components/schemas/Team'
        user:
          $ref: '#/components/schemas/User1'
      description: The mapping of resource/subject types pointing to their individual event types.
    tag:
      title: tag
      required:
      - type
      type: object
      properties:
        date:
          type: string
          description: The date that the tag was created, if available
          format: date-time
        links:
          $ref: '#/components/schemas/Links15'
        message:
          type: string
          description: The message associated with the tag, if available.
        name:
          type: string
          description: The name of the tag.
        tagger:
          $ref: '#/components/schemas/author'
        target:
          $ref: '#/components/schemas/commit'
        type:
          type: string
      description: A tag object, representing a tag in a repository.
    user:
      title: user
      allOf:
      - $ref: '#/components/schemas/account'
      - type: object
        properties:
          account_id:
            type: string
            description: The user's Atlassian account ID.
          is_staff:
            type: boolean
    version:
      title: version
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          id:
            type: integer
            format: int32
          links:
            $ref: '#/components/schemas/Links2'
          name:
            type: string
    webhook_subscription:
      title: webhook_subscription
      allOf:
      - $ref: '#/components/schemas/object'
      - type: object
        properties:
          active:
            type: boolean
          created_at:
            type: string
            format: date-time
          description:
            type: string
            description: A user-defined description of the webhook.
          events:
            minItems: 1
            uniqueItems: true
            type: array
            items:
              $ref: '#/components/schemas/Event1'
            description: The events this webhook is subscribed to.
          subject:
            allOf:
            - $ref: '#/components/schemas/object'
            - 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`.
          subject_type:
            allOf:
            - $ref: '#/components/schemas/SubjectType'
            - description: The type of entity, which is `repository` in the case of webhook subscriptions on repositories.
          url:
            type: string
            description: The URL events get delivered to.
          uuid:
            type: string
            description: The webhook's id
    Activity:
      title: Activity
      type: object
      properties:
        href:
          type: string
    Approve:
      title: Approve
      type: object
      properties:
        href:
          type: string
    Attachments:
      title: Attachments
      type: object
      properties:
        href:
          type: string
    Avatar:
      title: Avatar
      type: object
      properties:
        href:
          type: string
    Branch:
      title: Branch
      type: object
      properties:
        name:
          type: string
    Clone:
      title: Clone
      type: object
      properties:
        href:
          type: string
    Comments:
      title: Comments
      type: object
      properties:
        href:
          type: string
    Commit1:
      title: Commit1
      type: object
      properties:
        href:
          type: string
    Commit2:
      title: Commit2
      type: object
      properties:
        hash:
          pattern: '[0-9a-f]{7,}?'
          type: string
    Commits:
      title: Commits
      type: object
      properties:
        href:
          type: string
    Content:
      title: Content
      type: object
      properties:
        html:
          type: string
          description: The user's markup rendered as HTML.
        markup:
          allOf:
          - $ref: '#/components/schemas/Markup'
          - description: The type of markup language the content is to be interpreted in.
        raw:
          type: string
          description: The text as it was typed by a user.
    Decline:
      title: Decline
      type: object
      properties:
        href:
          type: string
    Diff:
      title: Diff
      type: object
      properties:
        href:
          type: string
    Downloads:
      title: Downloads
      type: object
      properties:
        href:
          type: string
    Error1:
      title: Error1
      required:
      - message
      type: object
      properties:
        data:
          type: object
          description: Optional structured data that is endpoint-specific.
        detail:
          type: string
        message:
          type: string
    Event:
      title: Event
      enum:
      - pullrequest:unapproved
      - issue:comment_created
      - pullrequest:approved
      - repo:created
      - repo:deleted
      - repo:imported
      - pullrequest:comment_updated
      - issue:updated
      - project:updated
      - pullrequest:comment_created
      - repo:commit_status_updated
      - pullrequest:updated
      - issue:created
      - repo:fork
      - pullrequest:comment_deleted
      - repo:commit_status_created
      - repo:updated
      - pullrequest:rejected
      - pullrequest:fulfilled
      - repo:push
      - pullrequest:created
      - repo:transfer
      - repo:commit_comment_created
      type: string
      description: The event identifier.
    Event1:
      title: Event1
      enum:
      - pullrequest:unapproved
      - issue:comment_created
      - pullrequest:approved
      - repo:created
      - repo:deleted
      - repo:imported
      - pullrequest:comment_updated
      - issue:updated
      - project:updated
      - pullrequest:comment_created
      - repo:commit_status_updated
      - pullrequest:updated
      - issue:created
      - repo:fork
      - pullrequest:comment_deleted
      - repo:commit_status_created
      - repo:updated
      - pullrequest:rejected
      - pullrequest:fulfilled
      - repo:push
      - pullrequest:created
      - repo:transfer
      - repo:commit_comment_created
      type: string
    Events:
      title: Events
      type: object
      properties:
        href:
          type: string
    Followers:
      title: Followers
      type: object
      properties:
        href:
          type: string
    Following:
      title: Following
      type: object
      properties:
        href:
          type: string
    ForkPolicy:
      title: ForkPolicy
      enum:
      - allow_forks
      - no_public_forks
      - no_forks
      type: string
      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
    Forks:
      title: Forks
      type: object
      properties:
        href:
          type: string
    format:
      title: format
      enum:
      - meta
      type: string
    Hooks:
      title: Hooks
      type: object
      properties:
        href:
          type: string
    Html:
      title: Html
      type: object
      properties:
        href:
          type: string
    Kind:
      title: Kind
      enum:
      - require_tasks_to_be_completed
      - require_passing_builds_to_merge
      - force
      - require_all_dependencies_merged
      - push
      - require_approvals_to_merge
      - enforce_merge_checks
      - restrict_merges
      - reset_pullrequest_approvals_on_change
      - delete
      type: string
      description: The type of restriction that is being applied
    Kind1:
      title: Kind1
      enum:
      - bug
      - enhancement
      - proposal
      - task
      type: string
    Links:
      title: Links
      type: object
      properties:
        avatar:
          $ref: '#/components/schemas/Avatar'
        followers:
          $ref: '#/components/schemas/Followers'
        following:
          $ref: '#/components/schemas/Following'
        html:
          $ref: '#/components/schemas/Html'
        repositories:
          $ref: '#/components/schemas/Repositories'
        self:
          $ref: '#/components/schemas/Self'
    Links1:
      title: Links1
      type: object
      properties:
        html:
          $ref: '#/components/schemas/Html'
        self:
          $ref: '#/components/schemas/Self'
    Links2:
      title: Links2
      type: object
      properties:
        self:
          $ref: '#/components/schemas/Self'
    Links3:
      title: Links3
      type: object
      properties:
        approve:
          $ref: '#/components/schemas/Approve'
        comments:
          $ref: '#/components/schemas/Comments'
        diff:
          $ref: '#/components/schemas/Diff'
        html:
          $ref: '#/components/schemas/Html'
        patch:
          $ref: '#/components/schemas/Patch'
        self:
          $ref: '#/components/schemas/Self'
        statuses:
          $ref: '#/components/schemas/Statuses'
    Links4:
      title: Links4
      type: object
      properties:
        avatar:
          $ref: '#/components/schemas/Avatar'
        clone:
          $ref: '#/components/schemas/Clone'
        commits:
          $ref: '#/components/schemas/Commits'
        downloads:
          $ref: '#/components/schemas/Downloads'
        forks:
          $ref: '#/components/schemas/Forks'
        hooks:
          $ref: '#/components/schemas/Hooks'
        html:
          $ref: '#/components/schemas/Html'
        pullrequests:
          $ref: '#/components/schemas/Pullrequests'
        self:
          $ref: '#/components/schemas/Self'
        watchers:
          $ref: '#/components/schemas/Watchers'
    Links5:
      title: Links5
      type: object
      properties:
        avatar:
          $ref: '#/components/schemas/Avatar'
        html:
          $ref: '#/components/schemas/Html'
    Links6:
      title: Links6
      type: object
      properties:
        commit:
          $ref: '#/components/schemas/Commit1'
        self:
          $ref: '#/components/schemas/Self'
    Links8:
      title: Links8
      type: object
      properties:
        attachments:
          $ref: '#/components/schemas/Attachments'
        comments:
          $ref: '#/components/schemas/Comments'
        html:
          $ref: '#/components/schemas/Html'
        self:
          $ref: '#/components/schemas/Self'
        vote:
          $ref: '#/components/schemas/Vote'
        watch:
          $ref: '#/components/schemas/Watch'
    Links12:
      title: Links12
      type: object
      properties:
        activity:
          $ref: '#/components/schemas/Activity'
        approve:
          $ref: '#/components/schemas/Approve'
        comments:
          $ref: '#/components/schemas/Comments'
        commits:
          $ref: '#/components/schemas/Commits'
        decline:
          $ref: '#/components/schemas/Decline'
        diff:
          $ref: '#/components/schemas/Diff'
        html:
          $ref: '#/components/schemas/Html'
        merge:
          $ref: '#/components/schemas/Merge'
        self:
          $ref: '#/components/schemas/Self'
    Links14:
      title: Links14
      type: object
      properties:
        diff:
          $ref: '#/components/schemas/Diff'
        html:
          $ref: '#/components/schemas/Html'
        self:
          $ref: '#/components/schemas/Self'
    Links15:
      title: Links15
      type: object
      properties:
        commits:
          $ref: '#/components/schemas/Commits'
        html:
          $ref: '#/components/schemas/Html'
        self:
          $ref: '#/components/schemas/Self'
    Markup:
      title: Markup
      enum:
      - markdown
      - creole
      type: string
      description: The type of markup language the content is to be interpreted in.
    Merge:
      title: Merge
      type: object
      properties:
        href:
          type: string
    MergeCommit:
      title: MergeCommit
      type: object
      properties:
        hash:
          pattern: '[0-9a-f]{7,}?'
          type: string
    MergeStrategy:
      title: MergeStrategy
      enum:
      - merge_commit
      - squash
      type: string
      description: The merge strategy that will be used to merge the pull request.
    Name:
      title: Name
      enum:
      - COMPLETED
      type: string
      description: The name of pipeline state (COMPLETED).
    Name1:
      title: Name1
      enum:
      - ERROR
      type: string
      description: The name of the result (ERROR)
    Name2:
      title: Name2
      enum:
      - FAILED
      type: string
      description: The name of the failed result (FAILED).
    Name3:
      title: Name3
      enum:
      - STOPPED
      type: string
      description: The name of the stopped result (STOPPED).
    Name4:
      title: Name4
      enum:
      - SUCCESSFUL
      type: string
      description: The name of the successful result (SUCCESSFUL).
    Name5:
      title: Name5
      enum:
      - IN_PROGRESS
      type: string
      description: The name of pipeline state (IN_PROGRESS).
    Name6:
      title: Name6
      enum:
      - PENDING
      type: string
      description: The name of pipeline state (PENDING).
    Name7:
      title: Name7
      enum:
      - COMPLETED
      type: string
      description: The name of pipeline step state (COMPLETED).
    Name9:
      title: Name9
      enum:
      - FAILED
      type: string
      description: The name of the result (FAILED)
    Name10:
      title: Name10
      enum:
      - STOPPED
      type: string
      description: The name of the result (STOPPED)
    Name11:
      title: Name11
      enum:
      - SUCCESSFUL
      type: string
      description: The name of the result (SUCCESSFUL)
    Name12:
      title: Name12
      enum:
      - IN_PROGRESS
      type: string
      description: The name of pipeline step state (IN_PROGRESS).
    Name13:
      title: Name13
      enum:
      - PENDING
      type: string
      description: The name of pipeline step state (PENDING).
    Patch:
      title: Patch
      type: object
      properties:
        href:
          type: string
    Priority:
      title: Priority
      enum:
      - trivial
      - minor
      - major
      - critical
      - blocker
      type: string
    Pullrequests:
      title: Pullrequests
      type: object
      properties:
        href:
          type: string
    RefType:
      title: RefType
      enum:
      - branch
      - tag
      - named_branch
      - bookmark
      type: string
      description: The type of reference (branch/tag).
    Repositories:
      title: Repositories
      type: object
      properties:
        href:
          type: string
    Repository1:
      title: Repository1
      type: object
      properties:
        events:
          $ref: '#/components/schemas/Events'
    Role:
      title: Role
      enum:
      - PARTICIPANT
      - REVIEWER
      type: string
    role1:
      title: role1
      enum:
      - admin
      - contributor
      - member
      - owner
      type: string
    role2:
      title: role2
      enum:
      - owner
      - contributor
      - member
      type: string
    role4:
      title: role4
      enum:
      - admin
      - contributor
      - member
      type: string
    Scm:
      title: Scm
      enum:
      - hg
      - git
      type: string
    Scm1:
      title: Scm1
      enum:
      - hg
      - git
      type: string
      description: The DVCS used to store the snippet.
    Self:
      title: Self
      type: object
      properties:
        href:
          type: string
    State:
      title: State
      enum:
      - SUCCESSFUL
      - FAILED
      - INPROGRESS
      - STOPPED
      type: string
      description: Provides some indication of the status of this commit
    State1:
      title: State1
      enum:
      - new
      - open
      - resolved
      - on hold
      - invalid
      - duplicate
      - wontfix
      - closed
      type: string
    State2:
      title: State2
      enum:
      - MERGED
      - SUPERSEDED
      - OPEN
      - DECLINED
      type: string
      description: The pull request's current status.
    state3:
      title: state3
      enum:
      - MERGED
      - SUPERSEDED
      - OPEN
      - DECLINED
      type: string
    Statuses:
      title: Statuses
      type: object
      properties:
        href:
          type: string
    subject_type1:
      title: subject_type1
      enum:
      - user
      - repository
      - team
      type: string
    SubjectType:
      title: SubjectType
      enum:
      - user
      - repository
      - team
      type: string
      description: The type of entity, which is `repository` in the case of webhook subscriptions on repositories.
    Team:
      title: Team
      type: object
      properties:
        events:
          $ref: '#/components/schemas/Events'
    Type:
      title: Type
      enum:
      - branches
      - tags
      - bookmarks
      - default
      - custom
      type: string
      description: The type of selector.
    User1:
      title: User1
      type: object
      properties:
        events:
          $ref: '#/components/schemas/Events'
    Vote:
      title: Vote
      type: object
      properties:
        href:
          type: string
    Watch:
      title: Watch
      type: object
      properties:
        href:
          type: string
    Watchers:
      title: Watchers
      type: object
      properties:
        href:
          type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.bitbucket.org/2.0/authorize
          tokenUrl: https://api.bitbucket.org/2.0/access_token
          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 team's project settings and read repositories contained within your team's projects
            project:write: Read and modify your team's project settings, and read and transfer repositories within your team's projects
            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
            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
security:
- oauth2: []
tags:
- name: users
  description: ''
- name: teams
  description: ''
- name: repositories
  description: ''
- name: source
  description: >-
    Browse the source code in the repository and
                                  create new commits by uploading.
- name: refs
  description: ''
- name: commits
  description: ''
- name: pullrequests
  description: ''
- name: issue_tracker
  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: wiki
  description: ''
- name: downloads
  description: ''
- name: snippets
  description: ''
- name: webhooks
  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: commitstatuses
  description: >
    Commit statuses provide a way to tag commits with meta data,

    like automated build results.
- name: branchrestrictions
  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 (bookmark) deletion

    * Prevent history re-writes (Git only)
- name: projects
  description: >
    Bitbucket Cloud projects make it easier for teams to focus on

    a goal, product, or process by organizing their repositories.
- name: pipelines
  description: >
    Bitbucket Pipelines brings continuous delivery to Bitbucket

    Cloud, empowering teams with full branching to deployment

    visibility and faster feedback loops.
- name: addon
  description: ''
externalDocs:
  url: https://bitbucket.org/api
