swagger: '2.0' info: title: Bitbucket Addon Pipelines API description: Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework. version: '2.0' termsOfService: https://www.atlassian.com/legal/customer-agreement contact: name: Bitbucket Support url: https://support.atlassian.com/bitbucket-cloud/ email: support@bitbucket.org host: api.bitbucket.org basePath: /2.0 schemes: - https consumes: - application/json produces: - application/json tags: - name: Pipelines description: 'Bitbucket Pipelines brings continuous delivery to Bitbucket Cloud, empowering teams with full branching to deployment visibility and faster feedback loops. ' paths: /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables: get: tags: - Pipelines description: Find deployment environment level variables. summary: List variables for an environment operationId: getDeploymentVariables parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: environment_uuid description: The environment. required: true in: path type: string responses: '200': description: The retrieved deployment variables. schema: $ref: '#/definitions/paginated_deployment_variable' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token post: tags: - Pipelines description: Create a deployment environment level variable. summary: Create a variable for an environment operationId: createDeploymentVariable parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: environment_uuid description: The environment. required: true in: path type: string - name: _body in: body description: The variable to create required: true schema: $ref: '#/definitions/deployment_variable' responses: '201': description: The variable was created. schema: $ref: '#/definitions/deployment_variable' headers: Location: type: string description: The URL of the newly created variable. '404': description: The account, repository, environment or variable with the given UUID was not found. schema: $ref: '#/definitions/error' '409': description: A variable with the provided key already exists. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}: put: tags: - Pipelines description: Update a deployment environment level variable. summary: Update a variable for an environment operationId: updateDeploymentVariable parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: environment_uuid description: The environment. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to update. required: true in: path type: string - name: _body in: body description: The updated deployment variable. required: true schema: $ref: '#/definitions/deployment_variable' responses: '200': description: The deployment variable was updated. schema: $ref: '#/definitions/deployment_variable' '404': description: The account, repository, environment or variable with the given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token delete: tags: - Pipelines description: Delete a deployment environment level variable. summary: Delete a variable for an environment operationId: deleteDeploymentVariable parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: environment_uuid description: The environment. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to delete. required: true in: path type: string responses: '204': description: The variable was deleted. '404': description: The account, repository, environment or variable with given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines: get: tags: - Pipelines summary: List pipelines description: 'Find pipelines in a repository. Note that unlike other endpoints in the Bitbucket API, this endpoint utilizes query parameters to allow filtering and sorting of returned results. See [query parameters](#api-repositories-workspace-repo-slug-pipelines-get-request-Query%20parameters) for specific details. ' operationId: getPipelinesForRepository parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: creator.uuid description: The UUID of the creator of the pipeline to filter by. required: false in: query type: string format: uuid - name: target.ref_type description: The type of the reference to filter by. required: false in: query type: string enum: - BRANCH - TAG - ANNOTATED_TAG - name: target.ref_name description: The reference name to filter by. required: false in: query type: string - name: target.branch description: The name of the branch to filter by. required: false in: query type: string - name: target.commit.hash description: The revision to filter by. required: false in: query type: string - name: target.selector.pattern description: The pipeline pattern to filter by. required: false in: query type: string - name: target.selector.type description: The type of pipeline to filter by. required: false in: query type: string enum: - BRANCH - TAG - CUSTOM - PULLREQUESTS - DEFAULT - name: created_on description: The creation date to filter by. required: false in: query type: string format: date-time - name: trigger_type description: The trigger type to filter by. required: false in: query type: string enum: - PUSH - MANUAL - SCHEDULED - PARENT_STEP - name: status description: The pipeline status to filter by. required: false in: query type: string enum: - PARSING - PENDING - PAUSED - HALTED - BUILDING - ERROR - PASSED - FAILED - STOPPED - UNKNOWN - name: sort description: The attribute name to sort on. required: false in: query type: string enum: - creator.uuid - created_on - run_creation_date - name: page description: The page number of elements to retrieve. required: false in: query type: integer format: int32 minimum: 1 default: 1 - name: pagelen description: The maximum number of results to return. required: false in: query type: integer format: int32 minimum: 1 maximum: 100 default: 10 responses: '200': description: The matching pipelines. schema: $ref: '#/definitions/paginated_pipelines' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token post: tags: - Pipelines summary: Run a pipeline description: "Endpoint to create and initiate a pipeline.\nThere are a number of different options to initiate a pipeline, where the payload of the request will determine which type of pipeline will be instantiated.\n\n## Trigger a pipeline for a branch\n\nOne way to trigger pipelines is by specifying the branch for which you want to trigger a pipeline.\nThe specified branch will be used to determine which pipeline definition from the `bitbucket-pipelines.yml` file will be applied to initiate the pipeline. The pipeline will then do a clone of the repository and checkout the latest revision of the specified branch.\n\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \\\n -d '\n {\n \"target\": {\n \"ref_type\": \"branch\",\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\"\n }\n }'\n```\n\n## Trigger a pipeline for a commit on a branch or tag\n\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.\n\nThe following reference types are supported:\n\n* `branch`\n* `named_branch`\n* `bookmark`\n * `tag`\n\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/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\n## Trigger a specific pipeline definition for a commit\n\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\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/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\n## Trigger a specific pipeline definition for a commit on a branch or tag\n\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\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/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\n## Trigger a custom pipeline with variables\n\nIn addition to triggering a custom pipeline that is defined in your `bitbucket-pipelines.yml` file as shown in the examples above, you can specify variables that will be available for your build. In the request, provide a list of variables, specifying the following for each variable: key, value, and whether it should be secured or not (this field is optional and defaults to not secured).\n\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \\\n -d '\n {\n \"target\": {\n \"type\": \"pipeline_ref_target\",\n \"ref_type\": \"branch\",\n \"ref_name\": \"master\",\n \"selector\": {\n \"type\": \"custom\",\n \"pattern\": \"Deploy to production\"\n }\n },\n \"variables\": [\n {\n \"key\": \"var1key\",\n \"value\": \"var1value\",\n \"secured\": true\n },\n {\n \"key\": \"var2key\",\n \"value\": \"var2value\"\n }\n ]\n }'\n```\n\n## Trigger a pull request pipeline\n\nYou can also initiate a pipeline for a specific pull request.\n\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \\\n -d '\n {\n \"target\": {\n \"type\": \"pipeline_pullrequest_target\",\n \"source\": \"pull-request-branch\",\n \"destination\": \"master\",\n \"destination_commit\": {\n \"hash\": \"9f848b7\"\n },\n \"commit\": {\n \"hash\": \"1a372fc\"\n },\n \"pullrequest\": {\n \"id\": \"3\"\n },\n \"selector\": {\n \"type\": \"pull-requests\",\n \"pattern\": \"**\"\n }\n }\n }'\n```\n\n# On-demand pipeline\n\nBy default, pipelines run using the YAML in the repository’s `bitbucket-pipelines.yml` configuration file.\nWith an _on-demand_ pipeline, you include the pipeline’s YAML in the request body. That YAML applies only\nto that run and overrides the YAML in `bitbucket-pipelines.yml`.\n\nJust like with regular pipelines, there is a number of different options to initiate an on-demand pipeline.\nHowever, since the payload contains YAML configuration in this case, _query parameters_ are used to supply\nthe necessary metadata to determine which type of pipeline will be instantiated. These query parameters\nare derived from the JSON equivalent by turning each property into a key-value pair with the JSON path\nof the property as the new key.\n\n## Trigger on-demand pipeline for a branch\n\nYou can initiate an on-demand pipeline for a specific branch. This branch will be used to determine\nwhich pipeline definition from the supplied YAML configuration will be applied to initiate the pipeline.\nThe pipeline will then do a clone of the repository and check out the latest revision of the specified branch.\n\nTo trigger an on-demand pipeline for a _branch_ the requesting user must have **write permission** for\nthat branch (which can be limited by [branch restrictions](https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/)).\n\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/yaml' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines?target.type=pipeline_ref_target&target.ref_type=branch&target.ref_name=master \\\n -d '\npipelines:\n default:\n - step:\n script:\n - echo This is an on-demand pipeline'\n```\n\n## Trigger on-demand pipeline for a commit on a branch or tag\n\nYou can initiate an on-demand pipeline for a specific commit and in the context of a specified reference\n(branch or tag). The specified reference will be used to determine which pipeline definition from the supplied\nYAML configuration will be applied to initiate the pipeline. The pipeline will clone the repository and\ncheck out the specified reference.\n\nTo trigger an on-demand pipeline for a _branch_ the requesting user must have **write permission** for\nthat branch (which can be limited by [branch restrictions](https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/)).\n\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/yaml' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines?target.type=pipeline_ref_target&target.ref_type=branch&target.ref_name=master&target.commit.hash=ce5b7431602f7cbba007062eeb55225c6e18e956 \\\n -d '\npipelines:\n default:\n - step:\n script:\n - echo This is an on-demand pipeline'\n```\n\n## Trigger a specific on-demand pipeline definition for a commit\n\nYou can trigger a specific pipeline that is defined in the supplied YAML configuration for a specific commit.\nIn addition to the commit revision, you specify the type and pattern of the selector that identifies\nthe pipeline definition. The resulting pipeline will then clone the repository and checkout the specified revision.\n\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/yaml' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines?target.type=pipeline_commit_target&target.commit.hash=a3c4e02c9a3755eccdc3764e6ea13facdf30f923&target.selector.type=custom&target.selector.pattern=security-scan \\\n -d '\npipelines:\n custom:\n security-scan:\n - step:\n script:\n - echo Run on-demand security scan\n```\n\n## Trigger a custom on-demand pipeline with variables\n\nIn addition to triggering a custom on-demand pipeline that is defined in the supplied YAML configuration\nas shown in the examples above, you can specify variables that will be available for your build.\nIn the request, provide each variable as an indexed set of query parameters representing its key, value,\nand whether it should be secured or not (this field is optional and defaults to not secured).\n\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/yaml' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines?target.type=pipeline_ref_target&target.ref_type=branch&target.ref_name=master&target.selector.type=custom&target.selector.pattern=security-scan&variables[0].key=var1key&variables[0].value=var1value&variables[0].secured=true&variables[1].key=var2key&variables[1].value=var2value \\\n -d '\npipelines:\n custom:\n security-scan:\n - variables:\n - name: var1key\n - name: var2key\n - step:\n script:\n - echo Run on-demand security scan'\n```\n\n## Trigger a pull request pipeline\n\nYou can also initiate an on-demand pipeline for a specific pull request.\n\n### Example\n\n```\n$ curl -X POST -is -u '{atlassian_account_email}:{api_token}' \\\n -H 'Content-Type: application/yaml' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines?target.type=pipeline_pullrequest_target&target.source=pull-request-branch&target.destination=destination&target.destination_commit.hash=9f848b7&target.commit.hash=1a372fc&target.pullrequest.id=3&target.selector.type=pull-requests&target.selector.pattern=** \\\n -d '\npipelines:\n pull-requests:\n \"**\":\n - step:\n script:\n - echo This is an on-demand pipeline'\n```\n" operationId: createPipelineForRepository parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: _body in: body description: The pipeline to initiate. required: true schema: $ref: '#/definitions/pipeline' responses: '201': description: The initiated pipeline. schema: $ref: '#/definitions/pipeline' headers: Location: type: string description: The URL of the newly created 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. schema: $ref: '#/definitions/error' '404': description: The account or repository was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket - write:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines-config/caches: get: tags: - Pipelines summary: List caches description: Retrieve the repository pipelines caches. operationId: getRepositoryPipelineCaches parameters: - name: workspace description: The account. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string responses: '200': description: The list of caches for the given repository. schema: $ref: '#/definitions/paginated_pipeline_caches' '404': description: The account or repository was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token delete: tags: - Pipelines summary: Delete caches description: Delete repository cache versions by name. operationId: deleteRepositoryPipelineCaches parameters: - name: workspace description: The account. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: name description: The cache name. required: true in: query type: string responses: '204': description: The caches were deleted. '404': description: The workspace, repository or cache name was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}: delete: tags: - Pipelines summary: Delete a cache description: Delete a repository cache. operationId: deleteRepositoryPipelineCache parameters: - name: workspace description: The account. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: cache_uuid description: The UUID of the cache to delete. required: true in: path type: string responses: '204': description: The cache was deleted. '404': description: The workspace, repository or cache_uuid with given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri: get: tags: - Pipelines summary: Get cache content URI description: Retrieve the URI of the content of the specified cache. operationId: getRepositoryPipelineCacheContentURI parameters: - name: workspace description: The account. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: cache_uuid description: The UUID of the cache. required: true in: path type: string responses: '200': description: The cache content uri. schema: $ref: '#/definitions/pipeline_cache_content_uri' '404': description: The workspace, repository or cache_uuid with given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines-config/runners: get: tags: - Pipelines summary: Get repository runners description: Retrieve repository runners. operationId: getRepositoryRunners produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string responses: '200': description: The repository runners. schema: $ref: '#/definitions/paginated_pipeline_runners' security: - oauth2: - runner - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token post: tags: - Pipelines summary: Create repository runner description: Create repository runner. operationId: createRepositoryRunner produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string responses: '200': description: The repository runner. schema: $ref: '#/definitions/pipeline_runner' '400': description: The request body contained invalid properties or runner limit exceeded. schema: $ref: '#/definitions/error' '409': description: The repository runner with the provided UUID already exists. schema: $ref: '#/definitions/error' security: - oauth2: - runner:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:runner:bitbucket - read:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines-config/runners/{runner_uuid}: get: tags: - Pipelines summary: Get repository runner description: Retrieve repository runner by uuid. operationId: getRepositoryRunner produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: runner_uuid description: The runner uuid. required: true in: path type: string responses: '200': description: The repository runner. schema: $ref: '#/definitions/pipeline_runner' '404': description: The repository runner was not found. schema: $ref: '#/definitions/error' security: - oauth2: - runner - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token put: tags: - Pipelines summary: Update repository runner description: Update repository runner. operationId: updateRepositoryRunner produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: runner_uuid description: The runner uuid. required: true in: path type: string responses: '200': description: The repository runner. schema: $ref: '#/definitions/pipeline_runner' '404': description: The repository runner was not found. schema: $ref: '#/definitions/error' security: - oauth2: - runner:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:runner:bitbucket - write:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token delete: tags: - Pipelines summary: Delete repository runner description: Delete repository runner by uuid. operationId: deleteRepositoryRunner produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: runner_uuid description: The runner uuid. required: true in: path type: string responses: '204': description: The repository runner was deleted. '404': description: The repository runner was not found. schema: $ref: '#/definitions/error' security: - oauth2: - runner:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}: get: tags: - Pipelines summary: Get a pipeline description: Retrieve a specified pipeline operationId: getPipelineForRepository parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: pipeline_uuid description: The pipeline UUID. required: true in: path type: string responses: '200': description: The pipeline. schema: $ref: '#/definitions/pipeline' '404': description: No account, repository or pipeline with the UUID provided exists. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps: get: tags: - Pipelines summary: List steps for a pipeline description: Find steps for the given pipeline. operationId: getPipelineStepsForRepository parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: pipeline_uuid description: The UUID of the pipeline. required: true in: path type: string responses: '200': description: The steps. schema: $ref: '#/definitions/paginated_pipeline_steps' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}: get: tags: - Pipelines summary: Get a step of a pipeline description: Retrieve a given step of a pipeline. operationId: getPipelineStepForRepository parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: pipeline_uuid description: The UUID of the pipeline. required: true in: path type: string - name: step_uuid description: The UUID of the step. required: true in: path type: string responses: '200': description: The step. schema: $ref: '#/definitions/pipeline_step' '404': description: No account, repository, pipeline or step with the UUID provided exists for the pipeline with the UUID provided. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log: get: tags: - Pipelines summary: Get log file for a step 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: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: pipeline_uuid description: The UUID of the pipeline. required: true in: path type: string - name: step_uuid description: The UUID of the step. required: true in: path type: string produces: - application/octet-stream responses: '200': description: The raw log file for this pipeline step. '304': description: The log has the same etag as the provided If-None-Match header. schema: $ref: '#/definitions/error' '307': description: After the step is completed, the log is moved to long term storage and a redirection to the log file is returned. '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. schema: $ref: '#/definitions/error' '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). schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}: get: tags: - Pipelines summary: Get the logs for the build container or a service container for a given step of a pipeline. description: 'Retrieve the log file for a build container or service container. This endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.' operationId: getPipelineContainerLog parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: pipeline_uuid description: The UUID of the pipeline. required: true in: path type: string - name: step_uuid description: The UUID of the step. required: true in: path type: string - name: log_uuid description: For the main build container specify the step UUID; for a service container specify the service container UUID required: true in: path type: string produces: - application/octet-stream responses: '200': description: The raw log file for the build container or service container. '307': description: After the step is completed, the log is moved to long term storage and a redirection to the log file is returned. '404': description: No account, repository, pipeline, step or log exist for the provided path. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports: get: tags: - Pipelines summary: Get a summary of test reports for a given step of a pipeline. operationId: getPipelineTestReports parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: pipeline_uuid description: The UUID of the pipeline. required: true in: path type: string - name: step_uuid description: The UUID of the step. required: true in: path type: string produces: - application/json responses: '200': description: A summary of test reports for this pipeline step. '404': description: No account, repository, pipeline, step or test reports exist for the provided path. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases: get: tags: - Pipelines summary: Get test cases for a given step of a pipeline. operationId: getPipelineTestReportTestCases parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: pipeline_uuid description: The UUID of the pipeline. required: true in: path type: string - name: step_uuid description: The UUID of the step. required: true in: path type: string produces: - application/json responses: '200': description: Test cases for this pipeline step. '404': description: No account, repository, pipeline, step or test reports exist for the provided path. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token ? /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons : get: tags: - Pipelines summary: Get test case reasons (output) for a given test case in a step of a pipeline. operationId: getPipelineTestReportTestCaseReasons parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: pipeline_uuid description: The UUID of the pipeline. required: true in: path type: string - name: step_uuid description: The UUID of the step. required: true in: path type: string - name: test_case_uuid description: The UUID of the test case. required: true in: path type: string produces: - application/json responses: '200': description: Test case reasons (output). '404': description: No account, repository, pipeline, step or test case with the UUID provided exists for the pipeline with the UUID provided. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline: post: tags: - Pipelines summary: Stop a pipeline description: Signal the stop of a pipeline and all of its steps that not have completed yet. operationId: stopPipeline parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: pipeline_uuid description: The UUID of the pipeline. required: true in: path type: string responses: '204': description: The pipeline has been signaled to stop. '404': description: Either the account, repository or pipeline with the given UUID does not exist. schema: $ref: '#/definitions/error' '400': description: The specified pipeline has already completed. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config: get: tags: - Pipelines summary: Get configuration description: Retrieve the repository pipelines configuration. operationId: getRepositoryPipelineConfig parameters: - name: workspace description: The account. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string responses: '200': description: The repository pipelines configuration. schema: $ref: '#/definitions/pipelines_config' security: - oauth2: - repository:admin - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:repository:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token put: tags: - Pipelines summary: Update configuration description: Update the pipelines configuration for a repository. operationId: updateRepositoryPipelineConfig parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: _body description: The updated repository pipelines configuration. in: body required: true schema: $ref: '#/definitions/pipelines_config' responses: '200': description: The repository pipelines configuration was updated. schema: $ref: '#/definitions/pipelines_config' security: - oauth2: - repository:admin - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:repository:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config/build_number: put: tags: - Pipelines summary: Update the next build number description: Update the next build number that should be assigned to a pipeline. The next build number that will be configured has to be strictly higher than the current latest build number for this repository. operationId: updateRepositoryBuildNumber parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: _body in: body description: The build number to update. required: true schema: $ref: '#/definitions/pipeline_build_number' responses: '200': description: The build number has been configured. schema: $ref: '#/definitions/pipeline_build_number' '404': description: The account or repository was not found. schema: $ref: '#/definitions/error' '400': description: The update failed because the next number was invalid (it should be higher than the current number). schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config/schedules: post: tags: - Pipelines summary: Create a schedule description: Create a schedule for the given repository. operationId: createRepositoryPipelineSchedule parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: _body in: body description: The schedule to create. required: true schema: $ref: '#/definitions/pipeline_schedule_post_request_body' responses: '201': description: The created schedule. schema: $ref: '#/definitions/pipeline_schedule' headers: Location: type: string description: The URL of the newly created schedule. '400': description: There were errors validating the request. schema: $ref: '#/definitions/error' '401': description: The maximum limit of schedules for this repository was reached. schema: $ref: '#/definitions/error' '404': description: The account or repository was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket - write:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token get: tags: - Pipelines summary: List schedules description: Retrieve the configured schedules for the given repository. operationId: getRepositoryPipelineSchedules parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string responses: '200': description: The list of schedules. schema: $ref: '#/definitions/paginated_pipeline_schedules' '404': description: The account or repository was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}: get: tags: - Pipelines summary: Get a schedule description: Retrieve a schedule by its UUID. operationId: getRepositoryPipelineSchedule parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: schedule_uuid description: The uuid of the schedule. required: true in: path type: string responses: '200': description: The requested schedule. schema: $ref: '#/definitions/pipeline_schedule' '404': description: The account, repository or schedule was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token put: tags: - Pipelines summary: Update a schedule description: Update a schedule. operationId: updateRepositoryPipelineSchedule parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: schedule_uuid description: The uuid of the schedule. required: true in: path type: string - name: _body in: body description: The schedule to update. required: true schema: $ref: '#/definitions/pipeline_schedule_put_request_body' responses: '200': description: The schedule is updated. schema: $ref: '#/definitions/pipeline_schedule' '404': description: The account, repository or schedule was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket - write:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token delete: tags: - Pipelines summary: Delete a schedule description: Delete a schedule. operationId: deleteRepositoryPipelineSchedule parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: schedule_uuid description: The uuid of the schedule. required: true in: path type: string responses: '204': description: The schedule was deleted. '404': description: The account, repository or schedule was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions: get: tags: - Pipelines summary: List executions of a schedule description: Retrieve the executions of a given schedule. operationId: getRepositoryPipelineScheduleExecutions parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: schedule_uuid description: The uuid of the schedule. required: true in: path type: string responses: '200': description: The list of executions of a schedule. schema: $ref: '#/definitions/paginated_pipeline_schedule_executions' '404': description: The account or repository was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair: get: tags: - Pipelines summary: Get SSH key pair 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: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string responses: '200': description: The SSH key pair. schema: $ref: '#/definitions/pipeline_ssh_key_pair' '404': description: The account, repository or SSH key pair was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token put: tags: - Pipelines summary: Update SSH key pair 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: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: _body in: body description: The created or updated SSH key pair. required: true schema: $ref: '#/definitions/pipeline_ssh_key_pair' responses: '200': description: The SSH key pair was created or updated. schema: $ref: '#/definitions/pipeline_ssh_key_pair' '404': description: The account, repository or SSH key pair was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token delete: tags: - Pipelines summary: Delete SSH key pair description: Delete the repository SSH key pair. operationId: deleteRepositoryPipelineKeyPair parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string responses: '204': description: The SSH key pair was deleted. '404': description: The account, repository or SSH key pair was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts: get: tags: - Pipelines summary: List known hosts description: Find repository level known hosts. operationId: getRepositoryPipelineKnownHosts parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string responses: '200': description: The retrieved known hosts. schema: $ref: '#/definitions/paginated_pipeline_known_hosts' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token post: tags: - Pipelines summary: Create a known host description: Create a repository level known host. operationId: createRepositoryPipelineKnownHost parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: _body in: body description: The known host to create. required: true schema: $ref: '#/definitions/pipeline_known_host' responses: '201': description: The known host was created. schema: $ref: '#/definitions/pipeline_known_host' headers: Location: type: string description: The URL of the newly created pipeline known host. '404': description: The account or repository does not exist. schema: $ref: '#/definitions/error' '409': description: A known host with the provided hostname already exists. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}: get: tags: - Pipelines summary: Get a known host description: Retrieve a repository level known host. operationId: getRepositoryPipelineKnownHost parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: known_host_uuid description: The UUID of the known host to retrieve. required: true in: path type: string responses: '200': description: The known host. schema: $ref: '#/definitions/pipeline_known_host' '404': description: The account, repository or known host with the specified UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token put: tags: - Pipelines summary: Update a known host description: Update a repository level known host. operationId: updateRepositoryPipelineKnownHost parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: known_host_uuid description: The UUID of the known host to update. required: true in: path type: string - name: _body in: body description: The updated known host. required: true schema: $ref: '#/definitions/pipeline_known_host' responses: '200': description: The known host was updated. schema: $ref: '#/definitions/pipeline_known_host' '404': description: The account, repository or known host with the given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token delete: tags: - Pipelines summary: Delete a known host description: Delete a repository level known host. operationId: deleteRepositoryPipelineKnownHost parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: known_host_uuid description: The UUID of the known host to delete. required: true in: path type: string responses: '204': description: The known host was deleted. '404': description: The account, repository or known host with given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config/variables: get: tags: - Pipelines summary: List variables for a repository description: Find repository level variables. operationId: getRepositoryPipelineVariables parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string responses: '200': description: The retrieved variables. schema: $ref: '#/definitions/paginated_pipeline_variables' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token post: tags: - Pipelines summary: Create a variable for a repository description: Create a repository level variable. operationId: createRepositoryPipelineVariable parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: _body in: body description: The variable to create. required: true schema: $ref: '#/definitions/pipeline_variable' responses: '201': description: The variable was created. schema: $ref: '#/definitions/pipeline_variable' headers: Location: type: string description: The URL of the newly created pipeline variable. '404': description: The account or repository does not exist. schema: $ref: '#/definitions/error' '409': description: A variable with the provided key already exists. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}: get: tags: - Pipelines summary: Get a variable for a repository description: Retrieve a repository level variable. operationId: getRepositoryPipelineVariable parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to retrieve. required: true in: path type: string responses: '200': description: The variable. schema: $ref: '#/definitions/pipeline_variable' '404': description: The account, repository or variable with the specified UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token put: tags: - Pipelines summary: Update a variable for a repository description: Update a repository level variable. operationId: updateRepositoryPipelineVariable parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to update. required: true in: path type: string - name: _body in: body description: The updated variable required: true schema: $ref: '#/definitions/pipeline_variable' responses: '200': description: The variable was updated. schema: $ref: '#/definitions/pipeline_variable' '404': description: The account, repository or variable with the given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token delete: tags: - Pipelines summary: Delete a variable for a repository description: Delete a repository level variable. operationId: deleteRepositoryPipelineVariable parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: repo_slug description: The repository. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to delete. required: true in: path type: string responses: '204': description: The variable was deleted. '404': description: The account, repository or variable with given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /teams/{username}/pipelines_config/variables: get: tags: - Pipelines summary: List variables for an account deprecated: true description: 'Find account level variables. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: getPipelineVariablesForTeam parameters: - name: username description: The account. required: true in: path type: string responses: '200': description: The found account level variables. schema: $ref: '#/definitions/paginated_pipeline_variables' security: - oauth2: - pipeline - basic: [] - api_key: [] post: tags: - Pipelines deprecated: true summary: Create a variable for a user description: 'Create an account level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: createPipelineVariableForTeam parameters: - name: username description: The account. required: true in: path type: string - name: _body in: body description: The variable to create. required: false schema: $ref: '#/definitions/pipeline_variable' responses: '201': description: The created variable. schema: $ref: '#/definitions/pipeline_variable' headers: Location: type: string description: The URL of the newly created pipeline variable. '404': description: The account does not exist. schema: $ref: '#/definitions/error' '409': description: A variable with the provided key already exists. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] /teams/{username}/pipelines_config/variables/{variable_uuid}: get: tags: - Pipelines deprecated: true summary: Get a variable for a team description: 'Retrieve a team level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: getPipelineVariableForTeam parameters: - name: username description: The account. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to retrieve. required: true in: path type: string responses: '200': description: The variable. schema: $ref: '#/definitions/pipeline_variable' '404': description: The account or variable with the given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] put: tags: - Pipelines deprecated: true summary: Update a variable for a team description: 'Update a team level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: updatePipelineVariableForTeam parameters: - name: username description: The account. required: true in: path type: string - name: variable_uuid description: The UUID of the variable. required: true in: path type: string - name: _body in: body description: The updated variable. required: true schema: $ref: '#/definitions/pipeline_variable' responses: '200': description: The variable was updated. schema: $ref: '#/definitions/pipeline_variable' '404': description: The account or the variable was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] delete: tags: - Pipelines deprecated: true summary: Delete a variable for a team description: 'Delete a team level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: deletePipelineVariableForTeam parameters: - name: username description: The account. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to delete. required: true in: path type: string responses: '204': description: The variable was deleted '404': description: The account or the variable with the provided UUID does not exist. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] /users/{selected_user}/pipelines_config/variables: get: tags: - Pipelines deprecated: true summary: List variables for a user description: 'Find user level variables. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: getPipelineVariablesForUser parameters: - name: selected_user description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. required: true in: path type: string responses: '200': description: The found user level variables. schema: $ref: '#/definitions/paginated_pipeline_variables' security: - oauth2: - pipeline - basic: [] - api_key: [] post: tags: - Pipelines deprecated: true summary: Create a variable for a user description: 'Create a user level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: createPipelineVariableForUser parameters: - name: selected_user description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. required: true in: path type: string - name: _body in: body description: The variable to create. required: false schema: $ref: '#/definitions/pipeline_variable' responses: '201': description: The created variable. schema: $ref: '#/definitions/pipeline_variable' headers: Location: type: string description: The URL of the newly created pipeline variable. '404': description: The account does not exist. schema: $ref: '#/definitions/error' '409': description: A variable with the provided key already exists. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] /users/{selected_user}/pipelines_config/variables/{variable_uuid}: get: tags: - Pipelines deprecated: true summary: Get a variable for a user description: 'Retrieve a user level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: getPipelineVariableForUser parameters: - name: selected_user description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to retrieve. required: true in: path type: string responses: '200': description: The variable. schema: $ref: '#/definitions/pipeline_variable' '404': description: The account or variable with the given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] put: tags: - Pipelines deprecated: true summary: Update a variable for a user description: 'Update a user level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: updatePipelineVariableForUser parameters: - name: selected_user description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. required: true in: path type: string - name: variable_uuid description: The UUID of the variable. required: true in: path type: string - name: _body in: body description: The updated variable. required: true schema: $ref: '#/definitions/pipeline_variable' responses: '200': description: The variable was updated. schema: $ref: '#/definitions/pipeline_variable' '404': description: The account or the variable was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] delete: tags: - Pipelines deprecated: true summary: Delete a variable for a user description: 'Delete an account level variable. This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).' operationId: deletePipelineVariableForUser parameters: - name: selected_user description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to delete. required: true in: path type: string responses: '204': description: The variable was deleted '404': description: The account or the variable with the provided UUID does not exist. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] /workspaces/{workspace}/pipelines-config/identity/oidc/.well-known/openid-configuration: get: tags: - Pipelines summary: Get OpenID configuration for OIDC in Pipelines description: This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/ operationId: getOIDCConfiguration produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string responses: '200': description: The OpenID configuration '404': description: The workspace was not found. schema: $ref: '#/definitions/error' security: - oauth2: [] - basic: [] - api_key: [] /workspaces/{workspace}/pipelines-config/identity/oidc/keys.json: get: tags: - Pipelines summary: Get keys for OIDC in Pipelines description: This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/ operationId: getOIDCKeys produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string responses: '200': description: The keys in JSON web key format '404': description: The workspace was not found. schema: $ref: '#/definitions/error' security: - oauth2: [] - basic: [] - api_key: [] /workspaces/{workspace}/pipelines-config/runners: get: tags: - Pipelines summary: Get workspace runners description: Retrieve workspace runners. operationId: getWorkspaceRunners produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string responses: '200': description: The workspace runners. schema: $ref: '#/definitions/paginated_pipeline_runners' security: - oauth2: - runner - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token post: tags: - Pipelines summary: Create workspace runner description: Create workspace runner. operationId: createWorkspaceRunner produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string responses: '200': description: The workspace runner. schema: $ref: '#/definitions/pipeline_runner' '400': description: The request body contained invalid properties or runner limit exceeded. schema: $ref: '#/definitions/error' '409': description: The workspace runner with the provided UUID already exists. schema: $ref: '#/definitions/error' security: - oauth2: - runner:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:runner:bitbucket - read:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /workspaces/{workspace}/pipelines-config/runners/{runner_uuid}: get: tags: - Pipelines summary: Get workspace runner description: Get workspace runner by uuid. operationId: getWorkspaceRunner produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: runner_uuid description: The runner uuid. required: true in: path type: string responses: '200': description: The workspace runner. schema: $ref: '#/definitions/pipeline_runner' '404': description: The workspace runner was not found. schema: $ref: '#/definitions/error' security: - oauth2: - runner - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token put: tags: - Pipelines summary: Update workspace runner description: Update workspace runner. operationId: updateWorkspaceRunner produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: runner_uuid description: The runner uuid. required: true in: path type: string responses: '200': description: The workspace runner. schema: $ref: '#/definitions/pipeline_runner' '404': description: The workspace runner was not found. schema: $ref: '#/definitions/error' security: - oauth2: - runner:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:runner:bitbucket - write:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token delete: tags: - Pipelines summary: Delete workspace runner description: Delete workspace runner by uuid. operationId: deleteWorkspaceRunner produces: - application/json parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: runner_uuid description: The runner uuid. required: true in: path type: string responses: '204': description: The workspace runner was deleted. '404': description: The workspace runner was not found. schema: $ref: '#/definitions/error' security: - oauth2: - runner:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:runner:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /workspaces/{workspace}/pipelines-config/variables: get: tags: - Pipelines summary: List variables for a workspace description: Find workspace level variables. operationId: getPipelineVariablesForWorkspace parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string responses: '200': description: The found workspace level variables. schema: $ref: '#/definitions/paginated_pipeline_variables' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token post: tags: - Pipelines summary: Create a variable for a workspace description: Create a workspace level variable. operationId: createPipelineVariableForWorkspace parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: _body in: body description: The variable to create. required: false schema: $ref: '#/definitions/pipeline_variable' responses: '201': description: The created variable. schema: $ref: '#/definitions/pipeline_variable' headers: Location: type: string description: The URL of the newly created pipeline variable. '404': description: The workspace does not exist. schema: $ref: '#/definitions/error' '409': description: A variable with the provided key already exists. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token /workspaces/{workspace}/pipelines-config/variables/{variable_uuid}: get: tags: - Pipelines summary: Get variable for a workspace description: Retrieve a workspace level variable. operationId: getPipelineVariableForWorkspace parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to retrieve. required: true in: path type: string responses: '200': description: The variable. schema: $ref: '#/definitions/pipeline_variable' '404': description: The workspace or variable with the given UUID was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token put: tags: - Pipelines summary: Update variable for a workspace description: Update a workspace level variable. operationId: updatePipelineVariableForWorkspace parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: variable_uuid description: The UUID of the variable. required: true in: path type: string - name: _body in: body description: The updated variable. required: true schema: $ref: '#/definitions/pipeline_variable' responses: '200': description: The variable was updated. schema: $ref: '#/definitions/pipeline_variable' '404': description: The workspace or the variable was not found. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token delete: tags: - Pipelines summary: Delete a variable for a workspace description: Delete a workspace level variable. operationId: deletePipelineVariableForWorkspace parameters: - name: workspace description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. required: true in: path type: string - name: variable_uuid description: The UUID of the variable to delete. required: true in: path type: string responses: '204': description: The variable was deleted '404': description: The workspace or the variable with the provided UUID does not exist. schema: $ref: '#/definitions/error' security: - oauth2: - pipeline:variable - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:pipeline:bitbucket x-atlassian-auth-types: - forge-oauth2 - api-token definitions: paginated_deployment_variable: type: object title: Paginated Deployment Variables description: A paged list of deployment variables. properties: page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. values: type: array minItems: 0 items: $ref: '#/definitions/deployment_variable' description: The values of the current page. 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. 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. next: type: string format: uri description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. previous: type: string format: uri description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. base_commit: allOf: - $ref: '#/definitions/object' - type: object title: Base Commit description: The common base type for both repository and snippet commits. properties: hash: type: string pattern: '[0-9a-f]{7,}?' date: type: string format: date-time author: $ref: '#/definitions/author' committer: $ref: '#/definitions/committer' message: type: string summary: type: object properties: raw: type: string description: The text as it was typed by a user. markup: type: string description: The type of markup language the raw content is to be interpreted in. enum: - markdown - creole - plaintext html: type: string description: The user's content rendered as HTML. additionalProperties: false parents: type: array items: $ref: '#/definitions/base_commit' minItems: 0 additionalProperties: true pipeline_step: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Step description: A step of a Bitbucket pipeline. This represents the actual result of the step execution. properties: uuid: type: string description: The UUID identifying the step. started_on: type: string format: date-time description: The timestamp when the step execution was started. This is not set when the step hasn't executed yet. completed_on: type: string format: date-time description: The timestamp when the step execution was completed. This is not set if the step is still in progress. state: $ref: '#/definitions/pipeline_step_state' description: The current state of the step image: $ref: '#/definitions/pipeline_image' description: The Docker image used as the build container for the step. setup_commands: type: array items: $ref: '#/definitions/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. script_commands: type: array items: $ref: '#/definitions/pipeline_command' description: The list of build commands. These commands are executed in the build container. x-bb-default-fields: - uuid x-bb-url: /rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid} x-bb-batch-url: /rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch x-bb-batch-max-size: 100 pipeline_image: type: object title: Pipeline Image description: The definition of a Docker image that can be used for a Bitbucket Pipelines step execution context. properties: 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. username: type: string description: The username needed to authenticate with the Docker registry. Only required when using a private Docker image. password: type: string description: The password needed to authenticate with the Docker registry. Only required when using a private Docker image. email: type: string description: The email needed to authenticate with the Docker registry. Only required when using a private Docker image. pipelines_config: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipelines Configuration description: The Pipelines configuration for a repository. properties: enabled: type: boolean description: Whether Pipelines is enabled for the repository. repository: $ref: '#/definitions/repository' pipeline_build_number: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Build Number description: A Pipelines build number. properties: next: type: integer description: The next number that will be used as build number. paginated_pipeline_steps: type: object title: Paginated Pipeline Steps description: A paged list of pipeline steps. properties: page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. values: type: array minItems: 0 items: $ref: '#/definitions/pipeline_step' description: The values of the current page. 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. 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. next: type: string format: uri description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. previous: type: string format: uri description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. repository: allOf: - $ref: '#/definitions/object' - type: object title: Repository description: A Bitbucket repository. properties: links: type: object properties: self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false avatar: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false pullrequests: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false commits: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false forks: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false watchers: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false downloads: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false clone: type: array items: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false hooks: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false 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. 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. is_private: type: boolean parent: $ref: '#/definitions/repository' scm: type: string enum: - git owner: $ref: '#/definitions/account' name: type: string description: type: string created_on: type: string format: date-time updated_on: type: string format: date-time size: type: integer language: type: string has_issues: type: boolean description: ' The issue tracker for this repository is enabled. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com. ' has_wiki: type: boolean description: ' The wiki for this repository is enabled. Wiki features are not supported for repositories in workspaces administered through admin.atlassian.com. ' fork_policy: type: string description: "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n be made public later)\n* **no_forks**: deny all forking\n" enum: - allow_forks - no_public_forks - no_forks project: $ref: '#/definitions/project' mainbranch: $ref: '#/definitions/branch' additionalProperties: true deployment_variable: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Deployment Variable description: A Pipelines deployment variable. properties: uuid: type: string description: The UUID identifying the variable. key: type: string description: The unique name of the variable. value: type: string description: The value of the variable. If the variable is secured, this will be empty. secured: type: boolean description: If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API. pipeline_cache_content_uri: type: object title: Pipeline Cache Content URI description: A representation of the location of pipeline cache content. properties: uri: type: string format: uri description: The uri for pipeline cache content. pipeline_schedule_execution: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Schedule Execution description: A Pipelines schedule execution. properties: {} paginated_pipeline_caches: type: object title: Paginated Pipeline Cache description: A paged list of pipeline caches properties: page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. values: type: array minItems: 0 items: $ref: '#/definitions/pipeline_cache' description: The values of the current page. 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. 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. next: type: string format: uri description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. previous: type: string format: uri description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. committer: allOf: - $ref: '#/definitions/object' - type: object title: Committer description: The committer of a change in a repository properties: raw: type: string description: The raw committer value from the repository. This may be the only value available if the committer does not match a user in Bitbucket. user: $ref: '#/definitions/account' additionalProperties: true pipeline_schedule_put_request_body: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Request body for Pipeline Schedule PUT request properties: enabled: type: boolean description: Whether the schedule is enabled. author: allOf: - $ref: '#/definitions/object' - type: object title: Author description: The author of a change in a repository 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: '#/definitions/account' additionalProperties: true pipeline_runner: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Runner description: A Bitbucket Pipelines runner for self-hosted builds. properties: uuid: type: string description: The UUID identifying the runner. name: type: string description: The name of the runner. labels: type: array items: type: string description: Labels assigned to the runner for identification and routing. state: $ref: '#/definitions/pipeline_runner_state' description: The current state of the runner. created_on: type: string format: date-time description: The timestamp when the runner was created. updated_on: type: string format: date-time description: The timestamp when the runner was last updated. oauth_client: $ref: '#/definitions/pipeline_runner_oauth_client' description: OAuth client configuration for the runner. pipelines_links_section_href: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Links href description: A links section href properties: href: type: string format: uri description: A link pipeline_selector: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Selector description: A representation of the selector that was used to identify the pipeline in the YML file. properties: type: enum: - branches - tags - bookmarks - default - custom type: string description: The type of selector. pattern: type: string description: The name of the matching pipeline definition. ref: type: object title: Ref description: A ref object, representing a branch or tag in a repository. properties: type: type: string links: type: object properties: self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false commits: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false name: type: string description: The name of the ref. target: $ref: '#/definitions/commit' required: - type additionalProperties: true paginated_pipeline_schedules: type: object title: Paginated Pipeline Schedule description: A paged list of schedules properties: page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. values: type: array minItems: 0 items: $ref: '#/definitions/pipeline_schedule' description: The values of the current page. 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. 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. next: type: string format: uri description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. previous: type: string format: uri description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. pipeline_ssh_public_key: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline SSH Public Key description: A Pipelines known host public key. properties: key_type: type: string description: The type of the public key. key: type: string description: The base64 encoded 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_target: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Target description: A representation of the target that a pipeline executes on. properties: {} pipeline_trigger: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Trigger description: A representation of the trigger used for a pipeline. properties: {} error: type: object title: 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`. properties: type: type: string error: type: object properties: message: type: string detail: type: string data: type: object description: Optional structured data that is endpoint-specific. properties: {} additionalProperties: true required: - message additionalProperties: false required: - type additionalProperties: true commit: allOf: - $ref: '#/definitions/base_commit' - type: object title: Commit description: A repository commit object. properties: repository: $ref: '#/definitions/repository' participants: type: array items: $ref: '#/definitions/participant' minItems: 0 additionalProperties: true link: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false paginated_pipelines: type: object title: Paginated Pipelines description: A paged list of pipelines properties: page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. values: type: array minItems: 0 items: $ref: '#/definitions/pipeline' description: The values of the current page. 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. 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. next: type: string format: uri description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. previous: type: string format: uri description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. pipeline_cache: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Cache description: A representation of metadata for a pipeline cache for given repository. properties: uuid: type: string description: The UUID identifying the pipeline cache. pipeline_uuid: type: string description: The UUID of the pipeline that created the cache. step_uuid: type: string description: The uuid of the step that created the cache. name: type: string description: The name of the cache. key_hash: type: string description: The key hash of the cache version. path: type: string description: The path where the cache contents were retrieved from. file_size_bytes: type: integer description: The size of the file containing the archive of the cache. created_on: type: string format: date-time description: The timestamp when the cache was created. paginated_pipeline_schedule_executions: type: object title: Paginated Pipeline Schedule Executions description: A paged list of the executions of a schedule. properties: page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. values: type: array minItems: 0 items: $ref: '#/definitions/pipeline_schedule_execution' description: The values of the current page. 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. 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. next: type: string format: uri description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. previous: type: string format: uri description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. pipeline_runner_oauth_client: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Runner OAuth Client description: OAuth client configuration for runner authentication. properties: id: type: string description: The OAuth client ID. secret: type: string description: The OAuth client secret. This is an optional element that is only provided once. token_endpoint: type: string format: uri description: The OAuth token endpoint URL. audience: type: string description: The intended audience for the OAuth token. account: allOf: - $ref: '#/definitions/object' - type: object title: Account description: An account object. properties: links: $ref: '#/definitions/account_links' created_on: type: string format: date-time display_name: type: string uuid: type: string additionalProperties: true pipeline_ref_target: allOf: - $ref: '#/definitions/pipeline_target' - additionalProperties: true type: object title: Pipeline Ref Target description: A Bitbucket Pipelines reference target. properties: ref_type: enum: - branch - tag - named_branch - bookmark type: string description: The type of reference (branch/tag). ref_name: type: string description: The name of the reference. commit: $ref: '#/definitions/commit' selector: $ref: '#/definitions/pipeline_selector' participant: allOf: - $ref: '#/definitions/object' - type: object title: Participant description: Object describing a user's role on resources like commits or pull requests. properties: user: $ref: '#/definitions/account' role: type: string enum: - PARTICIPANT - REVIEWER approved: type: boolean state: type: string enum: - approved - changes_requested - null participated_on: type: string description: The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented. format: date-time additionalProperties: true paginated_pipeline_known_hosts: type: object title: Paginated Pipeline Known Hosts description: A paged list of known hosts. properties: page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. values: type: array minItems: 0 items: $ref: '#/definitions/pipeline_known_host' description: The values of the current page. 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. 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. next: type: string format: uri description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. previous: type: string format: uri description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. pipeline_schedule_post_request_body: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Request body for Pipeline Schedule POST request properties: target: type: object description: The target on which the schedule will be executed. properties: selector: $ref: '#/definitions/pipeline_selector' ref_name: type: string description: The name of the reference. ref_type: type: string description: The type of reference (branch only). enum: - branch required: - selector - ref_name - ref_type enabled: type: boolean description: Whether the schedule is enabled. cron_pattern: type: string description: 'The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day.' required: - target - cron_pattern paginated_pipeline_variables: type: object title: Paginated Pipeline Variables description: A paged list of variables. properties: page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. values: type: array minItems: 0 items: $ref: '#/definitions/pipeline_variable' description: The values of the current page. 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. 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. next: type: string format: uri description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. previous: type: string format: uri description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. account_links: type: object title: Account Links description: Links related to an Account. properties: avatar: $ref: '#/definitions/link' additionalProperties: true pipeline_known_host: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Known Host description: A Pipelines known host. properties: uuid: type: string description: The UUID identifying the known host. hostname: type: string description: The hostname of the known host. public_key: $ref: '#/definitions/pipeline_ssh_public_key' description: The public key of the known host. pipeline: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline description: A Bitbucket Pipeline. This represents an actual pipeline result. properties: uuid: type: string description: The UUID identifying the pipeline. build_number: type: integer description: The build number of the pipeline. creator: $ref: '#/definitions/account' description: The Bitbucket account that was used to create the pipeline. repository: $ref: '#/definitions/repository' target: $ref: '#/definitions/pipeline_target' description: The target that the pipeline built. trigger: $ref: '#/definitions/pipeline_trigger' description: The trigger used for the pipeline. state: $ref: '#/definitions/pipeline_state' variables: type: array minItems: 0 items: $ref: '#/definitions/pipeline_variable' description: The variables for the pipeline. created_on: type: string format: date-time description: The timestamp when the pipeline was created. completed_on: type: string format: date-time description: The timestamp when the Pipeline was completed. This is not set if the pipeline is still in progress. build_seconds_used: type: integer description: The number of build seconds used by this pipeline. configuration_sources: type: array description: An ordered list of sources of the pipeline configuration minItems: 0 items: $ref: '#/definitions/pipeline_configuration_source' links: $ref: '#/definitions/pipelines_pipeline_links' pipeline_variable: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Variable description: A Pipelines variable. properties: uuid: type: string description: The UUID identifying the variable. key: type: string description: The unique name of the variable. value: type: string description: The value of the variable. If the variable is secured, this will be empty. secured: type: boolean description: If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API. branch: allOf: - $ref: '#/definitions/ref' - type: object title: Branch description: A branch object, representing a branch in a repository. properties: merge_strategies: type: array description: Available merge strategies for pull requests targeting this branch. items: type: string enum: - merge_commit - squash - fast_forward - squash_fast_forward - rebase_fast_forward - rebase_merge default_merge_strategy: type: string description: The default merge strategy for pull requests targeting this branch. additionalProperties: true team_links: allOf: - $ref: '#/definitions/account_links' - type: object title: Team Links description: Links related to a Team. properties: self: $ref: '#/definitions/link' html: $ref: '#/definitions/link' members: $ref: '#/definitions/link' projects: $ref: '#/definitions/link' repositories: $ref: '#/definitions/link' additionalProperties: true paginated_pipeline_runners: type: object title: Paginated Runners description: A paged list of runners. properties: page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. values: type: array minItems: 0 items: $ref: '#/definitions/pipeline_runner' description: The values of the current page. 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. 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. 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. 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. object: type: 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`. properties: type: type: string required: - type additionalProperties: true discriminator: type pipeline_ssh_key_pair: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline SSH Key Pair description: A Pipelines SSH key pair. 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. pipelines_pipeline_links: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Links description: Links section for a Pipeline. properties: self: $ref: '#/definitions/pipelines_links_section_href' description: Link to the Pipeline. steps: $ref: '#/definitions/pipelines_links_section_href' description: Link to the steps of the Pipeline. pipeline_command: type: object title: Pipeline Command description: An executable pipeline command. properties: name: type: string description: The name of the command. command: type: string description: The executable command. pipeline_state: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline State description: The representation of the progress state of a pipeline. properties: {} pipeline_runner_state: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Runner State description: The state information of a runner. properties: status: type: string enum: - UNREGISTERED - ONLINE - OFFLINE - DISABLED - ENABLED - UNHEALTHY description: The current status of the runner. version: $ref: '#/definitions/pipeline_runner_version' description: Version information for the runner. updated_on: type: string format: date-time description: The timestamp when the runner state was last updated. cordoned: type: boolean description: Whether the runner is cordoned (prevented from accepting new steps). pipeline_step_state: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Step State description: The representation of the progress state of a pipeline step. properties: {} pipeline_runner_version: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Runner Version description: Version information for a runner. properties: version: type: string description: The currently installed version of the runner. current: type: string description: The current recommended version of the runner. team: allOf: - $ref: '#/definitions/account' - type: object title: Team description: A team object. properties: links: $ref: '#/definitions/team_links' additionalProperties: true project: allOf: - $ref: '#/definitions/object' - type: object title: Project description: "A Bitbucket project.\n Projects are used by teams to organize repositories." properties: links: type: object properties: html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false avatar: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false uuid: type: string description: The project's immutable id. key: type: string description: The project's key. owner: $ref: '#/definitions/team' name: type: string description: The name of the project. 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.' created_on: type: string format: date-time updated_on: type: string format: date-time has_publicly_visible_repos: type: boolean description: ' Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.' additionalProperties: true pipeline_configuration_source: type: object description: Information about the source of the pipeline configuration properties: source: type: string description: Identifier of the configuration source uri: type: string format: uri description: Link to the configuration source view or its immediate content required: - source - uri pipeline_schedule: allOf: - $ref: '#/definitions/object' - additionalProperties: true type: object title: Pipeline Schedule description: A Pipelines schedule. properties: uuid: type: string description: The UUID identifying the schedule. enabled: type: boolean description: Whether the schedule is enabled. target: $ref: '#/definitions/pipeline_ref_target' description: The target on which the schedule will be executed. cron_pattern: type: string description: 'The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day.' created_on: type: string format: date-time description: The timestamp when the schedule was created. updated_on: type: string format: date-time description: The timestamp when the schedule was updated. securityDefinitions: basic: type: basic description: Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth is available only with username and app password as credentials. oauth2: type: oauth2 description: OAuth 2 as per [RFC-6749](https://tools.ietf.org/html/rfc6749). flow: accessCode authorizationUrl: https://bitbucket.org/site/oauth2/authorize tokenUrl: https://bitbucket.org/site/oauth2/access_token scopes: repository: Read your repositories repository:write: Read and modify your repositories repository:admin: Administer your repositories repository:delete: Delete your repositories project: Read your workspace's project settings and read repositories contained within your workspace's projects project:admin: Read and modify settings for projects in your workspace email: Read your account's primary email address account: Read your account information account:write: Read and modify your account information team: Read your team membership information team:write: Read and modify your team membership information pipeline: Access your repositories' build pipelines pipeline:write: Access and rerun your repositories' build pipelines pipeline:variable: Access your repositories' build pipelines and configure their variables runner: Access your workspaces/repositories' runners runner:write: Access and edit your workspaces/repositories' runners test: Access your workspaces/repositories' test test:write: Access and edit your workspaces/repositories' test pullrequest: Read your repositories and their pull requests pullrequest:write: Read and modify your repositories and their pull requests webhook: Read and modify your repositories' webhooks issue: Read your repositories' issues issue:write: Read and modify your repositories' issues snippet: Read your snippets snippet:write: Read and modify your snippets wiki: Read and modify your repositories' wikis api_key: name: Authorization type: apiKey description: API Keys can be used as Basic HTTP Authentication credentials and provide a substitute for the account's actual username and password. API Keys are only available to team accounts and there is only 1 key per account. API Keys do not support scopes and have therefore access to all contents of the account. in: header x-revision: 84a5dd73aa83 x-atlassian-narrative: documents: - anchor: authentication title: Authentication methods description: How to authenticate API actions icon: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTcuNjQ3MyAxODYuODEzOCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgaXNvbGF0aW9uOiBpc29sYXRlOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6ICNkZTM1MGI7CiAgICAgIH0KCiAgICAgIC5jbHMtMyB7CiAgICAgICAgZmlsbDogI2ZmNTYzMDsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBmaWxsOiAjZGZlMWU1OwogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmFmYmZjOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIGZpbGw6ICNlYmVjZjA7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDY1ZmY7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICAgIHN0cm9rZS13aWR0aDogMnB4OwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6ICM1ZTZjODQ7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogIzI1Mzg1ODsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogIzI2ODRmZjsKICAgICAgfQoKICAgICAgLmNscy0xMSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPlNlY3VyaXR5IHdpdGggS2V5PC90aXRsZ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ZD0iTTIyLjQ5MzIsMTIyLjgwMjlBMjIuNDkyOSwyMi40OTI5LDAsMSwxLDQ0Ljk4NTgsMTAwLjMxLDIyLjUxODUsMjIuNTE4NSwwLDAsMSwyMi40OTMyLDEyMi44MDI5Wm0wLTM3LjA5NzJBMTQuNjA0MiwxNC42MDQyLDAsMSwwLDM3LjA5NzIsMTAwLjMxLDE0LjYyMDcsMTQuNjIwNywwLDAsMCwyMi40OTMyLDg1LjcwNTdaIi8+CiAgICAgIDwvZz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo= body: "\nThe purpose of this section is to describe how to authenticate when making API calls using the Bitbucket REST API.\n\n-----\n\n* [Access tokens](#access-tokens)\n * [Repository access tokens](#repository-access-tokens)\n * [Project access tokens](#project-access-tokens)\n * [Workspace access tokens](#workspace-access-tokens)\n* [App passwords](#app-passwords)\n* [API tokens](#api-tokens)\n* [OAuth 2.0](#oauth-2-0)\n * [Making requests](#making-requests)\n * [Repository cloning](#repository-cloning)\n * [Refresh tokens](#refresh-tokens)\n* [Bitbucket OAuth 2.0 Scopes](#bitbucket-oauth-2-0-scopes)\n* [Forge app and API token scopes](#forge-app-and-api-token-scopes)\n\n---\n\n### Access tokens\n\nAccess tokens are passwords (or tokens) that provide access to a _single_ repository, project or workspace.\nThese tokens can authenticate with Bitbucket APIs for scripting, CI/CD tools, Bitbucket Cloud-connected apps,\nand Bitbucket Cloud integrations.\n\nAccess tokens are linked to a repository, project, or workspace, not a user account.\nThe level of access provided by the token is set when a repository, or workspace admin creates it,\nby setting privilege scopes.\n\nThere are three types of access token:\n\n* **Repository access tokens** can connect to a single repository, preventing them from accessing any other repositories or workspaces.\n* **Project access tokens** can connect to a single project, providing access to any repositories within the project.\n* **Workspace access tokens** can connect to a single workspace and have access to any projects and repositories within that workspace.\n\nWhen using Bitbucket APIs with an access token, the token will be treated as the \"user\" in the\nBitbucket UI and Bitbucket logs. This includes when using the access token to leave a comment on a pull request,\npush a commit, or merge a pull request. The Bitbucket UI and API responses will show the\nrepository/project/workspace access token as a user. The username shown in the Bitbucket UI is the Access\nToken _name_, and a custom icon is used to differentiate it from a regular user in the UI.\n\n#### Considerations for using access tokens\n\n* After creation, an access token can't be viewed or modified. The token's name, created date,\nlast accessed date, and scopes are visible on the repository, project, or workspace **access tokens** page.\n* Access tokens can access a limited set of Bitbucket's privilege scopes.\n* Provided you set the correct privilege scopes, you can use an access token to clone (`repository`)\nand push (`repository:write`) code to the token's repository or the repositories the token can access.\n* You can't use an access token to log into the Bitbucket website.\n* Access tokens don't require two-step verification.\n* You can set privilege scopes (specific access rights) for each access token.\n* You can't use an access token to manipulate or query repository, project, or workspace permissions.\n* Access tokens are not listed in any repository or workspace permission API response.\n* Access tokens are deactivated when deleting the resource tied to it (a repository, project, or workspace).\n* Repository access tokens are also revoked when transferring the repository to another workspace.\n* Any content created by the access token will persist after the access token has been revoked.\n* Access tokens can interact with branch restriction APIs, but the token can't be configured as a user with merge access when using branch restrictions.\n\nThere are some APIs which are inaccessible for Access tokens, these are:\n\n* [Add a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-post)\n* [Update a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-put)\n* [Delete a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-delete)\n\n#### Repository access tokens\n\nFor details on creating, managing, and using repository access tokens, visit\n[Repository access tokens](https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/).\n\nThe available scopes for repository access tokens are:\n\n- [`repository`](#repository)\n- [`repository:write`](#repository-write)\n- [`repository:admin`](#repository-admin)\n- [`repository:delete`](#repository-delete)\n- [`pullrequest`](#pullrequest)\n- [`pullrequest:write`](#pullrequest-write)\n- [`webhook`](#webhook)\n- [`pipeline`](#pipeline)\n- [`pipeline:write`](#pipeline-write)\n- [`pipeline:variable`](#pipeline-variable)\n- [`runner`](#runner)\n- [`runner:write`](#runner-write)\n\n#### Project access tokens\n\nFor details on creating, managing, and using project access tokens, visit\n[Project access tokens](https://support.atlassian.com/bitbucket-cloud/docs/project-access-tokens/).\n\nThe available scopes for project access tokens are:\n\n- [`project`](#project)\n- [`repository`](#repository)\n- [`repository:write`](#repository-write)\n- [`repository:admin`](#repository-admin)\n- [`repository:delete`](#repository-delete)\n- [`pullrequest`](#pullrequest)\n- [`pullrequest:write`](#pullrequest-write)\n- [`webhook`](#webhook)\n- [`pipeline`](#pipeline)\n- [`pipeline:write`](#pipeline-write)\n- [`pipeline:variable`](#pipeline-variable)\n- [`runner`](#runner)\n- [`runner:write`](#runner-write)\n\n#### Workspace access tokens\n\nFor details on creating, managing, and using workspace access tokens, visit\n[Workspace access tokens](https://support.atlassian.com/bitbucket-cloud/docs/workspace-access-tokens/).\n\nThe available scopes for workspace access tokens are:\n\n- [`project`](#project)\n- [`project:admin`](#project-admin)\n- [`repository`](#repository)\n- [`repository:write`](#repository-write)\n- [`repository:admin`](#repository-admin)\n- [`repository:delete`](#repository-delete)\n- [`pullrequest`](#pullrequest)\n- [`pullrequest:write`](#pullrequest-write)\n- [`webhook`](#webhook)\n- [`account`](#account)\n- [`pipeline`](#pipeline)\n- [`pipeline:write`](#pipeline-write)\n- [`pipeline:variable`](#pipeline-variable)\n- [`runner`](#runner)\n- [`runner:write`](#runner-write)\n\n### App passwords\n\nApp passwords are deprecated. Use [API tokens](#api-tokens).\n\n### API tokens\n\nAPI Tokens are personal access tokens that users can create to authenticate with Bitbucket's REST APIs\nor interact with Git. They are designed as a long term replacement for app passwords, while retaining a\nlot of the functionality you are already familiar with.\n\nSome important points about API tokens:\n\n* To authenticate with an API token, use Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617), where\n the username is your Atlassian email and password is the API token.\n* You cannot view an API token or adjust permissions after you create the API token. They are\n designed to be disposable. If you need to change the scopes or you've lost the token, you should just create a new one.\n* API token require an expiry date at creation, with a maximum duration of 1 year.\n* You cannot use them to log into Bitbucket website.\n* API tokens are tied to an individual account's credentials and should not be shared. If you're sharing your API token\n you're giving direct, authenticated access to everything that the token has been scoped\n to do with Bitbucket's APIs.\n* You can set privilege scopes (specific access rights) for each API token.\n\nFor details on creating, managing, and using API tokens, visit\n[API tokens](https://support.atlassian.com/bitbucket-cloud/docs/api-tokens/).\n\n### OAuth 2.0\n\nOur OAuth 2 implementation is merged in with our existing OAuth 1 in\nsuch a way that existing OAuth 1 consumers automatically become\nvalid OAuth 2 clients. The only thing you need to do is edit your\nexisting consumer and configure a callback URL.\n\nOnce that is in place, you'll have the following 2 URLs:\n\n https://bitbucket.org/site/oauth2/authorize\n https://bitbucket.org/site/oauth2/access_token\n\nFor obtaining access/bearer tokens, we support two of RFC-6749's grant flows, plus a custom Bitbucket flow\nfor exchanging JWT tokens for access tokens.\nNote that Implicit Grant (4.2) and Resource Owner Password Credentials Grant (4.3) are no longer supported.\n\n\n#### 1. Authorization Code Grant (4.1)\n\nThe full-blown 3-LO flow. Request authorization from the end user by\nsending their browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code\n\nThe callback includes the `?code={}` query parameter that you can swap\nfor an access token:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=authorization_code -d code={code}\n\n#### 2. Client Credentials Grant (4.4)\n\nObtain an access token that represents not an end user, but the owner of the\nclient/consumer:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=client_credentials\n\n\n#### 3. Bitbucket Cloud JWT Grant (urn:bitbucket:oauth2:jwt)\n\nIf your Atlassian Connect add-on uses JWT authentication, you can swap a\nJWT for an OAuth access token. The resulting access token represents the\naccount for which the add-on is installed.\n\nMake sure you send the JWT token in the Authorization request header\nusing the \"JWT\" scheme (case sensitive). Note that this custom scheme\nmakes this different from HTTP Basic Auth (and so you cannot use \"curl\n-u\").\n\n $ curl -X POST -H \"Authorization: JWT {jwt_token}\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=urn:bitbucket:oauth2:jwt\n\n\n#### Making Requests\n\n\nAs of May 4th, 2026, all OAuth 2.0 authenticated API requests must be directed at\nhttps://api.bitbucket.org with the `access token` placed as a `Bearer` token in the\nrequest `Authorization` header as per RFC-6750 (2.1)\n\n``` bash\n$ curl -H \"Authorization: Bearer {access_token}\" \\\n https://api.bitbucket.org/2.0/user\n```\n\n#### Repository Cloning\n\nSince add-ons will not be able to upload their own SSH keys to clone\nwith, access tokens can be used as Basic HTTP Auth credentials to\nclone securely over HTTPS. This is much like GitHub, yet slightly\ndifferent:\n\n $ git clone https://x-token-auth:{access_token}@bitbucket.org/user/repo.git\n\nThe literal string `x-token-auth` as a substitute for username is\nrequired (note the difference with GitHub where the actual token is in\nthe username field).\n\n\n#### Refresh Tokens\n\nOur access tokens expire in one hour. When this happens you'll get 401\nresponses.\n\nBoth the `authorization_code` and `refresh_token` access token grant\nresponses include a refresh token that can be used to generate a new access\ntoken, without the need for end user participation:\n\n``` bash\n$ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=refresh_token -d refresh_token={refresh_token}\n```\n\nOnce a refresh token has been used to issue a new access token, a new refresh\ntoken will be issued as part of the response. The existing refresh token will\nexpire shortly after and should not be used again.\n\nA refresh token which is not used to generate an access token will expire after\n3 months. After this point the end user will be required to complete the full\n`authorization_code` grant flow again.\n\n### Bitbucket OAuth 2.0 scopes\n\nBitbucket's API applies a number of privilege scopes to endpoints. In order to access an\nendpoint, a request will need to have the necessary scopes.\n\nOAuth 2.0 Scopes are applicable for OAuth 2 and access tokens\nauth mechanisms as well as Bitbucket Connect apps.\n\nScopes are declared in the descriptor as a list of strings, with each string being the name of a unique scope.\n\nA descriptor lacking the `scopes` element is implicitly assumed to require all scopes and as a result,\nBitbucket will require end users authorizing/installing the add-on to explicitly accept all scopes.\n\nOur best practice suggests you add only the scopes your add-on needs, but no more than it needs.\n\nInvalid scope strings will cause the descriptor to be rejected and the installation to fail.\n\nThe available scopes are:\n\n- [project](#project)\n- [project:write](#project-write)\n- [project:admin](#project-admin)\n- [repository](#repository)\n- [repository:write](#repository-write)\n- [repository:admin](#repository-admin)\n- [repository:delete](#repository-delete)\n- [pullrequest](#pullrequest)\n- [pullrequest:write](#pullrequest-write)\n- [issue](#issue)\n- [issue:write](#issue-write)\n- [wiki](#wiki)\n- [webhook](#webhook)\n- [snippet](#snippet)\n- [snippet:write](#snippet-write)\n- [email](#email)\n- [account](#account)\n- [account:write](#account-write)\n- [pipeline](#pipeline)\n- [pipeline:write](#pipeline-write)\n- [pipeline:variable](#pipeline-variable)\n- [runner](#runner)\n- [runner:write](#runner-write)\n\n#### project\n\nProvides access to view the project or projects.\nThis scope implies the [`repository`](#repository) scope, giving read access to all the repositories in a project or projects.\n\n#### project:write\n\nThis scope is deprecated, and has been made obsolete by `project:admin`. Please see the deprecation notice [here](/cloud/bitbucket/deprecation-notice-project-write-scope).\n\n#### project:admin\n\nProvides admin access to a project or projects. No distinction is made between public and private projects. This scope doesn't implicitly grant the [`project`](#project) scope or the [`repository:write`](#repository-write) scope on any repositories under the project. It gives access to the admin features of a project only, not direct access to its repositories' contents.\n\n* ability to create the project\n* ability to update the project\n* ability to delete the project\n\n#### repository\n\nProvides read access to a repository or repositories.\nNote that this scope does not give access to a repository's pull requests.\n\n* access to the repo's source code\n* clone over HTTPS\n* access the file browsing API\n* download zip archives of the repo's contents\n* the ability to view and use the issue tracker on any repo (created issues, comment, vote, etc)\n* the ability to view and use the wiki on any repo (create/edit pages)\n\n#### repository:write\n\nProvides write (not admin) access to a repository or repositories. No distinction is made between public and private repositories. This scope implicitly grants the [`repository`](#repository) scope, which does not need to be requested separately.\nThis scope alone does not give access to the pull requests API.\n\n* push access over HTTPS\n* fork repos\n\n#### repository:admin\n\nProvides admin access to a repository or repositories. No distinction is made between public and private repositories. This scope doesn't implicitly grant the [`repository`](#repository) or the [`repository:write`](#repository-write) scopes. It gives access to the admin features of a repo only, not direct access to its contents. This scope can be used or misused to grant read access to other users, who can then clone the repo, but users that need to read and write source code would also request explicit read or write.\nThis scope comes with access to the following functionality:\n\n* View and manipulate committer mappings\n* List and edit deploy keys\n* Ability to delete the repo\n* View and edit repo permissions\n* View and edit branch permissions\n* Import and export the issue tracker\n* Enable and disable the issue tracker\n* List and edit issue tracker version, milestones and components\n* Enable and disable the wiki\n* List and edit default reviewers\n* List and edit repo links (Jira/Bamboo/Custom)\n* List and edit the repository webhooks\n* Initiate a repo ownership transfer\n\n#### repository:delete\n\nProvides access to delete a repository or repositories.\n\n#### pullrequest\n\nProvides read access to pull requests.\nThis scope implies the [`repository`](#repository) scope, giving read access to the pull request's destination repository.\n\n* see and list pull requests\n* create and resolve tasks\n* comment on pull requests\n\n#### pullrequest:write\n\nImplicitly grants the [`pullrequest`](#pullrequest) scope and adds the ability to create, merge and decline pull requests.\nThis scope also implicitly grants the [`repository:write`](#repository-write) scope, giving write access to the pull request's destination repository. This is necessary to allow merging.\n\n* merge pull requests\n* decline pull requests\n* create pull requests\n* approve pull requests\n\n#### issue\n\nAbility to interact with issue trackers the way non-repo members can.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* view, list and search issues\n* create new issues\n* comment on issues\n* watch issues\n* vote for issues\n\n#### issue:write\n\nThis scope implicitly grants the [`issue`](#issue) scope and adds the ability to transition and delete issues.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* transition issues\n* delete issues\n\n#### wiki\n\nProvides access to wikis. This scope provides both read and write access (wikis are always editable by anyone with access to them).\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* view wikis\n* create pages\n* edit pages\n* push to wikis\n* clone wikis\n\n#### webhook\n\nGives access to webhooks. This scope is required for any webhook-related operation.\n\nThis scope gives read access to existing webhook subscriptions on all\nresources the authorization mechanism can access, without needing further scopes.\nFor example:\n\n- A client can list all existing webhook subscriptions on a repository. The [`repository`](#repository) scope is not required.\n- Existing webhook subscriptions for the issue tracker on a repo can be retrieved without the [`issue`](#issue) scope. All that is required is the `webhook` scope.\n\nTo create webhooks, the client will need read access to the resource. Such as: for [`issue:created`](#issue-created), the client will need to\nhave both the `webhook` and the [`issue`](#issue) scope.\n\n* list webhook subscriptions on any accessible repository, user, team, or snippet\n* create/update/delete webhook subscriptions.\n\n#### snippet\n\nProvides read access to snippets.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\n\n* view any snippet\n* create snippet comments\n\n#### snippet:write\n\nProvides write access to snippets.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\nThis scope implicitly grants the [`snippet`](#snippet) scope which does not need to be requested separately.\n\n* create snippets\n* edit snippets\n* delete snippets\n\n#### email\n\nAbility to see the user's primary email address. This should make it easier to use Bitbucket Cloud as a login provider for apps or external applications.\n\n#### account\n\nWhen used for:\n* **user-related APIs** — Gives read-only access to the user's account information.\nNote that this doesn't include any ability to change any of the data. This scope allows you to view the user's:\n * email addresses\n * language\n * location\n * website\n * full name\n * SSH keys\n * user groups\n* **workspace-related APIs** — Grants access to view the workspace's:\n * users\n * user permissions\n * projects\n\n#### account:write\n\nAbility to change properties on the user's account.\n\n* delete the authorizing user's account\n* manage the user's groups\n* change a user's email addresses\n* change username, display name and avatar\n\n#### pipeline\n\nGives read-only access to pipelines, steps, deployment environments and variables.\n\n#### pipeline:write\n\nGives write access to pipelines. This scope allows a user to:\n* Stop pipelines\n* Rerun failed pipelines\n* Resume halted pipelines\n* Trigger manual pipelines.\n\nThis scope is not needed to trigger a build using a push. Performing a `git push` (or equivalent actions) will trigger the build. The token doing the push only needs the [`repository:write`](#repository-write) scope.\n\nThis doesn't give write access to create variables.\n\n#### pipeline:variable\n\nGives write access to create variables in pipelines at the various levels:\n* Workspace\n* Repository\n* Deployment\n\n#### runner\n\nGives read-only access to pipelines runners setup against a workspace or repository.\n\n#### runner:write\n\nGives write access to create/edit/disable/delete pipelines runners setup against a workspace or repository.\n\n### Forge app and API token scopes\n\nIn order for a Forge app integration or an API token to access Bitbucket API endpoints, it needs to include certain privilege scopes. These are different from Bitbucket OAuth 2.0 scopes.\n\nIn the case of a Forge app, the privilege scopes need to be included in the app manifest.\n\nUnlike OAuth 2.0 scopes, Forge app and API token scopes do not implicitly grant access to other scopes, for example, `write:repository:bitbucket` does not implicitly grant access to `read:repository:bitbucket`.\n\nIt's important to note that only a subset of all API endpoints are currently available for Forge app integrations. Each endpoint is clearly labeled, indicating whether it is available for Forge apps.\n\nOur best practice recommends adhering to the principle of least privilege. You should only add the scopes that are necessary for your needs.\n\nThe available scopes are:\n\n- [`read:repository:bitbucket`](#read-repository-bitbucket)\n- [`write:repository:bitbucket`](#write-repository-bitbucket)\n- [`admin:repository:bitbucket`](#admin-repository-bitbucket)\n- [`delete:repository:bitbucket`](#delete-repository-bitbucket)\n- [`read:pullrequest:bitbucket`](#read-pullrequest-bitbucket)\n- [`write:pullrequest:bitbucket`](#write-pullrequest-bitbucket)\n- [`read:project:bitbucket`](#read-project-bitbucket)\n- [`admin:project:bitbucket`](#admin-project-bitbucket)\n- [`read:workspace:bitbucket`](#read-workspace-bitbucket)\n- [`admin:workspace:bitbucket`](#admin-workspace-bitbucket)\n- [`read:user:bitbucket`](#read-user-bitbucket)\n- [`write:user:bitbucket`](#write-user-bitbucket)\n- [`read:pipeline:bitbucket`](#read-pipeline-bitbucket)\n- [`write:pipeline:bitbucket`](#write-pipeline-bitbucket)\n- [`admin:pipeline:bitbucket`](#admin-pipeline-bitbucket)\n- [`read:runner:bitbucket`](#read-runner-bitbucket)\n- [`write:runner:bitbucket`](#write-runner-bitbucket)\n- [`read:issue:bitbucket`](#read-issue-bitbucket)\n- [`write:issue:bitbucket`](#write-issue-bitbucket)\n- [`delete:issue:bitbucket`](#delete-issue-bitbucket)\n- [`read:webhook:bitbucket`](#read-webhook-bitbucket)\n- [`write:webhook:bitbucket`](#write-webhook-bitbucket)\n- [`delete:webhook:bitbucket`](#delete-webhook-bitbucket)\n- [`read:snippet:bitbucket`](#read-snippet-bitbucket)\n- [`write:snippet:bitbucket`](#write-snippet-bitbucket)\n- [`delete:snippet:bitbucket`](#delete-snippet-bitbucket)\n- [`read:ssh-key:bitbucket`](#read-ssh-key-bitbucket)\n- [`write:ssh-key:bitbucket`](#write-ssh-key-bitbucket)\n- [`delete:ssh-key:bitbucket`](#delete-ssh-key-bitbucket)\n- [`read:gpg-key:bitbucket`](#read-gpg-key-bitbucket)\n- [`write:gpg-key:bitbucket`](#write-gpg-key-bitbucket)\n- [`delete:gpg-key:bitbucket`](#delete-gpg-key-bitbucket)\n- [`read:permission:bitbucket`](#read-permission-bitbucket)\n- [`write:permission:bitbucket`](#write-permission-bitbucket)\n- [`delete:permission:bitbucket`](#delete-permission-bitbucket)\n\n#### read:repository:bitbucket\n\nAllows viewing of repository data. Note that this scope does not give access to a repository's pull requests.\n* access to the repository's source code\n* access the file browsing API\n* access to certain repository configurations such as branching model, default reviewers, etc.\n\n#### write:repository:bitbucket\n\nAllows modification of repository data. No distinction is made between public and private repositories. This scope does not imply the `read:repository:bitbucket` scope, so you need to request that separately if required. This scope alone does not give access to the pull request API.\n* update/delete source, branches, tags, etc.\n* fork repositories\n\n#### admin:repository:bitbucket\n\nAllows admin activities on repositories. No distinction is made between public and private repositories. This scope does not implicitly grant the `read:repository:bitbucket` or the `write:repository:bitbucket` scopes. It gives access to the admin features of a repository only, not direct access to its contents. This scope does not allow modification of repository permissions. This scope comes with access to the following functionality:\n* create repository\n* view repository permissions\n* view and edit branch restrictions\n* edit branching model settings\n* edit default reviewers\n* view and edit inheritance state for repository settings\n\n#### delete:repository:bitbucket\nAllows deletion of repositories.\n\n#### read:pullrequest:bitbucket\nAllows viewing of pull requests, plus the ability to comment on pull requests.\n\nThis scope does not imply the `read:repository:bitbucket` scope. With this scope, you could retrieve some data specific to the source/destination repositories of a pull request using pull request endpoints, but it does not give access to repository API endpoints.\n\n#### write:pullrequest:bitbucket\nAllows the ability to create, update, approve, decline, and merge pull requests.\n\nThis scope does not imply the `write:repository:bitbucket` scope.\n\n#### read:project:bitbucket\nAllows viewing of project and project permission data.\n\n#### admin:project:bitbucket\nAllows the ability to create, update, and delete project. No distinction is made between public and private projects.\n\nThis scope does not implicitly grant the `read:project:bitbucket` scope or any repository scopes. It gives access to the admin features of a project only, not direct access to its repositories' contents.\n\n#### read:workspace:bitbucket\nAllows viewing of workspace and workspace permission data.\n\n#### admin:workspace:bitbucket\nAllows the ability to create, update and delete the workspace. This scope does not implicitly grant the `read:workspace:bitbucket` scope or any repository scopes. It gives access to the admin features of a workspace only, not direct access to its workspaces' contents.\n\n#### read:user:bitbucket\nAllows viewing of data related to the current user.\n\n#### write:user:bitbucket\nAllows the ability to update data related to the current user.\n\nThis scope does not imply the `read:user:bitbucket` scope.\n\n#### read:pipeline:bitbucket\nAllows read access to all pipeline information (pipelines, steps, caches, artifacts, logs, tests, code-insights).\n\n#### write:pipeline:bitbucket\nAllows running pipelines (i.e., start/stop/create pipeline) and uploading tests/code-insights.\n\nThis scope does not imply the `read:pipeline:bitbucket` scope.\n\n#### admin:pipeline:bitbucket\nAllows admin activities, such as creating pipeline variables.\n\nThis scope does not implicitly grant the `read:pipeline:bitbucket` or the `write:pipeline:bitbucket` scopes.\n\n#### read:runner:bitbucket\nAllows viewing of runners information.\n\n#### write:runner:bitbucket\nAllows runners management.\n\nThis scope does not imply the `read:runners:bitbucket` scope.\n\n#### read:issue:bitbucket\nAllows the viewing of issues.\n\n#### write:issue:bitbucket\nAllows the ability to create and update issues.\n\nThis scope does not implicitly grant the `read:issue:bitbucket` scope.\n\n#### delete:issue:bitbucket\nAllows the deletion of issues.\n\n#### read:webhook:bitbucket\nAllows read access to webhooks information.\n\n#### write:webhook:bitbucket\nAllows the ability to create and update webhooks.\n\nThis scope does not implicitly grant the `read:webhook:bitbucket` scope.\n\n#### delete:webhook:bitbucket\nAllows the deletion of webhooks.\n\n#### read:snippet:bitbucket\nAllows the viewing of snippets.\n\n#### write:snippet:bitbucket\nAllows the ability to create and update snippets.\n\nThis scope does not implicitly grant the `read:snippet:bitbucket` scope.\n\n#### delete:snippet:bitbucket\nAllows the deletion of snippets.\n\n#### read:ssh-key:bitbucket\nAllows read access to information related to deploy keys and SSH keys.\n\n#### write:ssh-key:bitbucket\nAllows the ability to create and update deploy keys and SSH keys.\n\nThis scope does not implicitly grant the `read:ssh-key:bitbucket` scope.\n\n#### delete:ssh-key:bitbucket\nAllows the deletion of deploy keys and SSH keys.\n\n#### read:gpg-key:bitbucket\nAllows read access to information related to GPG keys.\n\n#### write:gpg-key:bitbucket\nAllows the ability to create and update GPG keys.\n\nThis scope does not implicitly grant the `read:gpg-key:bitbucket` scope.\n\n#### delete:gpg-key:bitbucket\nAllows the deletion of GPG keys.\n\n#### read:permission:bitbucket\nAllows read access to permissions data.\n\n#### write:permission:bitbucket\nAllows the ability to create and modify permissions related data.\n\nThis scope does not implicitly grant the `read:permission:bitbucket` scope.\n\n#### delete:permission:bitbucket\nAllows the deletion of permissions related data.\n" - anchor: filtering title: Filter and sort API objects description: Query the 2.0 API for specific objects icon: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTk0LjE5MTkgMTQ3LjYwOTIiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjY2ZkNGRiOwogICAgICB9CgogICAgICAuY2xzLTMsIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzg3NzdkOTsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC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wxMC42NTM2LTE3LjU2ODFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy01IiBkPSJNODMuMjUzNywxMzIuNTU2QTY3LjIzNDgsNjcuMjM0OCwwLDAsMSw5LjcxLDMyLjQyOTUsNjYuNzk3NCw2Ni43OTc0LDAsMCwxLDUxLjE4MzcsMS45NjY2bC4wMDA3LDBBNjYuNzk2Miw2Ni43OTYyLDAsMCwxLDEwMi4wNTEsOS43NTI1aDBBNjcuMjM0Niw2Ny4yMzQ2LDAsMCwxLDgzLjI1MzcsMTMyLjU1NloiLz4KICAgICAgICA8cGF0aCBpZD0iX1BhdGhfMiIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtNiIgZD0iTTIzLjQzOSw0MC43NDgyQTUxLjE5MDgsNTEuMTkwOCwwLDAsMCwxMTEuMDEsOTMuNzg4OSw1MS4xOTA4LDUxLjE5MDgsMCwwLDAsMjMuNDM5LDQwLjc0ODJaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNNzkuNDMzLDExNi45ODJBNTEuMjE2Miw1MS4yMTYyLDAsMCwwLDExOC40MjQxLDY3LjAzN2E0OS4xMzkxLDQ5LjEzOTEsMCwwLDEtNS4wODY3LDIuMjc4OWMtMTUuNzAyOSw1Ljk2MDktMjkuNjg5NSwyLjExLTM2LjQ5ODcuMTMwOC0yMC40MzA3LTUuOTM5LTI0Ljc5LTE3LjM3ODUtMzkuMDQxNC0yNC41ODIzYTQ4LjMwOTIsNDguMzA5MiwwLDAsMC0xNC4wOTM5LTQuNTNjLS4wODYyLjEzOTUtLjE3OTMuMjczLS4yNjQ0LjQxMzVBNTEuMTkwNyw1MS4xOTA3LDAsMCwwLDc5LjQzMywxMTYuOTgyWiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K body: "\nYou can query the 2.0 API for specific objects using a simple language which resembles SQL.\n\nNote that filtering and querying by username has been deprecated, due to privacy changes. \nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-querying) \nfor details.\n\n---\n\n* [Supported endpoints](#supported-endpoints)\n* [Operators](#operators)\n* [Data types](#data-types)\n* [Querying](#querying)\n* [Sorting query results](#sorting-query-results)\n\n----\n\n### Supported endpoints\n\nMost 2.0 API resources that return paginated collections of objects support a single, shared, generic querying language that is used to filter down a result set.\n\nThis includes, but is in no way limited to:\n\n /2.0/repositories/{username}\n /2.0/repositories/{username}/{slug}/refs\n /2.0/repositories/{username}/{slug}/refs/branches\n /2.0/repositories/{username}/{slug}/refs/tags\n /2.0/repositories/{username}/{slug}/forks\n /2.0/repositories/{username}/{slug}/src\n /2.0/repositories/{username}/{slug}/issues\n /2.0/repositories/{username}/{slug}/pullrequests\n\nFiltering and sorting supports several distinct operators and data types as well as basic features, like logical operators (AND, OR).\nAs examples, the following queries could be used on the issue tracker endpoint (`/2.0/repositories/{workspace}/{slug}/issues/`):\n\n\t(state = \"open\" OR state = \"new\") AND assignee = null\n\treporter.nickname != \"evzijst\" AND priority >= \"major\"\n\t(title ~ \"unicode\" OR content.raw ~ \"unicode\") AND created_on > 2015-10-04T14:00:00-07:00\n\nFilter queries can be added to the URL using the q= query parameter. To sort the response, add sort=. Note that the entire query string is put in the q parameter and hence needs to be URL-encoded as shown in the following example:\n\n\t/2.0/repositories/foo/bar/issues?q=state=\"new\"&sort=-updated_on\n\n\n### Operators\n\nFiltering and sorting supports the following operators:\n\n| Operator | Definition | Example |\n|----------|--------------------------------|---------------------------------------|\n| \"=\" | test for equality | `nickname = \"evzijst\"` |\n| \"!=\" | not equal | `is_private != true` |\n| \"~\" | case-insensitive text contains | `description ~ \"beef\"` |\n| \"!~\" | case-insensitive not contains | `description !~ \"fubar\"` |\n| \">\" | greater than | `priority > \"major\"` |\n| \">=\" | greater than or equal | `priority <= \"trivial\"` |\n| \"<\" | less than | `id < 1234` |\n| \"<=\" | less than or equal | `updated_on <= 2015-03-04` |\n| \"IN\" | value present in list | `state IN (\"OPEN\", \"MERGED\")` |\n| \"NOT IN\" | value not present in list | `state NOT IN (\"DECLINED\", \"MERGED\")` |\n\n### Data types\n\nFiltering and sorting supports the following data types:\n\n| Type | Description | Example |\n|--------------|-----------------------------------------|-----------------|\n| **String** | any text inside double quotes | `\"foo\"` |\n| **Number** | arbitrary precision integers and floats | `1`, `-10.302` |\n| **Null** | to test for the absence of a value | `null` |\n| **boolean** | the unquoted strings true or false | `true`, `false` |\n| **datetime** | an unquoted [ISO-8601][iso-8601] date time string with the timezone offset, milliseconds and entire time component being optional | `2015-03-04T14:08:59.123+02:00`, `2015-03-04T14:08:59` Date time strings are assumed to be in UTC, unless an explicit timezone offset is provided |\n| **list** | a comma separated list of values enclosed in parentheses | `(\"a\", \"b\")`, `(1, 2)` |\n\n[iso-8601]: https://en.wikipedia.org/wiki/ISO_8601\n\n### Querying\n\nObjects can be filtered based on their properties. In principle, every element in an object's JSON document schema can be used as a filter criterion.\n\nNote that while the array of objects in a paginated response is wrapped in an\nenvelope with a `values` element, this prefix should not be included in the\nquery fields (so use `/2.0/repositories/foo/bar/issues?q=state=\"new\"`, not\n`/2.0/repositories/foo/bar/issues?q=values.state=\"new\"`).\n\n\n### Examples\n\nFields that contain embedded instances of other object types (e.g. owner is an embedded user object, while parent is an embedded repository) can be traversed recursively. For instance:\n\n\tparent.owner.nickname = \"bitbucket\"\n\nTo find pull requests which merge into master, come from a fork of the repo rather than a branch inside the repo, and on which I am a reviewer:\n\n```\nsource.repository.full_name != \"main/repo\" AND state = \"OPEN\" AND reviewers.nickname = \"evzijst\" AND destination.branch.name = \"master\"\n```\n```\n/2.0/repositories/main/repo/pullrequests?q=source.repository.full_name+%21%3D+%22main%2Frepo%22+AND+state+%3D+%22OPEN%22+AND+reviewers.nickname+%3D+%22evzijst%22+AND+destination.branch.name+%3D+%22master%22\n```\n\nTo find new or on-hold issues related to the UI, created or updated in the last day (SF local time), that have not yet been assigned to anyone:\n\n```\nstate IN (\"new\", \"on hold\") AND assignee = null AND component = \"UI\" and updated_on > 2015-11-11T00:00:00-07:00\n```\n```\n/2.0/repositories/main/repo/issues?q=state%20IN%20%28%22new%22%2C%20%22on%20hold%22%29%20AND%20assignee%20%3D%20null%20AND%20component%20%3D%20%22UI%22%20and%20updated%5Fon%20%3E%202015%2D11%2D11T00%3A00%3A00%2D07%3A00\n```\n\nTo find all tags with the string \"2015\" in the name:\n\n```\nname ~ \"2015\"\n```\n```\n/2.0/repositories/{username}/{slug}/refs/tags?q=name+%7E+%222015%22\n```\nOr all my branches:\n\n```\nname ~ \"erik/\"\n```\n```\n/2.0/repositories/{username}/{slug}/refs/?q=name+%7E+%22erik%2F%22\n```\n### Sorting query results\n\nYou can sort result sets using the ?sort= query parameter, available on the same resources that support filtering:\n\n* In principle, every field that can be queried can also be used as a key for sorting.\n* By default the sort order is ascending. To reverse the order, prefix the field name with a hyphen (e.g. ?sort=-updated_on).\n* Only one field can be sorted on. Compound fields (e.g. sort on state first, followed by updated_on) are not supported.\n\n\n" - anchor: pagination title: Pagination description: Learn more about pagination icon: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM4LjgyIDE1MS42Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2IyZDRmZjt9LmNscy0ye2ZpbGw6IzRjOWFmZjt9LmNscy0ze2ZpbGw6IzAwNTJjYzt9LmNscy00e29wYWNpdHk6MC42O30uY2xzLTV7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudCk7fS5jbHMtNntmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTIpO30uY2xzLTd7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudC0zKTt9LmNscy04e2ZpbGw6dXJsKCNsaW5lYXItZ3JhZGllbnQtNCk7fS5jbH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MS41NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSI3OS4xNiIgeTE9IjEwMi4zMyIgeDI9IjExNy4yNCIgeTI9IjEwMi4zMyIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjEwMi4zMyIgeDI9IjcyLjYiIHkyPSIxMDIuMzMiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iMTI1Ljk4IiB5MT0iMTEzLjEiIHgyPSIxNDkuMDYiIHkyPSIxMTMuMSIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSI3OS4xNiIgeTE9IjExMy4xIiB4Mj0iMTE3LjI0IiB5Mj0iMTEzLjEiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSIxMTMuMSIgeDI9IjcyLjYiIHkyPSIxMTMuMSIvPjwvZz48L2c+PC9zdmc+ body: "\nEndpoints that return collections of objects should always apply pagination.\nPaginated collections are always wrapped in the following wrapper object:\n\n```json\n{\n \"size\": 5421,\n \"page\": 2,\n \"pagelen\": 10,\n \"next\": \"https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=3\",\n \"previous\": \"https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=1\",\n \"values\": [\n ...\n ]\n}\n```\n\nPagination is often page-bound, with a query parameter page indicating which\npage is to be returned.\n\nHowever, clients are not expected to construct URLs themselves by manipulating\nthe page number query parameter. Instead, the response contains a link to the\nnext page. This link should be treated as an opaque location that is not to be\nconstructed by clients or even assumed to be predictable. The only contract\naround the next link is that it will return the next chunk of results.\n\nLack of a next link in the response indicates the end of the collection.\n\nThe paginated response contains the following fields:\n\n| Field | Value |\n|------------|----------|\n| `size` | Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. |\n| `page` | Page number of the current results. This is an optional element that is not provided in all responses. |\n| `pagelen` | Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. |\n| `next` | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. |\n| `previous` | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. |\n| `values` | The list of objects. This contains at most `pagelen` objects. |\n\nThe link to the next page is included such that you don't have to hardcode or construct any links. Only values and next are guaranteed (except the last page, which lacks next). This is because the previous and size values can be expensive for some data sets.\n\nIt is important to realize that Bitbucket support both list-based pagination and iterator-based pagination. List-based pagination assumes that the collection is a discrete, immutable, consistently ordered, finite array of objects with a fixed size. Clients navigate a list-based collection by requesting offset-based chunks. In Bitbucket Cloud, list-based responses include the optional size, page, and previous element. The the next and previous links typically resemble something like /foo/bar?page=4.\n\nHowever, not all result sets can be treated as immutable and finite – much like how programming languages tend to distinguish between lists and arrays on one hand and iterators or stream on the other. Where an list-based pagination offers random access into any point in a collection, iterator-based pagination can only navigate forward one element at a time. In Bitbucket such iterator-based pagination contains the next link and pagelen elements, but not necessarily anything else. In these cases, the next link's value often contains an unpredictable hash instead of an explicit page number. The commits resource uses iterator-based pagination.\n" - anchor: partial-response title: Partial responses description: Tweak which fields are returned icon: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTYyLjQ0ODcgMjEwLjExMTUiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTYsIC5jbHMtOCB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTggewogICAgICAgIHN0cm9rZTogIzAwNjVmZjsK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NzA1IiB4Mj0iNzkuMTEzNSIgeTI9IjM2LjE3MDUiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTgiIHgxPSIxOC4zOTczIiB5MT0iMjYuNTgzOCIgeDI9Ijc5LjExMzUiIHkyPSIyNi41ODM4Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy05IiBwb2ludHM9IjE2Mi40NDkgMzguNzQyIDEyMy43MDcgMzguNzQyIDEyMy43MDcgMCAxNjIuNDQ5IDM4Ljc0MiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K body: "\nBy default, each endpoint returns the full representation of a resource and in\nsome cases that can be a lot of data. For example, retrieving a list of pull\nrequests can amount to quite a large document.\n\nFor better performance, you can ask the server to only return the fields you\nreally need and to omit unwanted data. To request a partial response and to\nadd or remove specific fields from a response, use the `fields` query\nparameter.\n\n\n### Example\n\nMost API resources embed a substantial list of links pointing to related\nresources. This saves the client from constructing its own URLs, but is\nsomewhat wasteful when the client doesn't need them.\n\nTo significantly reduce the size of the response, use `?fields=-links`:\n\n```json\n$ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links\n{\n \"nickname\": \"evzijst\",\n \"account_status\": \"active\",\n \"website\": \"\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{a288a0ab-e13b-43f0-a689-c4ef0a249875}\",\n \"created_on\": \"2010-07-07T05:16:36+00:00\",\n \"location\": null,\n \"type\": \"user\"\n}\n```\n\n### Fields parameter syntax\n\nThe `fields` parameter supports 3 modes of operation:\n\n1. Removal of select fields (e.g. `-links`)\n2. Pulling in additional fields not normally returned by an endpoint, while\n still getting all the default fields (e.g. `+reviewers`)\n3. Omitting all fields, except those specified (e.g. `owner.display_name`)\n\nThe fields parameter can contain a list of multiple comma-separated field names\n(e.g. `fields=owner.display_name,uuid,links.self.href`). The parameter itself is\nnot repeated.\n\nAs discussed at [Condensed Versus Full Objects](serialization#representations),\nmost objects that are embedded inside other objects (like how `owner` is an\nembedded `user` object in `repository`) appear in \"condensed\" form that omits\nmany fields. The `fields` parameter allows us to pull in additional fields in\nsuch cases.\n\nFor example, the embedded repository object in a pull request does not normally\ncontain its `owner`. To add that in we can use:\n`+values.destination.repository.owner`.\n\n\n### Wildcards\n\nThe asterisk can be used to match all fields on a particular level. For\nexample, removing all entries from the `links` element can be done like this:\n\n```json\n$ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links.*\n{\n \"nickname\": \"evzijst\",\n \"account_status\": \"active\",\n \"website\": \"\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{a288a0ab-e13b-43f0-a689-c4ef0a249875}\",\n \"links\": {},\n \"created_on\": \"2010-07-07T05:16:36+00:00\",\n \"location\": null,\n \"type\": \"user\"\n}\n```\n\nWildcards can be used in combination with exclusion and inclusion. For\ninstance, `-*,+foo,+bar` will remove all elements from the root level and then\nadd in `foo` and `bar`.\n\n\n### URL encoding\n\nBe aware that when using the `+foo.bar` syntax in the query string, that the\n\"+\" must be URL encoded as \"%2B\" and so the URL will be:\n\n```\nhttps://api.bitbucket.org/2.0/repositories/evzijst/interruptingcow?fields=%2Bowner.created_on\n```\n\nWithout URL escaping, \"+\" is interpreted as an encoded space which will not\nmatch any fields.\n\n\n### Field discovery\n\nWhile a resource's `self` URL, as well its \"collection\" URL typically return\nthe full object with all its fields, there are some exceptions for fields that\nare overly verbose or costly to generate.\n\nFor instance, a pull request contains the embedded lists of reviewers and\nparticipants. These fields are included from the `self` URL, but not from the\n`/pullrequests` collections resource, as it would impact performance too much.\n\nTo discover any additional fields that might not be included by default,\n`fields=*` can be used.\n\n\n### More examples\n\nIf we want to get a list of all reviewer nicknames on pull requests I created,\nwe could combine a [filter](filtering) with a partial response. This will omit\nall other data from the response:\n\n```\n/2.0/repositories/bitbucket/bitbucket/pullrequests?fields=values.id,values.reviewers.nickname,values.state&q=author.uuid%3D%22%7Bd301aafa-d676-4ee0-88be-962be7417567%7D%22\n{\n \"values\": [\n {\n \"reviewers\": [\n {\n \"nickname\": \"abhin\"\n },\n {\n \"nickname\": \"dtao\"\n },\n {\n \"nickname\": \"csomme\"\n }\n ],\n \"state\": \"OPEN\",\n \"id\": 11355\n },\n {\n \"reviewers\": [\n {\n \"nickname\": \"csomme\"\n },\n {\n \"nickname\": \"abhin\"\n },\n {\n \"nickname\": \"dstevens\"\n }\n ],\n \"state\": \"MERGED\",\n \"id\": 11347\n },\n {\n \"reviewers\": [\n {\n \"nickname\": \"csomme\"\n },\n {\n \"nickname\": \"jmooring\"\n },\n {\n \"nickname\": \"zdavis\"\n },\n {\n \"nickname\": \"flexbox\"\n }\n ],\n \"state\": \"OPEN\",\n \"id\": 11344\n }\n ]\n}\n```\n" - anchor: serialization title: Schemas and Serialization description: Learn more about object representations icon: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMjAuNzYyNCAyMDUuNTg2Ij4KICA8ZGVmcz4KICAgIDxzdHlsZT4KICAgICAgLmNscy0xIHsKICAgICAgICBpc29sYXRpb246IGlzb2xhdGU7CiAgICAgIH0KCiAgICAgIC5jbHMtMiwgLmNscy02IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC5jbHMtMTMsIC5jbHMtMywgLmNscy00LCAuY2xzLTYgewogICAgICAgIGZpbGw6IG5vbmU7CiAgICAgICAgc3Ryb2tlOiAjYzFjN2QwOwogICAgICAgIHN0cm9rZS1saW5lY2FwOiByb3VuZDsKICAgICAgICBzdHJva2UtbWl0ZXJsaW1pdDogMTA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMy43ODE2IDUuMjk0MzsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjMDA2NWZmOwogICAgICB9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NjUuODc0OSIgeTI9IjE3MS4zNjgxIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy04IiBwb2ludHM9IjM1LjI1NSA4OS42NDUgMzUuNDM0IDEwOS41NjkgMTcuOTE1IDEyMS40MTYgMTcuNzM2IDEwMS40OTIgMzUuMjU1IDg5LjY0NSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTQiIHBvaW50cz0iOTIuMzk0IDE3My44MTUgNzQuODc1IDE4NS42NjIgNTcuMTM5IDE3NC4xMzIgNzQuNjY0IDE2Mi4yOTEgOTIuMzk0IDE3My44MTUiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTE1IiBwb2ludHM9Ijc0Ljg3NSAxODUuNjYyIDc1LjA1NCAyMDUuNTg2IDU3LjMxOSAxOTQuMDU3IDU3LjEzOSAxNzQuMTMyIDc0Ljg3NSAxODUuNjYyIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy0xNiIgcG9pbnRzPSI5Mi4zOTQgMTczLjgxNSA5Mi41NzQgMTkzLjczOSA3NS4wNTQgMjA1LjU4NiA3NC44NzUgMTg1LjY2MiA5Mi4zOTQgMTczLjgxNSIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K body: ' ---- * [Open API Specification](#open-api-specification) * [JSON Schema](#json-schema) * [Condensed Versus Full Objects](#condensed-versus-full-objects) ____ ### Open API Specification Bitbucket uses the [Open API Specification](https://openapis.org) (OAI, formerly known as Swagger) to describe its APIs. Our OAI specification schema is hosted at [https://api.bitbucket.org/swagger.json](https://api.bitbucket.org/swagger.json) and serves as the canonical definition and comprehensive declaration of all available endpoints. The OAI specification makes writing client applications easier by: auto-generating boilerplate code (like data object classes) and dealing with authentication and error handling. You can find a comprehensive set of open tools for the OAI specification at: [https://github.com/swagger-api](https://github.com/swagger-api). ### JSON Schema Bitbucket uses JSON Schema to describe the layout of every type of object consumed or produced by the API. These schemas are collected under the `#definitions` element of our swagger.json file. When an endpoint expects an object as part of a POST or PUT, it also expects the object to validate against the JSON schemas. The same applies to objects returned by an endpoint. ### Condensed Versus Full Objects Most objects in Bitbucket come both in "full" and "partial" representation. The full representation is when all elements are included. This is the layout returned by a resource''s `self` location (e.g. `/2.0/repositories/foo/bar`), as well as resource collection endpoints (e.g. `/2.0/repositories`). However, Bitbucket objects often embed other objects. For example, a `repository` object embeds a `user` object for its owner. Likewise, a `pullrequest` object embeds its `repository` object. These related objects are embedded, or inlined, to reduce the "chatter" when clients make frequent followup API calls to collect information on common, related information. Embedded related objects are typically limited in their fields to avoid such object graphs from becoming too deep and noisy. They often exclude their own nested objects in an attempt to strike a balance between performance and utility. An object''s embedded or condensed representation tends to be standardized, meaning the fields included is the same set, regardless of where the object was embedded. ' - anchor: uri-uuid title: URI, UUID, and structures description: URL's, UUID's, errors, and timestamps icon: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTc5LjI2IDE3Ny42NSI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50KTt9LmNscy0ye2ZpbGw6IzA5MWU0Mjt9LmNscy0xMCwuY2xzLTExLC5jbHMtMywuY2xzLTQsLmNscy05e2ZpbGw6bm9uZTt9LmNscy0ze3N0cm9rZTojOTljMWZmO30uY2xzLTMsLmNscy00e3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MDt9LmNscy0xMiwuY2xzLTQsLmNscy05e3N0cm9rZTojZTVlOGVjO30uY2xzLTV7ZmlsbDojMzQ0NTYzO30uY2xzLTZ7ZmlsbDojZmY4YjAwO30uY2xzLTd7ZmlsbDojZmZjNDAwO30uY2xzLTh7ZmlsbDojM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UgY2xhc3M9ImNscy05IiB4MT0iNTkuNjEiIHkxPSIxMDIuODkiIHgyPSI5OS4zMyIgeTI9IjEwMi44OSIvPjxjaXJjbGUgY2xhc3M9ImNscy02IiBjeD0iMTMuNSIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTciIGN4PSIzMC4xOCIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTgiIGN4PSI0Ni44NiIgY3k9IjEyLjA4IiByPSI1LjExIi8+PC9nPjwvZz48L3N2Zz4= body: "\nYou should be familiar with REST architecture before writing an integration. Read this overview page to gain a good understanding of Bitbucket's REST implementation.\n\n----\n\n* [URI structure](#uri-structure)\n* [HTTP methods](#http-methods)\n* [UUID](#universally-unique-identifier)\n * [User object and UUID](#user-object-and-uuid)\n * [Repository object and UUID](#repository-object-and-uuid)\n * [Team object and UUID](#team-object-and-uuid)\n* [Standard error responses](#standardized-error-responses)\n* [Standard ISO-8601 timestamps](#standard-iso-8601-timestamps)\n\n----\n\n\n### URI structure\n\nAll Bitbucket Cloud requests start with the `https://api.bitbucket.org/2.0` prefix (for the 2.0 API) and `https://api.bitbucket.org/1.0` prefix (1.0 API).\n\nThe next segment of the URI path depends on the endpoint of the request. For example, using the curl command and the repositories endpoint you can list all the issues on Bitbucket's tutorial repository:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/tutorials/tutorials.bitbucket.org\n```\nGiven a specific endpoint, you can then drill down to a particular aspect or resource of that endpoint. The issues resource on a repository is an example:\n\n```\ncurl https://api.bitbucket.org/1.0/repositories/tutorials/tutorials.bitbucket.org/issues\n```\n\n#### HTTP methods\n\nA given endpoint or resource has a series of actions (or methods) associated with it. The Bitbucket service supports these standard HTTP methods:\n\n| Call | Description |\n|------|-------------|\n| GET | Retrieves information. |\n| PUT | Updates existing information. |\n| POST | Creates new information. |\n| DELETE | Removes existing information. |\n\nFor example, you can call use the POST action on the issues resource and create an issue on the issue tracker.\n\n**Specifying content length**\n\nYou can get a `411 Length Required` response. If this happens, the API requires a Content-Length header but the client is not sending it. You should add the header yourself, for example using the curl client:\n\n```\ncurl -r PUT --header \"Content-Length: 0\" -u user:app_password https://api.bitbucket.org/1.0/emails/rap@atlassian.com\n```\n\n### Universally Unique Identifier\n\nUUID's provide a single point of recognition for users, teams, and repositories. The UUID is distinct from the username, team name, and repository name fields and remains the same even when those fields change. For example when a user changes their username or moves a repository you will need to modify calls which use those identifiers but not if you are pointing to the UUID.\n\n#### UUID examples and structure\n\nUUID's work with both the 1.0 and 2.0 APIs for the user, team, and repository objects. The following examples the following characters are replacements for curly brackets: `%7B` replaces `{` and `%7D` replaces `}`. You will see this structure in the following example sections.\n\n#### User object and UUID\n\nWhen you make a call using either the username or the UUID for that user the response is the same.\n\n**Call with username**:\n\n```\ncurl https://api.bitbucket.org/2.0/users/tutorials\n```\n\n***Call with UUID for the user**:\n\n```\ncurl https://api.bitbucket.org/2.0/users/%7Bc788b2da-b7a2-404c-9e26-d3f077557007%7D\n```\n\n**Response**\n```JSON\n{\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"website\": \"https://tutorials.bitbucket.org/\",\n \"display_name\": \"tutorials account\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n }\n },\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"location\": \"Santa Monica, CA\",\n \"type\": \"user\"\n}\n```\n\n#### Repository object and UUID\n\nOnce you have the UUID for a repository you no longer need a username or team name to make the API call so long as you use an empty field. This helps you resolve repositories no matter if the username or team name changes.\n\n**Call with team name (1team) and repository name (moxie)**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/1team/moxie\n```\n**Call with UUID and empty field**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/%7B%7D/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D\n```\n\n**Call with UUID and teamname**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/1team/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D\n```\n\n**Response**\n\n```JSON\n{\n \"created_on\": \"2013-11-08T01:11:03.222520+00:00\",\n \"description\": \"\",\n \"fork_policy\": \"allow_forks\",\n \"full_name\": \"1team/moxie\",\n \"has_issues\": false,\n \"has_wiki\": false,\n \"is_private\": false,\n \"language\": \"\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/1team/moxie/avatar/32/\"\n },\n \"branches\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/branches\"\n },\n \"clone\": [\n {\n \"href\": \"https://bitbucket.org/1team/moxie.git\",\n \"name\": \"https\"\n },\n {\n \"href\": \"ssh://git@bitbucket.org/1team/moxie.git\",\n \"name\": \"ssh\"\n }\n ],\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/commits\"\n },\n \"downloads\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/downloads\"\n },\n \"forks\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/forks\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/1team/moxie\"\n },\n \"pullrequests\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/pullrequests\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie\"\n },\n \"tags\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/tags\"\n },\n \"watchers\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/watchers\"\n }\n },\n \"name\": \"moxie\",\n \"owner\": {\n \"display_name\": \"the team\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/1team/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/1team/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/teams/1team\"\n }\n },\n \"type\": \"team\",\n \"username\": \"1team\",\n \"uuid\": \"{aa559944-83c9-4963-a9a8-69ac8d9cf5d2}\"\n },\n \"project\": {\n \"key\": \"PROJ\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/user/1team/projects/PROJ/avatar/32\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/account/user/1team/projects/PROJ\"\n }\n },\n \"name\": \"Untitled project\",\n \"type\": \"project\",\n \"uuid\": \"{ab52aaeb-16ad-4fb0-bb1d-47e4f00367ff}\"\n },\n \"scm\": \"git\",\n \"size\": 33348,\n \"type\": \"repository\",\n \"updated_on\": \"2013-11-08T01:11:03.263237+00:00\",\n \"uuid\": \"{21fa9bf8-b5b2-4891-97ed-d590bad0f871}\",\n \"website\": \"\"\n}\n```\n\n#### Team object and UUID\n\nThis example shows a call for a list of team members using both the team name and with the UUID for the team object. As the call is unauthenticated in the following example the response object will only show members with public profiles. The response is the same in either case.\n\n**Call with teamname**\n\n```\ncurl https://api.bitbucket.org/2.0/teams/1team/members\n```\n**Call with UUID for team object**\n\n```\ncurl https://api.bitbucket.org/2.0/teams/%7Baa559944-83c9-4963-a9a8-69ac8d9cf5d2%7D/members\n```\n\n**Response**\n\n```JSON\n{\n \"page\": 1,\n \"pagelen\": 50,\n \"size\": 2,\n \"values\": [\n {\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"display_name\": \"tutorials account\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/tutorials/avatar/32/\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials/\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/tutorials\"\n }\n },\n \"location\": null,\n \"type\": \"user\",\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"website\": \"https://tutorials.bitbucket.org/\"\n },\n {\n \"created_on\": \"2013-12-10T14:44:13+00:00\",\n \"display_name\": \"Dan Stevens [Atlassian]\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/dans9190/avatar/32/\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/followers\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/following\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/dans9190/\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/dans9190\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/dans9190\"\n }\n },\n \"location\": null,\n \"type\": \"user\",\n \"username\": \"dans9190\",\n \"nickname\": \"dans9190\",\n \"account_status\": \"active\",\n \"uuid\": \"{1cd06601-cd0e-4fce-be03-e9ac226978b7}\",\n \"website\": \"\"\n }\n ]\n}\n```\n\n### Standardized error responses\n\nThe 2.0 API standardizes the error response layout. The 2.0 API serves a JSON\nobject along with the appropriate HTTP status code. The JSON object provides a\ndetailed problem description.\n\n```json\n{\n \"type\": \"error\",\n \"error\": {\n \"message\": \"Bad request\",\n \"fields\": {\n \"src\": [\n \"This field is required.\"\n ]\n },\n \"detail\": \"You must specify a valid source branch when creating a pull request.\",\n \"id\": \"d23a1cc5178f7637f3d9bf2d13824258\",\n \"data\": {\n \"extra\": \"Optional, endpoint-specific data to further augment the error.\"\n }\n }\n}\n```\n\nThis object contains an error element which contains the following nested\nelements:\n\n| Element | Description |\n|---------|-------------|\n| message | A short description of the problem. This element is always present. Its value may be localized. |\n| fields | This optional element is used in response to POST or PUT operations in which clients have provided invalid input. It contains a list of one or more client-provided fields that failed validation. The values may be localized. |\n| detail | An optional detailed explanation of the failure. Its value may be localized.\n| id | An optional unique error identifier that identifies the error in Bitbucket's logging system. If you feel you hit a bug in an API and this field is provided, please mention it if you decide to contact support as it will greatly help us narrow down the problem. |\n\n### Standard ISO-8601 timestamps\n\nAll 2.0 APIs use standardized ISO-8601 timestamps. In most cases, our APIs return UTC timestamps and for these, the timezone offset part will be 00:00. In rare cases where the original localized timestamp has significance, the timezone offset may identify the event's original timezone.\n" - anchor: cors-hypermedia title: Cors and hypermedia description: Learn about resources and linking icon: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM2LjYgMjE4LjQzIj48ZGVmcz48c3R5bGU+LmNscy0xe2lzb2xhdGlvbjppc29sYXRlO30uY2xzLTIsLmNscy0zLC5jbHM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AtMTEuNzMtMTEuMTcsMzEuNzcsMzEuNzcsMCwwLDAsMjkuMjgsNTYuMTNDNTguMjksMTkyLjQ0LDU0LjY4LDE4Ni45LDU0LjEyLDE4MC4zNloiLz48cGF0aCBjbGFzcz0iY2xzLTgiIGQ9Ik0xODkuNjIsMTgwLjM2QTU4LjksNTguOSwwLDAsMCwxODgsMTY5LjA4cy0yLjM1LTkuNDQtNy4zMy0xNi44M0E0My44OSw0My44OSwwLDAsMCwxNjksMTQxLjA4YTMxLjc3LDMxLjc3LDAsMCwwLDI5LjI4LDU2LjEzQzE5My43OSwxOTIuNDQsMTkwLjE4LDE4Ni45LDE4OS42MiwxODAuMzZaIi8+PGcgaWQ9Il9Hcm91cF8yIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPjxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTg5LjksMzMuNzhhMzIuNDYsMzIuNDYsMCwxLDEsMTEuODgsNDQuMzRBMzIuNDksMzIuNDksMCwwLDEsODkuOSwzMy43OFoiLz48L2c+PHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTEyMi4yMyw2Ni4xM2E1OC45LDU4LjksMCwwLDAtMS41OS0xMS4yN3MtMi4zNS05LjQ0LTcuMzMtMTYuODNjLTMuMzctNS05LjA2LTkuNzktMTUuNDMtMTMuNDhBMzIuNDQsMzIuNDQsMCwwLDAsMTI4Ljc3LDgwLjZDMTI1LjMxLDc2LjM5LDEyMi43LDcxLjYxLDEyMi4yMyw2Ni4xM1oiLz48L2c+PC9nPjwvZz48L3N2Zz4= body: "\nThis section describes [Cross-origin resource sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) (CORS), what content types we support in requests and responses, and hyperlinking resources in each json responses.\n\n\n----\n\n* [CORS](#cors)\n* [Supported content types](#supported-content-types)\n* [Resource links](#resource-links)\n\n----\n\n### Cors\n\nThe Bitbucket API supports Cross-origin resource sharing to allow requests for restricted resources across domains. For more information you can refer to:\n\n* [Wikipedia article on CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)\n* [W3C CORS recommendation](https://www.w3.org/TR/cors/)\n\nSending a general request from the api to bitbucket.com:\n\n`curl -i https://api.bitbucket.org -H \"origin: http://bitbucket.com\"`\n\nGives this result:\n\n HTTP/1.1 302 FOUND\n Server: nginx/1.6.2\n Vary: Cookie\n Cache-Control: max-age=900\n Content-Type: text/html; charset=utf-8\n Strict-Transport-Security: max-age=31536000\n Date: Tue, 21 Jun 2016 17:54:37 GMT\n Location: http://confluence.atlassian.com/x/IYBGDQ\n X-Served-By: app-110\n X-Static-Version: 2c820eb0d2b3\n ETag: \"d41d8cd98f00b204e9800998ecf8427e\"\n X-Content-Type-Options: nosniff\n X-Render-Time: 0.00379920005798\n Connection: Keep-Alive\n X-Version: 2c820eb0d2b3\n X-Frame-Options: SAMEORIGIN\n X-Request-Count: 383\n X-Cache-Info: cached\n Content-Length: 0\n\nSending the same request with the CORS check -X OPTIONS in the call:\n\n`curl -i https://api.bitbucket.org -H \"origin: http://bitbucket.com\" -X OPTIONS`\n\nGives this result:\n\n HTTP/1.1 302 FOUND\n Server: nginx/1.6.2\n Vary: Cookie\n Cache-Control: max-age=900\n Content-Type: text/html; charset=utf-8\n Access-Control-Expose-Headers: Accept-Ranges, Content-Encoding, Content-Length, Content-Type, ETag, Last-Modified\n Strict-Transport-Security: max-age=31536000\n Date: Tue, 21 Jun 2016 18:04:30 GMT\n Access-Control-Max-Age: 86400\n Location: http://confluence.atlassian.com/x/IYBGDQ\n X-Served-By: app-111\n Access-Control-Allow-Origin: *\n X-Static-Version: 2c820eb0d2b3\n ETag: \"d41d8cd98f00b204e9800998ecf8427e\"\n X-Content-Type-Options: nosniff\n X-Render-Time: 0.00371098518372\n Connection: keep-alive\n X-Version: 2c820eb0d2b3\n X-Frame-Options: SAMEORIGIN\n X-Request-Count: 357\n Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS\n Access-Control-Allow-Headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, Range, X-CsrftokenX-Requested-With\n X-Cache-Info: not cacheable; request wasn't a GET or HEAD\n Content-Length: 0\n\n\n\n### Supported content types\n\nThe default and primary content type for 2.0 APIs is JSON. This applies both to responses from the server and to the request bodies provided by the client.\n\nUnless documented otherwise, whenever creating a new (POST) or modifying an existing (PUT) object, your client must provide the object's normal representation. Not every object element can be mutated. For example, a repository's created_on date is an auto-generated, immutable field. Your client can omit immutable fields from a request body.\n\nIn some cases, a resource might also accept regular application/x-www-url-form-encoded POST and PUT bodies. Such bodies can be more convenient in scripts and command line usage. Requests bodies can contain contain nested elements or they can be flat (without nested elements). Clients can send flat request bodies as either as application/json or as application/x-www-url-form-encoded. Nested objects always require JSON.\n\n### Resource links\n\nEvery 2.0 object contains a links element that points to related resources or alternate representations. Use links to quickly discover and traverse to related objects. Links serve a \"self-documenting\" function for each endpoint. For example, the following request for a specific user:\n\n\n`$ curl https://api.bitbucket.org/2.0/users/tutorials`\n\n```json\n{\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"website\": \"https://tutorials.bitbucket.org/\",\n \"display_name\": \"tutorials account\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n }\n },\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"location\": \"Santa Monica, CA\",\n \"type\": \"user\"\n}\n```\nLinks can be actual REST API resources or they can be informational. In this example, informative resources include the user's avatar and the HTML URL for the user's Bitbucket account. Your client should avoid hardcoding an API's URL and instead use the URLs returned in API responses.\n\nA link's key is its `rel` (relationship) attribute and it contains a mandatory href element. For example, the following link:\n\n```json\n\"self\": {\n \"href\": \"https://api.bitbucket.org/api/2.0/users/tutorials\"\n}\n```\n\nThe rel for this link is self and the href is https://api.bitbucket.org/api/2.0/users/tutorials. A single rel key can contain an list (array) of href objects. Your client should anticipate that any rel key can contain one or more href objects.\n\nFinally, links can also contain optional elements. Two common optional elements are the name element and the title element. They are often used to disambiguate links that share the same rel key. In the example below, the repository object that contains a clone link with two href objects. Each object contains the optional name element to clarify its use.\n\n```json\n\"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/bitbucket\"\n },\n \"clone\": [\n {\n \"href\": \"https://api.bitbucket.org/evzijst/bitbucket.git\",\n \"name\": \"https\"\n },\n {\n \"href\": \"ssh://git@bitbucket.org/erik/bitbucket.git\",\n \"name\": \"ssh\"\n }\n ],\n ...\n}\n```\nLinks can support [URI Templates](https://tools.ietf.org/html/rfc6570); Those that do contain a `\"templated\": \"true\"` element.\n" - anchor: bb-connect title: Integrating with Bitbucket Cloud description: Build Bitbucket integration with Forge or Atlassian Connect icon: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjU3LjMxNjMgMTYyLjU5OTQiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjMzQ0NTYzOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICMxZG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Y2xhc3M9ImNscy0yIiB4PSIxMzguODE4NiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxODAuNjEwNCIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIyMjIuNDAyMiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSI3NC40ODk1IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSIxMTYuMjgxNCIgd2lkdGg9IjI0Ljc1MzYiIGhlaWdodD0iMTIuODgxNSIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTU4LjA3MzIiIHdpZHRoPSIyNC43NTM2IiBoZWlnaHQ9IjEyLjg4MTUiLz4KICAgICAgPC9nPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg== body: "\nYou can use [Forge](https://developer.atlassian.com/cloud/bitbucket/getting-started-with-forge/) \nor [Atlassian Connect](https://developer.atlassian.com/cloud/bitbucket/getting-started-with-connect/) \nto build apps which can connect with the Bitbucket UI and your own application set. An app could\nbe an integration with another existing service, new features for the Atlassian\napplication, or even a new product that runs within the Atlassian application.\n\nFor complete information see:\n[integrating with Bitbucket Cloud](https://developer.atlassian.com/cloud/bitbucket/)\n"