{ "opencollection": "1.0.0", "info": { "name": "Atlassian Admin Account Pullrequests API", "version": "1.0.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Pullrequests", "type": "folder" }, "items": [ { "info": { "name": "Atlassian Get A Task On A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/tasks/:task_id", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "task_id", "value": "", "type": "path", "description": "The ID of the task." }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns a specific pull request task." }, { "info": { "name": "Atlassian Update Task on Pull Request", "type": "http" }, "http": { "method": "PUT", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/tasks/:task_id", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "task_id", "value": "", "type": "path", "description": "The ID of the task." }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "This API operation updates an existing task associated with a specific pull request in a Bitbucket repository. By sending a PUT request to the endpoint with the workspace identifier, repository slug, pull request ID, and task ID, you can modify task properties such as its content, state, or other metadata. This is useful for managing and tracking action items or to-do items that are linked to code reviews within pull requests, allowing teams to update task status or details as work progresses du" }, { "info": { "name": "Atlassian Delete A Task On A Pull Request", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/tasks/:task_id", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "task_id", "value": "", "type": "path", "description": "The ID of the task." }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Deletes a specific pull request task." }, { "info": { "name": "Atlassian List Pull Requests For A User", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/pullrequests/:selected_user", "params": [ { "name": "selected_user", "value": "", "type": "path", "description": "This can either be the username of the pull request author, the author's UUID\nsurrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID.\n" }, { "name": "state", "value": "", "type": "query", "description": "Only return pull requests that are in this state. This parameter can be repeated." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns all pull requests authored by the specified user.

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

This endpoint also supports filtering and sorting of the results. See
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." }, { "info": { "name": "Atlassian List Pull Requests", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" }, { "name": "state", "value": "", "type": "query", "description": "Only return pull requests that are in this state. This parameter can be repeated." } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns all pull requests on the specified repository.

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

This endpoint also supports filtering and sorting of the results. See
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." }, { "info": { "name": "Atlassian Create A Pull Request", "type": "http" }, "http": { "method": "POST", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Creates a new pull request where the destination repository is
this repository and the author is the authenticated user.

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

```
curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repository/pullrequests \\
-u my-username:my-password \\
--request POST \\
--header 'Content-Type: application/json' \\
--data '{
\"title\": \"My Tit" }, { "info": { "name": "Atlassian List A Pull Request Activity Log", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/activity", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns a paginated list of the pull request's activity log.

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

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

Comment example:
```
{
\"pagelen\": 20,
\"values\": [
{
\"comment\": {
\"links\": " }, { "info": { "name": "Atlassian Get A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns the specified pull request." }, { "info": { "name": "Atlassian Update A Pull Request", "type": "http" }, "http": { "method": "PUT", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Mutates the specified pull request.

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

Only open pull requests can be mutated." }, { "info": { "name": "Atlassian List A Pull Request Activity Log", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/activity", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns a paginated list of the pull request's activity log.

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

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

Comment example:
```
{
\"pagelen\": 20,
\"values\": [
{
\"comment\": {
\"links\": " }, { "info": { "name": "Atlassian Approve A Pull Request", "type": "http" }, "http": { "method": "POST", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/approve", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Approve the specified pull request as the authenticated user." }, { "info": { "name": "Atlassian Unapprove A Pull Request", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/approve", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Redact the authenticated user's approval of the specified pull
request." }, { "info": { "name": "Atlassian List Comments On A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/comments", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns a paginated list of the pull request's comments.

This includes both global, inline comments and replies.

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

This endpoint also supports filtering and sorting of the results. See
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more
details." }, { "info": { "name": "Atlassian Create A Comment On A Pull Request", "type": "http" }, "http": { "method": "POST", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/comments", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Creates a new pull request comment.

Returns the newly created pull request comment." }, { "info": { "name": "Atlassian Get A Comment On A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/comments/:comment_id", "params": [ { "name": "comment_id", "value": "", "type": "path", "description": "The id of the comment." }, { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns a specific pull request comment." }, { "info": { "name": "Atlassian Update A Comment On A Pull Request", "type": "http" }, "http": { "method": "PUT", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/comments/:comment_id", "params": [ { "name": "comment_id", "value": "", "type": "path", "description": "The id of the comment." }, { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Updates a specific pull request comment." }, { "info": { "name": "Atlassian Delete A Comment On A Pull Request", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/comments/:comment_id", "params": [ { "name": "comment_id", "value": "", "type": "path", "description": "The id of the comment." }, { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Deletes a specific pull request comment." }, { "info": { "name": "Atlassian Resolve A Comment Thread", "type": "http" }, "http": { "method": "POST", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/comments/:comment_id/resolve", "params": [ { "name": "comment_id", "value": "", "type": "path", "description": "The id of the comment." }, { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Needs a more full description created." }, { "info": { "name": "Atlassian Reopen A Comment Thread", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/comments/:comment_id/resolve", "params": [ { "name": "comment_id", "value": "", "type": "path", "description": "The id of the comment." }, { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Needs a more full description created." }, { "info": { "name": "Atlassian List Commits On A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/commits", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns a paginated list of the pull request's commits.

These are the commits that are being merged into the destination
branch when the pull requests gets accepted." }, { "info": { "name": "Atlassian Decline A Pull Request", "type": "http" }, "http": { "method": "POST", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/decline", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Declines the pull request." }, { "info": { "name": "Atlassian List Changes In A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/diff", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get)
with the revspec that corresponds to the pull request." }, { "info": { "name": "Atlassian Get The Diff Stat For A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/diffstat", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get)
with the revspec that corresponds to the pull request." }, { "info": { "name": "Atlassian Merge A Pull Request", "type": "http" }, "http": { "method": "POST", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/merge", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" }, { "name": "async", "value": "", "type": "query", "description": "Default value is false.\n\n\nWhen set to true, runs merge asynchronously and\nimmediately returns a 202 with polling link to\nthe task-status API in the Location header.\n\n\nWhen set to false, runs merge and waits for it to\ncomplete, returning 200 when it succeeds. If the\nduration of the merge exceeds a timeout threshold,\nthe API returns a 202 with polling link to the\ntask-status API in the Location header." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Merges the pull request." }, { "info": { "name": "Atlassian Get The Merge Task Status For A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/merge/task-status/:task_id", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "task_id", "value": "", "type": "path", "description": "ID of the merge task" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "When merging a pull request takes too long, the client receives a
task ID along with a 202 status code. The task ID can be used in a call
to this endpoint to check the status of a merge task.

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

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

```
HTTP/2 200
{
\"task_status\": \"PENDING\",
\"links\": {
" }, { "info": { "name": "Atlassian Get The Patch For A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/patch", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get)
with the revspec that corresponds to pull request." }, { "info": { "name": "Atlassian Request Changes For A Pull Request", "type": "http" }, "http": { "method": "POST", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/request-changes", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Needs a more full description created." }, { "info": { "name": "Atlassian Remove Change Request For A Pull Request", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/request-changes", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Needs a more full description created." }, { "info": { "name": "Atlassian List Tasks On A Pull Request", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/tasks", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" }, { "name": "q", "value": "", "type": "query", "description": "\nQuery string to narrow down the response. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details." }, { "name": "sort", "value": "", "type": "query", "description": "\nField by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\nDefaults to `created_on`.\n" }, { "name": "pagelen", "value": "", "type": "query", "description": "\nCurrent number of objects on the existing page.\nThe default value is 10 with 100 being the maximum allowed value.\nIndividual APIs may enforce different values.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns a paginated list of the pull request's tasks.

This endpoint supports filtering and sorting of the results by the 'task' field.
See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." }, { "info": { "name": "Atlassian Create A Task On A Pull Request", "type": "http" }, "http": { "method": "POST", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/tasks", "params": [ { "name": "pull_request_id", "value": "", "type": "path", "description": "The id of the pull request." }, { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Creates a new pull request task.

Returns the newly created pull request task.

Tasks can optionally be created in relation to a comment specified by the comment's ID which
will cause the task to appear below the comment on a pull request when viewed in Bitbucket." }, { "info": { "name": "Atlassian List Pull Requests That Contain A Commit", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/commit/:commit/pullrequests", "params": [ { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces" }, { "name": "repo_slug", "value": "", "type": "path", "description": "The repository; either the UUID in curly braces, or the slug" }, { "name": "commit", "value": "", "type": "path", "description": "The SHA1 of the commit" }, { "name": "page", "value": "", "type": "query", "description": "Which page to retrieve" }, { "name": "pagelen", "value": "", "type": "query", "description": "How many pull requests to retrieve per page" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details." }, { "info": { "name": "Atlassian List Default Reviewers", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/default-reviewers", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns the repository's default reviewers.

These are the users that are automatically added as reviewers on every
new pull request that is created. To obtain the repository's default reviewers
as well as the default reviewers inherited from the project, use the
[effective-default-reveiwers](#api-repositories-workspace-repo-slug-effective-default-reviewers-get) endpoint." }, { "info": { "name": "Atlassian Get A Default Reviewer", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/default-reviewers/:target_username", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "target_username", "value": "", "type": "path", "description": "This can either be the username or the UUID of the default reviewer,\nsurrounded by curly-braces, for example: `{account UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns the specified reviewer.

This can be used to test whether a user is among the repository's
default reviewers list. A 404 indicates that that specified user is not
a default reviewer." }, { "info": { "name": "Atlassian Add A User To The Default Reviewers", "type": "http" }, "http": { "method": "PUT", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/default-reviewers/:target_username", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "target_username", "value": "", "type": "path", "description": "This can either be the username or the UUID of the default reviewer,\nsurrounded by curly-braces, for example: `{account UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Adds the specified user to the repository's list of default
reviewers.

This method is idempotent. Adding a user a second time has no effect." }, { "info": { "name": "Atlassian Remove A User From The Default Reviewers", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/default-reviewers/:target_username", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "target_username", "value": "", "type": "path", "description": "This can either be the username or the UUID of the default reviewer,\nsurrounded by curly-braces, for example: `{account UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Removes a default reviewer from the repository." }, { "info": { "name": "Atlassian List Effective Default Reviewers", "type": "http" }, "http": { "method": "GET", "url": "https://api.atlassian.com/repositories/:workspace/:repo_slug/effective-default-reviewers", "params": [ { "name": "repo_slug", "value": "", "type": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n" }, { "name": "workspace", "value": "", "type": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n" } ], "auth": { "type": "oauth2", "flow": "authorization_code", "authorizationUrl": "https://auth.atlassian.com/authorize", "accessTokenUrl": "https://auth.atlassian.com/oauth/token", "credentials": { "clientId": "{{clientId}}", "clientSecret": "{{clientSecret}}" } } }, "docs": "Returns the repository's effective default reviewers. This includes both default
reviewers defined at the repository level as well as those inherited from its project.

These are the users that are automatically added as reviewers on every
new pull request that is created." } ] } ], "bundled": true }