{ "opencollection": "1.0.0", "info": { "name": "Bitbucket Addon Pullrequests API", "version": "2.0" }, "items": [ { "info": { "name": "Pullrequests", "type": "folder" }, "items": [ { "info": { "name": "List pull requests that contain a commit", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "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": "List default reviewers", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns the repository's default reviewers.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created. To obtain the repository's default reviewers\nas well as the default reviewers inherited from the project, use the\n[effective-default-reveiwers](#api-repositories-workspace-repo-slug-effective-default-reviewers-get) endpoint." }, { "info": { "name": "Get a default reviewer", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns the specified reviewer.\n\nThis can be used to test whether a user is among the repository's\ndefault reviewers list. A 404 indicates that that specified user is not\na default reviewer." }, { "info": { "name": "Add a user to the default reviewers", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/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" } ] }, "docs": "Adds the specified user to the repository's list of default\nreviewers.\n\nThis method is idempotent. Adding a user a second time has no effect." }, { "info": { "name": "Remove a user from the default reviewers", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/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" } ] }, "docs": "Removes a default reviewer from the repository." }, { "info": { "name": "List effective default reviewers", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns the repository's effective default reviewers. This includes both default\nreviewers defined at the repository level as well as those inherited from its project.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created." }, { "info": { "name": "List pull requests", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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." } ] }, "docs": "Returns all pull requests on the specified repository.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." }, { "info": { "name": "Create a pull request", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/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" } ] }, "docs": "Creates a new pull request where the destination repository is\nthis repository and the author is the authenticated user.\n\nThe minimum required fields to create a pull request are `title` and\n`source`, specified by a branch name.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repository/pullrequests \\\n -u my-username:my-password \\\n --request POST \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"title\": \"My Title\",\n \"source\": {\n " }, { "info": { "name": "List a pull request activity log", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns a paginated list of the pull request's activity log.\n\nThis handler serves both a v20 and internal endpoint. The v20 endpoint\nreturns reviewer comments, updates, approvals and request changes. The internal\nendpoint includes those plus tasks and attachments.\n\nComments created on a file or a line of code have an inline property.\n\nComment example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"comment\": {\n \"links\": {\n \"self\": {\n " }, { "info": { "name": "Get a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns the specified pull request." }, { "info": { "name": "Update a pull request", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/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" } ] }, "docs": "Mutates the specified pull request.\n\nThis can be used to change the pull request's branches or description.\n\nOnly open pull requests can be mutated." }, { "info": { "name": "List a pull request activity log", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns a paginated list of the pull request's activity log.\n\nThis handler serves both a v20 and internal endpoint. The v20 endpoint\nreturns reviewer comments, updates, approvals and request changes. The internal\nendpoint includes those plus tasks and attachments.\n\nComments created on a file or a line of code have an inline property.\n\nComment example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"comment\": {\n \"links\": {\n \"self\": {\n " }, { "info": { "name": "Approve a pull request", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/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" } ] }, "docs": "Approve the specified pull request as the authenticated user." }, { "info": { "name": "Unapprove a pull request", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/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" } ] }, "docs": "Redact the authenticated user's approval of the specified pull\nrequest." }, { "info": { "name": "List comments on a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns a paginated list of the pull request's comments.\n\nThis includes both global, inline comments and replies.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more\ndetails." }, { "info": { "name": "Create a comment on a pull request", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/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" } ] }, "docs": "Creates a new pull request comment.\n\nReturns the newly created pull request comment." }, { "info": { "name": "Get a comment on a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns a specific pull request comment." }, { "info": { "name": "Update a comment on a pull request", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/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" } ] }, "docs": "Updates a specific pull request comment." }, { "info": { "name": "Delete a comment on a pull request", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/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" } ] }, "docs": "Deletes a specific pull request comment." }, { "info": { "name": "Resolve a comment thread", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/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" } ] }, "docs": "Resolve a comment thread" }, { "info": { "name": "Reopen a comment thread", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/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" } ] }, "docs": "Reopen a comment thread" }, { "info": { "name": "List commits on a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns a paginated list of the pull request's commits.\n\nThese are the commits that are being merged into the destination\nbranch when the pull requests gets accepted." }, { "info": { "name": "Decline a pull request", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/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" } ] }, "docs": "Declines the pull request." }, { "info": { "name": "List changes in a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get)\nwith the revspec that corresponds to the pull request." }, { "info": { "name": "Get the diff stat for a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get)\nwith the revspec that corresponds to the pull request." }, { "info": { "name": "Merge a pull request", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/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." } ] }, "docs": "Merges the pull request." }, { "info": { "name": "Get the merge task status for a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "When merging a pull request takes too long, the client receives a\ntask ID along with a 202 status code. The task ID can be used in a call\nto this endpoint to check the status of a merge task.\n\n```\ncurl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\n```\n\nIf the merge task is not yet finished, a PENDING status will be returned.\n\n```\nHTTP/2 200\n{\n \"task_status\": \"PENDING\",\n \"links\": {\n \"self\": {\n \"href\": \"h" }, { "info": { "name": "Get the patch for a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get)\nwith the revspec that corresponds to pull request." }, { "info": { "name": "Request changes for a pull request", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/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" } ] }, "docs": "Request changes for a pull request" }, { "info": { "name": "Remove change request for a pull request", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/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" } ] }, "docs": "Remove change request for a pull request" }, { "info": { "name": "List commit statuses for a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/repositories/:workspace/:repo_slug/pullrequests/:pull_request_id/statuses", "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": "Query string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n" }, { "name": "sort", "value": "", "type": "query", "description": "Field by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\nDefaults to `created_on`.\n" } ] }, "docs": "Returns all statuses (e.g. build results) for the given pull\nrequest." }, { "info": { "name": "List tasks on a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns a paginated list of the pull request's tasks.\n\nThis endpoint supports filtering and sorting of the results by the 'task' field.\nSee [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." }, { "info": { "name": "Create a task on a pull request", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/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" } ] }, "docs": "Creates a new pull request task.\n\nReturns the newly created pull request task.\n\nTasks can optionally be created in relation to a comment specified by the comment's ID which\nwill cause the task to appear below the comment on a pull request when viewed in Bitbucket." }, { "info": { "name": "Get a task on a pull request", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/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" } ] }, "docs": "Returns a specific pull request task." }, { "info": { "name": "Update a task on a pull request", "type": "http" }, "http": { "method": "PUT", "url": "{{baseUrl}}/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" } ] }, "docs": "Updates a specific pull request task." }, { "info": { "name": "Delete a task on a pull request", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/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" } ] }, "docs": "Deletes a specific pull request task." }, { "info": { "name": "List workspace pull requests for a user", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/workspaces/:workspace/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": "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." } ] }, "docs": "Returns all workspace pull requests authored by the specified user.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details." } ] } ], "bundled": true }