| Operator | \nDefinition | \nExample | \n
|---|---|---|
| \"=\" | \ntest for equality | \nnickname = \"evzijst\" | \n
| \"!=\" | \nnot equal | \nis_private != true | \n
| \"~\" | \ncase-insensitive text contains | \ndescription ~ \"beef\" | \n
| \"!~\" | \ncase-insensitive not contains | \ndescription !~ \"fubar\" | \n
| \">\" | \ngreater than | \npriority > \"major\" | \n
| \">=\" | \ngreater than or equal | \npriority <= \"trivial\" | \n
| \"<\" | \nless than | \nid < 1234 | \n
| \"<=\" | \nless than or equal | \nupdated_on <= 2015-03-04 | \n
| Type | \nDescription | \nExample | \n
|---|---|---|
| String | \nany text inside double quotes | \n\"foo\" | \n
| Number | \narbitrary precision integers and floats | \n1, -10.302 | \n
| Null | \nto test for the absence of a value | \nnull | \n
| boolean | \nthe unquoted strings true or false | \ntrue, false | \n
| datetime | \nan unquoted ISO-8601 date time string with the timezone offset, milliseconds and entire time component being optional | \n2015-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
| Field | \nValue | \n
|---|---|
size | \n 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 | \n Page number of the current results. This is an optional element that is not provided in all responses. | \n
pagelen | \n 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 | \n 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 | \n 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.\n Use this link to navigate the result set and refrain from constructing your own URLs. | \n
values | \n The list of objects. This contains at most pagelen objects. | \n
| Call | \nDescription | \n
|---|---|
| GET | \nRetrieves information. | \n
| PUT | \nUpdates existing information. | \n
| POST | \nCreates new information. | \n
| DELETE | \nRemoves existing information. | \n
| Element | \nDescription | \n
|---|---|
| message | \nA short description of the problem. This element is always present. Its value may be localized. | \n
| fields | \nThis 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 | \nAn optional detailed explanation of the failure. Its value may be localized. | \n
| id | \nAn 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
Add a GEORDI_OUTPUT_DIR setting
\",\n \"type\": \"rendered\"\n }\n },\n \"hash\": \"f7591a13eda445d9a9167f98eb870319f4b6c2d8\",\n \"repository\": {\n \"name\": \"geordi\",\n \"type\": \"repository\",\n \"full_name\": \"bitbucket/geordi\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bitbucket/geordi\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B85d08b4e-571d-44e9-a507-fa476535aa98%7D?ts=1730260\"\n }\n },\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/patch/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bitbucket/geordi/commits/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diff/f7591a13eda445d9a9167f98eb870319f4b6c2d8\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"Brodie Rao \",\n \"type\": \"author\",\n \"user\": {\n \"display_name\": \"Brodie Rao\",\n \"uuid\": \"{9484702e-c663-4afd-aefb-c93a8cd31c28}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca/613070db-28b0-421f-8dba-ae8a87e2a5c7/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"brodie\",\n \"account_id\": \"557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca\"\n }\n },\n \"summary\": {\n \"raw\": \"Add a GEORDI_OUTPUT_DIR setting\",\n \"markup\": \"markdown\",\n \"html\": \"Add a GEORDI_OUTPUT_DIR setting
\",\n \"type\": \"rendered\"\n },\n \"participants\": [],\n \"parents\": [\n {\n \"type\": \"commit\",\n \"hash\": \"f06941fec4ef6bcb0c2456927a0cf258fa4f899b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f06941fec4ef6bcb0c2456927a0cf258fa4f899b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bitbucket/geordi/commits/f06941fec4ef6bcb0c2456927a0cf258fa4f899b\"\n }\n }\n }\n ],\n \"date\": \"2012-07-16T19:37:54+00:00\",\n \"message\": \"Add a GEORDI_OUTPUT_DIR setting\",\n \"type\": \"commit\"\n}\n```", "parameters": [], "tags": [ "commits" ] }, "parameters": [ { "name": "commit", "in": "path", "description": "The commit's SHA1.", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/approve": { "delete": { "responses": { "204": { "description": "An empty response indicating the authenticated user's approval has been withdrawn." }, "404": { "description": "If the specified commit, or the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Redact the authenticated user's approval of the specified commit.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", "parameters": [], "tags": [ "commits" ] }, "post": { "responses": { "200": { "description": "The `participant` object recording that the authenticated user approved the commit.", "schema": { "$ref": "#/definitions/participant" } }, "404": { "description": "If the specified commit, or the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "repository:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Approve the specified commit as the authenticated user.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", "parameters": [], "tags": [ "commits" ] }, "parameters": [ { "name": "commit", "in": "path", "description": "The commit's SHA1.", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments": { "get": { "responses": { "200": { "description": "A paginated list of commit comments.", "schema": { "$ref": "#/definitions/paginated_commit_comments" } } }, "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the commit's comments.\n\nThis includes both global and inline comments.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.", "parameters": [ { "name": "q", "in": "query", "description": "Query string to narrow down the response as per\n[filtering and sorting](../../../../../../meta/filtering).\n", "required": false, "type": "string" }, { "name": "sort", "in": "query", "description": "Field by which the results should be sorted as per\n[filtering and sorting](../../../../../../meta/filtering).\n", "required": false, "type": "string" } ], "tags": [ "commits" ] }, "post": { "responses": { "201": { "description": "The newly created comment.", "headers": { "Location": { "type": "string", "description": "The location of the newly created comment." } } }, "400": { "description": "If the comment was detected as spam, or if the parent comment is not attached to the same node as the new comment" }, "404": { "description": "If a parent ID was passed in that cannot be found" } }, "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates new comment on the specified commit.\n\nTo post a reply to an existing comment, include the `parent.id` field:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \\\n -X POST -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"One more thing!\"},\n \"parent\": {\"id\": 5728901}}'\n```", "parameters": [ { "name": "_body", "in": "body", "description": "The specified comment.", "required": true, "schema": { "$ref": "#/definitions/commit_comment" } } ], "tags": [ "commits" ] }, "parameters": [ { "name": "commit", "in": "path", "description": "The commit's SHA1.", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}": { "get": { "responses": { "200": { "description": "The commit comment.", "schema": { "$ref": "#/definitions/commit_comment" } } }, "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified commit comment.", "parameters": [], "tags": [ "commits" ] }, "parameters": [ { "name": "comment_id", "in": "path", "description": "The id of the comment.", "required": true, "type": "integer" }, { "name": "commit", "in": "path", "description": "The commit's SHA1.", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}": { "put": { "responses": { "204": { "description": "An empty response." } }, "operationId": "updateCommitHostedPropertyValue", "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", "parameters": [ { "required": true, "type": "string", "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace" }, { "required": true, "type": "string", "description": "The repository.", "in": "path", "name": "repo_slug" }, { "required": true, "type": "string", "description": "The commit.", "in": "path", "name": "commit" }, { "required": true, "type": "string", "description": "The key of the Connect app.", "in": "path", "name": "app_key" }, { "required": true, "type": "string", "description": "The name of the property.", "in": "path", "name": "property_name" } ], "tags": [ "properties" ] }, "delete": { "responses": { "204": { "description": "An empty response." } }, "operationId": "deleteCommitHostedPropertyValue", "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", "parameters": [ { "required": true, "type": "string", "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace" }, { "required": true, "type": "string", "description": "The repository.", "in": "path", "name": "repo_slug" }, { "required": true, "type": "string", "description": "The commit.", "in": "path", "name": "commit" }, { "required": true, "type": "string", "description": "The key of the Connect app.", "in": "path", "name": "app_key" }, { "required": true, "type": "string", "description": "The name of the property.", "in": "path", "name": "property_name" } ], "tags": [ "properties" ] }, "get": { "responses": { "200": { "description": "The value of the property." } }, "operationId": "getCommitHostedPropertyValue", "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", "parameters": [ { "required": true, "type": "string", "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace" }, { "required": true, "type": "string", "description": "The repository.", "in": "path", "name": "repo_slug" }, { "required": true, "type": "string", "description": "The commit.", "in": "path", "name": "commit" }, { "required": true, "type": "string", "description": "The key of the Connect app.", "in": "path", "name": "app_key" }, { "required": true, "type": "string", "description": "The name of the property.", "in": "path", "name": "property_name" } ], "tags": [ "properties" ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests": { "get": { "responses": { "200": { "description": "The paginated list of pull requests.", "schema": { "$ref": "#/definitions/paginated_pullrequests" } }, "202": { "description": "The repository's pull requests are still being indexed.", "schema": { "$ref": "#/definitions/paginated_pullrequests" } }, "404": { "description": "Either the repository does not exist, or pull request commit links have not yet been indexed.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "required": true, "type": "string", "description": "The account; either the UUID in curly braces, or the account_id", "in": "path", "name": "username" }, { "required": true, "type": "string", "description": "The repository; either the UUID in curly braces, or the slug", "in": "path", "name": "repo_slug" }, { "required": true, "type": "string", "description": "The SHA1 of the commit", "in": "path", "name": "commit" }, { "description": "Which page to retrieve", "format": "int32", "default": 1, "required": false, "in": "query", "type": "integer", "name": "page" }, { "description": "How many pull requests to retrieve per page", "format": "int32", "default": 30, "required": false, "in": "query", "type": "integer", "name": "pagelen" } ], "tags": [ "pullrequests" ], "produces": [ "application/json" ], "summary": "Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.", "operationId": "getPullrequestsForCommit" } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports": { "get": { "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/paginated_reports" } } }, "description": "Returns a paginated list of Reports linked to this commit.", "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The commit for which to retrieve reports.", "required": true, "type": "string", "name": "commit", "in": "path" } ], "tags": [ "reports", "commits" ], "produces": [ "application/json" ], "operationId": "getReportsForCommit" } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}": { "put": { "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/report" } }, "400": { "description": "The provided Report object is malformed or incomplete.", "schema": { "$ref": "#/definitions/error" } } }, "description": "Creates or updates a report for the specified commit.\nTo upload a report, make sure to generate an ID that is unique across all reports for that commit. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-001.\n\n### Sample cURL request:\n```\ncurl --request PUT 'https://api.bitbucket.org/2.0/repositories/Removed assignee, changed kind and priority.
\",\n \"type\": \"rendered\"\n },\n \"type\": \"issue_change\",\n \"id\": 2\n }\n ],\n \"page\": 1\n}\n```\n\nChanges support [filtering and sorting](../../../meta/filtering) that\ncan be used to search for specific changes. For instance, to see\nwhen an issue transitioned to \"resolved\":\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/site/master/issues/1/changes \\\n -G --data-urlencode='q=changes.state.new = \"resolved\"'\n```\n\nThis resource is only available on repositories that have the issue\ntracker enabled.\n\nN.B.\n\nThe `changes.assignee` and `changes.assignee_account_id` fields are not\na `user` object. Instead, they contain the raw `username` and\n`account_id` of the user. This is to protect the integrity of the audit\nlog even after a user account gets deleted.\n\nThe `changes.assignee` field is deprecated will disappear in the\nfuture. Use `changes.assignee_account_id` instead.", "parameters": [ { "name": "q", "in": "query", "description": "\nQuery string to narrow down the response. See\n[filtering and sorting](../../../meta/filtering) for details.", "required": false, "type": "string" }, { "name": "sort", "in": "query", "description": "\nName of a response property to sort results. See\n[filtering and sorting](../../../meta/filtering#query-sort)\nfor details.\n", "required": false, "type": "string" } ], "tags": [ "issue_tracker" ] }, "post": { "responses": { "201": { "description": "The newly created issue change.", "schema": { "$ref": "#/definitions/issue_change" }, "headers": { "Location": { "type": "string", "description": "The (absolute) URL of the newly created issue change." } } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "When the authenticated user isn't authorized to modify the issue.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Makes a change to the specified issue.\n\nFor example, to change an issue's state and assignee, create a new\nchange object that modifies these fields:\n\n```\ncurl https://api.bitbucket.org/2.0/site/master/issues/1234/changes \\\n -s -u evzijst -X POST -H \"Content-Type: application/json\" \\\n -d '{\n \"changes\": {\n \"assignee_account_id\": {\n \"new\": \"557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443\"\n },\n \"state\": {\n \"new\": 'resolved\"\n }\n }\n \"message\": {\n \"raw\": \"This is now resolved.\"\n }\n }'\n```\n\nThe above example also includes a custom comment to go alongside the\nchange. This comment will also be visible on the issue page in the UI.\n\nThe fields of the `changes` object are strings, not objects. This\nallows for immutable change log records, even after user accounts,\nmilestones, or other objects recorded in a change entry, get renamed or\ndeleted.\n\nThe `assignee_account_id` field stores the account id. When POSTing a\nnew change and changing the assignee, the client should therefore use\nthe user's account_id in the `changes.assignee_account_id.new` field.\n\nThis call requires authentication. Private repositories or private\nissue trackers require the caller to authenticate with an account that\nhas appropriate authorization.", "parameters": [ { "name": "_body", "in": "body", "description": "The new issue state change. The only required elements are `changes.[].new`. All other elements can be omitted from the body.", "required": true, "schema": { "$ref": "#/definitions/issue_change" } } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "name": "issue_id", "in": "path", "description": "The issue id", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes/{change_id}": { "get": { "responses": { "200": { "description": "The specified issue change object.", "schema": { "$ref": "#/definitions/issue_change" } }, "404": { "description": "The specified repository or issue change does not exist or does not have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue change object.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", "parameters": [], "tags": [ "issue_tracker" ] }, "parameters": [ { "name": "change_id", "in": "path", "description": "The issue change id", "required": true, "type": "string" }, { "name": "issue_id", "in": "path", "description": "The issue id", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments": { "get": { "responses": { "200": { "description": "A paginated list of issue comments.", "schema": { "$ref": "#/definitions/paginated_issue_comments" } } }, "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a paginated list of all comments that were made on the\nspecified issue.\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](../../../../../../meta/filtering) for more details.", "parameters": [ { "name": "q", "in": "query", "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](../../../../../../meta/filtering).", "required": false, "type": "string" } ], "tags": [ "issue_tracker" ] }, "post": { "responses": { "201": { "description": "The newly created comment.", "headers": { "Location": { "type": "string", "description": "The location of the newly issue comment." } } }, "400": { "description": "If the input was invalid, or if the comment being created is detected as spam ", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new issue comment.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/ \\\n -X POST -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"Lorem ipsum.\"}}'\n```", "parameters": [ { "name": "_body", "in": "body", "description": "The new issue comment object.", "required": true, "schema": { "$ref": "#/definitions/issue_comment" } } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "name": "issue_id", "in": "path", "description": "The issue id", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}": { "delete": { "responses": { "204": { "description": "Indicates successful deletion." } }, "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes the specified comment.", "parameters": [ { "name": "_body", "in": "body", "description": "The updated comment.", "required": true, "schema": { "$ref": "#/definitions/issue_comment" } } ], "tags": [ "issue_tracker" ] }, "get": { "responses": { "200": { "description": "The issue comment.", "schema": { "$ref": "#/definitions/issue_comment" } } }, "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue comment object.", "parameters": [], "tags": [ "issue_tracker" ] }, "put": { "responses": { "200": { "description": "The updated issue comment.", "schema": { "$ref": "#/definitions/issue_comment" } }, "400": { "description": "If the input was invalid, or if the update to the comment is detected as spam ", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Updates the content of the specified issue comment. Note that only\nthe `content.raw` field can be modified.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/5728901 \\\n -X PUT -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"Lorem ipsum.\"}'\n```", "parameters": [ { "name": "_body", "in": "body", "description": "The updated comment.", "required": true, "schema": { "$ref": "#/definitions/issue_comment" } } ], "tags": [ "issue_tracker" ] }, "parameters": [ { "name": "comment_id", "in": "path", "description": "The id of the comment.", "required": true, "type": "integer" }, { "name": "issue_id", "in": "path", "description": "The issue id", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote": { "delete": { "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "account:write", "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Retract your vote.", "parameters": [], "tags": [ "issue_tracker" ] }, "get": { "responses": { "204": { "description": "If the authenticated user has not voted for this issue.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the authenticated user has not voted for this issue, or when the repo does not exist, or does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "account", "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Check whether the authenticated user has voted for this issue.\nA 204 status code indicates that the user has voted, while a 404\nimplies they haven't.", "parameters": [], "tags": [ "issue_tracker" ] }, "put": { "responses": { "204": { "description": "Indicating the authenticated user has cast their vote successfully.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "account:write", "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Vote for this issue.\n\nTo cast your vote, do an empty PUT. The 204 status code indicates that\nthe operation was successful.", "parameters": [], "tags": [ "issue_tracker" ] }, "parameters": [ { "name": "issue_id", "in": "path", "description": "The issue id", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch": { "delete": { "responses": { "204": { "description": "Indicates that the authenticated user successfully stopped watching this issue.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "account:write", "issue:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Stop watching this issue.", "parameters": [], "tags": [ "issue_tracker" ] }, "get": { "responses": { "204": { "description": "If the authenticated user is watching this issue.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "account", "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Indicated whether or not the authenticated user is watching this\nissue.", "parameters": [], "tags": [ "issue_tracker" ] }, "put": { "responses": { "204": { "description": "Indicates that the authenticated user successfully started watching this issue.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "When the request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "account:write", "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Start watching this issue.\n\nTo start watching this issue, do an empty PUT. The 204 status code\nindicates that the operation was successful.", "parameters": [], "tags": [ "issue_tracker" ] }, "parameters": [ { "name": "issue_id", "in": "path", "description": "The issue id", "required": true, "type": "string" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/merge-base/{revspec}": { "get": { "responses": { "200": { "description": "The merge base of the provided spec.", "schema": { "$ref": "#/definitions/commit" } }, "401": { "description": "If the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "403": { "description": "If the authenticated user does not have access to any of the repositories specified.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the repository or ref in the spec does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the best common ancestor between two commits, specified in a revspec\nof 2 commits (e.g. 3a8b42..9ff173).\n\nIf more than one best common ancestor exists, only one will be returned. It is\nunspecified which will be returned.", "parameters": [], "tags": [ "commits" ] }, "parameters": [ { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "revspec", "in": "path", "description": "A commit range using double dot notation (e.g. `3a8b42..9ff173`).\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/milestones": { "get": { "responses": { "200": { "description": "The milestones that have been defined in the issue tracker.", "schema": { "$ref": "#/definitions/paginated_milestones" } }, "404": { "description": "The specified repository does not exist or does not have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the milestones that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", "parameters": [], "tags": [ "issue_tracker" ] }, "parameters": [ { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/milestones/{milestone_id}": { "get": { "responses": { "200": { "description": "The specified milestone object.", "schema": { "$ref": "#/definitions/milestone" } }, "404": { "description": "The specified repository or milestone does not exist or does not have the issue tracker enabled.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "issue" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified issue tracker milestone object.", "parameters": [], "tags": [ "issue_tracker" ] }, "parameters": [ { "name": "milestone_id", "in": "path", "description": "The milestone's id", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/patch/{spec}": { "get": { "responses": { "200": { "description": "The raw patches" }, "555": { "description": "If the diff was too large and timed out.\n\nSince this endpoint does not employ any form of pagination, but\ninstead returns the diff as a single document, it can run into\ntrouble on very large diffs. If Bitbucket times out in cases\nlike these, a 555 status code is returned.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "repository" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Produces a raw patch for a single commit (diffed against its first\nparent), or a patch-series for a revspec of 2 commits (e.g.\n`3a8b42..9ff173` where the first commit represents the source and the\nsecond commit the destination).\n\nIn case of the latter (diffing a revspec), a patch series is returned\nfor the commits on the source branch (`3a8b42` and its ancestors in\nour example). For Mercurial, a single patch is returned that combines\nthe changes of all commits on the source branch.\n\nWhile similar to diffs, patches:\n\n* Have a commit header (username, commit message, etc)\n* Do not support the `path=foo/bar.py` query parameter\n\nThe raw patch is returned as-is, in whatever encoding the files in the\nrepository use. It is not decoded into unicode. As such, the\ncontent-type is `text/plain`.", "parameters": [], "tags": [ "commits" ] }, "parameters": [ { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "spec", "in": "path", "description": "A commit SHA (e.g. `3a8b42`) or a commit range using double dot\nnotation (e.g. `3a8b42..9ff173`).\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/": { "get": { "description": "Retrieve the repository pipelines caches.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "workspace", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "operationId": "getRepositoryPipelineCaches" } }, "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}": { "delete": { "description": "Delete a repository cache.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "workspace", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the cache to delete.", "required": true, "type": "string", "name": "cache_uuid", "in": "path" } ], "operationId": "deleteRepositoryPipelineCache" } }, "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri": { "get": { "description": "Retrieve the URI of the content of the specified cache.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "workspace", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the cache.", "required": true, "type": "string", "name": "cache_uuid", "in": "path" } ], "operationId": "getRepositoryPipelineCacheContentURI" } }, "/repositories/{workspace}/{repo_slug}/pipelines/": { "post": { "description": "Endpoint to create and initiate a pipeline.\nThere are a couple of different options to initiate a pipeline, where the payload of the request will determine which type of pipeline will be instantiated.\n# Trigger a Pipeline for a branch\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 username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"ref_type\": \"branch\",\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\"\n }\n }'\n```\n# Trigger a Pipeline for a commit on a branch or tag\nYou can initiate a pipeline for a specific commit and in the context of a specified reference (e.g. a branch, tag or bookmark).\nThe specified reference will be used to determine which pipeline definition from the bitbucket-pipelines.yml file will be applied to initiate the pipeline. The pipeline will clone the repository and then do a checkout the specified reference.\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 username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ce5b7431602f7cbba007062eeb55225c6e18e956\"\n },\n \"ref_type\": \"branch\",\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\"\n }\n }'\n```\n# Trigger a specific pipeline definition for a commit\nYou can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit.\nIn addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition. The resulting pipeline will then clone the repository and checkout the specified revision.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"commit\": {\n \"hash\":\"a3c4e02c9a3755eccdc3764e6ea13facdf30f923\",\n \"type\":\"commit\"\n },\n \"selector\": {\n \"type\":\"custom\",\n \"pattern\":\"Deploy to production\"\n },\n \"type\":\"pipeline_commit_target\"\n }\n }'\n```\n# Trigger a specific pipeline definition for a commit on a branch or tag\nYou can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit in the context of a specified reference.\nIn addition to the commit revision, you specify the type and pattern of the selector that identifies the pipeline definition, as well as the reference information. The resulting pipeline will then clone the repository a checkout the specified reference.\n\n### Example\n\n```\n$ curl -X POST -is -u username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \\\n -d '\n {\n \"target\": {\n \"commit\": {\n \"hash\":\"a3c4e02c9a3755eccdc3764e6ea13facdf30f923\",\n \"type\":\"commit\"\n },\n \"selector\": {\n \"type\": \"custom\",\n \"pattern\": \"Deploy to production\"\n },\n \"type\": \"pipeline_ref_target\",\n \"ref_name\": \"master\",\n \"ref_type\": \"branch\"\n }\n }'\n```\n\n\n# Trigger a custom pipeline with variables\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 username:password \\\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 username:password \\\n -H 'Content-Type: application/json' \\\n https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \\\n -d '\n {\n\t\"target\": {\n \"type\": \"pipeline_pullrequest_target\",\n\t \"source\": \"pull-request-branch\",\n \"destination\": \"master\",\n \"destination_commit\": {\n \t \"hash\" : \"9f848b7\"\n },\n \"commit\": {\n \t\"hash\" : \"1a372fc\"\n },\n \"pullrequest\" : {\n \t\"id\" : \"3\"\n },\n\t \"selector\": {\n \"type\": \"pull-requests\",\n \"pattern\": \"**\"\n }\n }\n }'\n```\n", "tags": [ "pipelines" ], "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of the newly created pipeline." } }, "description": "The initiated pipeline.", "schema": { "$ref": "#/definitions/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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "in": "body", "description": "The pipeline to initiate.", "name": "_body", "schema": { "$ref": "#/definitions/pipeline" } } ], "operationId": "createPipelineForRepository" }, "get": { "description": "Find pipelines", "tags": [ "pipelines" ], "responses": { "200": { "description": "The matching pipelines.", "schema": { "$ref": "#/definitions/paginated_pipelines" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "operationId": "getPipelinesForRepository" } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}": { "get": { "description": "Retrieve a specified pipeline", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The pipeline UUID.", "required": true, "type": "string", "name": "pipeline_uuid", "in": "path" } ], "operationId": "getPipelineForRepository" } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/": { "get": { "description": "Find steps for the given pipeline.", "tags": [ "pipelines" ], "responses": { "200": { "description": "The steps.", "schema": { "$ref": "#/definitions/paginated_pipeline_steps" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the pipeline.", "required": true, "type": "string", "name": "pipeline_uuid", "in": "path" } ], "operationId": "getPipelineStepsForRepository" } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}": { "get": { "description": "Retrieve a given step of a pipeline.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the pipeline.", "required": true, "type": "string", "name": "pipeline_uuid", "in": "path" }, { "description": "The UUID of the step.", "required": true, "type": "string", "name": "step_uuid", "in": "path" } ], "operationId": "getPipelineStepForRepository" } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log": { "get": { "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" } }, "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" } } }, "description": "Retrieve the log file for a given step of a pipeline.\n\nThis endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.", "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the pipeline.", "required": true, "type": "string", "name": "pipeline_uuid", "in": "path" }, { "description": "The UUID of the step.", "required": true, "type": "string", "name": "step_uuid", "in": "path" } ], "tags": [ "pipelines" ], "produces": [ "application/octet-stream" ], "operationId": "getPipelineStepLogForRepository" } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}": { "get": {} }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports": { "get": {} }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases": { "get": {} }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons": { "get": {} }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline": { "post": { "description": "Signal the stop of a pipeline and all of its steps that not have completed yet.", "tags": [ "pipelines" ], "responses": { "204": { "description": "The pipeline has been signaled to stop." }, "400": { "description": "The specified pipeline has already completed.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "Either the account, repository or pipeline with the given UUID does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the pipeline.", "required": true, "type": "string", "name": "pipeline_uuid", "in": "path" } ], "operationId": "stopPipeline" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config": { "put": { "description": "Update the pipelines configuration for a repository.", "tags": [ "pipelines" ], "responses": { "200": { "description": "The repository pipelines configuration was updated.", "schema": { "$ref": "#/definitions/pipelines_config" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The updated repository pipelines configuration.", "required": true, "in": "body", "name": "_body", "schema": { "$ref": "#/definitions/pipelines_config" } } ], "operationId": "updateRepositoryPipelineConfig" }, "get": { "description": "Retrieve the repository pipelines configuration.", "tags": [ "pipelines" ], "responses": { "200": { "description": "The repository pipelines configuration.", "schema": { "$ref": "#/definitions/pipelines_config" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "workspace", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "operationId": "getRepositoryPipelineConfig" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/build_number": { "put": { "description": "Update the next build number that should be assigned to a pipeline. The next build number that will be configured has to be strictly higher than the current latest build number for this repository.", "tags": [ "pipelines" ], "responses": { "200": { "description": "The build number has been configured.", "schema": { "$ref": "#/definitions/pipeline_build_number" } }, "400": { "description": "The update failed because the next number was invalid (it should be higher than the current number).", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "The account or repository was not found.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "in": "body", "description": "The build number to update.", "name": "_body", "schema": { "$ref": "#/definitions/pipeline_build_number" } } ], "operationId": "updateRepositoryBuildNumber" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/": { "post": { "description": "Create a schedule for the given repository.", "tags": [ "pipelines" ], "responses": { "201": { "description": "The created schedule.", "schema": { "$ref": "#/definitions/pipeline_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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "in": "body", "description": "The schedule to create.", "name": "_body", "schema": { "$ref": "#/definitions/pipeline_schedule" } } ], "operationId": "createRepositoryPipelineSchedule" }, "get": { "description": "Retrieve the configured schedules for the given repository.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "operationId": "getRepositoryPipelineSchedules" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}": { "put": { "description": "Update a schedule.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The uuid of the schedule.", "required": true, "type": "string", "name": "schedule_uuid", "in": "path" }, { "required": true, "in": "body", "description": "The schedule to update.", "name": "_body", "schema": { "$ref": "#/definitions/pipeline_schedule" } } ], "operationId": "updateRepositoryPipelineSchedule" }, "get": { "description": "Retrieve a schedule by its UUID.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The uuid of the schedule.", "required": true, "type": "string", "name": "schedule_uuid", "in": "path" } ], "operationId": "getRepositoryPipelineSchedule" }, "delete": { "description": "Delete a schedule.", "tags": [ "pipelines" ], "responses": { "204": { "description": "The schedule was deleted." }, "404": { "description": "The account, repository or schedule was not found.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The uuid of the schedule.", "required": true, "type": "string", "name": "schedule_uuid", "in": "path" } ], "operationId": "deleteRepositoryPipelineSchedule" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions/": { "get": { "description": "Retrieve the executions of a given schedule.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "operationId": "getRepositoryPipelineScheduleExecutions" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair": { "put": { "description": "Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "in": "body", "description": "The created or updated SSH key pair.", "name": "_body", "schema": { "$ref": "#/definitions/pipeline_ssh_key_pair" } } ], "operationId": "updateRepositoryPipelineKeyPair" }, "get": { "description": "Retrieve the repository SSH key pair excluding the SSH private key. The private key is a write only field and will never be exposed in the logs or the REST API.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "operationId": "getRepositoryPipelineSshKeyPair" }, "delete": { "description": "Delete the repository SSH key pair.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "operationId": "deleteRepositoryPipelineKeyPair" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/": { "post": { "description": "Create a repository level known host.", "tags": [ "pipelines" ], "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of the newly created pipeline known host." } }, "description": "The known host was created.", "schema": { "$ref": "#/definitions/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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "in": "body", "description": "The known host to create.", "name": "_body", "schema": { "$ref": "#/definitions/pipeline_known_host" } } ], "operationId": "createRepositoryPipelineKnownHost" }, "get": { "description": "Find repository level known hosts.", "tags": [ "pipelines" ], "responses": { "200": { "description": "The retrieved known hosts.", "schema": { "$ref": "#/definitions/paginated_pipeline_known_hosts" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "operationId": "getRepositoryPipelineKnownHosts" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}": { "put": { "description": "Update a repository level known host.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the known host to update.", "required": true, "type": "string", "name": "known_host_uuid", "in": "path" }, { "required": true, "in": "body", "description": "The updated known host.", "name": "_body", "schema": { "$ref": "#/definitions/pipeline_known_host" } } ], "operationId": "updateRepositoryPipelineKnownHost" }, "get": { "description": "Retrieve a repository level known host.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the known host to retrieve.", "required": true, "type": "string", "name": "known_host_uuid", "in": "path" } ], "operationId": "getRepositoryPipelineKnownHost" }, "delete": { "description": "Delete a repository level known host.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the known host to delete.", "required": true, "type": "string", "name": "known_host_uuid", "in": "path" } ], "operationId": "deleteRepositoryPipelineKnownHost" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/": { "post": { "description": "Create a repository level variable.", "tags": [ "pipelines" ], "responses": { "201": { "headers": { "Location": { "type": "string", "description": "The URL of the newly created pipeline variable." } }, "description": "The variable was created.", "schema": { "$ref": "#/definitions/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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "required": true, "in": "body", "description": "The variable to create.", "name": "_body", "schema": { "$ref": "#/definitions/pipeline_variable" } } ], "operationId": "createRepositoryPipelineVariable" }, "get": { "description": "Find repository level variables.", "tags": [ "pipelines" ], "responses": { "200": { "description": "The retrieved variables.", "schema": { "$ref": "#/definitions/paginated_pipeline_variables" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" } ], "operationId": "getRepositoryPipelineVariables" } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}": { "put": { "description": "Update a repository level variable.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the variable to update.", "required": true, "type": "string", "name": "variable_uuid", "in": "path" }, { "required": true, "in": "body", "description": "The updated variable", "name": "_body", "schema": { "$ref": "#/definitions/pipeline_variable" } } ], "operationId": "updateRepositoryPipelineVariable" }, "get": { "description": "Retrieve a repository level variable.", "tags": [ "pipelines" ], "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" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the variable to retrieve.", "required": true, "type": "string", "name": "variable_uuid", "in": "path" } ], "operationId": "getRepositoryPipelineVariable" }, "delete": { "description": "Delete a repository level variable.", "tags": [ "pipelines" ], "responses": { "204": { "description": "The variable was deleted." }, "404": { "description": "The account, repository or variable with given UUID was not found.", "schema": { "$ref": "#/definitions/error" } } }, "parameters": [ { "description": "The account.", "required": true, "type": "string", "name": "username", "in": "path" }, { "description": "The repository.", "required": true, "type": "string", "name": "repo_slug", "in": "path" }, { "description": "The UUID of the variable to delete.", "required": true, "type": "string", "name": "variable_uuid", "in": "path" } ], "operationId": "deleteRepositoryPipelineVariable" } }, "/repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}": { "put": { "responses": { "204": { "description": "An empty response." } }, "operationId": "updateRepositoryHostedPropertyValue", "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", "parameters": [ { "required": true, "type": "string", "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace" }, { "required": true, "type": "string", "description": "The repository.", "in": "path", "name": "repo_slug" }, { "required": true, "type": "string", "description": "The key of the Connect app.", "in": "path", "name": "app_key" }, { "required": true, "type": "string", "description": "The name of the property.", "in": "path", "name": "property_name" } ], "tags": [ "properties" ] }, "delete": { "responses": { "204": { "description": "An empty response." } }, "operationId": "deleteRepositoryHostedPropertyValue", "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", "parameters": [ { "required": true, "type": "string", "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace" }, { "required": true, "type": "string", "description": "The repository.", "in": "path", "name": "repo_slug" }, { "required": true, "type": "string", "description": "The key of the Connect app.", "in": "path", "name": "app_key" }, { "required": true, "type": "string", "description": "The name of the property.", "in": "path", "name": "property_name" } ], "tags": [ "properties" ] }, "get": { "responses": { "200": { "description": "The value of the property." } }, "operationId": "getRepositoryHostedPropertyValue", "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", "parameters": [ { "required": true, "type": "string", "description": "The repository container; either the workspace slug or the UUID in curly braces.", "in": "path", "name": "workspace" }, { "required": true, "type": "string", "description": "The repository.", "in": "path", "name": "repo_slug" }, { "required": true, "type": "string", "description": "The key of the Connect app.", "in": "path", "name": "app_key" }, { "required": true, "type": "string", "description": "The name of the property.", "in": "path", "name": "property_name" } ], "tags": [ "properties" ] } }, "/repositories/{workspace}/{repo_slug}/pullrequests": { "get": { "responses": { "200": { "description": "All pull requests on the specified repository.", "schema": { "$ref": "#/definitions/paginated_pullrequests" } }, "401": { "description": "If the repository is private and the request was not authenticated." }, "404": { "description": "If the specified repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "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](../../../../meta/filtering) for more details.", "parameters": [ { "name": "state", "in": "query", "description": "Only return pull requests that are in this state. This parameter can be repeated.", "type": "string", "enum": [ "MERGED", "SUPERSEDED", "OPEN", "DECLINED" ] } ], "tags": [ "pullrequests" ] }, "post": { "responses": { "201": { "description": "The newly created pull request.", "schema": { "$ref": "#/definitions/pullrequest" }, "headers": { "Location": { "type": "string", "description": "The URL of new newly created pull request." } } }, "400": { "description": "If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "If the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "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-username/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 \"branch\": {\n \"name\": \"staging\"\n }\n }\n }'\n```\n\nIf the pull request's `destination` is not specified, it will default\nto the `repository.mainbranch`. To open a pull request to a\ndifferent branch, say from a feature branch to a staging branch,\nspecify a `destination` (same format as the `source`):\n\n```\n{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"my-feature-branch\"\n }\n },\n \"destination\": {\n \"branch\": {\n \"name\": \"staging\"\n }\n }\n}\n```\n\nReviewers can be specified by adding an array of user objects as the\n`reviewers` property.\n\n```\n{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"my-feature-branch\"\n }\n },\n \"reviewers\": [\n {\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n }\n ]\n}\n```\n\nOther fields:\n\n* `description` - a string\n* `close_source_branch` - boolean that specifies if the source branch should be closed upon merging", "parameters": [ { "name": "_body", "in": "body", "description": "The new pull request.\n\nThe request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork).\n\nSince not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title.", "required": false, "schema": { "$ref": "#/definitions/pullrequest" } } ], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/activity": { "get": { "responses": { "200": { "description": "The pull request activity log" }, "401": { "description": "If the repository is private and the request was not authenticated." }, "404": { "description": "If the specified repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "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 \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\"\n }\n },\n \"deleted\": false,\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"content\": {\n \"raw\": \"inline with to a dn from lines\",\n \"markup\": \"markdown\",\n \"html\": \"inline with to a dn from lines
\",\n \"type\": \"rendered\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\",\n \"inline\": {\n \"context_lines\": \"\",\n \"to\": null,\n \"path\": \"\",\n \"outdated\": false,\n \"from\": 211\n },\n \"type\": \"pullrequest_comment\",\n \"id\": 118571088\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nUpdates include a state property of OPEN, MERGED, or DECLINED.\n\nUpdate example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"update\": {\n \"description\": \"\",\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\",\n \"destination\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"6a2c16e4a152\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\"\n }\n }\n },\n \"branch\": {\n \"name\": \"master\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"reason\": \"\",\n \"source\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"728c8bad1813\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\"\n }\n }\n },\n \"branch\": {\n \"name\": \"username/NONE-add-onClick-prop-for-accessibility\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"state\": \"OPEN\",\n \"author\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"date\": \"2019-05-10T06:48:25.305565+00:00\"\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nApproval example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"approval\": {\n \"date\": \"2019-09-27T00:37:19.849534+00:00\",\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n }\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```", "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}": { "get": { "responses": { "200": { "description": "The pull request object", "examples": { "application/json": { "type": "pullrequest", "description": "Everything is awesome!", "links": { "decline": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/decline" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/commits" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/comments" }, "merge": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/merge" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/pull-requests/1" }, "activity": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/activity" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/diff" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/statuses" } }, "author": { "username": "example-username", "display_name": "Example Username", "account_id": "123456:daffbc08-1a80-4bd0-98bf-7997de0a3d10", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/example-username" }, "html": { "href": "https://bitbucket.org/example-username/" }, "avatar": { "href": "https://bitbucket.org/account/example-username/avatar/" } }, "nickname": "example-username", "type": "user", "uuid": "{58021780-82b6-4517-b153-0ae73ce3e4b4}" }, "close_source_branch": true, "reviewers": [], "id": 1, "destination": { "commit": { "type": "commit", "hash": "230269fdfabd", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/commit/230269fdfabd" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/commits/230269fdfabd" } } }, "branch": { "name": "master" }, "repository": { "full_name": "example-username/bits_and_bobs", "type": "repository", "name": "bits_and_bobs", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B7708d810-964c-403f-aa6d-4e949280d614%7D?ts=python" } }, "uuid": "{7708d810-964c-403f-aa6d-4e949280d614}" } }, "comment_count": 0, "summary": { "raw": "Everything is awesome!", "markup": "markdown", "html": "Everything is awesome!
", "type": "rendered" }, "source": { "commit": { "type": "commit", "hash": "c184aab5708b", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/commit/c184aab5708b" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/commits/c184aab5708b" } } }, "branch": { "name": "branch_magnificent_internet" }, "repository": { "full_name": "example-username/bits_and_bobs", "type": "repository", "name": "bits_and_bobs", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B7708d810-964c-403f-aa6d-4e949280d614%7D?ts=python" } }, "uuid": "{7708d810-964c-403f-aa6d-4e949280d614}" } }, "participants": [], "state": "OPEN", "task_count": 0, "created_on": "2018-06-20T23:17:33.616037+00:00", "updated_on": "2018-06-20T23:17:33.616037+00:00", "reason": "", "title": "Change a cooperative standard to a smiling disease", "merge_commit": null, "closed_by": null } }, "schema": { "$ref": "#/definitions/pullrequest" } }, "401": { "description": "If the repository is private and the request was not authenticated." }, "404": { "description": "If the repository or pull request does not exist", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns the specified pull request.", "parameters": [], "tags": [ "pullrequests" ] }, "put": { "responses": { "200": { "description": "The updated pull request", "examples": { "application/json": { "type": "pullrequest", "description": "Everything is awesome!", "links": { "decline": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/decline" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/commits" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/comments" }, "merge": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/merge" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/pull-requests/1" }, "activity": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/activity" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/diff" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/statuses" } }, "author": { "username": "example-username", "display_name": "Example Username", "account_id": "123456:daffbc08-1a80-4bd0-98bf-7997de0a3d10", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/example-username" }, "html": { "href": "https://bitbucket.org/example-username/" }, "avatar": { "href": "https://bitbucket.org/account/example-username/avatar/" } }, "nickname": "example-username", "type": "user", "uuid": "{58021780-82b6-4517-b153-0ae73ce3e4b4}" }, "close_source_branch": true, "reviewers": [], "id": 1, "destination": { "commit": { "type": "commit", "hash": "230269fdfabd", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/commit/230269fdfabd" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/commits/230269fdfabd" } } }, "branch": { "name": "master" }, "repository": { "full_name": "example-username/bits_and_bobs", "type": "repository", "name": "bits_and_bobs", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B7708d810-964c-403f-aa6d-4e949280d614%7D?ts=python" } }, "uuid": "{7708d810-964c-403f-aa6d-4e949280d614}" } }, "comment_count": 0, "summary": { "raw": "Everything is awesome!", "markup": "markdown", "html": "Everything is awesome!
", "type": "rendered" }, "source": { "commit": { "type": "commit", "hash": "c184aab5708b", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/commit/c184aab5708b" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/commits/c184aab5708b" } } }, "branch": { "name": "branch_magnificent_internet" }, "repository": { "full_name": "example-username/bits_and_bobs", "type": "repository", "name": "bits_and_bobs", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B7708d810-964c-403f-aa6d-4e949280d614%7D?ts=python" } }, "uuid": "{7708d810-964c-403f-aa6d-4e949280d614}" } }, "participants": [], "state": "OPEN", "task_count": 0, "created_on": "2018-06-20T23:17:33.616037+00:00", "updated_on": "2018-06-20T23:17:33.616037+00:00", "reason": "", "title": "Change a cooperative standard to a smiling disease", "merge_commit": null, "closed_by": null } }, "schema": { "$ref": "#/definitions/pullrequest" } }, "400": { "description": "If the input document was invalid.", "schema": { "$ref": "#/definitions/error" } }, "401": { "description": "If the request was not authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the repository or pull request id does not exist", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "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.", "parameters": [ { "name": "_body", "in": "body", "description": "The pull request that is to be updated.", "required": false, "schema": { "$ref": "#/definitions/pullrequest" } } ], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity": { "get": { "responses": { "200": { "description": "The pull request activity log" }, "401": { "description": "If the repository is private and the request was not authenticated." }, "404": { "description": "If the specified repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "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 \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\"\n }\n },\n \"deleted\": false,\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"content\": {\n \"raw\": \"inline with to a dn from lines\",\n \"markup\": \"markdown\",\n \"html\": \"inline with to a dn from lines
\",\n \"type\": \"rendered\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\",\n \"inline\": {\n \"context_lines\": \"\",\n \"to\": null,\n \"path\": \"\",\n \"outdated\": false,\n \"from\": 211\n },\n \"type\": \"pullrequest_comment\",\n \"id\": 118571088\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nUpdates include a state property of OPEN, MERGED, or DECLINED.\n\nUpdate example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"update\": {\n \"description\": \"\",\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\",\n \"destination\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"6a2c16e4a152\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\"\n }\n }\n },\n \"branch\": {\n \"name\": \"master\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"reason\": \"\",\n \"source\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"728c8bad1813\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\"\n }\n }\n },\n \"branch\": {\n \"name\": \"username/NONE-add-onClick-prop-for-accessibility\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"state\": \"OPEN\",\n \"author\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"date\": \"2019-05-10T06:48:25.305565+00:00\"\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nApproval example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"approval\": {\n \"date\": \"2019-09-27T00:37:19.849534+00:00\",\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n }\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://bitbucket.org/!api/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```", "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve": { "delete": { "responses": { "204": { "description": "An empty response indicating the authenticated user's approval has been withdrawn." }, "401": { "description": "The request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "The specified pull request or the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Redact the authenticated user's approval of the specified pull\nrequest.", "parameters": [], "tags": [ "pullrequests" ] }, "post": { "responses": { "200": { "description": "The `participant` object recording that the authenticated user approved the pull request.", "schema": { "$ref": "#/definitions/participant" } }, "401": { "description": "The request wasn't authenticated.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "The specified pull request or the repository does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Approve the specified pull request as the authenticated user.", "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments": { "get": { "responses": { "200": { "description": "A paginated list of comments made on the given pull request, in chronological order.", "schema": { "$ref": "#/definitions/paginated_pullrequest_comments" } }, "403": { "description": "If the authenticated user does not have access to the pull request.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the pull request does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "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](../../../../../../meta/filtering) for more\ndetails.", "parameters": [], "tags": [ "pullrequests" ] }, "post": { "responses": { "201": { "description": "The newly created comment.", "schema": { "$ref": "#/definitions/pullrequest_comment" }, "headers": { "Location": { "type": "string", "description": "The URL of the new comment" } } }, "403": { "description": "If the authenticated user does not have access to the pull request.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the pull request does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Creates a new pull request comment.\n\nReturns the newly created pull request comment.", "parameters": [ { "name": "_body", "in": "body", "description": "The comment object.", "required": true, "schema": { "$ref": "#/definitions/pullrequest_comment" } } ], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}": { "delete": { "responses": { "204": { "description": "Successful deletion." }, "403": { "description": "If the authenticated user does not have access to delete the comment.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the comment does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Deletes a specific pull request comment.", "parameters": [], "tags": [ "pullrequests" ] }, "get": { "responses": { "200": { "description": "The comment.", "schema": { "$ref": "#/definitions/pullrequest_comment" } }, "403": { "description": "If the authenticated user does not have access to the pull request.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the comment does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Returns a specific pull request comment.", "parameters": [], "tags": [ "pullrequests" ] }, "put": { "responses": { "200": { "description": "The updated comment.", "schema": { "$ref": "#/definitions/pullrequest_comment" } }, "403": { "description": "If the authenticated user does not have access to the comment.", "schema": { "$ref": "#/definitions/error" } }, "404": { "description": "If the comment does not exist.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Updates a specific pull request comment.", "parameters": [ { "name": "_body", "in": "body", "description": "The contents of the updated comment.", "required": true, "schema": { "$ref": "#/definitions/pullrequest_comment" } } ], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "comment_id", "in": "path", "description": "The id of the comment.", "required": true, "type": "integer" }, { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits": { "get": { "responses": { "default": { "description": "Unexpected error.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "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.", "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline": { "post": { "responses": { "200": { "description": "The pull request object.", "examples": { "application/json": { "type": "pullrequest", "description": "Everything is awesome!", "links": { "decline": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/decline" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/commits" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/comments" }, "merge": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/merge" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/pull-requests/1" }, "activity": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/activity" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/diff" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/statuses" } }, "author": { "username": "example-username", "display_name": "Example Username", "account_id": "123456:daffbc08-1a80-4bd0-98bf-7997de0a3d10", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/example-username" }, "html": { "href": "https://bitbucket.org/example-username/" }, "avatar": { "href": "https://bitbucket.org/account/example-username/avatar/" } }, "nickname": "example-username", "type": "user", "uuid": "{58021780-82b6-4517-b153-0ae73ce3e4b4}" }, "close_source_branch": true, "reviewers": [], "id": 1, "destination": { "commit": { "type": "commit", "hash": "230269fdfabd", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/commit/230269fdfabd" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/commits/230269fdfabd" } } }, "branch": { "name": "master" }, "repository": { "full_name": "example-username/bits_and_bobs", "type": "repository", "name": "bits_and_bobs", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B7708d810-964c-403f-aa6d-4e949280d614%7D?ts=python" } }, "uuid": "{7708d810-964c-403f-aa6d-4e949280d614}" } }, "comment_count": 0, "summary": { "raw": "Everything is awesome!", "markup": "markdown", "html": "Everything is awesome!
", "type": "rendered" }, "source": { "commit": { "type": "commit", "hash": "c184aab5708b", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/commit/c184aab5708b" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/commits/c184aab5708b" } } }, "branch": { "name": "branch_magnificent_internet" }, "repository": { "full_name": "example-username/bits_and_bobs", "type": "repository", "name": "bits_and_bobs", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B7708d810-964c-403f-aa6d-4e949280d614%7D?ts=python" } }, "uuid": "{7708d810-964c-403f-aa6d-4e949280d614}" } }, "participants": [], "state": "OPEN", "task_count": 0, "created_on": "2018-06-20T23:17:33.616037+00:00", "updated_on": "2018-06-20T23:17:33.616037+00:00", "reason": "", "title": "Change a cooperative standard to a smiling disease", "merge_commit": null, "closed_by": null } }, "schema": { "$ref": "#/definitions/pullrequest" } }, "555": { "description": "If the decline took too long and timed out.\nIn this case the caller should retry the request later.", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Declines the pull request.", "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff": { "get": { "responses": { "302": { "description": "Redirects to the [repository diff](../../diff/%7Bspec%7D) with the\nrevspec that corresponds to the pull request.\n" } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Redirects to the [repository diff](../../diff/%7Bspec%7D)\nwith the revspec that corresponds to the pull request.", "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat": { "get": { "responses": { "302": { "description": "Redirects to the [repository diffstat](../../diffstat/%7Bspec%7D) with\nthe revspec that corresponds to pull request.\n" } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Redirects to the [repository diffstat](../../diffstat/%7Bspec%7D)\nwith the revspec that corresponds to the pull request.", "parameters": [], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge": { "post": { "responses": { "200": { "description": "The pull request object.", "examples": { "application/json": { "type": "pullrequest", "description": "Everything is awesome!", "links": { "decline": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/decline" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/commits" }, "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1" }, "comments": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/comments" }, "merge": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/merge" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/pull-requests/1" }, "activity": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/activity" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/diff" }, "approve": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/approve" }, "statuses": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/pullrequests/1/statuses" } }, "author": { "username": "example-username", "display_name": "Example Username", "account_id": "123456:daffbc08-1a80-4bd0-98bf-7997de0a3d10", "links": { "self": { "href": "https://api.bitbucket.org/2.0/users/example-username" }, "html": { "href": "https://bitbucket.org/example-username/" }, "avatar": { "href": "https://bitbucket.org/account/example-username/avatar/" } }, "nickname": "example-username", "type": "user", "uuid": "{58021780-82b6-4517-b153-0ae73ce3e4b4}" }, "close_source_branch": true, "reviewers": [], "id": 1, "destination": { "commit": { "type": "commit", "hash": "230269fdfabd", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/commit/230269fdfabd" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/commits/230269fdfabd" } } }, "branch": { "name": "master" }, "repository": { "full_name": "example-username/bits_and_bobs", "type": "repository", "name": "bits_and_bobs", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B7708d810-964c-403f-aa6d-4e949280d614%7D?ts=python" } }, "uuid": "{7708d810-964c-403f-aa6d-4e949280d614}" } }, "comment_count": 0, "summary": { "raw": "Everything is awesome!", "markup": "markdown", "html": "Everything is awesome!
", "type": "rendered" }, "source": { "commit": { "type": "commit", "hash": "c184aab5708b", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs/commit/c184aab5708b" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs/commits/c184aab5708b" } } }, "branch": { "name": "branch_magnificent_internet" }, "repository": { "full_name": "example-username/bits_and_bobs", "type": "repository", "name": "bits_and_bobs", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/example-username/bits_and_bobs" }, "html": { "href": "https://bitbucket.org/example-username/bits_and_bobs" }, "avatar": { "href": "https://bytebucket.org/ravatar/%7B7708d810-964c-403f-aa6d-4e949280d614%7D?ts=python" } }, "uuid": "{7708d810-964c-403f-aa6d-4e949280d614}" } }, "participants": [], "state": "OPEN", "task_count": 0, "created_on": "2018-06-20T23:17:33.616037+00:00", "updated_on": "2018-06-20T23:17:33.616037+00:00", "reason": "", "title": "Change a cooperative standard to a smiling disease", "merge_commit": null, "closed_by": null } }, "schema": { "$ref": "#/definitions/pullrequest" } }, "202": { "description": "In the Location header, the URL to poll for the pull request merge status" }, "555": { "description": "If the merge took too long and timed out.\nIn this case the caller should retry the request later", "schema": { "$ref": "#/definitions/error" } } }, "security": [ { "oauth2": [ "pullrequest:write" ] }, { "basic": [] }, { "api_key": [] } ], "description": "Merges the pull request.", "parameters": [ { "name": "_body", "in": "body", "required": false, "schema": { "$ref": "#/definitions/pullrequest_merge_parameters" } } ], "tags": [ "pullrequests" ] }, "parameters": [ { "name": "pull_request_id", "in": "path", "description": "The id of the pull request.", "required": true, "type": "integer" }, { "name": "repo_slug", "in": "path", "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", "required": true, "type": "string" }, { "name": "workspace", "in": "path", "description": "This can either be the workspace ID (slug) or the workspace UUID\nsurrounded by curly-braces, for example: `{workspace UUID}`.\n", "required": true, "type": "string" } ] }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}": { "get": { "responses": { "200": { "description": "Returns a task status if the merge is either pending or successful, and if it is successful, a pull request" }, "400": { "description": "If the provided task ID does not relate to this pull request, or if something went wrong during the merge operation" }, "403": { "description": "The user making the request does not have permission to the repo and is different from the user who queued the task" } }, "security": [ { "oauth2": [ "pullrequest" ] }, { "basic": [] }, { "api_key": [] } ], "description": "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/