diff --git a/plugins/bitbucket-cloud-common/api-report.md b/plugins/bitbucket-cloud-common/api-report.md index 95e6f36836..0f4e82d5d1 100644 --- a/plugins/bitbucket-cloud-common/api-report.md +++ b/plugins/bitbucket-cloud-common/api-report.md @@ -271,9 +271,7 @@ export namespace Models { description?: string; fork_policy?: RepositoryForkPolicyEnum; full_name?: string; - // (undocumented) has_issues?: boolean; - // (undocumented) has_wiki?: boolean; // (undocumented) is_private?: boolean; diff --git a/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json b/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json index 9de3c5f9b3..d897d83047 100644 --- a/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json +++ b/plugins/bitbucket-cloud-common/bitbucket-cloud.oas.json @@ -499,7 +499,7 @@ "/hook_events": { "get": { "tags": ["Webhooks"], - "description": "Returns the webhook resource or subject types on which webhooks can\nbe registered.\n\nEach resource/subject type contains an `events` link that returns the\npaginated list of specific events each individual subject type can\nemit.\n\nThis endpoint is publicly accessible and does not require\nauthentication or scopes.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/hook_events\n\n{\n \"repository\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/repository\"\n }\n }\n },\n \"workspace\": {\n \"links\": {\n \"events\": {\n \"href\": \"https://api.bitbucket.org/2.0/hook_events/workspace\"\n }\n }\n }\n}\n```", + "description": "Returns the webhook resource or subject types on which webhooks can\nbe registered.\n\nEach resource/subject type contains an `events` link that returns the\npaginated list of specific events each individual subject type can\nemit.\n\nThis endpoint is publicly accessible and does not require\nauthentication or scopes.", "summary": "Get a webhook resource", "responses": { "200": { @@ -508,6 +508,26 @@ "application/json": { "schema": { "$ref": "#/components/schemas/subject_types" + }, + "examples": { + "response": { + "value": { + "repository": { + "links": { + "events": { + "href": "https://api.bitbucket.org/2.0/hook_events/repository" + } + } + }, + "workspace": { + "links": { + "events": { + "href": "https://api.bitbucket.org/2.0/hook_events/workspace" + } + } + } + } + } } } } @@ -530,7 +550,7 @@ "/hook_events/{subject_type}": { "get": { "tags": ["Webhooks"], - "description": "Returns a paginated list of all valid webhook events for the\nspecified entity.\n**The team and user webhooks are deprecated, and you should use workspace instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nThis is public data that does not require any scopes or authentication.\n\nExample:\n\nNOTE: The following example is a truncated response object for the `workspace` `subject_type`.\nWe return the same structure for the other `subject_type` objects.\n\n```\n$ curl https://api.bitbucket.org/2.0/hook_events/workspace\n{\n \"page\": 1,\n \"pagelen\": 30,\n \"size\": 21,\n \"values\": [\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository push occurs\",\n \"event\": \"repo:push\",\n \"label\": \"Push\"\n },\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository fork occurs\",\n \"event\": \"repo:fork\",\n \"label\": \"Fork\"\n },\n {\n \"category\": \"Repository\",\n \"description\": \"Whenever a repository import occurs\",\n \"event\": \"repo:imported\",\n \"label\": \"Import\"\n },\n ...\n {\n \"category\":\"Pull Request\",\n \"label\":\"Approved\",\n \"description\":\"When someone has approved a pull request\",\n \"event\":\"pullrequest:approved\"\n },\n ]\n}\n```", + "description": "Returns a paginated list of all valid webhook events for the\nspecified entity.\n**The team and user webhooks are deprecated, and you should use workspace instead.\nFor more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).**\n\nThis is public data that does not require any scopes or authentication.\n\nNOTE: The example response is a truncated response object for the `workspace` `subject_type`.\nWe return the same structure for the other `subject_type` objects.", "summary": "List subscribable webhook types", "responses": { "200": { @@ -539,6 +559,41 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_hook_events" + }, + "examples": { + "response": { + "value": { + "page": 1, + "pagelen": 30, + "size": 4, + "values": [ + { + "category": "Repository", + "description": "Whenever a repository push occurs", + "event": "repo:push", + "label": "Push" + }, + { + "category": "Repository", + "description": "Whenever a repository fork occurs", + "event": "repo:fork", + "label": "Fork" + }, + { + "category": "Repository", + "description": "Whenever a repository import occurs", + "event": "repo:imported", + "label": "Import" + }, + { + "category": "Pull Request", + "label": "Approved", + "description": "When someone has approved a pull request", + "event": "pullrequest:approved" + } + ] + } + } } } } @@ -788,6 +843,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -853,6 +915,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["delete:repository:bitbucket"] + } ] }, "get": { @@ -901,6 +970,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -959,6 +1035,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "put": { @@ -1043,6 +1126,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -1143,11 +1233,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "post": { "tags": ["Branch restrictions"], - "description": "Creates a new branch restriction rule for a repository.\n\n`kind` describes what will be restricted. Allowed values include:\n`push`, `force`, `delete` and `restrict_merges`.\n\nDifferent kinds of branch restrictions have different requirements:\n\n* `push` and `restrict_merges` require `users` and `groups` to be\n specified. Empty lists are allowed, in which case permission is\n denied for everybody.\n\nThe restriction applies to all branches that match. There are\ntwo ways to match a branch. It is configured in `branch_match_kind`:\n\n1. `glob`: Matches a branch against the `pattern`. A `'*'` in\n `pattern` will expand to match zero or more characters, and every\n other character matches itself. For example, `'foo*'` will match\n `'foo'` and `'foobar'`, but not `'barfoo'`. `'*'` will match all\n branches.\n2. `branching_model`: Matches a branch against the repository's\n branching model. The `branch_type` controls the type of branch\n to match. Allowed values include: `production`, `development`,\n `bugfix`, `release`, `feature` and `hotfix`.\n\nThe combination of `kind` and match must be unique. This means that\ntwo `glob` restrictions in a repository cannot have the same `kind` and\n`pattern`. Additionally, two `branching_model` restrictions in a\nrepository cannot have the same `kind` and `branch_type`.\n\n`users` and `groups` are lists of users and groups that are except from\nthe restriction. They can only be configured in `push` and\n`restrict_merges` restrictions. The `push` restriction stops a user\npushing to matching branches unless that user is in `users` or is a\nmember of a group in `groups`. The `restrict_merges` stops a user\nmerging pull requests to matching branches unless that user is in\n`users` or is a member of a group in `groups`. Adding new users or\ngroups to an existing restriction should be done via `PUT`.\n\nNote that branch restrictions with overlapping matchers is allowed,\nbut the resulting behavior may be surprising.", + "description": "Creates a new branch restriction rule for a repository.\n\n`kind` describes what will be restricted. Allowed values include:\n`push`, `force`, `delete`, `restrict_merges`, `require_tasks_to_be_completed`,\n`require_approvals_to_merge`, `require_default_reviewer_approvals_to_merge`,\n`require_no_changes_requested`, `require_passing_builds_to_merge`, `require_commits_behind`,\n`reset_pullrequest_approvals_on_change`, `smart_reset_pullrequest_approvals`,\n`reset_pullrequest_changes_requested_on_change`, `require_all_dependencies_merged`,\n`enforce_merge_checks`, and `allow_auto_merge_when_builds_pass`.\n\nDifferent kinds of branch restrictions have different requirements:\n\n* `push` and `restrict_merges` require `users` and `groups` to be\n specified. Empty lists are allowed, in which case permission is\n denied for everybody.\n\nThe restriction applies to all branches that match. There are\ntwo ways to match a branch. It is configured in `branch_match_kind`:\n\n1. `glob`: Matches a branch against the `pattern`. A `'*'` in\n `pattern` will expand to match zero or more characters, and every\n other character matches itself. For example, `'foo*'` will match\n `'foo'` and `'foobar'`, but not `'barfoo'`. `'*'` will match all\n branches.\n2. `branching_model`: Matches a branch against the repository's\n branching model. The `branch_type` controls the type of branch\n to match. Allowed values include: `production`, `development`,\n `bugfix`, `release`, `feature` and `hotfix`.\n\nThe combination of `kind` and match must be unique. This means that\ntwo `glob` restrictions in a repository cannot have the same `kind` and\n`pattern`. Additionally, two `branching_model` restrictions in a\nrepository cannot have the same `kind` and `branch_type`.\n\n`users` and `groups` are lists of users and groups that are except from\nthe restriction. They can only be configured in `push` and\n`restrict_merges` restrictions. The `push` restriction stops a user\npushing to matching branches unless that user is in `users` or is a\nmember of a group in `groups`. The `restrict_merges` stops a user\nmerging pull requests to matching branches unless that user is in\n`users` or is a member of a group in `groups`. Adding new users or\ngroups to an existing restriction should be done via `PUT`.\n\nNote that branch restrictions with overlapping matchers is allowed,\nbut the resulting behavior may be surprising.", "summary": "Create a branch restriction rule", "responses": { "201": { @@ -1212,6 +1309,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -1285,6 +1389,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "get": { @@ -1343,6 +1454,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "put": { @@ -1412,6 +1530,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -1447,7 +1572,7 @@ "/repositories/{workspace}/{repo_slug}/branching-model": { "get": { "tags": ["Branching model"], - "description": "Return the branching model as applied to the repository. This view is\nread-only. The branching model settings can be changed using the\n[settings](#api-repositories-workspace-repo-slug-branching-model-settings-get) API.\n\nThe returned object:\n\n1. Always has a `development` property. `development.branch` contains\n the actual repository branch object that is considered to be the\n `development` branch. `development.branch` will not be present\n if it does not exist.\n2. Might have a `production` property. `production` will not\n be present when `production` is disabled.\n `production.branch` contains the actual branch object that is\n considered to be the `production` branch. `production.branch` will\n not be present if it does not exist.\n3. Always has a `branch_types` array which contains all enabled branch\n types.\n\nExample body:\n\n```\n{\n \"development\": {\n \"name\": \"master\",\n \"branch\": {\n \"type\": \"branch\",\n \"name\": \"master\",\n \"target\": {\n \"hash\": \"16dffcb0de1b22e249db6799532074cf32efe80f\"\n }\n },\n \"use_mainbranch\": true\n },\n \"production\": {\n \"name\": \"production\",\n \"branch\": {\n \"type\": \"branch\",\n \"name\": \"production\",\n \"target\": {\n \"hash\": \"16dffcb0de1b22e249db6799532074cf32efe80f\"\n }\n },\n \"use_mainbranch\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"branching_model\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model\"\n }\n }\n}\n```", + "description": "Return the branching model as applied to the repository. This view is\nread-only. The branching model settings can be changed using the\n[settings](#api-repositories-workspace-repo-slug-branching-model-settings-get) API.\n\nThe returned object:\n\n1. Always has a `development` property. `development.branch` contains\n the actual repository branch object that is considered to be the\n `development` branch. `development.branch` will not be present\n if it does not exist.\n2. Might have a `production` property. `production` will not\n be present when `production` is disabled.\n `production.branch` contains the actual branch object that is\n considered to be the `production` branch. `production.branch` will\n not be present if it does not exist.\n3. Always has a `branch_types` array which contains all enabled branch\n types.", "summary": "Get the branching model for a repository", "responses": { "200": { @@ -1456,6 +1581,58 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model" + }, + "examples": { + "response": { + "value": { + "development": { + "name": "master", + "branch": { + "type": "branch", + "name": "master", + "target": { + "hash": "16dffcb0de1b22e249db6799532074cf32efe80f" + } + }, + "use_mainbranch": true + }, + "production": { + "name": "production", + "branch": { + "type": "branch", + "name": "production", + "target": { + "hash": "16dffcb0de1b22e249db6799532074cf32efe80f" + } + }, + "use_mainbranch": false + }, + "branch_types": [ + { + "kind": "release", + "prefix": "release/" + }, + { + "kind": "hotfix", + "prefix": "hotfix/" + }, + { + "kind": "feature", + "prefix": "feature/" + }, + { + "kind": "bugfix", + "prefix": "bugfix/" + } + ], + "type": "branching_model", + "links": { + "self": { + "href": "https://api.bitbucket.org/.../branching-model" + } + } + } + } } } } @@ -1501,6 +1678,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -1527,7 +1711,7 @@ "/repositories/{workspace}/{repo_slug}/branching-model/settings": { "get": { "tags": ["Branching model"], - "description": "Return the branching model configuration for a repository. The returned\nobject:\n\n1. Always has a `development` property for the development branch.\n2. Always a `production` property for the production branch. The\n production branch can be disabled.\n3. The `branch_types` contains all the branch types.\n\nThis is the raw configuration for the branching model. A client\nwishing to see the branching model with its actual current branches may\nfind the [active model API](/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-get) more useful.\n\nExample body:\n\n```\n{\n \"development\": {\n \"is_valid\": true,\n \"name\": null,\n \"use_mainbranch\": true\n },\n \"production\": {\n \"is_valid\": true,\n \"name\": \"production\",\n \"use_mainbranch\": false,\n \"enabled\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"enabled\": true,\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"enabled\": true,\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"enabled\": false,\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"branching_model_settings\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model/settings\"\n }\n }\n}\n```", + "description": "Return the branching model configuration for a repository. The returned\nobject:\n\n1. Always has a `development` property for the development branch.\n2. Always a `production` property for the production branch. The\n production branch can be disabled.\n3. The `branch_types` contains all the branch types.\n\nThis is the raw configuration for the branching model. A client\nwishing to see the branching model with its actual current branches may\nfind the [active model API](/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-get) more useful.", "summary": "Get the branching model config for a repository", "responses": { "200": { @@ -1536,6 +1720,51 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model_settings" + }, + "examples": { + "response": { + "value": { + "development": { + "is_valid": true, + "name": "null", + "use_mainbranch": true + }, + "production": { + "is_valid": true, + "name": "production", + "use_mainbranch": false, + "enabled": false + }, + "branch_types": [ + { + "kind": "release", + "enabled": true, + "prefix": "release/" + }, + { + "kind": "hotfix", + "enabled": true, + "prefix": "hotfix/" + }, + { + "kind": "feature", + "enabled": true, + "prefix": "feature/" + }, + { + "kind": "bugfix", + "enabled": false, + "prefix": "bugfix/" + } + ], + "type": "branching_model_settings", + "links": { + "self": { + "href": "https://api.bitbucket.org/.../branching-model/settings" + } + } + } + } } } } @@ -1581,11 +1810,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "put": { "tags": ["Branching model"], - "description": "Update the branching model configuration for a repository.\n\nThe `development` branch can be configured to a specific branch or to\ntrack the main branch. When set to a specific branch it must\ncurrently exist. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`development` property will leave the development branch unchanged.\n\nIt is possible for the `development` branch to be invalid. This\nhappens when it points at a specific branch that has been\ndeleted. This is indicated in the `is_valid` field for the branch. It is\nnot possible to update the settings for `development` if that\nwould leave the branch in an invalid state. Such a request will be\nrejected.\n\nThe `production` branch can be a specific branch, the main\nbranch or disabled. When set to a specific branch it must currently\nexist. The `enabled` property can be used to enable (`true`) or\ndisable (`false`) it. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`production` property will leave the production branch unchanged.\n\nIt is possible for the `production` branch to be invalid. This\nhappens when it points at a specific branch that has been\ndeleted. This is indicated in the `is_valid` field for the branch. A\nrequest that would leave `production` enabled and invalid will be\nrejected. It is possible to update `production` and make it invalid if\nit would also be left disabled.\n\nThe `branch_types` property contains the branch types to be updated.\nOnly the branch types passed will be updated. All updates will be\nrejected if it would leave the branching model in an invalid state.\nFor branch types this means that:\n\n1. The prefixes for all enabled branch types are valid. For example,\n it is not possible to use '*' inside a Git prefix.\n2. A prefix of an enabled branch type must not be a prefix of another\n enabled branch type. This is to ensure that a branch can be easily\n classified by its prefix unambiguously.\n\nIt is possible to store an invalid prefix if that branch type would be\nleft disabled. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. Each branch type must\nhave a `kind` property to identify it.\n\nExample Body:\n\n```\n {\n \"development\": {\n \"use_mainbranch\": true\n },\n \"production\": {\n \"enabled\": true,\n \"use_mainbranch\": false,\n \"name\": \"production\"\n },\n \"branch_types\": [\n {\n \"kind\": \"bugfix\",\n \"enabled\": true,\n \"prefix\": \"bugfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"release\",\n \"enabled\": false,\n }\n ]\n }\n```\n\nThere is currently a side effect when using this API endpoint. If the\nrepository is inheriting branching model settings from its project,\nupdating the branching model for this repository will disable the\nproject setting inheritance.\n\n\nWe have deprecated this side effect and will remove it on 1 August 2022.", + "description": "Update the branching model configuration for a repository.\n\nThe `development` branch can be configured to a specific branch or to\ntrack the main branch. When set to a specific branch it must\ncurrently exist. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`development` property will leave the development branch unchanged.\n\nIt is possible for the `development` branch to be invalid. This\nhappens when it points at a specific branch that has been\ndeleted. This is indicated in the `is_valid` field for the branch. It is\nnot possible to update the settings for `development` if that\nwould leave the branch in an invalid state. Such a request will be\nrejected.\n\nThe `production` branch can be a specific branch, the main\nbranch or disabled. When set to a specific branch it must currently\nexist. The `enabled` property can be used to enable (`true`) or\ndisable (`false`) it. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`production` property will leave the production branch unchanged.\n\nIt is possible for the `production` branch to be invalid. This\nhappens when it points at a specific branch that has been\ndeleted. This is indicated in the `is_valid` field for the branch. A\nrequest that would leave `production` enabled and invalid will be\nrejected. It is possible to update `production` and make it invalid if\nit would also be left disabled.\n\nThe `branch_types` property contains the branch types to be updated.\nOnly the branch types passed will be updated. All updates will be\nrejected if it would leave the branching model in an invalid state.\nFor branch types this means that:\n\n1. The prefixes for all enabled branch types are valid. For example,\n it is not possible to use '*' inside a Git prefix.\n2. A prefix of an enabled branch type must not be a prefix of another\n enabled branch type. This is to ensure that a branch can be easily\n classified by its prefix unambiguously.\n\nIt is possible to store an invalid prefix if that branch type would be\nleft disabled. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. Each branch type must\nhave a `kind` property to identify it.\n\nThere is currently a side effect when using this API endpoint. If the\nrepository is inheriting branching model settings from its project,\nupdating the branching model for this repository will disable the\nproject setting inheritance.\n\n\nWe have deprecated this side effect and will remove it on 1 August 2022.", "summary": "Update the branching model config for a repository", "responses": { "200": { @@ -1594,6 +1830,40 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model_settings" + }, + "examples": { + "response": { + "value": { + "development": { + "use_mainbranch": true + }, + "production": { + "enabled": true, + "use_mainbranch": false, + "name": "production" + }, + "branch_types": [ + { + "kind": "bugfix", + "enabled": true, + "prefix": "bugfix/" + }, + { + "kind": "feature", + "enabled": true, + "prefix": "feature/" + }, + { + "kind": "hotfix", + "prefix": "hotfix/" + }, + { + "kind": "release", + "enabled": false + } + ] + } + } } } } @@ -1649,6 +1919,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -1675,7 +1952,7 @@ "/repositories/{workspace}/{repo_slug}/commit/{commit}": { "get": { "tags": ["Commits"], - "description": "Returns the specified commit.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a1\n{\n \"rendered\": {\n \"message\": {\n \"raw\": \"Add a GEORDI_OUTPUT_DIR setting\",\n \"markup\": \"markdown\",\n \"html\": \"

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```", + "description": "Returns the specified commit.", "summary": "Get a commit", "responses": { "200": { @@ -1684,6 +1961,107 @@ "application/json": { "schema": { "$ref": "#/components/schemas/commit" + }, + "examples": { + "response": { + "value": { + "rendered": { + "message": { + "raw": "Add a GEORDI_OUTPUT_DIR setting", + "markup": "markdown", + "html": "

Add a GEORDI_OUTPUT_DIR setting

", + "type": "rendered" + } + }, + "hash": "f7591a13eda445d9a9167f98eb870319f4b6c2d8", + "repository": { + "name": "geordi", + "type": "repository", + "full_name": "bitbucket/geordi", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi" + }, + "html": { + "href": "https://bitbucket.org/bitbucket/geordi" + }, + "avatar": { + "href": "https://bytebucket.org/ravatar/%7B85d08b4e-571d-44e9-a507-fa476535aa98%7D?ts=1730260" + } + }, + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8" + }, + "comments": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/comments" + }, + "patch": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/patch/f7591a13eda445d9a9167f98eb870319f4b6c2d8" + }, + "html": { + "href": "https://bitbucket.org/bitbucket/geordi/commits/f7591a13eda445d9a9167f98eb870319f4b6c2d8" + }, + "diff": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diff/f7591a13eda445d9a9167f98eb870319f4b6c2d8" + }, + "approve": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/approve" + }, + "statuses": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f7591a13eda445d9a9167f98eb870319f4b6c2d8/statuses" + } + }, + "author": { + "raw": "Brodie Rao ", + "type": "author", + "user": { + "display_name": "Brodie Rao", + "uuid": "{9484702e-c663-4afd-aefb-c93a8cd31c28}", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D" + }, + "html": { + "href": "https://bitbucket.org/%7B9484702e-c663-4afd-aefb-c93a8cd31c28%7D/" + }, + "avatar": { + "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" + } + }, + "type": "user", + "nickname": "brodie", + "account_id": "557058:3aae1e05-702a-41e5-81c8-f36f29afb6ca" + } + }, + "summary": { + "raw": "Add a GEORDI_OUTPUT_DIR setting", + "markup": "markdown", + "html": "

Add a GEORDI_OUTPUT_DIR setting

", + "type": "rendered" + }, + "participants": [], + "parents": [ + { + "type": "commit", + "hash": "f06941fec4ef6bcb0c2456927a0cf258fa4f899b", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/commit/f06941fec4ef6bcb0c2456927a0cf258fa4f899b" + }, + "html": { + "href": "https://bitbucket.org/bitbucket/geordi/commits/f06941fec4ef6bcb0c2456927a0cf258fa4f899b" + } + } + } + ], + "date": "2012-07-16T19:37:54+00:00", + "message": "Add a GEORDI_OUTPUT_DIR setting", + "type": "commit" + } + } } } } @@ -1709,6 +2087,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -1771,6 +2156,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "post": { @@ -1809,6 +2201,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:repository:bitbucket", + "write:repository:bitbucket" + ] + } ] }, "parameters": [ @@ -1888,6 +2290,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -1934,6 +2343,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -1967,6 +2383,37 @@ ] }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}": { + "delete": { + "tags": ["Commits"], + "description": "Deletes the specified commit comment.\n\nNote that deleting comments that have visible replies that point to\nthem will not really delete the resource. This is to retain the integrity\nof the original comment tree. Instead, the `deleted` element is set to\n`true` and the content is blanked out. The comment will continue to be\nreturned by the collections and self endpoints.", + "summary": "Delete a commit comment", + "responses": { + "204": { + "description": "Indicates the comment was deleted by this action or a previous delete." + }, + "404": { + "description": "If the comment doesn't exist" + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, "get": { "tags": ["Commits"], "description": "Returns the specified commit comment.", @@ -1993,6 +2440,63 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "put": { + "tags": ["Commits"], + "description": "Used to update the contents of a comment. Only the content of the comment can be updated.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/7f71b5/comments/5728901 \\\n -X PUT -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"One more thing!\"}'\n```", + "summary": "Update a commit comment", + "responses": { + "201": { + "description": "The newly updated comment.", + "headers": { + "Location": { + "description": "The location of the newly updated comment.", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "If the comment update was detected as spam" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commit_comment" + } + } + }, + "description": "The updated comment.", + "required": true + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -2094,7 +2598,18 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "responses": { @@ -2152,7 +2667,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "responses": { @@ -2217,7 +2743,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests": { @@ -2308,7 +2845,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports": { @@ -2357,7 +2912,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}": { @@ -2436,7 +3002,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "tags": ["Reports", "Commits"], @@ -2502,7 +3079,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Reports", "Commits"], @@ -2551,7 +3139,18 @@ "204": { "description": "No content" } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations": { @@ -2609,7 +3208,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Reports", "Commits"], @@ -2684,7 +3294,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}": { @@ -2761,7 +3382,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Reports", "Commits"], @@ -2847,7 +3479,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Reports", "Commits"], @@ -2905,7 +3548,18 @@ "204": { "description": "No content" } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses": { @@ -2968,6 +3622,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3050,6 +3711,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3122,6 +3790,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "put": { @@ -3173,6 +3848,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3251,6 +3933,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -3289,6 +3978,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3315,7 +4011,7 @@ "/repositories/{workspace}/{repo_slug}/commits/{revision}": { "get": { "tags": ["Commits"], - "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log`.\nLike these tools, the DAG can be filtered.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/master\n\nReturns all commits on rev `master` (similar to `git log master`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master\n\nReturns all commits on ref `dev` or `foo`, except those that are reachable on\n`master` (similar to `git log dev foo ^master`).\n\nAn optional `path` parameter can be specified that will limit the\nresults to commits that affect that path. `path` can either be a file\nor a directory. If a directory is specified, commits are returned that\nhave modified any file in the directory tree rooted by `path`. It is\nimportant to note that if the `path` parameter is specified, the commits\nreturned by this endpoint may no longer be a DAG, parent commits that\ndo not modify the path will be omitted from the response.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=README.md&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `dev` or `foo` or `bar`, but not on `master`\nthat changed the file README.md.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master\n\nReturns all commits that are on refs `dev` or `foo`, but not on `master`\nthat changed to a file in any file in the directory src or its children.\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than can fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.", + "description": "These are the repository's commits. They are paginated and returned\nin reverse chronological order, similar to the output of `git log`.\nLike these tools, the DAG can be filtered.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/master\n\nReturns all commits on ref `master` (similar to `git log master`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master\n\nReturns all commits on ref `dev` or `foo`, except those that are reachable on\n`master` (similar to `git log dev foo ^master`).\n\nAn optional `path` parameter can be specified that will limit the\nresults to commits that affect that path. `path` can either be a file\nor a directory. If a directory is specified, commits are returned that\nhave modified any file in the directory tree rooted by `path`. It is\nimportant to note that if the `path` parameter is specified, the commits\nreturned by this endpoint may no longer be a DAG, parent commits that\ndo not modify the path will be omitted from the response.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=README.md&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `dev` or `foo` or `bar`, but not on `master`\nthat changed the file README.md.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master\n\nReturns all commits that are on refs `dev` or `foo`, but not on `master`\nthat changed to a file in any file in the directory src or its children.\n\nBecause the response could include a very large number of commits, it\nis paginated. Follow the 'next' link in the response to navigate to the\nnext page of commits. As with other paginated resources, do not\nconstruct your own links.\n\nWhen the include and exclude parameters are more than can fit in a\nquery string, clients can use a `x-www-form-urlencoded` POST instead.", "summary": "List commits for revision", "responses": { "200": { @@ -3349,6 +4045,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -3387,6 +4090,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -3402,7 +4112,7 @@ { "name": "revision", "in": "path", - "description": "The commit's SHA1.", + "description": "A commit SHA1 or ref name.", "required": true, "schema": { "type": "string" @@ -3585,6 +4295,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -3648,6 +4365,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "get": { @@ -3696,6 +4420,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "put": { @@ -3754,6 +4485,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -3789,7 +4527,7 @@ "/repositories/{workspace}/{repo_slug}/deploy-keys": { "get": { "tags": ["Deployments"], - "description": "Returns all deploy-keys belonging to a repository.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys\n\nOutput:\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"id\": 123,\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"label\": \"mykey\",\n \"type\": \"deploy_key\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"links\":{\n \"self\":{\n \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123\"\n }\n }\n \"last_used\": null,\n \"comment\": \"mleu@C02W454JHTD8\"\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```", + "description": "Returns all deploy-keys belonging to a repository.", "summary": "List repository deploy keys", "responses": { "200": { @@ -3798,6 +4536,37 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_deploy_keys" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "id": 123, + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "label": "mykey", + "type": "deploy_key", + "created_on": "2018-08-15T23:50:59.993890+00:00", + "repository": { + "full_name": "mleu/test", + "name": "test", + "type": "repository", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123" + } + }, + "last_used": null, + "comment": "mleu@C02W454JHTD8" + } + ], + "page": 1, + "size": 1 + } + } } } } @@ -3830,7 +4599,7 @@ }, "post": { "tags": ["Deployments"], - "description": "Create a new deploy key in a repository. Note: If authenticating a deploy key\nwith an OAuth consumer, any changes to the OAuth consumer will subsequently\ninvalidate the deploy key.\n\n\nExample:\n```\n$ curl -XPOST \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys -d \\\n'{\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\",\n \"label\": \"mydeploykey\"\n}'\n\nOutput:\n{\n \"id\": 123,\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"label\": \"mydeploykey\",\n \"type\": \"deploy_key\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"links\":{\n \"self\":{\n \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123\"\n }\n }\n \"last_used\": null,\n \"comment\": \"mleu@C02W454JHTD8\"\n}\n```", + "description": "Create a new deploy key in a repository. Note: If authenticating a deploy key\nwith an OAuth consumer, any changes to the OAuth consumer will subsequently\ninvalidate the deploy key.\n\n\nExample:\n```\n$ curl -X POST \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys -d \\\n'{\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\",\n \"label\": \"mydeploykey\"\n}'\n```", "summary": "Add a repository deploy key", "responses": { "200": { @@ -3839,6 +4608,30 @@ "application/json": { "schema": { "$ref": "#/components/schemas/deploy_key" + }, + "examples": { + "response": { + "value": { + "id": 123, + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "label": "mydeploykey", + "type": "deploy_key", + "created_on": "2018-08-15T23:50:59.993890+00:00", + "repository": { + "full_name": "mleu/test", + "name": "test", + "type": "repository", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/123" + } + }, + "last_used": null, + "comment": "mleu@C02W454JHTD8" + } + } } } } @@ -3896,7 +4689,7 @@ "/repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}": { "delete": { "tags": ["Deployments"], - "description": "This deletes a deploy key from a repository.\n\nExample:\n```\n$ curl -XDELETE \\\n-H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234\n```", + "description": "This deletes a deploy key from a repository.", "summary": "Delete a repository deploy key", "responses": { "204": { @@ -3930,7 +4723,7 @@ }, "get": { "tags": ["Deployments"], - "description": "Returns the deploy key belonging to a specific key.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234\n\nOutput:\n{\n \"comment\": \"mleu@C02W454JHTD8\",\n \"last_used\": null,\n \"links\": {\n \"self\": {\n \"href\": https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234\"\n }\n },\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"label\": \"mykey\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"id\": 1234,\n \"type\": \"deploy_key\"\n}\n```", + "description": "Returns the deploy key belonging to a specific key.", "summary": "Get a repository deploy key", "responses": { "200": { @@ -3939,6 +4732,30 @@ "application/json": { "schema": { "$ref": "#/components/schemas/deploy_key" + }, + "examples": { + "response": { + "value": { + "comment": "mleu@C02W454JHTD8", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-key/1234" + } + }, + "repository": { + "full_name": "mleu/test", + "name": "test", + "type": "repository", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "label": "mykey", + "created_on": "2018-08-15T23:50:59.993890+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "id": 1234, + "type": "deploy_key" + } + } } } } @@ -3971,7 +4788,7 @@ }, "put": { "tags": ["Deployments"], - "description": "Create a new deploy key in a repository.\n\nThe same key needs to be passed in but the comment and label can change.\n\nExample:\n```\n$ curl -XPUT \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234 -d \\\n'{\n \"label\": \"newlabel\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 newcomment\",\n}'\n\nOutput:\n{\n \"comment\": \"newcomment\",\n \"last_used\": null,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234\"\n }\n },\n \"repository\": {\n \"full_name\": \"mleu/test\",\n \"name\": \"test\",\n \"type\": \"repository\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"label\": \"newlabel\",\n \"created_on\": \"2018-08-15T23:50:59.993890+00:00\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"id\": 1234,\n \"type\": \"deploy_key\"\n}\n```", + "description": "Create a new deploy key in a repository.\n\nThe same key needs to be passed in but the comment and label can change.\n\nExample:\n```\n$ curl -X PUT \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234 -d \\\n'{\n \"label\": \"newlabel\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 newcomment\",\n}'\n```", "summary": "Update a repository deploy key", "responses": { "200": { @@ -3980,6 +4797,30 @@ "application/json": { "schema": { "$ref": "#/components/schemas/deploy_key" + }, + "examples": { + "response": { + "value": { + "comment": "newcomment", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234" + } + }, + "repository": { + "full_name": "mleu/test", + "name": "test", + "type": "repository", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "label": "newlabel", + "created_on": "2018-08-15T23:50:59.993890+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "id": 1234, + "type": "deploy_key" + } + } } } } @@ -4050,7 +4891,7 @@ } ] }, - "/repositories/{workspace}/{repo_slug}/deployments/": { + "/repositories/{workspace}/{repo_slug}/deployments": { "get": { "tags": ["Deployments"], "description": "Find deployments", @@ -4087,7 +4928,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid}": { @@ -4146,7 +5005,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables": { @@ -4195,7 +5072,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -4281,7 +5169,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}": { @@ -4360,7 +5259,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -4419,13 +5329,24 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/diff/{spec}": { "get": { "tags": ["Commits"], - "description": "Produces a raw git-style diff.\n\n#### Single commit spec\n\nIf the `spec` argument to this API is a single commit, the diff is\nproduced against the first parent of the specified commit.\n\n#### Two commit spec\n\nTwo commits separated by `..` may be provided as the `spec`, e.g.,\n`3a8b42..9ff173`. When two commits are provided and the `topic` query\nparameter is true or absent, this API produces a 2-way three dot diff.\nThis is the diff between source commit and the merge base of the source\ncommit and the destination commit. When the `topic` query param is false,\na simple git-style diff is produced.\n\nThe two commits are interpreted as follows:\n\n* First commit: the commit containing the changes we wish to preview\n* Second commit: the commit representing the state to which we want to\n compare the first commit\n* **Note**: This is the opposite of the order used in `git diff`.\n\n#### Comparison to patches\n\nWhile similar to patches, diffs:\n\n* Don't have a commit header (username, commit message, etc)\n* Support the optional `path=foo/bar.py` query param to filter\n the diff to just that one file diff\n\n#### Response\n\nThe raw diff 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`.", + "description": "Produces a raw git-style diff.\n\n#### Single commit spec\n\nIf the `spec` argument to this API is a single commit, the diff is\nproduced against the first parent of the specified commit.\n\n#### Two commit spec\n\nTwo commits separated by `..` may be provided as the `spec`, e.g.,\n`3a8b42..9ff173`. When two commits are provided and the `topic` query\nparameter is true, this API produces a 2-way three dot diff.\nThis is the diff between source commit and the merge base of the source\ncommit and the destination commit. When the `topic` query param is false,\na simple git-style diff is produced.\n\nThe two commits are interpreted as follows:\n\n* First commit: the commit containing the changes we wish to preview\n* Second commit: the commit representing the state to which we want to\n compare the first commit\n* **Note**: This is the opposite of the order used in `git diff`.\n\n#### Comparison to patches\n\nWhile similar to patches, diffs:\n\n* Don't have a commit header (username, commit message, etc)\n* Support the optional `path=foo/bar.py` query param to filter\n the diff to just that one file diff\n\n#### Response\n\nThe raw diff 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`.", "summary": "Compare two commits", "responses": { "200": { @@ -4491,7 +5412,7 @@ { "name": "merge", "in": "query", - "description": "This parameter is deprecated and will be removed at the end\nof 2022. The 'topic' parameter should be used instead. The\n'merge' and 'topic' parameters cannot be both used at the same\ntime.\n\nIf true, the source commit is merged into the\ndestination commit, and then a diff from the\ndestination to the merge result is returned. If false,\na simple 'two dot' diff between the source and\ndestination is returned. True if omitted.", + "description": "This parameter is deprecated. The 'topic' parameter should be used\ninstead. The 'merge' and 'topic' parameters cannot be both used at\nthe same time.\n\nIf true, the source commit is merged into the\ndestination commit, and then a diff from the\ndestination to the merge result is returned. If false,\na simple 'two dot' diff between the source and\ndestination is returned. True if omitted.", "required": false, "schema": { "type": "boolean" @@ -4517,6 +5438,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -4552,7 +5480,7 @@ "/repositories/{workspace}/{repo_slug}/diffstat/{spec}": { "get": { "tags": ["Commits"], - "description": "Produces a response in JSON format with a record for every path\nmodified, including information on the type of the change and the\nnumber of lines added and removed.\n\n#### Single commit spec\n\nIf the `spec` argument to this API is a single commit, the diff is\nproduced against the first parent of the specified commit.\n\n#### Two commit spec\n\nTwo commits separated by `..` may be provided as the `spec`, e.g.,\n`3a8b42..9ff173`. When two commits are provided and the `topic` query\nparameter is true or absent, this API produces a 2-way three dot diff.\nThis is the diff between source commit and the merge base of the source\ncommit and the destination commit. When the `topic` query param is false,\na simple git-style diff is produced.\n\nThe two commits are interpreted as follows:\n\n* First commit: the commit containing the changes we wish to preview\n* Second commit: the commit representing the state to which we want to\n compare the first commit\n* **Note**: This is the opposite of the order used in `git diff`.\n\n#### Sample output\n```\ncurl https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/diffstat/d222fa2..e174964\n{\n \"pagelen\": 500,\n \"values\": [\n {\n \"type\": \"diffstat\",\n \"status\": \"modified\",\n \"lines_removed\": 1,\n \"lines_added\": 2,\n \"old\": {\n \"path\": \"setup.py\",\n \"escaped_path\": \"setup.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/e1749643d655d7c7014001a6c0f58abaf42ad850/setup.py\"\n }\n }\n },\n \"new\": {\n \"path\": \"setup.py\",\n \"escaped_path\": \"setup.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/d222fa235229c55dad20b190b0b571adf737d5a6/setup.py\"\n }\n }\n }\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```", + "description": "Produces a response in JSON format with a record for every path\nmodified, including information on the type of the change and the\nnumber of lines added and removed.\n\n#### Single commit spec\n\nIf the `spec` argument to this API is a single commit, the diff is\nproduced against the first parent of the specified commit.\n\n#### Two commit spec\n\nTwo commits separated by `..` may be provided as the `spec`, e.g.,\n`3a8b42..9ff173`. When two commits are provided and the `topic` query\nparameter is true, this API produces a 2-way three dot diff.\nThis is the diff between source commit and the merge base of the source\ncommit and the destination commit. When the `topic` query param is false,\na simple git-style diff is produced.\n\nThe two commits are interpreted as follows:\n\n* First commit: the commit containing the changes we wish to preview\n* Second commit: the commit representing the state to which we want to\n compare the first commit\n* **Note**: This is the opposite of the order used in `git diff`.", "summary": "Compare two commit diff stats", "responses": { "200": { @@ -4561,6 +5489,43 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_diffstats" + }, + "examples": { + "response": { + "value": { + "pagelen": 500, + "values": [ + { + "type": "diffstat", + "status": "modified", + "lines_removed": 1, + "lines_added": 2, + "old": { + "path": "setup.py", + "escaped_path": "setup.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/e1749643d655d7c7014001a6c0f58abaf42ad850/setup.py" + } + } + }, + "new": { + "path": "setup.py", + "escaped_path": "setup.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/bitbucket/geordi/src/d222fa235229c55dad20b190b0b571adf737d5a6/setup.py" + } + } + } + } + ], + "page": 1, + "size": 1 + } + } } } } @@ -4586,6 +5551,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -4601,7 +5573,7 @@ { "name": "merge", "in": "query", - "description": "This parameter is deprecated and will be removed at the end\nof 2022. The 'topic' parameter should be used instead. The\n'merge' and 'topic' parameters cannot be both used at the same\ntime.\n\nIf true, the source commit is merged into the\ndestination commit, and then a diffstat from the\ndestination to the merge result is returned. If false,\na simple 'two dot' diffstat between the source and\ndestination is returned. True if omitted.", + "description": "This parameter is deprecated. The 'topic' parameter should be used\ninstead. The 'merge' and 'topic' parameters cannot be both used at\nthe same time.\n\nIf true, the source commit is merged into the\ndestination commit, and then a diffstat from the\ndestination to the merge result is returned. If false,\na simple 'two dot' diffstat between the source and\ndestination is returned. True if omitted.", "required": false, "schema": { "type": "boolean" @@ -4693,6 +5665,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -4807,6 +5786,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "get": { @@ -4937,6 +5923,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -4963,7 +5956,7 @@ "/repositories/{workspace}/{repo_slug}/effective-default-reviewers": { "get": { "tags": ["Pullrequests"], - "description": "Returns the repository's effective default reviewers. This includes both default\nreviewers defined at the repository level as well as those inherited from its project.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/{workspace_slug}/{repo_slug}/effective-default-reviewers?page=1&pagelen=20\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"user\": {\n \"display_name\": \"Patrick Wolf\",\n \"uuid\": \"{9565301a-a3cf-4b5d-88f4-dd6af8078d7e}\"\n },\n \"reviewer_type\": \"project\",\n \"type\": \"default_reviewer\",\n },\n {\n \"user\": {\n \"display_name\": \"Davis Lee\",\n \"uuid\": \"{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}\"\n },\n \"reviewer_type\": \"repository\",\n \"type\": \"default_reviewer\",\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```", + "description": "Returns the repository's effective default reviewers. This includes both default\nreviewers defined at the repository level as well as those inherited from its project.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created.", "summary": "List effective default reviewers", "responses": { "200": { @@ -4972,6 +5965,33 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_default_reviewer_and_type" + }, + "examples": { + "response": { + "value": { + "pagelen": 20, + "values": [ + { + "user": { + "display_name": "Patrick Wolf", + "uuid": "{9565301a-a3cf-4b5d-88f4-dd6af8078d7e}" + }, + "reviewer_type": "project", + "type": "default_reviewer" + }, + { + "user": { + "display_name": "Davis Lee", + "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}" + }, + "reviewer_type": "repository", + "type": "default_reviewer" + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -4997,6 +6017,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -5020,7 +6047,7 @@ } ] }, - "/repositories/{workspace}/{repo_slug}/environments/": { + "/repositories/{workspace}/{repo_slug}/environments": { "get": { "tags": ["Deployments"], "description": "Find environments", @@ -5057,7 +6084,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Deployments"], @@ -5134,7 +6179,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}": { @@ -5193,7 +6249,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Deployments"], @@ -5243,10 +6317,21 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes/": { + "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes": { "post": { "tags": ["Deployments"], "description": "Update an environment", @@ -5295,13 +6380,24 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path}": { "get": { "tags": ["Source", "Repositories"], - "description": "Returns a paginated list of commits that modified the specified file.\n\nCommits are returned in reverse chronological order. This is roughly\nequivalent to the following commands:\n\n $ git log --follow --date-order \n\nBy default, Bitbucket will follow renames and the path name in the\nreturned entries reflects that. This can be turned off using the\n`?renames=false` query parameter.\n\nResults are returned in descending chronological order by default, and\nlike most endpoints you can\n[filter and sort](/cloud/bitbucket/rest/intro/#filtering) the response to\nonly provide exactly the data you want.\n\nFor example, if you wanted to find commits made before 2011-05-18\nagainst a file named `README.rst`, but you only wanted the path and\ndate, your query would look like this:\n\n```\n$ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\\\n '?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18'\n{\n \"values\": [\n {\n \"commit\": {\n \"date\": \"2011-05-17T07:32:09+00:00\"\n },\n \"path\": \"README.rst\"\n },\n {\n \"commit\": {\n \"date\": \"2011-05-16T06:33:28+00:00\"\n },\n \"path\": \"README.txt\"\n },\n {\n \"commit\": {\n \"date\": \"2011-05-16T06:15:39+00:00\"\n },\n \"path\": \"README.txt\"\n }\n ]\n}\n```\n\nIn the response you can see that the file was renamed to `README.rst`\nby the commit made on 2011-05-16, and was previously named `README.txt`.", + "description": "Returns a paginated list of commits that modified the specified file.\n\nCommits are returned in reverse chronological order. This is roughly\nequivalent to the following commands:\n\n $ git log --follow --date-order \n\nBy default, Bitbucket will follow renames and the path name in the\nreturned entries reflects that. This can be turned off using the\n`?renames=false` query parameter.\n\nResults are returned in descending chronological order by default, and\nlike most endpoints you can\n[filter and sort](/cloud/bitbucket/rest/intro/#filtering) the response to\nonly provide exactly the data you want.\n\nThe example response returns commits made before 2011-05-18 against a file\nnamed `README.rst`. The results are filtered to only return the path and\ndate. This request can be made using:\n\n```\n$ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\\\n '?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18'\n```\n\nIn the response you can see that the file was renamed to `README.rst`\nby the commit made on 2011-05-16, and was previously named `README.txt`.", "summary": "List commits that modified a file", "responses": { "200": { @@ -5310,6 +6406,32 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_files" + }, + "examples": { + "response": { + "value": { + "values": [ + { + "commit": { + "date": "2011-05-17T07:32:09+00:00" + }, + "path": "README.rst" + }, + { + "commit": { + "date": "2011-05-16T06:33:28+00:00" + }, + "path": "README.txt" + }, + { + "commit": { + "date": "2011-05-16T06:15:39+00:00" + }, + "path": "README.txt" + } + ] + } + } } } } @@ -5364,6 +6486,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -5462,6 +6591,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -5508,6 +6644,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:repository:bitbucket", + "write:repository:bitbucket" + ] + } ] }, "parameters": [ @@ -5582,7 +6728,7 @@ }, "post": { "tags": ["Repositories", "Webhooks"], - "description": "Creates a new webhook on the specified repository.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo-slug/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nNote that this call requires the webhook scope, as well as any scope\nthat applies to the events that the webhook subscribes to. In the\nexample above that means: `webhook`, `repository` and `issue`.\n\nAlso note that the `url` must properly resolve and cannot be an\ninternal, non-routed address.", + "description": "Creates a new webhook on the specified repository.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo-slug/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"secret\": \"this is a really bad secret\",\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nWhen the `secret` is provided it will be used as the key to generate a HMAC\ndigest value sent in the `X-Hub-Signature` header at delivery time. Passing\na `null` or empty `secret` or not passing a `secret` will leave the webhook's\nsecret unset. Bitbucket only generates the `X-Hub-Signature` when the webhook's\nsecret is set.\n\nNote that this call requires the webhook scope, as well as any scope\nthat applies to the events that the webhook subscribes to. In the\nexample above that means: `webhook`, `repository` and `issue`.\n\nAlso note that the `url` must properly resolve and cannot be an\ninternal, non-routed address.", "summary": "Create a webhook for a repository", "responses": { "201": { @@ -5739,7 +6885,7 @@ }, "put": { "tags": ["Repositories", "Webhooks"], - "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `active`\n* `events`", + "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `secret`\n* `active`\n* `events`\n\nThe hook's secret is used as a key to generate the HMAC hex digest sent in the\n`X-Hub-Signature` header at delivery time. This signature is only generated\nwhen the hook has a secret.\n\nSet the hook's secret by passing the new value in the `secret` field. Passing a\n`null` value in the `secret` field will remove the secret from the hook. The\nhook's secret can be left unchanged by not passing the `secret` field in the\nrequest.", "summary": "Update a webhook for a repository", "responses": { "200": { @@ -5955,7 +7101,7 @@ "/repositories/{workspace}/{repo_slug}/issues/export": { "post": { "tags": ["Issue tracker"], - "description": "A POST request to this endpoint initiates a new background celery task that archives the repo's issues.\n\nFor example, you can run:\n\ncurl -u -X POST http://api.bitbucket.org/2.0/repositories///\nissues/export\n\nWhen the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the\n'Location' response header. This url is the endpoint for where the user can obtain their zip files.\"", + "description": "A POST request to this endpoint initiates a new background celery task that archives the repo's issues.\n\nWhen the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the\n'Location' response header. This url is the endpoint for where the user can obtain their zip files.\"", "summary": "Export issues", "responses": { "202": { @@ -6038,7 +7184,7 @@ "/repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zip": { "get": { "tags": ["Issue tracker"], - "description": "This endpoint is used to poll for the progress of an issue export\njob and return the zip file after the job is complete.\nAs long as the job is running, this will return a 200 response\nwith in the response body a description of the current status.\n\nAfter the job has been scheduled, but before it starts executing, this\nendpoint's response is:\n\n{\n \"type\": \"issue_job_status\",\n \"status\": \"ACCEPTED\",\n \"phase\": \"Initializing\",\n \"total\": 0,\n \"count\": 0,\n \"pct\": 0\n}\n\n\nThen once it starts running, it becomes:\n\n{\n \"type\": \"issue_job_status\",\n \"status\": \"STARTED\",\n \"phase\": \"Attachments\",\n \"total\": 15,\n \"count\": 11,\n \"pct\": 73\n}\n\nOnce the job has successfully completed, it returns a stream of the zip file.", + "description": "This endpoint is used to poll for the progress of an issue export\njob and return the zip file after the job is complete.\nAs long as the job is running, this will return a 202 response\nwith in the response body a description of the current status.\n\nAfter the job has been scheduled, but before it starts executing, the endpoint\nreturns a 202 response with status `ACCEPTED`.\n\nOnce it starts running, it is a 202 response with status `STARTED` and progress filled.\n\nAfter it is finished, it becomes a 200 response with status `SUCCESS` or `FAILURE`.", "summary": "Check issue export status", "responses": { "202": { @@ -6047,6 +7193,18 @@ "application/json": { "schema": { "$ref": "#/components/schemas/issue_job_status" + }, + "examples": { + "response": { + "value": { + "type": "issue_job_status", + "status": "ACCEPTED", + "phase": "Initializing", + "total": 0, + "count": 0, + "pct": 0 + } + } } } } @@ -6136,7 +7294,7 @@ "/repositories/{workspace}/{repo_slug}/issues/import": { "get": { "tags": ["Issue tracker"], - "description": "When using GET, this endpoint reports the status of the current import task. Request example:\n\n```\n$ curl -u -X GET https://api.bitbucket.org/2.0/repositories///issues/import\n```\n\nAfter the job has been scheduled, but before it starts executing, this endpoint's response is:\n\n```\n< HTTP/1.1 202 Accepted\n{\n \"type\": \"issue_job_status\",\n \"status\": \"PENDING\",\n \"phase\": \"Attachments\",\n \"total\": 15,\n \"count\": 0,\n \"percent\": 0\n}\n```\n\nOnce it starts running, it is a 202 response with status STARTED and progress filled.\n\nAfter it is finished, it becomes a 200 response with status SUCCESS or FAILURE.", + "description": "When using GET, this endpoint reports the status of the current import task.\n\nAfter the job has been scheduled, but before it starts executing, the endpoint\nreturns a 202 response with status `ACCEPTED`.\n\nOnce it starts running, it is a 202 response with status `STARTED` and progress filled.\n\nAfter it is finished, it becomes a 200 response with status `SUCCESS` or `FAILURE`.", "summary": "Check issue import status", "responses": { "200": { @@ -6155,6 +7313,18 @@ "application/json": { "schema": { "$ref": "#/components/schemas/issue_job_status" + }, + "examples": { + "response": { + "value": { + "type": "issue_job_status", + "status": "ACCEPTED", + "phase": "Attachments", + "total": 15, + "count": 0, + "percent": 0 + } + } } } } @@ -6204,7 +7374,7 @@ }, "post": { "tags": ["Issue tracker"], - "description": "A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All\nexisting issues will be deleted and replaced by the contents of the imported zip file.\n\nImports are done through a multipart/form-data POST. There is one valid and required form field, with the name\n\"archive,\" which needs to be a file field:\n\n```\n$ curl -u -X POST -F archive=@/path/to/file.zip https://api.bitbucket.org/2.0/repositories///issues/import\n```\n\nWhen the import job is accepted, here is example output:\n\n```\n< HTTP/1.1 202 Accepted\n\n{\n \"type\": \"issue_job_status\",\n \"status\": \"ACCEPTED\",\n \"phase\": \"Attachments\",\n \"total\": 15,\n \"count\": 0,\n \"percent\": 0\n}\n```", + "description": "A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All\nexisting issues will be deleted and replaced by the contents of the imported zip file.\n\nImports are done through a multipart/form-data POST. There is one valid and required form field, with the name\n\"archive,\" which needs to be a file field:\n\n```\n$ curl -u -X POST -F archive=@/path/to/file.zip https://api.bitbucket.org/2.0/repositories///issues/import\n```", "summary": "Import issues", "responses": { "202": { @@ -6213,6 +7383,18 @@ "application/json": { "schema": { "$ref": "#/components/schemas/issue_job_status" + }, + "examples": { + "response": { + "value": { + "type": "issue_job_status", + "status": "ACCEPTED", + "phase": "Attachments", + "total": 15, + "count": 0, + "percent": 0 + } + } } } } @@ -6711,7 +7893,7 @@ "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes": { "get": { "tags": ["Issue tracker"], - "description": "Returns the list of all changes that have been made to the specified\nissue. Changes are returned in chronological order with the oldest\nchange first.\n\nEach time an issue is edited in the UI or through the API, an immutable\nchange record is created under the `/issues/123/changes` endpoint. It\nalso has a comment associated with the change.\n\nNote that this operation is changing significantly, due to privacy changes.\nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-the-issue-changes-api)\nfor details.\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes - | jq .\n\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"changes\": {\n \"priority\": {\n \"new\": \"trivial\",\n \"old\": \"major\"\n },\n \"assignee\": {\n \"new\": \"\",\n \"old\": \"evzijst\"\n },\n \"assignee_account_id\": {\n \"new\": \"\",\n \"old\": \"557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443\"\n },\n \"kind\": {\n \"new\": \"enhancement\",\n \"old\": \"bug\"\n }\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes/2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst/dogslow/issues/1#comment-2\"\n }\n },\n \"issue\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1\"\n }\n },\n \"type\": \"issue\",\n \"id\": 1,\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/dogslow\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst/dogslow\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/evzijst/dogslow/avatar/32/\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"dogslow\",\n \"full_name\": \"evzijst/dogslow\",\n \"uuid\": \"{988b17c6-1a47-4e70-84ee-854d5f012bf6}\"\n },\n \"title\": \"Updated title\"\n },\n \"created_on\": \"2018-03-03T00:35:28.353630+00:00\",\n \"user\": {\n \"username\": \"evzijst\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"evzijst\",\n \"type\": \"user\",\n \"uuid\": \"{aaa7972b-38af-4fb1-802d-6e3854c95778}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/evzijst\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/evzijst/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/evzijst/avatar/32/\"\n }\n }\n },\n \"message\": {\n \"raw\": \"Removed assignee, changed kind and priority.\",\n \"markup\": \"markdown\",\n \"html\": \"

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](/cloud/bitbucket/rest/intro/#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.", + "description": "Returns the list of all changes that have been made to the specified\nissue. Changes are returned in chronological order with the oldest\nchange first.\n\nEach time an issue is edited in the UI or through the API, an immutable\nchange record is created under the `/issues/123/changes` endpoint. It\nalso has a comment associated with the change.\n\nNote that this operation is changing significantly, due to privacy changes.\nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-the-issue-changes-api)\nfor details.\n\nChanges support [filtering and sorting](/cloud/bitbucket/rest/intro/#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.", "summary": "List changes on an issue", "responses": { "200": { @@ -6720,6 +7902,98 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_log_entries" + }, + "examples": { + "response": { + "value": { + "pagelen": 20, + "values": [ + { + "changes": { + "priority": { + "new": "trivial", + "old": "major" + }, + "assignee": { + "new": "", + "old": "evzijst" + }, + "assignee_account_id": { + "new": "", + "old": "557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443" + }, + "kind": { + "new": "enhancement", + "old": "bug" + } + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes/2" + }, + "html": { + "href": "https://bitbucket.org/evzijst/dogslow/issues/1#comment-2" + } + }, + "issue": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1" + } + }, + "type": "issue", + "id": 1, + "repository": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow" + }, + "html": { + "href": "https://bitbucket.org/evzijst/dogslow" + }, + "avatar": { + "href": "https://bitbucket.org/evzijst/dogslow/avatar/32/" + } + }, + "type": "repository", + "name": "dogslow", + "full_name": "evzijst/dogslow", + "uuid": "{988b17c6-1a47-4e70-84ee-854d5f012bf6}" + }, + "title": "Updated title" + }, + "created_on": "2018-03-03T00:35:28.353630+00:00", + "user": { + "username": "evzijst", + "nickname": "evzijst", + "display_name": "evzijst", + "type": "user", + "uuid": "{aaa7972b-38af-4fb1-802d-6e3854c95778}", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/evzijst" + }, + "html": { + "href": "https://bitbucket.org/evzijst/" + }, + "avatar": { + "href": "https://bitbucket.org/account/evzijst/avatar/32/" + } + } + }, + "message": { + "raw": "Removed assignee, changed kind and priority.", + "markup": "markdown", + "html": "

Removed assignee, changed kind and priority.

", + "type": "rendered" + }, + "type": "issue_change", + "id": 2 + } + ], + "page": 1 + } + } } } } @@ -7597,6 +8871,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -7795,6 +9076,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "put": { @@ -7826,6 +9114,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } ] }, "parameters": [ @@ -7879,6 +9174,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -7914,7 +9216,7 @@ "/repositories/{workspace}/{repo_slug}/permissions-config/groups": { "get": { "tags": ["Repositories"], - "description": "Returns a paginated list of explicit group permissions for the given repository.\nThis endpoint does not support BBQL features.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups\n\nHTTP/1.1 200\nLocation: https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Administrators\",\n \"slug\": \"administrators\"\n },\n \"permission\": \"admin\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/\n geordi/permissions-config/groups/administrators\"\n }\n }\n },\n {\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Developers\",\n \"slug\": \"developers\"\n },\n \"permission\": \"read\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/\n geordi/permissions-config/groups/developers\"\n }\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```", + "description": "Returns a paginated list of explicit group permissions for the given repository.\nThis endpoint does not support BBQL features.", "summary": "List explicit group permissions for a repository", "responses": { "200": { @@ -7923,6 +9225,45 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_group_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/administrators" + } + } + }, + { + "type": "repository_group_permission", + "group": { + "type": "group", + "name": "Developers", + "slug": "developers" + }, + "permission": "read", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers" + } + } + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -7968,6 +9309,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -7994,7 +9342,7 @@ "/repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}": { "delete": { "tags": ["Repositories"], - "description": "Deletes the repository group permission between the requested repository and group, if one exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nExample:\n\n$ curl -X DELETE https://api.bitbucket.org/2.0/repositories/atlassian_tutorial\n/geordi/permissions-config/groups/developers\n\n\nHTTP/1.1 204", + "description": "Deletes the repository group permission between the requested repository and group, if one exists.\n\nOnly users with admin permission for the repository may access this resource.", "summary": "Delete an explicit group permission for a repository", "responses": { "204": { @@ -8021,7 +9369,7 @@ } }, "404": { - "description": "The workspace does not exist, the repository does not exist,or the group does not exist.", + "description": "The workspace does not exist, the repository does not exist, or the group does not exist.", "content": { "application/json": { "schema": { @@ -8045,7 +9393,7 @@ }, "get": { "tags": ["Repositories"], - "description": "Returns the group permission for a given group slug and repository\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n* `none`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n\nHTTP/1.1 200\nLocation:\nhttps://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n\n{\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Developers\",\n \"slug\": \"developers\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"read\",\n \"links\": {\n \"self\": {\n \"href\":\n \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\"\n }\n }\n}\n```", + "description": "Returns the group permission for a given group slug and repository\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n* `none`", "summary": "Get an explicit group permission for a repository", "responses": { "200": { @@ -8054,6 +9402,25 @@ "application/json": { "schema": { "$ref": "#/components/schemas/repository_group_permission" + }, + "examples": { + "response": { + "value": { + "type": "repository_group_permission", + "group": { + "type": "group", + "name": "Developers", + "slug": "developers", + "full_slug": "atlassian_tutorial:developers" + }, + "permission": "read", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers" + } + } + } + } } } } @@ -8099,11 +9466,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "put": { "tags": ["Repositories"], - "description": "Updates the group permission if it exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method supported for this endpoint is via app passwords.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n```\n$ curl -X PUT -H \"Content-Type: application/json\"\nhttps://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n-d\n'{\n \"permission\": \"write\"\n}'\n\nHTTP/1.1 200\nLocation:\nhttps://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\n\n{\n \"type\": \"repository_group_permission\",\n \"group\": {\n \"type\": \"group\",\n \"name\": \"Developers\",\n \"slug\": \"developers\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\",\n \"links\": {\n \"self\": {\n \"href\":\n \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers\"\n }\n }\n}\n```", + "description": "Updates the group permission, or grants a new permission if one does not already exist.\n\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method supported for this endpoint is via app passwords.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`", "summary": "Update an explicit group permission for a repository", "responses": { "200": { @@ -8112,6 +9486,25 @@ "application/json": { "schema": { "$ref": "#/components/schemas/repository_group_permission" + }, + "examples": { + "response": { + "value": { + "type": "repository_group_permission", + "group": { + "type": "group", + "name": "Developers", + "slug": "developers", + "full_slug": "atlassian_tutorial:developers" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/groups/developers" + } + } + } + } } } } @@ -8157,7 +9550,7 @@ } }, "404": { - "description": "The workspace does not exist, the repository does not exist,or the group does not exist.", + "description": "The workspace does not exist, the repository does not exist, or the group does not exist.", "content": { "application/json": { "schema": { @@ -8167,6 +9560,9 @@ } } }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema" + }, "security": [ { "oauth2": ["repository:admin"] @@ -8212,7 +9608,7 @@ "/repositories/{workspace}/{repo_slug}/permissions-config/users": { "get": { "tags": ["Repositories"], - "description": "Returns a paginated list of explicit user permissions for the given repository.\nThis endpoint does not support BBQL features.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Colin Cameron\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n },\n \"permission\": \"admin\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n }\n }\n },\n {\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\"\n },\n \"permission\": \"write\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0//repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c\"\n }\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```", + "description": "Returns a paginated list of explicit user permissions for the given repository.\nThis endpoint does not support BBQL features.", "summary": "List explicit user permissions for a repository", "responses": { "200": { @@ -8221,6 +9617,47 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_user_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + }, + { + "type": "repository_user_permission", + "user": { + "type": "user", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0//repositories/atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + } + } + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -8266,6 +9703,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -8292,7 +9736,7 @@ "/repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}": { "delete": { "tags": ["Repositories"], - "description": "Deletes the repository user permission between the requested repository and user, if one exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method for this endpoint is via app passwords.\n\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\npermissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\n\n\nHTTP/1.1 204\n```", + "description": "Deletes the repository user permission between the requested repository and user, if one exists.\n\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method for this endpoint is via app passwords.", "summary": "Delete an explicit user permission for a repository", "responses": { "204": { @@ -8343,7 +9787,7 @@ }, "get": { "tags": ["Repositories"], - "description": "Returns the explicit user permission for a given user and repository.\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n* `none`\n\nExample:\n\n```\n$ curl 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n\nHTTP/1.1 200\nLocation: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n\n{\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Colin Cameron\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n }\n }\n}\n```", + "description": "Returns the explicit user permission for a given user and repository.\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n* `none`", "summary": "Get an explicit user permission for a repository", "responses": { "200": { @@ -8352,6 +9796,26 @@ "application/json": { "schema": { "$ref": "#/components/schemas/repository_user_permission" + }, + "examples": { + "response": { + "value": { + "type": "repository_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a", + "nickname": "Colin Cameron" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + } } } } @@ -8397,11 +9861,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "put": { "tags": ["Repositories"], - "description": "Updates the explicit user permission for a given user and repository. The selected user must be a member of\nthe workspace, and cannot be the workspace owner.\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method for this endpoint is via app passwords.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl -X PUT -H \"Content-Type: application/json\" 'https://api.bitbucket.org/2.0/repositories/\natlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n-d '{\n \"permission\": \"write\"\n}'\n\nHTTP/1.1 200\nLocation: 'https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\npermissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a'\n\n\n{\n \"type\": \"repository_user_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Colin Cameron\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\n \"account_id\": \"557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/\n permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a\"\n }\n }\n}\n```", + "description": "Updates the explicit user permission for a given user and repository. The selected user must be a member of\nthe workspace, and cannot be the workspace owner.\nOnly users with admin permission for the repository may access this resource.\n\nThe only authentication method for this endpoint is via app passwords.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`", "summary": "Update an explicit user permission for a repository", "responses": { "200": { @@ -8410,6 +9881,26 @@ "application/json": { "schema": { "$ref": "#/components/schemas/repository_user_permission" + }, + "examples": { + "response": { + "value": { + "type": "repository_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a", + "nickname": "Colin Cameron" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian_tutorial/geordi/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + } } } } @@ -8465,6 +9956,9 @@ } } }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema" + }, "security": [ { "oauth2": ["repository:admin"] @@ -8507,168 +10001,7 @@ } ] }, - "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/": { - "get": { - "tags": ["Pipelines"], - "summary": "List caches", - "description": "Retrieve the repository pipelines caches.", - "operationId": "getRepositoryPipelineCaches", - "parameters": [ - { - "name": "workspace", - "description": "The account.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "repo_slug", - "description": "The repository.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The list of caches for the given repository.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/paginated_pipeline_caches" - } - } - } - }, - "404": { - "description": "The account or repository was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - } - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}": { - "delete": { - "tags": ["Pipelines"], - "summary": "Delete a cache", - "description": "Delete a repository cache.", - "operationId": "deleteRepositoryPipelineCache", - "parameters": [ - { - "name": "workspace", - "description": "The account.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "repo_slug", - "description": "The repository.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "cache_uuid", - "description": "The UUID of the cache to delete.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "204": { - "description": "The cache was deleted." - }, - "404": { - "description": "The workspace, repository or cache_uuid with given UUID was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - } - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri": { - "get": { - "tags": ["Pipelines"], - "summary": "Get cache content URI", - "description": "Retrieve the URI of the content of the specified cache.", - "operationId": "getRepositoryPipelineCacheContentURI", - "parameters": [ - { - "name": "workspace", - "description": "The account.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "repo_slug", - "description": "The repository.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "cache_uuid", - "description": "The UUID of the cache.", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "The cache content uri.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/pipeline_cache_content_uri" - } - } - } - }, - "404": { - "description": "The workspace, repository or cache_uuid with given UUID was not found.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error" - } - } - } - } - } - } - }, - "/repositories/{workspace}/{repo_slug}/pipelines/": { + "/repositories/{workspace}/{repo_slug}/pipelines": { "get": { "tags": ["Pipelines"], "summary": "List pipelines", @@ -8705,12 +10038,30 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], "summary": "Run a pipeline", - "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", + "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 \"target\": {\n \"type\": \"pipeline_pullrequest_target\",\n \"source\": \"pull-request-branch\",\n \"destination\": \"master\",\n \"destination_commit\": {\n \"hash\": \"9f848b7\"\n },\n \"commit\": {\n \"hash\": \"1a372fc\"\n },\n \"pullrequest\": {\n \"id\": \"3\"\n },\n \"selector\": {\n \"type\": \"pull-requests\",\n \"pattern\": \"**\"\n }\n }\n }'\n```\n", "operationId": "createPipelineForRepository", "parameters": [ { @@ -8782,7 +10133,308 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket", "write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines-config/caches": { + "get": { + "tags": ["Pipelines"], + "summary": "List caches", + "description": "Retrieve the repository pipelines caches.", + "operationId": "getRepositoryPipelineCaches", + "parameters": [ + { + "name": "workspace", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The list of caches for the given repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_caches" + } + } + } + }, + "404": { + "description": "The account or repository was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Pipelines"], + "summary": "Delete caches", + "description": "Delete repository cache versions by name.", + "operationId": "deleteRepositoryPipelineCaches", + "parameters": [ + { + "name": "workspace", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "name", + "description": "The cache name.", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The caches were deleted." + }, + "404": { + "description": "The workspace, repository or cache name was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}": { + "delete": { + "tags": ["Pipelines"], + "summary": "Delete a cache", + "description": "Delete a repository cache.", + "operationId": "deleteRepositoryPipelineCache", + "parameters": [ + { + "name": "workspace", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "cache_uuid", + "description": "The UUID of the cache to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The cache was deleted." + }, + "404": { + "description": "The workspace, repository or cache_uuid with given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri": { + "get": { + "tags": ["Pipelines"], + "summary": "Get cache content URI", + "description": "Retrieve the URI of the content of the specified cache.", + "operationId": "getRepositoryPipelineCacheContentURI", + "parameters": [ + { + "name": "workspace", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "cache_uuid", + "description": "The UUID of the cache.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The cache content uri.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_cache_content_uri" + } + } + } + }, + "404": { + "description": "The workspace, repository or cache_uuid with given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}": { @@ -8841,10 +10493,28 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/": { + "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps": { "get": { "tags": ["Pipelines"], "summary": "List steps for a pipeline", @@ -8890,7 +10560,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}": { @@ -8958,7 +10646,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log": { @@ -9039,7 +10745,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}": { @@ -9109,7 +10833,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports": { @@ -9169,7 +10911,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases": { @@ -9229,7 +10989,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons": { @@ -9298,7 +11076,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline": { @@ -9360,7 +11156,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config": { @@ -9400,7 +11214,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -9449,7 +11274,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/build_number": { @@ -9520,10 +11356,21 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/": { + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules": { "post": { "tags": ["Pipelines"], "summary": "Create a schedule", @@ -9553,7 +11400,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/pipeline_schedule" + "$ref": "#/components/schemas/pipeline_schedule_post_request_body" } } }, @@ -9601,7 +11448,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket", "write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "tags": ["Pipelines"], @@ -9649,7 +11514,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}": { @@ -9708,7 +11591,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -9748,7 +11649,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/pipeline_schedule" + "$ref": "#/components/schemas/pipeline_schedule_put_request_body" } } }, @@ -9776,7 +11677,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket", "write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -9826,10 +11745,28 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions/": { + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions": { "get": { "tags": ["Pipelines"], "summary": "List executions of a schedule", @@ -9885,7 +11822,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair": { @@ -9935,7 +11890,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -9994,7 +11967,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -10035,10 +12019,28 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/": { + "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts": { "get": { "tags": ["Pipelines"], "summary": "List known hosts", @@ -10075,7 +12077,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -10152,7 +12172,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}": { @@ -10211,7 +12242,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -10279,7 +12328,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -10329,10 +12389,28 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, - "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/": { + "/repositories/{workspace}/{repo_slug}/pipelines_config/variables": { "get": { "tags": ["Pipelines"], "summary": "List variables for a repository", @@ -10369,7 +12447,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -10446,7 +12542,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}": { @@ -10505,7 +12612,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -10573,7 +12698,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -10623,7 +12759,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}": { @@ -10677,7 +12831,18 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "responses": { @@ -10726,7 +12891,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "responses": { @@ -10782,7 +12958,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/pullrequests": { @@ -10836,6 +13023,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "post": { @@ -10902,6 +13096,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -10958,6 +13162,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11021,6 +13232,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "put": { @@ -11089,6 +13307,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -11154,6 +13382,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11195,6 +13430,16 @@ "204": { "description": "An empty response indicating the authenticated user's approval has been withdrawn." }, + "400": { + "description": "Pull request cannot be unapproved because the pull request has already been merged.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "401": { "description": "The request wasn't authenticated.", "content": { @@ -11226,6 +13471,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pullrequest:bitbucket"] + } ] }, "post": { @@ -11274,6 +13526,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -11353,6 +13615,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "post": { @@ -11420,6 +13689,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11492,6 +13768,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "get": { @@ -11540,6 +13823,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "put": { @@ -11599,6 +13889,166 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "comment_id", + "in": "path", + "description": "The id of the comment.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "pull_request_id", + "in": "path", + "description": "The id of the pull request.", + "required": true, + "schema": { + "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, + "schema": { + "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, + "schema": { + "type": "string" + } + } + ] + }, + "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve": { + "delete": { + "tags": ["Pullrequests"], + "description": "", + "summary": "Reopen a comment thread", + "responses": { + "204": { + "description": "The comment is reopened." + }, + "403": { + "description": "If the authenticated user does not have access to the pull request,\nor if the provided comment is not a top-level comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the comment does not exist, or if the comment has not been resolved", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "post": { + "tags": ["Pullrequests"], + "description": "", + "summary": "Resolve a comment thread", + "responses": { + "200": { + "description": "The comment resolution details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/comment_resolution" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request,\nif the provided comment is not a top-level comment,\nor if the comment is not on the diff.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the comment does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "If the comment has already been resolved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11680,6 +14130,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11749,6 +14206,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -11801,6 +14268,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11853,6 +14327,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -11945,6 +14426,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -12003,6 +14494,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -12064,6 +14562,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -12105,6 +14610,16 @@ "204": { "description": "An empty response indicating the authenticated user's request for change has been withdrawn." }, + "400": { + "description": "Pull request requested changes cannot be removed because the pull request has already been merged.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "401": { "description": "The request wasn't authenticated.", "content": { @@ -12136,6 +14651,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pullrequest:bitbucket"] + } ] }, "post": { @@ -12153,6 +14675,16 @@ } } }, + "400": { + "description": "Pull request changes cannot be requested because the pull request has already been merged.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, "401": { "description": "The request wasn't authenticated.", "content": { @@ -12184,6 +14716,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } ] }, "parameters": [ @@ -12276,6 +14818,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -12308,6 +14857,434 @@ } ] }, + "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's tasks.\n\nThis endpoint supports filtering and sorting of the results by the 'task' field.\nSee [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List tasks on a pull request", + "responses": { + "200": { + "description": "A paginated list of pull request tasks for the given pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_tasks" + } + } + } + }, + "400": { + "description": "If the user provides an invalid filter, sort, or fields query parameter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the pull request does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "\nField by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\nDefaults to `created_on`.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pagelen", + "in": "query", + "description": "\nCurrent number of objects on the existing page.\nThe default value is 10 with 100 being the maximum allowed value.\nIndividual APIs may enforce different values.\n", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "post": { + "tags": ["Pullrequests"], + "description": "Creates a new pull request task.\n\nReturns the newly created pull request task.\n\nTasks can optionally be created in relation to a comment specified by the comment's ID which\nwill cause the task to appear below the comment on a pull request when viewed in Bitbucket.", + "summary": "Create a task on a pull request", + "responses": { + "201": { + "description": "The newly created task.", + "headers": { + "Location": { + "description": "The URL of the new task", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_comment_task" + } + } + } + }, + "400": { + "description": "There is a missing required field in the request or the task content is blank.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the pull request does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_task_create" + } + } + }, + "description": "The contents of the task", + "required": true + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "pull_request_id", + "in": "path", + "description": "The id of the pull request.", + "required": true, + "schema": { + "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, + "schema": { + "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, + "schema": { + "type": "string" + } + } + ] + }, + "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}": { + "delete": { + "tags": ["Pullrequests"], + "description": "Deletes a specific pull request task.", + "summary": "Delete a task on a pull request", + "responses": { + "204": { + "description": "Successful deletion." + }, + "403": { + "description": "If the authenticated user does not have access to delete the task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the task does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "get": { + "tags": ["Pullrequests"], + "description": "Returns a specific pull request task.", + "summary": "Get a task on a pull request", + "responses": { + "200": { + "description": "The task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_comment_task" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the task does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "put": { + "tags": ["Pullrequests"], + "description": "Updates a specific pull request task.", + "summary": "Update a task on a pull request", + "responses": { + "200": { + "description": "The updated task.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_comment_task" + } + } + } + }, + "400": { + "description": "There is a missing required field in the request or the task content is blank.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the task does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/A_pullrequest_task_update" + } + } + }, + "description": "The updated state and content of the task.", + "required": true + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "pull_request_id", + "in": "path", + "description": "The id of the pull request.", + "required": true, + "schema": { + "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, + "schema": { + "type": "string" + } + }, + { + "name": "task_id", + "in": "path", + "description": "The ID of the task.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "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, + "schema": { + "type": "string" + } + } + ] + }, "/repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}": { "put": { "responses": { @@ -12368,7 +15345,18 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "responses": { @@ -12426,7 +15414,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "responses": { @@ -12491,7 +15490,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/repositories/{workspace}/{repo_slug}/refs": { @@ -12559,6 +15569,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -12585,7 +15602,7 @@ "/repositories/{workspace}/{repo_slug}/refs/branches": { "get": { "tags": ["Refs"], - "description": "Returns a list of all open branches within the specified repository.\n Results will be in the order the source control manager returns them.\n\n ```\n $ curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1 | jq .\n {\n \"pagelen\": 1,\n \"size\": 187,\n \"values\": [\n {\n \"name\": \"issue-9.3/AUI-5343-assistive-class\",\n \"links\": {\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/issue-9.3/AUI-5343-assistive-class\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/issue-9.3/AUI-5343-assistive-class\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/branch/issue-9.3/AUI-5343-assistive-class\"\n }\n },\n \"default_merge_strategy\": \"squash\",\n \"merge_strategies\": [\n \"merge_commit\",\n \"squash\",\n \"fast_forward\"\n ],\n \"type\": \"branch\",\n \"target\": {\n \"hash\": \"e5d1cde9069fcb9f0af90403a4de2150c125a148\",\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"aui\",\n \"full_name\": \"atlassian/aui\",\n \"uuid\": \"{585074de-7b60-4fd1-81ed-e0bc7fafbda5}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e5d1cde9069fcb9f0af90403a4de2150c125a148\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"Marcin Konopka \",\n \"type\": \"author\",\n \"user\": {\n \"display_name\": \"Marcin Konopka\",\n \"uuid\": \"{47cc24f4-2a05-4420-88fe-0417535a110a}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/MK-1.png\"\n }\n },\n \"nickname\": \"Marcin Konopka\",\n \"type\": \"user\",\n \"account_id\": \"60113d2b47a9540069f4de03\"\n }\n },\n \"parents\": [\n {\n \"hash\": \"87f7fc92b00464ae47b13ef65c91884e4ac9be51\",\n \"type\": \"commit\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/87f7fc92b00464ae47b13ef65c91884e4ac9be51\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/87f7fc92b00464ae47b13ef65c91884e4ac9be51\"\n }\n }\n }\n ],\n \"date\": \"2021-04-13T13:44:49+00:00\",\n \"message\": \"wip\n\",\n \"type\": \"commit\"\n }\n }\n ],\n \"page\": 1,\n \"next\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1&page=2\"\n }\n ```\n\n Branches support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)\n that can be used to search for specific branches. For instance, to find\n all branches that have \"stab\" in their name:\n\n ```\n curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches -G --data-urlencode 'q=name ~ \"stab\"'\n ```\n\n By default, results will be in the order the underlying source control system returns them and identical to\n the ordering one sees when running \"$ git branch --list\". Note that this follows simple\n lexical ordering of the ref names.\n\n This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are\n sorted [\"v10\", \"v11\", \"v9\"] instead of [\"v9\", \"v10\", \"v11\"].\n\n Sorting can be changed using the ?q= query parameter. When using ?q=name to explicitly sort on ref name,\n Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.", + "description": "Returns a list of all open branches within the specified repository.\nResults will be in the order the source control manager returns them.\n\nBranches support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering)\nthat can be used to search for specific branches. For instance, to find\nall branches that have \"stab\" in their name:\n\n```\ncurl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches -G --data-urlencode 'q=name ~ \"stab\"'\n```\n\nBy default, results will be in the order the underlying source control system returns them and identical to\nthe ordering one sees when running \"$ git branch --list\". Note that this follows simple\nlexical ordering of the ref names.\n\nThis can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are\nsorted [\"v10\", \"v11\", \"v9\"] instead of [\"v9\", \"v10\", \"v11\"].\n\nSorting can be changed using the ?q= query parameter. When using ?q=name to explicitly sort on ref name,\nBitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.", "summary": "List open branches", "responses": { "200": { @@ -12594,6 +15611,121 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_branches" + }, + "examples": { + "response": { + "value": { + "pagelen": 1, + "size": 187, + "values": [ + { + "name": "issue-9.3/AUI-5343-assistive-class", + "links": { + "commits": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/issue-9.3/AUI-5343-assistive-class" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/issue-9.3/AUI-5343-assistive-class" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/branch/issue-9.3/AUI-5343-assistive-class" + } + }, + "default_merge_strategy": "squash", + "merge_strategies": [ + "merge_commit", + "squash", + "fast_forward" + ], + "type": "branch", + "target": { + "hash": "e5d1cde9069fcb9f0af90403a4de2150c125a148", + "repository": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui" + }, + "avatar": { + "href": "https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317" + } + }, + "type": "repository", + "name": "aui", + "full_name": "atlassian/aui", + "uuid": "{585074de-7b60-4fd1-81ed-e0bc7fafbda5}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148" + }, + "comments": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/comments" + }, + "patch": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e5d1cde9069fcb9f0af90403a4de2150c125a148" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/commits/e5d1cde9069fcb9f0af90403a4de2150c125a148" + }, + "diff": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e5d1cde9069fcb9f0af90403a4de2150c125a148" + }, + "approve": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/approve" + }, + "statuses": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e5d1cde9069fcb9f0af90403a4de2150c125a148/statuses" + } + }, + "author": { + "raw": "Marcin Konopka ", + "type": "author", + "user": { + "display_name": "Marcin Konopka", + "uuid": "{47cc24f4-2a05-4420-88fe-0417535a110a}", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D" + }, + "html": { + "href": "https://bitbucket.org/%7B47cc24f4-2a05-4420-88fe-0417535a110a%7D/" + }, + "avatar": { + "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/initials/MK-1.png" + } + }, + "nickname": "Marcin Konopka", + "type": "user", + "account_id": "60113d2b47a9540069f4de03" + } + }, + "parents": [ + { + "hash": "87f7fc92b00464ae47b13ef65c91884e4ac9be51", + "type": "commit", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/87f7fc92b00464ae47b13ef65c91884e4ac9be51" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/commits/87f7fc92b00464ae47b13ef65c91884e4ac9be51" + } + } + } + ], + "date": "2021-04-13T13:44:49+00:00", + "message": "wip\n", + "type": "commit" + } + } + ], + "page": 1, + "next": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches?pagelen=1&page=2" + } + } } } } @@ -12647,6 +15779,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -12695,6 +15834,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "write:repository:bitbucket", + "read:repository:bitbucket" + ] + } ] }, "parameters": [ @@ -12758,11 +15907,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "get": { "tags": ["Refs"], - "description": "Returns a branch object within the specified repository.\n\n ```\n $ curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master | jq .\n {\n \"name\": \"master\",\n \"links\": {\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/master\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/branch/master\"\n }\n },\n \"default_merge_strategy\": \"squash\",\n \"merge_strategies\": [\n \"merge_commit\",\n \"squash\",\n \"fast_forward\"\n ],\n \"type\": \"branch\",\n \"target\": {\n \"hash\": \"e7d158ff7ed5538c28f94cd97a9ad569680fc94e\",\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"aui\",\n \"full_name\": \"atlassian/aui\",\n \"uuid\": \"{585074de-7b60-4fd1-81ed-e0bc7fafbda5}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e7d158ff7ed5538c28f94cd97a9ad569680fc94e\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"psre-renovate-bot \",\n \"type\": \"author\",\n \"user\": {\n \"display_name\": \"psre-renovate-bot\",\n \"uuid\": \"{250a442a-3ab3-4fcb-87c3-3c8f3df65ec7}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://secure.gravatar.com/avatar/6972ee037c9f36360170a86f544071a2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-3.png\"\n }\n },\n \"nickname\": \"Renovate Bot\",\n \"type\": \"user\",\n \"account_id\": \"5d5355e8c6b9320d9ea5b28d\"\n }\n },\n \"parents\": [\n {\n \"hash\": \"eab868a309e75733de80969a7bed1ec6d4651e06\",\n \"type\": \"commit\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/eab868a309e75733de80969a7bed1ec6d4651e06\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/aui/commits/eab868a309e75733de80969a7bed1ec6d4651e06\"\n }\n }\n }\n ],\n \"date\": \"2021-04-12T06:44:38+00:00\",\n \"message\": \"Merged in issue/NONE-renovate-master-babel-monorepo (pull request #2883)\n\nchore(deps): update babel monorepo to v7.13.15 (master)\n\nApproved-by: Chris \"Daz\" Darroch\n\",\n \"type\": \"commit\"\n }\n }\n ```\n\n This call requires authentication. Private repositories require the\n caller to authenticate with an account that has appropriate\n authorization.\n\n For Git, the branch name should not include any prefixes (e.g.\n refs/heads).", + "description": "Returns a branch object within the specified repository.\n\nThis call requires authentication. Private repositories require the\ncaller to authenticate with an account that has appropriate\nauthorization.\n\nFor Git, the branch name should not include any prefixes (e.g.\nrefs/heads).", "summary": "Get a branch", "responses": { "200": { @@ -12771,6 +15927,113 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branch" + }, + "examples": { + "response": { + "value": { + "name": "master", + "links": { + "commits": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/master" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/branch/master" + } + }, + "default_merge_strategy": "squash", + "merge_strategies": [ + "merge_commit", + "squash", + "fast_forward" + ], + "type": "branch", + "target": { + "hash": "e7d158ff7ed5538c28f94cd97a9ad569680fc94e", + "repository": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui" + }, + "avatar": { + "href": "https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317" + } + }, + "type": "repository", + "name": "aui", + "full_name": "atlassian/aui", + "uuid": "{585074de-7b60-4fd1-81ed-e0bc7fafbda5}" + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" + }, + "comments": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/comments" + }, + "patch": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/commits/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" + }, + "diff": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e7d158ff7ed5538c28f94cd97a9ad569680fc94e" + }, + "approve": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/approve" + }, + "statuses": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/statuses" + } + }, + "author": { + "raw": "psre-renovate-bot ", + "type": "author", + "user": { + "display_name": "psre-renovate-bot", + "uuid": "{250a442a-3ab3-4fcb-87c3-3c8f3df65ec7}", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D" + }, + "html": { + "href": "https://bitbucket.org/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D/" + }, + "avatar": { + "href": "https://secure.gravatar.com/avatar/6972ee037c9f36360170a86f544071a2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-3.png" + } + }, + "nickname": "Renovate Bot", + "type": "user", + "account_id": "5d5355e8c6b9320d9ea5b28d" + } + }, + "parents": [ + { + "hash": "eab868a309e75733de80969a7bed1ec6d4651e06", + "type": "commit", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/eab868a309e75733de80969a7bed1ec6d4651e06" + }, + "html": { + "href": "https://bitbucket.org/atlassian/aui/commits/eab868a309e75733de80969a7bed1ec6d4651e06" + } + } + } + ], + "date": "2021-04-12T06:44:38+00:00", + "message": "Merged in issue/NONE-renovate-master-babel-monorepo (pull request #2883)\n\nchore(deps): update babel monorepo to v7.13.15 (master)\n\nApproved-by: Chris \"Daz\" Darroch\n", + "type": "commit" + } + } + } } } } @@ -12806,6 +16069,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -12903,6 +16173,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { @@ -12951,6 +16228,16 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "write:repository:bitbucket", + "read:repository:bitbucket" + ] + } ] }, "parameters": [ @@ -13014,6 +16301,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "get": { @@ -13062,6 +16356,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -13143,11 +16444,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "post": { "tags": ["Source", "Repositories"], - "description": "This endpoint is used to create new commits in the repository by\nuploading files.\n\nTo add a new file to a repository:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \\\n -F /repo/path/to/image.png=@image.png\n```\n\nThis will create a new commit on top of the main branch, inheriting the\ncontents of the main branch, but adding (or overwriting) the\n`image.png` file to the repository in the `/repo/path/to` directory.\n\nTo create a commit that deletes files, use the `files` parameter:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \\\n -F files=/file/to/delete/1.txt \\\n -F files=/file/to/delete/2.txt\n```\n\nYou can add/modify/delete multiple files in a request. Rename/move a\nfile by deleting the old path and adding the content at the new path.\n\nThis endpoint accepts `multipart/form-data` (as in the examples above),\nas well as `application/x-www-form-urlencoded`.\n\n#### multipart/form-data\n\nA `multipart/form-data` post contains a series of \"form fields\" that\nidentify both the individual files that are being uploaded, as well as\nadditional, optional meta data.\n\nFiles are uploaded in file form fields (those that have a\n`Content-Disposition` parameter) whose field names point to the remote\npath in the repository where the file should be stored. Path field\nnames are always interpreted to be absolute from the root of the\nrepository, regardless whether the client uses a leading slash (as the\nabove `curl` example did).\n\nFile contents are treated as bytes and are not decoded as text.\n\nThe commit message, as well as other non-file meta data for the\nrequest, is sent along as normal form field elements. Meta data fields\nshare the same namespace as the file objects. For `multipart/form-data`\nbodies that should not lead to any ambiguity, as the\n`Content-Disposition` header will contain the `filename` parameter to\ndistinguish between a file named \"message\" and the commit message field.\n\n#### application/x-www-form-urlencoded\n\nIt is also possible to upload new files using a simple\n`application/x-www-form-urlencoded` POST. This can be convenient when\nuploading pure text files:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src \\\n --data-urlencode \"/path/to/me.txt=Lorem ipsum.\" \\\n --data-urlencode \"message=Initial commit\" \\\n --data-urlencode \"author=Erik van Zijst \"\n```\n\nThere could be a field name clash if a client were to upload a file\nnamed \"message\", as this filename clashes with the meta data property\nfor the commit message. To avoid this and to upload files whose names\nclash with the meta data properties, use a leading slash for the files,\ne.g. `curl --data-urlencode \"/message=file contents\"`.\n\nWhen an explicit slash is omitted for a file whose path matches that of\na meta data parameter, then it is interpreted as meta data, not as a\nfile.\n\n#### Executables and links\n\nWhile this API aims to facilitate the most common use cases, it is\npossible to perform some more advanced operations like creating a new\nsymlink in the repository, or creating an executable file.\n\nFiles can be supplied with a `x-attributes` value in the\n`Content-Disposition` header. For example, to upload an executable\nfile, as well as create a symlink from `README.txt` to `README`:\n\n```\n--===============1438169132528273974==\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-ID: \"bin/shutdown.sh\"\nContent-Disposition: attachment; filename=\"shutdown.sh\"; x-attributes:\"executable\"\n\n#!/bin/sh\nhalt\n\n--===============1438169132528273974==\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-ID: \"/README.txt\"\nContent-Disposition: attachment; filename=\"README.txt\"; x-attributes:\"link\"\n\nREADME\n--===============1438169132528273974==--\n```\n\nLinks are files that contain the target path and have\n`x-attributes:\"link\"` set.\n\nWhen overwriting links with files, or vice versa, the newly uploaded\nfile determines both the new contents, as well as the attributes. That\nmeans uploading a file without specifying `x-attributes=\"link\"` will\ncreate a regular file, even if the parent commit hosted a symlink at\nthe same path.\n\nThe same applies to executables. When modifying an existing executable\nfile, the form-data file element must include\n`x-attributes=\"executable\"` in order to preserve the executable status\nof the file.\n\nNote that this API does not support the creation or manipulation of\nsubrepos / submodules.", + "description": "This endpoint is used to create new commits in the repository by\nuploading files.\n\nTo add a new file to a repository:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \\\n -F /repo/path/to/image.png=@image.png\n```\n\nThis will create a new commit on top of the main branch, inheriting the\ncontents of the main branch, but adding (or overwriting) the\n`image.png` file to the repository in the `/repo/path/to` directory.\n\nTo create a commit that deletes files, use the `files` parameter:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \\\n -F files=/file/to/delete/1.txt \\\n -F files=/file/to/delete/2.txt\n```\n\nYou can add/modify/delete multiple files in a request. Rename/move a\nfile by deleting the old path and adding the content at the new path.\n\nThis endpoint accepts `multipart/form-data` (as in the examples above),\nas well as `application/x-www-form-urlencoded`.\n\nNote: `multipart/form-data` is currently not supported by Forge apps\nfor this API.\n\n#### multipart/form-data\n\nA `multipart/form-data` post contains a series of \"form fields\" that\nidentify both the individual files that are being uploaded, as well as\nadditional, optional meta data.\n\nFiles are uploaded in file form fields (those that have a\n`Content-Disposition` parameter) whose field names point to the remote\npath in the repository where the file should be stored. Path field\nnames are always interpreted to be absolute from the root of the\nrepository, regardless whether the client uses a leading slash (as the\nabove `curl` example did).\n\nFile contents are treated as bytes and are not decoded as text.\n\nThe commit message, as well as other non-file meta data for the\nrequest, is sent along as normal form field elements. Meta data fields\nshare the same namespace as the file objects. For `multipart/form-data`\nbodies that should not lead to any ambiguity, as the\n`Content-Disposition` header will contain the `filename` parameter to\ndistinguish between a file named \"message\" and the commit message field.\n\n#### application/x-www-form-urlencoded\n\nIt is also possible to upload new files using a simple\n`application/x-www-form-urlencoded` POST. This can be convenient when\nuploading pure text files:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src \\\n --data-urlencode \"/path/to/me.txt=Lorem ipsum.\" \\\n --data-urlencode \"message=Initial commit\" \\\n --data-urlencode \"author=Erik van Zijst \"\n```\n\nThere could be a field name clash if a client were to upload a file\nnamed \"message\", as this filename clashes with the meta data property\nfor the commit message. To avoid this and to upload files whose names\nclash with the meta data properties, use a leading slash for the files,\ne.g. `curl --data-urlencode \"/message=file contents\"`.\n\nWhen an explicit slash is omitted for a file whose path matches that of\na meta data parameter, then it is interpreted as meta data, not as a\nfile.\n\n#### Executables and links\n\nWhile this API aims to facilitate the most common use cases, it is\npossible to perform some more advanced operations like creating a new\nsymlink in the repository, or creating an executable file.\n\nFiles can be supplied with a `x-attributes` value in the\n`Content-Disposition` header. For example, to upload an executable\nfile, as well as create a symlink from `README.txt` to `README`:\n\n```\n--===============1438169132528273974==\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-ID: \"bin/shutdown.sh\"\nContent-Disposition: attachment; filename=\"shutdown.sh\"; x-attributes:\"executable\"\n\n#!/bin/sh\nhalt\n\n--===============1438169132528273974==\nContent-Type: text/plain; charset=\"us-ascii\"\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nContent-ID: \"/README.txt\"\nContent-Disposition: attachment; filename=\"README.txt\"; x-attributes:\"link\"\n\nREADME\n--===============1438169132528273974==--\n```\n\nLinks are files that contain the target path and have\n`x-attributes:\"link\"` set.\n\nWhen overwriting links with files, or vice versa, the newly uploaded\nfile determines both the new contents, as well as the attributes. That\nmeans uploading a file without specifying `x-attributes=\"link\"` will\ncreate a regular file, even if the parent commit hosted a symlink at\nthe same path.\n\nThe same applies to executables. When modifying an existing executable\nfile, the form-data file element must include\n`x-attributes=\"executable\"` in order to preserve the executable status\nof the file.\n\nNote that this API does not support the creation or manipulation of\nsubrepos / submodules.", "summary": "Create a commit by uploading a file", "responses": { "201": { @@ -13231,6 +16539,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } ] }, "parameters": [ @@ -13281,7 +16596,7 @@ } }, "555": { - "description": "If the call times out, possibly because the specifiedrecursion depth is too large.", + "description": "If the call times out, possibly because the specified recursion depth is too large.", "content": { "application/json": { "schema": { @@ -13295,7 +16610,7 @@ { "name": "format", "in": "query", - "description": "If 'meta' is provided, returns the (json) meta data for the contents of the file. If 'rendered' is provided, returns the contents of a non-binary file in HTML-formatted rendered markup. Since Git does not generally track what text encoding scheme is used, this endpoint attempts to detect the most appropriate character encoding. While usually correct, determining the character encoding can be ambiguous which in exceptional cases can lead to misinterpretation of the characters. As such, the raw element in the response object should not be treated as equivalent to the file's actual contents.", + "description": "If 'meta' is provided, returns the (json) meta data for the contents of the file. If 'rendered' is provided, returns the contents of a non-binary file in HTML-formatted rendered markup. The 'rendered' option only supports these filetypes: `.md`, `.markdown`, `.mkd`, `.mkdn`, `.mdown`, `.text`, `.rst`, and `.textile`. Since Git does not generally track what text encoding scheme is used, this endpoint attempts to detect the most appropriate character encoding. While usually correct, determining the character encoding can be ambiguous which in exceptional cases can lead to misinterpretation of the characters. As such, the raw element in the response object should not be treated as equivalent to the file's actual contents.", "required": false, "schema": { "type": "string", @@ -13340,6 +16655,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -13537,6 +16859,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -15371,7 +18700,7 @@ } ] }, - "/teams/{username}/pipelines_config/variables/": { + "/teams/{username}/pipelines_config/variables": { "get": { "tags": ["Pipelines"], "summary": "List variables for an account", @@ -15400,7 +18729,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -15461,7 +18801,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/teams/{username}/pipelines_config/variables/{variable_uuid}": { @@ -15512,7 +18863,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -15564,7 +18926,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -15606,14 +18979,25 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/teams/{username}/search/code": { "get": { "tags": ["Search"], "summary": "Search for code in a team's repositories", - "description": "Search for code in the repositories of the specified team.\n\nSearching across all repositories:\n\n```\ncurl 'https://api.bitbucket.org/2.0/teams/team_name/search/code?search_query=foo'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 2,\n \"content_matches\": [\n {\n \"lines\": [\n {\n \"line\": 2,\n \"segments\": []\n },\n {\n \"line\": 3,\n \"segments\": [\n {\n \"text\": \"def \"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \"():\"\n }\n ]\n },\n {\n \"line\": 4,\n \"segments\": [\n {\n \"text\": \" print(\\\"snek\\\")\"\n }\n ]\n },\n {\n \"line\": 5,\n \"segments\": []\n }\n ]\n }\n ],\n \"path_matches\": [\n {\n \"text\": \"src/\"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \".py\"\n }\n ],\n \"file\": {\n \"path\": \"src/foo.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n }\n }\n }\n ]\n}\n```\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both as in the example above.\n\nYou can use the same syntax for the search query as in the UI, e.g.\nto only search within a specific repository:\n\n```\ncurl 'https://api.bitbucket.org/2.0/teams/team_name/search/code?search_query=foo+repo:demo'\n# results from the \"demo\" repository\n```\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files (the `%2B` is a URL-encoded `+`):\n\n```\ncurl 'https://api.bitbucket.org/2.0/teams/team_name/search/code'\\\n '?search_query=foo&fields=%2Bvalues.file.commit.repository'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 1,\n \"content_matches\": [...],\n \"path_matches\": [...],\n \"file\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n }\n },\n \"repository\": {\n \"name\": \"demo\",\n \"type\": \"repository\",\n \"full_name\": \"my-workspace/demo\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default\"\n }\n },\n \"uuid\": \"{850e1749-781a-4115-9316-df39d0600e7a}\"\n }\n },\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n },\n \"path\": \"src/foo.py\"\n }\n }\n ]\n}\n```\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", + "description": "Search for code in the repositories of the specified team.\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both.\n\nYou can use the same syntax for the search query as in the UI.\nE.g. to search for \"foo\" only within the repository \"demo\",\nuse the query parameter `search_query=foo+repo:demo`.\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files, use the query parameter\n`search_query=foo&fields=%2Bvalues.file.commit.repository`\n(the `%2B` is a URL-encoded `+`).\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", "operationId": "searchTeam", "parameters": [ { @@ -15664,6 +19048,80 @@ "application/json": { "schema": { "$ref": "#/components/schemas/search_result_page" + }, + "examples": { + "response": { + "value": { + "size": 1, + "page": 1, + "pagelen": 10, + "query_substituted": false, + "values": [ + { + "type": "code_search_result", + "content_match_count": 2, + "content_matches": [ + { + "lines": [ + { + "line": 2, + "segments": [] + }, + { + "line": 3, + "segments": [ + { + "text": "def " + }, + { + "text": "foo", + "match": true + }, + { + "text": "():" + } + ] + }, + { + "line": 4, + "segments": [ + { + "text": " print(\"snek\")" + } + ] + }, + { + "line": 5, + "segments": [] + } + ] + } + ], + "path_matches": [ + { + "text": "src/" + }, + { + "text": "foo", + "match": true + }, + { + "text": ".py" + } + ], + "file": { + "path": "src/foo.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" + } + } + } + } + ] + } + } } } } @@ -15698,7 +19156,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/user": { @@ -15817,7 +19286,7 @@ "/user/permissions/repositories": { "get": { "tags": ["Repositories"], - "description": "Returns an object for each repository the caller has explicit access\nto and their effective permission — the highest level of permission the\ncaller has. This does not return public repositories that the user was\nnot granted any specific permission in, and does not distinguish between\nexplicit and implicit privileges.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/user/permissions/repositories\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"bitbucket/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n }\n ],\n \"page\": 1,\n \"size\": 1\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nrepository or permission by adding the following query string\nparameters:\n\n* `q=repository.name=\"geordi\"` or `q=permission>\"read\"`\n* `sort=repository.name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", + "description": "Returns an object for each repository the caller has explicit access\nto and their effective permission — the highest level of permission the\ncaller has. This does not return public repositories that the user was\nnot granted any specific permission in, and does not distinguish between\nexplicit and implicit privileges.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nrepository or permission by adding the following query string\nparameters:\n\n* `q=repository.name=\"geordi\"` or `q=permission>\"read\"`\n* `sort=repository.name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", "summary": "List repository permissions for a user", "responses": { "200": { @@ -15826,6 +19295,33 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_permission", + "user": { + "type": "user", + "nickname": "evzijst", + "display_name": "Erik van Zijst", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "bitbucket/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "admin" + } + ], + "page": 1, + "size": 1 + } + } } } } @@ -15868,7 +19364,7 @@ "/user/permissions/workspaces": { "get": { "tags": ["Workspaces"], - "description": "Returns an object for each workspace the caller is a member of, and\ntheir effective role - the highest level of privilege the caller has.\nIf a user is a member of multiple groups with distinct roles, only the\nhighest level is returned.\n\nPermissions can be:\n\n* `owner`\n* `collaborator`\n* `member`\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/user/permissions/workspaces\n\n{\n \"pagelen\": 10,\n \"page\": 1,\n \"size\": 1,\n \"values\": [\n {\n \"type\": \"workspace_membership\",\n \"permission\": \"owner\",\n \"last_accessed\": \"2019-03-07T12:35:02.900024+00:00\",\n \"added_on\": \"2018-10-11T17:42:02.961424+00:00\",\n \"user\": {\n \"type\": \"user\",\n \"uuid\": \"{470c176d-3574-44ea-bb41-89e8638bcca4}\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n },\n \"workspace\": {\n \"type\": \"workspace\",\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"slug\": \"bbworkspace1\",\n \"name\": \"Atlassian Bitbucket\",\n }\n }\n ]\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nworkspace or permission by adding the following query string parameters:\n\n* `q=workspace.slug=\"bbworkspace1\"` or `q=permission=\"owner\"`\n* `sort=workspace.slug`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", + "description": "Returns an object for each workspace the caller is a member of, and\ntheir effective role - the highest level of privilege the caller has.\nIf a user is a member of multiple groups with distinct roles, only the\nhighest level is returned.\n\nPermissions can be:\n\n* `owner`\n* `collaborator`\n* `member`\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**\n\n**When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on\n`workspace_membership` will no longer be present: `last_accessed` and `added_on`. See the\n[deprecation announcement](/cloud/bitbucket/announcement-breaking-change-workspace-membership/).**\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nworkspace or permission by adding the following query string parameters:\n\n* `q=workspace.slug=\"bbworkspace1\"` or `q=permission=\"owner\"`\n* `sort=workspace.slug`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", "summary": "List workspaces for the current user", "responses": { "200": { @@ -15877,6 +19373,35 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_workspace_memberships" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "page": 1, + "size": 1, + "values": [ + { + "type": "workspace_membership", + "permission": "owner", + "last_accessed": "2019-03-07T12:35:02.900024+00:00", + "added_on": "2018-10-11T17:42:02.961424+00:00", + "user": { + "type": "user", + "uuid": "{470c176d-3574-44ea-bb41-89e8638bcca4}", + "nickname": "evzijst", + "display_name": "Erik van Zijst" + }, + "workspace": { + "type": "workspace", + "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}", + "slug": "bbworkspace1", + "name": "Atlassian Bitbucket" + } + } + ] + } + } } } } @@ -15969,7 +19494,7 @@ { "name": "selected_user", "in": "path", - "description": "This can either be the UUID of the account, surrounded by curly-braces, for\nexample: `{account UUID}`, OR an Atlassian Account ID.\n", + "description": "This can either be an Atlassian Account ID OR the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`.\n", "required": true, "schema": { "type": "string" @@ -15977,7 +19502,7 @@ } ] }, - "/users/{selected_user}/pipelines_config/variables/": { + "/users/{selected_user}/pipelines_config/variables": { "get": { "tags": ["Pipelines"], "deprecated": true, @@ -16006,7 +19531,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -16067,7 +19603,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/users/{selected_user}/pipelines_config/variables/{variable_uuid}": { @@ -16118,7 +19665,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -16170,7 +19728,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -16212,7 +19781,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/users/{selected_user}/properties/{app_key}/{property_name}": { @@ -16257,7 +19837,18 @@ "requestBody": { "$ref": "#/components/requestBodies/application_property" }, - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "responses": { @@ -16297,7 +19888,18 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "get": { "responses": { @@ -16344,14 +19946,25 @@ } } ], - "tags": ["properties"] + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/users/{selected_user}/search/code": { "get": { "tags": ["Search"], "summary": "Search for code in a user's repositories", - "description": "Search for code in the repositories of the specified user.\n\nSearching across all repositories:\n\n```\ncurl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code?search_query=foo'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 2,\n \"content_matches\": [\n {\n \"lines\": [\n {\n \"line\": 2,\n \"segments\": []\n },\n {\n \"line\": 3,\n \"segments\": [\n {\n \"text\": \"def \"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \"():\"\n }\n ]\n },\n {\n \"line\": 4,\n \"segments\": [\n {\n \"text\": \" print(\\\"snek\\\")\"\n }\n ]\n },\n {\n \"line\": 5,\n \"segments\": []\n }\n ]\n }\n ],\n \"path_matches\": [\n {\n \"text\": \"src/\"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \".py\"\n }\n ],\n \"file\": {\n \"path\": \"src/foo.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n }\n }\n }\n ]\n}\n```\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both as in the example above.\n\nYou can use the same syntax for the search query as in the UI, e.g.\nto only search within a specific repository:\n\n```\ncurl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code?search_query=foo+repo:demo'\n# results from the \"demo\" repository\n```\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files (the `%2B` is a URL-encoded `+`):\n\n```\ncurl 'https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/search/code'\\\n '?search_query=foo&fields=%2Bvalues.file.commit.repository'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 1,\n \"content_matches\": [...],\n \"path_matches\": [...],\n \"file\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n }\n },\n \"repository\": {\n \"name\": \"demo\",\n \"type\": \"repository\",\n \"full_name\": \"my-workspace/demo\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default\"\n }\n },\n \"uuid\": \"{850e1749-781a-4115-9316-df39d0600e7a}\"\n }\n },\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n },\n \"path\": \"src/foo.py\"\n }\n }\n ]\n}\n```\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", + "description": "Search for code in the repositories of the specified user.\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both.\n\nYou can use the same syntax for the search query as in the UI.\nE.g. to search for \"foo\" only within the repository \"demo\",\nuse the query parameter `search_query=foo+repo:demo`.\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files, use the query parameter\n`search_query=foo&fields=%2Bvalues.file.commit.repository`\n(the `%2B` is a URL-encoded `+`).\n", "operationId": "searchAccount", "parameters": [ { @@ -16402,6 +20015,80 @@ "application/json": { "schema": { "$ref": "#/components/schemas/search_result_page" + }, + "examples": { + "response": { + "value": { + "size": 1, + "page": 1, + "pagelen": 10, + "query_substituted": false, + "values": [ + { + "type": "code_search_result", + "content_match_count": 2, + "content_matches": [ + { + "lines": [ + { + "line": 2, + "segments": [] + }, + { + "line": 3, + "segments": [ + { + "text": "def " + }, + { + "text": "foo", + "match": true + }, + { + "text": "():" + } + ] + }, + { + "line": 4, + "segments": [ + { + "text": " print(\"snek\")" + } + ] + }, + { + "line": 5, + "segments": [] + } + ] + } + ], + "path_matches": [ + { + "text": "src/" + }, + { + "text": "foo", + "match": true + }, + { + "text": ".py" + } + ], + "file": { + "path": "src/foo.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" + } + } + } + } + ] + } + } } } } @@ -16436,13 +20123,24 @@ } } } - } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/users/{selected_user}/ssh-keys": { "get": { "tags": ["Ssh"], - "description": "Returns a paginated list of the user's SSH public keys.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys\n{\n \"page\": 1,\n \"pagelen\": 10,\n \"size\": 1,\n \"values\": [\n {\n \"comment\": \"user@myhost\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n }\n ]\n}\n```", + "description": "Returns a paginated list of the user's SSH public keys.", "summary": "List SSH keys", "responses": { "200": { @@ -16451,6 +20149,49 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_ssh_user_keys" + }, + "examples": { + "response": { + "value": { + "page": 1, + "pagelen": 10, + "size": 1, + "values": [ + { + "comment": "user@myhost", + "created_on": "2018-03-14T13:17:05.196003+00:00", + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY", + "label": "", + "last_used": "2018-03-20T13:18:05.196003+00:00", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a" + } + }, + "owner": { + "display_name": "Mark Adams", + "links": { + "avatar": { + "href": "https://bitbucket.org/account/markadams-atl/avatar/32/" + }, + "html": { + "href": "https://bitbucket.org/markadams-atl/" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}" + } + }, + "type": "user", + "username": "markadams-atl", + "nickname": "markadams-atl", + "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}" + }, + "type": "ssh_key", + "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}" + } + ] + } + } } } } @@ -16483,7 +20224,7 @@ }, "post": { "tags": ["Ssh"], - "description": "Adds a new SSH public key to the specified user account and returns the resulting key.\n\nExample:\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY user@myhost\"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys\n\n{\n \"comment\": \"user@myhost\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n}\n```", + "description": "Adds a new SSH public key to the specified user account and returns the resulting key.\n\nExample:\n\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY user@myhost\"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys\n```", "summary": "Add a new SSH key", "responses": { "201": { @@ -16492,6 +20233,42 @@ "application/json": { "schema": { "$ref": "#/components/schemas/ssh_account_key" + }, + "examples": { + "response": { + "value": { + "comment": "user@myhost", + "created_on": "2018-03-14T13:17:05.196003+00:00", + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY", + "label": "", + "last_used": "2018-03-20T13:18:05.196003+00:00", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a" + } + }, + "owner": { + "display_name": "Mark Adams", + "links": { + "avatar": { + "href": "https://bitbucket.org/account/markadams-atl/avatar/32/" + }, + "html": { + "href": "https://bitbucket.org/markadams-atl/" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}" + } + }, + "type": "user", + "username": "markadams-atl", + "nickname": "markadams-atl", + "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}" + }, + "type": "ssh_key", + "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}" + } + } } } } @@ -16546,7 +20323,7 @@ { "name": "selected_user", "in": "path", - "description": "This can either be the UUID of the account, surrounded by curly-braces, for\nexample: `{account UUID}`, OR an Atlassian Account ID.\n", + "description": "This can either be an Atlassian Account ID OR the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`.\n", "required": true, "schema": { "type": "string" @@ -16557,7 +20334,7 @@ "/users/{selected_user}/ssh-keys/{key_id}": { "delete": { "tags": ["Ssh"], - "description": "Deletes a specific SSH public key from a user's account\n\nExample:\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}\n```", + "description": "Deletes a specific SSH public key from a user's account.", "summary": "Delete a SSH key", "responses": { "204": { @@ -16601,7 +20378,7 @@ }, "get": { "tags": ["Ssh"], - "description": "Returns a specific SSH public key belonging to a user.\n\nExample:\n```\n$ curl https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{fbe4bbab-f6f7-4dde-956b-5c58323c54b3}\n\n{\n \"comment\": \"user@myhost\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n}\n```", + "description": "Returns a specific SSH public key belonging to a user.", "summary": "Get a SSH key", "responses": { "200": { @@ -16610,6 +20387,42 @@ "application/json": { "schema": { "$ref": "#/components/schemas/ssh_account_key" + }, + "examples": { + "response": { + "value": { + "comment": "user@myhost", + "created_on": "2018-03-14T13:17:05.196003+00:00", + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY", + "label": "", + "last_used": "2018-03-20T13:18:05.196003+00:00", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a" + } + }, + "owner": { + "display_name": "Mark Adams", + "links": { + "avatar": { + "href": "https://bitbucket.org/account/markadams-atl/avatar/32/" + }, + "html": { + "href": "https://bitbucket.org/markadams-atl/" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}" + } + }, + "type": "user", + "username": "markadams-atl", + "nickname": "markadams-atl", + "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}" + }, + "type": "ssh_key", + "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}" + } + } } } } @@ -16642,7 +20455,7 @@ }, "put": { "tags": ["Ssh"], - "description": "Updates a specific SSH public key on a user's account\n\nNote: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again.\n\nExample:\n```\n$ curl -X PUT -H \"Content-Type: application/json\" -d '{\"label\": \"Work key\"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}\n\n{\n \"comment\": \"\",\n \"created_on\": \"2018-03-14T13:17:05.196003+00:00\",\n \"key\": \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY\",\n \"label\": \"Work key\",\n \"last_used\": \"2018-03-20T13:18:05.196003+00:00\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a\"\n }\n },\n \"owner\": {\n \"display_name\": \"Mark Adams\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/markadams-atl/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/markadams-atl/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}\"\n }\n },\n \"type\": \"user\",\n \"username\": \"markadams-atl\",\n \"nickname\": \"markadams-atl\",\n \"uuid\": \"{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}\"\n },\n \"type\": \"ssh_key\",\n \"uuid\": \"{b15b6026-9c02-4626-b4ad-b905f99f763a}\"\n}\n```", + "description": "Updates a specific SSH public key on a user's account\n\nNote: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again.\n\nExample:\n\n```\n$ curl -X PUT -H \"Content-Type: application/json\" -d '{\"label\": \"Work key\"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}\n```", "summary": "Update a SSH key", "responses": { "200": { @@ -16651,6 +20464,42 @@ "application/json": { "schema": { "$ref": "#/components/schemas/ssh_account_key" + }, + "examples": { + "response": { + "value": { + "comment": "", + "created_on": "2018-03-14T13:17:05.196003+00:00", + "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKqP3Cr632C2dNhhgKVcon4ldUSAeKiku2yP9O9/bDtY", + "label": "Work key", + "last_used": "2018-03-20T13:18:05.196003+00:00", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/b15b6026-9c02-4626-b4ad-b905f99f763a" + } + }, + "owner": { + "display_name": "Mark Adams", + "links": { + "avatar": { + "href": "https://bitbucket.org/account/markadams-atl/avatar/32/" + }, + "html": { + "href": "https://bitbucket.org/markadams-atl/" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}" + } + }, + "type": "user", + "username": "markadams-atl", + "nickname": "markadams-atl", + "uuid": "{d7dd0e2d-3994-4a50-a9ee-d260b6cefdab}" + }, + "type": "ssh_key", + "uuid": "{b15b6026-9c02-4626-b4ad-b905f99f763a}" + } + } } } } @@ -16714,7 +20563,7 @@ { "name": "selected_user", "in": "path", - "description": "This can either be the UUID of the account, surrounded by curly-braces, for\nexample: `{account UUID}`, OR an Atlassian Account ID.\n", + "description": "This can either be an Atlassian Account ID OR the UUID of the account,\nsurrounded by curly-braces, for example: `{account UUID}`.\n", "required": true, "schema": { "type": "string" @@ -16725,7 +20574,7 @@ "/workspaces": { "get": { "tags": ["Workspaces"], - "description": "Returns a list of workspaces accessible by the authenticated user.\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/workspaces\n\n{\n \"pagelen\": 10,\n \"page\": 1,\n \"size\": 1,\n \"values\": [\n {\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"links\": {\n \"owners\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members?q=permission%3D%22owner%22\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/bbworkspace1\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/bbworkspace1\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/bbworkspace1/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/workspaces/bbworkspace1/avatar/?ts=1543465801\"\n },\n \"members\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members\"\n },\n \"projects\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects\"\n }\n },\n \"created_on\": \"2018-11-14T19:15:05.058566+00:00\",\n \"type\": \"workspace\",\n \"slug\": \"bbworkspace1\",\n \"is_private\": true,\n \"name\": \"Atlassian Bitbucket\"\n }\n ]\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nworkspace or permission by adding the following query string parameters:\n\n* `q=slug=\"bbworkspace1\"` or `q=is_private=true`\n* `sort=created_on`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**", + "description": "Returns a list of workspaces accessible by the authenticated user.\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by\nworkspace or permission by adding the following query string parameters:\n\n* `q=slug=\"bbworkspace1\"` or `q=is_private=true`\n* `sort=created_on`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**", "summary": "List workspaces for user", "responses": { "200": { @@ -16734,6 +20583,51 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_workspaces" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "page": 1, + "size": 1, + "values": [ + { + "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}", + "links": { + "owners": { + "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members?q=permission%3D%22owner%22" + }, + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1" + }, + "repositories": { + "href": "https://api.bitbucket.org/2.0/repositories/bbworkspace1" + }, + "snippets": { + "href": "https://api.bitbucket.org/2.0/snippets/bbworkspace1" + }, + "html": { + "href": "https://bitbucket.org/bbworkspace1/" + }, + "avatar": { + "href": "https://bitbucket.org/workspaces/bbworkspace1/avatar/?ts=1543465801" + }, + "members": { + "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1/members" + }, + "projects": { + "href": "https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects" + } + }, + "created_on": "2018-11-14T19:15:05.058566+00:00", + "type": "workspace", + "slug": "bbworkspace1", + "is_private": true, + "name": "Atlassian Bitbucket" + } + ] + } + } } } } @@ -16895,7 +20789,7 @@ }, "post": { "tags": ["Workspaces", "Webhooks"], - "description": "Creates a new webhook on the specified workspace.\n\nWorkspace webhooks are fired for events from all repositories contained\nby that workspace.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nThis call requires the webhook scope, as well as any scope\nthat applies to the events that the webhook subscribes to. In the\nexample above that means: `webhook`, `repository` and `issue`.\n\nThe `url` must properly resolve and cannot be an internal, non-routed address.\n\nOnly workspace owners can install webhooks on workspaces.", + "description": "Creates a new webhook on the specified workspace.\n\nWorkspace webhooks are fired for events from all repositories contained\nby that workspace.\n\nExample:\n\n```\n$ curl -X POST -u credentials -H 'Content-Type: application/json'\n https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks\n -d '\n {\n \"description\": \"Webhook Description\",\n \"url\": \"https://example.com/\",\n \"active\": true,\n \"secret\": \"this is a really bad secret\",\n \"events\": [\n \"repo:push\",\n \"issue:created\",\n \"issue:updated\"\n ]\n }'\n```\n\nWhen the `secret` is provided it will be used as the key to generate a HMAC\ndigest value sent in the `X-Hub-Signature` header at delivery time. Passing\na `null` or empty `secret` or not passing a `secret` will leave the webhook's\nsecret unset. Bitbucket only generates the `X-Hub-Signature` when the webhook's\nsecret is set.\n\nThis call requires the webhook scope, as well as any scope\nthat applies to the events that the webhook subscribes to. In the\nexample above that means: `webhook`, `repository` and `issue`.\n\nThe `url` must properly resolve and cannot be an internal, non-routed address.\n\nOnly workspace owners can install webhooks on workspaces.", "summary": "Create a webhook for a workspace", "responses": { "201": { @@ -17043,7 +20937,7 @@ }, "put": { "tags": ["Workspaces", "Webhooks"], - "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `active`\n* `events`", + "description": "Updates the specified webhook subscription.\n\nThe following properties can be mutated:\n\n* `description`\n* `url`\n* `secret`\n* `active`\n* `events`\n\nThe hook's secret is used as a key to generate the HMAC hex digest sent in the\n`X-Hub-Signature` header at delivery time. This signature is only generated\nwhen the hook has a secret.\n\nSet the hook's secret by passing the new value in the `secret` field. Passing a\n`null` value in the `secret` field will remove the secret from the hook. The\nhook's secret can be left unchanged by not passing the `secret` field in the\nrequest.", "summary": "Update a webhook for a workspace", "responses": { "200": { @@ -17147,6 +21041,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:workspace:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17208,6 +21109,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:workspace:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17234,7 +21142,7 @@ "/workspaces/{workspace}/permissions": { "get": { "tags": ["Workspaces"], - "description": "Returns the list of members in a workspace\nand their permission levels.\nPermission can be:\n* `owner`\n* `collaborator`\n* `member`\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**\n\nExample:\n\n```\n$ curl -X https://api.bitbucket.org/2.0/workspaces/bbworkspace1/permissions\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"permission\": \"owner\",\n \"type\": \"workspace_membership\",\n \"user\": {\n \"type\": \"user\",\n \"uuid\": \"{470c176d-3574-44ea-bb41-89e8638bcca4}\",\n \"display_name\": \"Erik van Zijst\",\n },\n \"workspace\": {\n \"type\": \"workspace\",\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"slug\": \"bbworkspace1\",\n \"name\": \"Atlassian Bitbucket\",\n }\n },\n {\n \"permission\": \"member\",\n \"type\": \"workspace_membership\",\n \"user\": {\n \"type\": \"user\",\n \"nickname\": \"seanaty\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"workspace\": {\n \"type\": \"workspace\",\n \"uuid\": \"{a15fb181-db1f-48f7-b41f-e1eff06929d6}\",\n \"slug\": \"bbworkspace1\",\n \"name\": \"Atlassian Bitbucket\",\n }\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nResults may be further [filtered](/cloud/bitbucket/rest/intro/#filtering) by\npermission by adding the following query string parameters:\n\n* `q=permission=\"owner\"`", + "description": "Returns the list of members in a workspace\nand their permission levels.\nPermission can be:\n* `owner`\n* `collaborator`\n* `member`\n\n**The `collaborator` role is being removed from the Bitbucket Cloud API. For more information,\nsee the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).**\n\n**When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on\n`workspace_membership` will no longer be present: `last_accessed` and `added_on`. See the\n[deprecation announcement](/cloud/bitbucket/announcement-breaking-change-workspace-membership/).**\n\nResults may be further [filtered](/cloud/bitbucket/rest/intro/#filtering) by\npermission by adding the following query string parameters:\n\n* `q=permission=\"owner\"`", "summary": "List user permissions in a workspace", "responses": { "200": { @@ -17243,6 +21151,48 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_workspace_memberships" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "permission": "owner", + "type": "workspace_membership", + "user": { + "type": "user", + "uuid": "{470c176d-3574-44ea-bb41-89e8638bcca4}", + "display_name": "Erik van Zijst" + }, + "workspace": { + "type": "workspace", + "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}", + "slug": "bbworkspace1", + "name": "Atlassian Bitbucket" + } + }, + { + "permission": "member", + "type": "workspace_membership", + "user": { + "type": "user", + "nickname": "seanaty", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" + }, + "workspace": { + "type": "workspace", + "uuid": "{a15fb181-db1f-48f7-b41f-e1eff06929d6}", + "slug": "bbworkspace1", + "name": "Atlassian Bitbucket" + } + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -17279,6 +21229,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:workspace:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17296,7 +21253,7 @@ "/workspaces/{workspace}/permissions/repositories": { "get": { "tags": ["Workspaces"], - "description": "Returns an object for each repository permission for all of a\nworkspace's repositories.\n\nPermissions returned are effective permissions: the highest level of\npermission the user has. This does not distinguish between direct and\nindirect (group) privileges.\n\nOnly users with admin permission for the team may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Jeff Zeng\",\n \"uuid\": \"{47f92a9a-c3a3-4d0b-bc4e-782a969c5c72}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"whee\",\n \"full_name\": \"atlassian_tutorial/whee\",\n \"uuid\": \"{30ba25e9-51ff-4555-8dd0-fc7ee2fa0895}\"\n },\n \"permission\": \"admin\"\n }\n ],\n \"page\": 1,\n \"size\": 3\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby repository, user, or permission by adding the following query string\nparameters:\n\n* `q=repository.name=\"geordi\"` or `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", + "description": "Returns an object for each repository permission for all of a\nworkspace's repositories.\n\nPermissions returned are effective permissions: the highest level of\npermission the user has. This does not distinguish between direct and\nindirect (group) privileges.\n\nOnly users with admin permission for the team may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby repository, user, or permission by adding the following query string\nparameters:\n\n* `q=repository.name=\"geordi\"` or `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", "summary": "List all repository permissions for a workspace", "responses": { "200": { @@ -17305,6 +21262,62 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Erik van Zijst", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "atlassian_tutorial/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "admin" + }, + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "atlassian_tutorial/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "write" + }, + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Jeff Zeng", + "uuid": "{47f92a9a-c3a3-4d0b-bc4e-782a969c5c72}" + }, + "repository": { + "type": "repository", + "name": "whee", + "full_name": "atlassian_tutorial/whee", + "uuid": "{30ba25e9-51ff-4555-8dd0-fc7ee2fa0895}" + }, + "permission": "admin" + } + ], + "page": 1, + "size": 3 + } + } } } } @@ -17350,6 +21363,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17367,7 +21387,7 @@ "/workspaces/{workspace}/permissions/repositories/{repo_slug}": { "get": { "tags": ["Workspaces"], - "description": "Returns an object for the repository permission of each user in the\nrequested repository.\n\nPermissions returned are effective permissions: the highest level of\npermission the user has. This does not distinguish between direct and\nindirect (group) privileges.\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nExample:\n\n```\n$ curl https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/permissions/repositories/geordi\n\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"admin\"\n },\n {\n \"type\": \"repository_permission\",\n \"user\": {\n \"type\": \"user\",\n \"display_name\": \"Sean Conaty\",\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n },\n \"repository\": {\n \"type\": \"repository\",\n \"name\": \"geordi\",\n \"full_name\": \"atlassian_tutorial/geordi\",\n \"uuid\": \"{85d08b4e-571d-44e9-a507-fa476535aa98}\"\n },\n \"permission\": \"write\"\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby user, or permission by adding the following query string parameters:\n\n* `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", + "description": "Returns an object for the repository permission of each user in the\nrequested repository.\n\nPermissions returned are effective permissions: the highest level of\npermission the user has. This does not distinguish between direct and\nindirect (group) privileges.\n\nOnly users with admin permission for the repository may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `write`\n* `read`\n\nResults may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering)\nby user, or permission by adding the following query string parameters:\n\n* `q=permission>\"read\"`\n* `sort=user.display_name`\n\nNote that the query parameter values need to be URL escaped so that `=`\nwould become `%3D`.", "summary": "List a repository permissions for a workspace", "responses": { "200": { @@ -17376,6 +21396,47 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_repository_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Erik van Zijst", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "atlassian_tutorial/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "admin" + }, + { + "type": "repository_permission", + "user": { + "type": "user", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" + }, + "repository": { + "type": "repository", + "name": "geordi", + "full_name": "atlassian_tutorial/geordi", + "uuid": "{85d08b4e-571d-44e9-a507-fa476535aa98}" + }, + "permission": "write" + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -17421,6 +21482,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } ] }, "parameters": [ @@ -17475,7 +21543,18 @@ } } } - } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/workspaces/{workspace}/pipelines-config/identity/oidc/keys.json": { @@ -17509,7 +21588,18 @@ } } } - } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/workspaces/{workspace}/pipelines-config/variables": { @@ -17540,7 +21630,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "post": { "tags": ["Pipelines"], @@ -17600,7 +21708,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}": { @@ -17650,7 +21769,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "put": { "tags": ["Pipelines"], @@ -17701,7 +21838,18 @@ } } } - } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] }, "delete": { "tags": ["Pipelines"], @@ -17742,7 +21890,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } }, "/workspaces/{workspace}/projects": { @@ -17782,11 +21948,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket"] + } ] }, "post": { "tags": ["Projects"], - "description": "Creates a new project.\n\nNote that the avatar has to be embedded as either a data-url\nor a URL to an external image as shown in the examples below:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/...\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```\n\nor even:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"http://i.imgur.com/72tRx4w.gif\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/teams/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```", + "description": "Creates a new project.\n\nNote that the avatar has to be embedded as either a data-url\nor a URL to an external image as shown in the examples below:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/...\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/workspaces/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```\n\nor even:\n\n```\n$ body=$(cat << EOF\n{\n \"name\": \"Mars Project\",\n \"key\": \"MARS\",\n \"description\": \"Software for colonizing mars.\",\n \"links\": {\n \"avatar\": {\n \"href\": \"http://i.imgur.com/72tRx4w.gif\"\n }\n },\n \"is_private\": false\n}\nEOF\n)\n$ curl -H \"Content-Type: application/json\" \\\n -X POST \\\n -d \"$body\" \\\n https://api.bitbucket.org/2.0/workspaces/teams-in-space/projects/ | jq .\n{\n // Serialized project document\n}\n```", "summary": "Create a project in a workspace", "responses": { "201": { @@ -17841,6 +22014,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "parameters": [ @@ -17858,7 +22038,7 @@ "/workspaces/{workspace}/projects/{project_key}": { "delete": { "tags": ["Projects"], - "description": "Deletes this project. This is an irreversible operation.\n\nYou cannot delete a project that still contains repositories.\nTo delete the project, [delete](/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-delete)\nor transfer the repositories first.\n\nExample:\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/bbworkspace1/PROJ\n```", + "description": "Deletes this project. This is an irreversible operation.\n\nYou cannot delete a project that still contains repositories.\nTo delete the project, [delete](/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-delete)\nor transfer the repositories first.\n\nExample:\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects/PROJ\n```", "summary": "Delete a project for a workspace", "responses": { "204": { @@ -17895,6 +22075,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "get": { @@ -17953,6 +22140,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket"] + } ] }, "put": { @@ -18030,6 +22224,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "parameters": [ @@ -18056,7 +22257,7 @@ "/workspaces/{workspace}/projects/{project_key}/branching-model": { "get": { "tags": ["Branching model"], - "description": "Return the branching model set at the project level. This view is\nread-only. The branching model settings can be changed using the\n[settings](#api-workspaces-workspace-projects-project-key-branching-model-settings-get)\nAPI.\n\nThe returned object:\n\n1. Always has a `development` property. `development.name` is\n the user-specified branch that can be inherited by an individual repository's\n branching model.\n2. Might have a `production` property. `production` will not\n be present when `production` is disabled.\n `production.name` is the user-specified branch that can be\n inherited by an individual repository's branching model.\n3. Always has a `branch_types` array which contains all enabled branch\n types.\n\nExample body:\n\n```\n{\n \"development\": {\n \"name\": \"master\",\n \"use_mainbranch\": true\n },\n \"production\": {\n \"name\": \"production\",\n \"use_mainbranch\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"project_branching_model\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model\"\n }\n }\n}\n```", + "description": "Return the branching model set at the project level. This view is\nread-only. The branching model settings can be changed using the\n[settings](#api-workspaces-workspace-projects-project-key-branching-model-settings-get)\nAPI.\n\nThe returned object:\n\n1. Always has a `development` property. `development.name` is\n the user-specified branch that can be inherited by an individual repository's\n branching model.\n2. Might have a `production` property. `production` will not\n be present when `production` is disabled.\n `production.name` is the user-specified branch that can be\n inherited by an individual repository's branching model.\n3. Always has a `branch_types` array which contains all enabled branch\n types.", "summary": "Get the branching model for a project", "responses": { "200": { @@ -18065,6 +22266,44 @@ "application/json": { "schema": { "$ref": "#/components/schemas/project_branching_model" + }, + "examples": { + "response": { + "value": { + "development": { + "name": "master", + "use_mainbranch": true + }, + "production": { + "name": "production", + "use_mainbranch": false + }, + "branch_types": [ + { + "kind": "release", + "prefix": "release/" + }, + { + "kind": "hotfix", + "prefix": "hotfix/" + }, + { + "kind": "feature", + "prefix": "feature/" + }, + { + "kind": "bugfix", + "prefix": "bugfix/" + } + ], + "type": "project_branching_model", + "links": { + "self": { + "href": "https://api.bitbucket.org/.../branching-model" + } + } + } + } } } } @@ -18110,6 +22349,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } ] }, "parameters": [ @@ -18136,7 +22382,7 @@ "/workspaces/{workspace}/projects/{project_key}/branching-model/settings": { "get": { "tags": ["Branching model"], - "description": "Return the branching model configuration for a project. The returned\nobject:\n\n1. Always has a `development` property for the development branch.\n2. Always a `production` property for the production branch. The\n production branch can be disabled.\n3. The `branch_types` contains all the branch types.\n\n\nThis is the raw configuration for the branching model. A client\nwishing to see the branching model with its actual current branches may find the\n[active model API](#api-workspaces-workspace-projects-project-key-branching-model-get)\nmore useful.\n\nExample body:\n\n```\n{\n \"development\": {\n \"name\": null,\n \"use_mainbranch\": true\n },\n \"production\": {\n \"name\": \"production\",\n \"use_mainbranch\": false,\n \"enabled\": false\n },\n \"branch_types\": [\n {\n \"kind\": \"release\",\n \"enabled\": true,\n \"prefix\": \"release/\"\n },\n {\n \"kind\": \"hotfix\",\n \"enabled\": true,\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"bugfix\",\n \"enabled\": false,\n \"prefix\": \"bugfix/\"\n }\n ],\n \"type\": \"branching_model_settings\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/.../branching-model/settings\"\n }\n }\n}\n```", + "description": "Return the branching model configuration for a project. The returned\nobject:\n\n1. Always has a `development` property for the development branch.\n2. Always a `production` property for the production branch. The\n production branch can be disabled.\n3. The `branch_types` contains all the branch types.\n\n\nThis is the raw configuration for the branching model. A client\nwishing to see the branching model with its actual current branches may find the\n[active model API](#api-workspaces-workspace-projects-project-key-branching-model-get)\nmore useful.", "summary": "Get the branching model config for a project", "responses": { "200": { @@ -18145,6 +22391,49 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model_settings" + }, + "examples": { + "response": { + "value": { + "development": { + "name": "null", + "use_mainbranch": true + }, + "production": { + "name": "production", + "use_mainbranch": false, + "enabled": false + }, + "branch_types": [ + { + "kind": "release", + "enabled": true, + "prefix": "release/" + }, + { + "kind": "hotfix", + "enabled": true, + "prefix": "hotfix/" + }, + { + "kind": "feature", + "enabled": true, + "prefix": "feature/" + }, + { + "kind": "bugfix", + "enabled": false, + "prefix": "bugfix/" + } + ], + "type": "branching_model_settings", + "links": { + "self": { + "href": "https://api.bitbucket.org/.../branching-model/settings" + } + } + } + } } } } @@ -18190,11 +22479,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "put": { "tags": ["Branching model"], - "description": "Update the branching model configuration for a project.\n\nThe `development` branch can be configured to a specific branch or to\ntrack the main branch. Any branch name can be supplied, but will only\nsuccessfully be applied to a repository via inheritance if that branch\nexists for that repository. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`development` property will leave the development branch unchanged.\n\nThe `production` branch can be a specific branch, the main\nbranch or disabled. Any branch name can be supplied, but will only\nsuccessfully be applied to a repository via inheritance if that branch\nexists for that repository. The `enabled` property can be used to enable (`true`)\nor disable (`false`) it. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`production` property will leave the production branch unchanged.\n\nThe `branch_types` property contains the branch types to be updated.\nOnly the branch types passed will be updated. All updates will be\nrejected if it would leave the branching model in an invalid state.\nFor branch types this means that:\n\n1. The prefixes for all enabled branch types are valid. For example,\n it is not possible to use '*' inside a Git prefix.\n2. A prefix of an enabled branch type must not be a prefix of another\n enabled branch type. This is to ensure that a branch can be easily\n classified by its prefix unambiguously.\n\nIt is possible to store an invalid prefix if that branch type would be\nleft disabled. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. Each branch type must\nhave a `kind` property to identify it.\n\nExample Body:\n\n```\n {\n \"development\": {\n \"use_mainbranch\": true\n },\n \"production\": {\n \"enabled\": true,\n \"use_mainbranch\": false,\n \"name\": \"production\"\n },\n \"branch_types\": [\n {\n \"kind\": \"bugfix\",\n \"enabled\": true,\n \"prefix\": \"bugfix/\"\n },\n {\n \"kind\": \"feature\",\n \"enabled\": true,\n \"prefix\": \"feature/\"\n },\n {\n \"kind\": \"hotfix\",\n \"prefix\": \"hotfix/\"\n },\n {\n \"kind\": \"release\",\n \"enabled\": false,\n }\n ]\n }\n```", + "description": "Update the branching model configuration for a project.\n\nThe `development` branch can be configured to a specific branch or to\ntrack the main branch. Any branch name can be supplied, but will only\nsuccessfully be applied to a repository via inheritance if that branch\nexists for that repository. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`development` property will leave the development branch unchanged.\n\nThe `production` branch can be a specific branch, the main\nbranch or disabled. Any branch name can be supplied, but will only\nsuccessfully be applied to a repository via inheritance if that branch\nexists for that repository. The `enabled` property can be used to enable (`true`)\nor disable (`false`) it. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. A request without a\n`production` property will leave the production branch unchanged.\n\nThe `branch_types` property contains the branch types to be updated.\nOnly the branch types passed will be updated. All updates will be\nrejected if it would leave the branching model in an invalid state.\nFor branch types this means that:\n\n1. The prefixes for all enabled branch types are valid. For example,\n it is not possible to use '*' inside a Git prefix.\n2. A prefix of an enabled branch type must not be a prefix of another\n enabled branch type. This is to ensure that a branch can be easily\n classified by its prefix unambiguously.\n\nIt is possible to store an invalid prefix if that branch type would be\nleft disabled. Only the passed properties will be updated. The\nproperties not passed will be left unchanged. Each branch type must\nhave a `kind` property to identify it.", "summary": "Update the branching model config for a project", "responses": { "200": { @@ -18203,6 +22499,40 @@ "application/json": { "schema": { "$ref": "#/components/schemas/branching_model_settings" + }, + "examples": { + "response": { + "value": { + "development": { + "use_mainbranch": true + }, + "production": { + "enabled": true, + "use_mainbranch": false, + "name": "production" + }, + "branch_types": [ + { + "kind": "bugfix", + "enabled": true, + "prefix": "bugfix/" + }, + { + "kind": "feature", + "enabled": true, + "prefix": "feature/" + }, + { + "kind": "hotfix", + "prefix": "hotfix/" + }, + { + "kind": "release", + "enabled": false + } + ] + } + } } } } @@ -18258,6 +22588,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "parameters": [ @@ -18284,7 +22621,7 @@ "/workspaces/{workspace}/projects/{project_key}/default-reviewers": { "get": { "tags": ["Projects"], - "description": "Return a list of all default reviewers for a project. This is a list of users that will be added as default\nreviewers to pull requests for any repository within the project.\n\nExample:\n```\n$ curl https://api.bitbucket.org/2.0/.../projects/.../default-reviewers | jq .\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"user\": {\n \"display_name\": \"Davis Lee\",\n \"uuid\": \"{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}\"\n },\n \"reviewer_type\": \"project\",\n \"type\": \"default_reviewer\"\n },\n {\n \"user\": {\n \"display_name\": \"Jorge Rodriguez\",\n \"uuid\": \"{1aa43376-260d-4a0b-9660-f62672b9655d}\"\n },\n \"reviewer_type\": \"project\",\n \"type\": \"default_reviewer\"\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```", + "description": "Return a list of all default reviewers for a project. This is a list of users that will be added as default\nreviewers to pull requests for any repository within the project.", "summary": "List the default reviewers in a project", "responses": { "200": { @@ -18293,6 +22630,33 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_default_reviewer_and_type" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "user": { + "display_name": "Davis Lee", + "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}" + }, + "reviewer_type": "project", + "type": "default_reviewer" + }, + { + "user": { + "display_name": "Jorge Rodriguez", + "uuid": "{1aa43376-260d-4a0b-9660-f62672b9655d}" + }, + "reviewer_type": "project", + "type": "default_reviewer" + } + ], + "page": 1, + "size": 2 + } + } } } } @@ -18328,6 +22692,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "parameters": [ @@ -18358,7 +22729,7 @@ "summary": "Remove the specific user from the project's default reviewers", "responses": { "204": { - "description": "The specified user was removed from the list of project default reviewers" + "description": "The specified user was removed from the list of project default reviewers" }, "400": { "description": "If the specified user is not a default reviewer for the project", @@ -18401,11 +22772,18 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "get": { "tags": ["Projects"], - "description": "Returns the specified default reviewer.\n\nExample:\n```\n$ curl https://api.bitbucket.org/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D\n{\n \"display_name\": \"Davis Lee\",\n \"type\": \"user\",\n \"uuid\": \"{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}\"\n}\n```", + "description": "Returns the specified default reviewer.", "summary": "Get a default reviewer", "responses": { "200": { @@ -18414,6 +22792,15 @@ "application/json": { "schema": { "$ref": "#/components/schemas/user" + }, + "examples": { + "response": { + "value": { + "display_name": "Davis Lee", + "type": "user", + "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}" + } + } } } } @@ -18459,19 +22846,48 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pullrequest:bitbucket"] + } ] }, "put": { "tags": ["Projects"], - "description": "Adds the specified user to the project's list of default reviewers. The method is\nidempotent. Accepts an optional body containing the `uuid` of the user to be added.\n\nExample:\n```\n$ curl -XPUT https://api.bitbucket.org/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D\n-d { 'uuid': '{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}' }\n\nHTTP/1.1 204\n```", + "description": "Adds the specified user to the project's list of default reviewers. The method is\nidempotent. Accepts an optional body containing the `uuid` of the user to be added.", "summary": "Add the specific user as a default reviewer for the project", "responses": { - "204": { + "200": { "description": "The specified user was added as a project default reviewer", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/user" + }, + "examples": { + "response": { + "value": { + "display_name": "Yaniv Sagy", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/users/%7Bdd5db7f2-6389-458d-a62a-716773910b7a%7D" + }, + "avatar": { + "href": "https://secure.gravatar.com/avatar/YS-2.png" + }, + "html": { + "href": "https://api.bitbucket.org/%7Bdd5db7f2-6389-458d-a62a-716773910b7a%7D/" + } + }, + "type": "user", + "uuid": "{dd5db7f2-6389-458d-a62a-716773910b7a}", + "account_id": "712020:4efe52fa-b4b4-475b-9eb0-c0a23b7eb194", + "nickname": "Yaniv Sagy" + } + } } } } @@ -18517,6 +22933,13 @@ { "api_key": [] } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } ] }, "parameters": [ @@ -18552,7 +22975,7 @@ "/workspaces/{workspace}/projects/{project_key}/deploy-keys": { "get": { "tags": ["Deployments"], - "description": "Returns all deploy keys belonging to a project.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys\n\nOutput:\n{\n \"pagelen\":10,\n \"values\":[\n {\n \"comment\":\"thakseth@C02W454JHTD8\",\n \"last_used\":null,\n \"links\":{\n \"self\":{\n \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234\"\n }\n },\n \"label\":\"test\",\n \"project\":{\n \"links\":{\n \"self\":{\n \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT\"\n }\n },\n \"type\":\"project\",\n \"name\":\"cooperative standard\",\n \"key\":\"TEST_PROJECT\",\n \"uuid\":\"{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}\"\n },\n \"created_on\":\"2021-07-28T21:20:19.491721+00:00\",\n \"key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r\",\n \"type\":\"project_deploy_key\",\n \"id\":1234\n }\n ],\n \"page\":1,\n \"size\":1\n}\n```", + "description": "Returns all deploy keys belonging to a project.", "summary": "List project deploy keys", "responses": { "200": { @@ -18561,6 +22984,42 @@ "application/json": { "schema": { "$ref": "#/components/schemas/paginated_project_deploy_keys" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "comment": "thakseth@C02W454JHTD8", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234" + } + }, + "label": "test", + "project": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT" + } + }, + "type": "project", + "name": "cooperative standard", + "key": "TEST_PROJECT", + "uuid": "{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}" + }, + "created_on": "2021-07-28T21:20:19.491721+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r", + "type": "project_deploy_key", + "id": 1234 + } + ], + "page": 1, + "size": 1 + } + } } } } @@ -18600,7 +23059,7 @@ }, "post": { "tags": ["Deployments"], - "description": "Create a new deploy key in a project.\n\nExample:\n```\n$ curl -XPOST \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/workspaces/jzeng/projects/JZ/deploy-keys/ -d \\\n'{\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\",\n \"label\": \"mydeploykey\"\n}'\n\nOutput:\n{\n \"comment\": \"mleu@C02W454JHTD8\",\n \"last_used\": null,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/workspaces/testadfsa/projects/ASDF/deploy-keys/5/\"\n }\n },\n \"label\": \"myprojectkey\",\n \"project\": {\n ...\n },\n \"created_on\": \"2021-08-10T05:28:00.570859+00:00\",\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5\",\n \"type\": \"project_deploy_key\",\n \"id\": 5\n}\n```", + "description": "Create a new deploy key in a project.\n\nExample:\n```\n$ curl -X POST \\\n-H \"Authorization \" \\\n-H \"Content-type: application/json\" \\\nhttps://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/ -d \\\n'{\n \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8\",\n \"label\": \"mydeploykey\"\n}'\n```", "summary": "Create a project deploy key", "responses": { "200": { @@ -18609,6 +23068,35 @@ "application/json": { "schema": { "$ref": "#/components/schemas/project_deploy_key" + }, + "examples": { + "response": { + "value": { + "comment": "mleu@C02W454JHTD8", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/5/" + } + }, + "label": "myprojectkey", + "project": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT" + } + }, + "type": "project", + "name": "cooperative standard", + "key": "TEST_PROJECT", + "uuid": "{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}" + }, + "created_on": "2021-08-10T05:28:00.570859+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", + "type": "project_deploy_key", + "id": 5 + } + } } } } @@ -18680,7 +23168,7 @@ "/workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}": { "delete": { "tags": ["Deployments"], - "description": "This deletes a deploy key from a project.\n\nExample:\n```\n$ curl -XDELETE \\\n-H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/workspaces/jzeng/projects/JZ/deploy-keys/1234\n```", + "description": "This deletes a deploy key from a project.", "summary": "Delete a deploy key from a project", "responses": { "204": { @@ -18721,7 +23209,7 @@ }, "get": { "tags": ["Deployments"], - "description": "Returns the deploy key belonging to a specific key ID.\n\nExample:\n```\n$ curl -H \"Authorization \" \\\nhttps://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234\n\nOutput:\n{\n \"pagelen\":10,\n \"values\":[\n {\n \"comment\":\"thakseth@C02W454JHTD8\",\n \"last_used\":null,\n \"links\":{\n \"self\":{\n \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234\"\n }\n },\n \"label\":\"test\",\n \"project\":{\n \"links\":{\n \"self\":{\n \"href\":\"https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT\"\n }\n },\n \"type\":\"project\",\n \"name\":\"cooperative standard\",\n \"key\":\"TEST_PROJECT\",\n \"uuid\":\"{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}\"\n },\n \"created_on\":\"2021-07-28T21:20:19.491721+00:00\",\n \"key\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r\",\n \"type\":\"project_deploy_key\",\n \"id\":1234\n }\n ],\n}\n```", + "description": "Returns the deploy key belonging to a specific key ID.", "summary": "Get a project deploy key", "responses": { "200": { @@ -18730,6 +23218,40 @@ "application/json": { "schema": { "$ref": "#/components/schemas/project_deploy_key" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "comment": "thakseth@C02W454JHTD8", + "last_used": null, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234" + } + }, + "label": "test", + "project": { + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT" + } + }, + "type": "project", + "name": "cooperative standard", + "key": "TEST_PROJECT", + "uuid": "{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}" + }, + "created_on": "2021-07-28T21:20:19.491721+00:00", + "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r", + "type": "project_deploy_key", + "id": 1234 + } + ] + } + } } } } @@ -18797,11 +23319,795 @@ } ] }, + "/workspaces/{workspace}/projects/{project_key}/permissions-config/groups": { + "get": { + "tags": ["Projects"], + "description": "Returns a paginated list of explicit group permissions for the given project.\nThis endpoint does not support BBQL features.", + "summary": "List explicit group permissions for a project", + "responses": { + "200": { + "description": "Paginated list of project group permissions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_project_group_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + }, + { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Developers", + "slug": "developers" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + } + } + } + ], + "page": 1, + "size": 2 + } + } + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The user doesn't have admin access to the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or both of the workspace and project don't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual key assigned to the project.\n", + "required": true, + "schema": { + "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, + "schema": { + "type": "string" + } + } + ] + }, + "/workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}": { + "delete": { + "tags": ["Projects"], + "description": "Deletes the project group permission between the requested project and group, if one exists.\n\nOnly users with admin permission for the project may access this resource.", + "summary": "Delete an explicit group permission for a project", + "responses": { + "204": { + "description": "The project group permission was deleted and no content returned." + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Projects"], + "description": "Returns the group permission for a given group and project.\n\nOnly users with admin permission for the project may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `create-repo`\n* `write`\n* `read`\n* `none`", + "summary": "Get an explicit group permission for a project", + "responses": { + "200": { + "description": "Project group permission", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_group_permission" + }, + "examples": { + "response": { + "value": { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/administrators" + } + } + } + } + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The user doesn't have admin access to the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket", "read:user:bitbucket"] + } + ] + }, + "put": { + "tags": ["Projects"], + "description": "Updates the group permission, or grants a new permission if one does not already exist.\n\nOnly users with admin permission for the project may access this resource.\n\nDue to security concerns, the JWT and OAuth authentication methods are unsupported.\nThis is to ensure integrations and add-ons are not allowed to change permissions.\n\nPermissions can be:\n\n* `admin`\n* `create-repo`\n* `write`\n* `read`", + "summary": "Update an explicit group permission for a project", + "responses": { + "200": { + "description": "Project group permission updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_group_permission" + }, + "examples": { + "response": { + "value": { + "type": "project_group_permission", + "group": { + "type": "group", + "name": "Administrators", + "slug": "administrators" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/groups/administrators" + } + } + } + } + } + } + } + }, + "400": { + "description": "No permission value was provided or the value is invalid(not one of read, write, create-repo, or admin).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "402": { + "description": "You have reached your plan's user limit and must upgrade before giving access to additional users.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema" + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "group_slug", + "in": "path", + "description": "Slug of the requested group.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual key assigned to the project.\n", + "required": true, + "schema": { + "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, + "schema": { + "type": "string" + } + } + ] + }, + "/workspaces/{workspace}/projects/{project_key}/permissions-config/users": { + "get": { + "tags": ["Projects"], + "description": "Returns a paginated list of explicit user permissions for the given project.\nThis endpoint does not support BBQL features.", + "summary": "List explicit user permissions for a project", + "responses": { + "200": { + "description": "Paginated list of explicit user permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_project_user_permissions" + }, + "examples": { + "response": { + "value": { + "pagelen": 10, + "values": [ + { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + }, + { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Sean Conaty", + "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324c" + } + } + } + ], + "page": 1, + "size": 2 + } + } + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The user doesn't have admin access to the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or both of the workspace and project don't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual key assigned to the project.\n", + "required": true, + "schema": { + "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, + "schema": { + "type": "string" + } + } + ] + }, + "/workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}": { + "delete": { + "tags": ["Projects"], + "description": "Deletes the project user permission between the requested project and user, if one exists.\n\nOnly users with admin permission for the project may access this resource.\n\nDue to security concerns, the JWT and OAuth authentication methods are unsupported.\nThis is to ensure integrations and add-ons are not allowed to change permissions.", + "summary": "Delete an explicit user permission for a project", + "responses": { + "204": { + "description": "The project user permission was deleted and no content returned." + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and selected user doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Projects"], + "description": "Returns the explicit user permission for a given user and project.\n\nOnly users with admin permission for the project may access this resource.\n\nPermissions can be:\n\n* `admin`\n* `create-repo`\n* `write`\n* `read`\n* `none`", + "summary": "Get an explicit user permission for a project", + "responses": { + "200": { + "description": "Explicit user permission for user and project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_user_permission" + }, + "examples": { + "response": { + "value": { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "admin", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + } + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and selected user doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket", "read:user:bitbucket"] + } + ] + }, + "put": { + "tags": ["Projects"], + "description": "Updates the explicit user permission for a given user and project. The selected\nuser must be a member of the workspace, and cannot be the workspace owner.\n\nOnly users with admin permission for the project may access this resource.\n\nDue to security concerns, the JWT and OAuth authentication methods are unsupported.\nThis is to ensure integrations and add-ons are not allowed to change permissions.\n\nPermissions can be:\n\n* `admin`\n* `create-repo`\n* `write`\n* `read`", + "summary": "Update an explicit user permission for a project", + "responses": { + "200": { + "description": "Explicit user permission updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project_user_permission" + }, + "examples": { + "response": { + "value": { + "type": "project_user_permission", + "user": { + "type": "user", + "display_name": "Colin Cameron", + "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + "account_id": "557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + }, + "permission": "write", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/workspaces/atlassian_tutorial/projects/PRJ/permissions-config/users/557058:ba8948b2-49da-43a9-9e8b-e7249b8e324a" + } + } + } + } + } + } + } + }, + "400": { + "description": "No permission value was provided or the value is invalid (not one of read, write, create-repo, or admin)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "The user couldn't be authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "402": { + "description": "You have reached your plan's user limit and must upgrade before giving access to additional users.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the project, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or more of the workspace, project, and selected user doesn't exist for the given identifiers or the requesting user is not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema" + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual key assigned to the project.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "selected_user_id", + "in": "path", + "description": "This can either be the username, the user's UUID surrounded by curly-braces,\nfor example: {account UUID}, or the user's Atlassian ID.\n", + "required": true, + "schema": { + "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, + "schema": { + "type": "string" + } + } + ] + }, "/workspaces/{workspace}/search/code": { "get": { "tags": ["Search"], "summary": "Search for code in a workspace", - "description": "Search for code in the repositories of the specified workspace.\n\nSearching across all repositories:\n\n```\ncurl 'https://api.bitbucket.org/2.0/workspaces/workspace_slug_or_uuid/search/code?search_query=foo'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 2,\n \"content_matches\": [\n {\n \"lines\": [\n {\n \"line\": 2,\n \"segments\": []\n },\n {\n \"line\": 3,\n \"segments\": [\n {\n \"text\": \"def \"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \"():\"\n }\n ]\n },\n {\n \"line\": 4,\n \"segments\": [\n {\n \"text\": \" print(\\\"snek\\\")\"\n }\n ]\n },\n {\n \"line\": 5,\n \"segments\": []\n }\n ]\n }\n ],\n \"path_matches\": [\n {\n \"text\": \"src/\"\n },\n {\n \"text\": \"foo\",\n \"match\": true\n },\n {\n \"text\": \".py\"\n }\n ],\n \"file\": {\n \"path\": \"src/foo.py\",\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n }\n }\n }\n ]\n}\n```\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both as in the example above.\n\nYou can use the same syntax for the search query as in the UI, e.g.\nto only search within a specific repository:\n\n```\ncurl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code?search_query=foo+repo:demo'\n# results from the \"demo\" repository\n```\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files (the `%2B` is a URL-encoded `+`):\n\n```\ncurl 'https://api.bitbucket.org/2.0/workspaces/my-workspace/search/code'\\\n '?search_query=foo&fields=%2Bvalues.file.commit.repository'\n{\n \"size\": 1,\n \"page\": 1,\n \"pagelen\": 10,\n \"query_substituted\": false,\n \"values\": [\n {\n \"type\": \"code_search_result\",\n \"content_match_count\": 1,\n \"content_matches\": [...],\n \"path_matches\": [...],\n \"file\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/commit/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo/commits/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b\"\n }\n },\n \"repository\": {\n \"name\": \"demo\",\n \"type\": \"repository\",\n \"full_name\": \"my-workspace/demo\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/my-workspace/demo\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B850e1749-781a-4115-9316-df39d0600e7a%7D?ts=default\"\n }\n },\n \"uuid\": \"{850e1749-781a-4115-9316-df39d0600e7a}\"\n }\n },\n \"type\": \"commit_file\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py\"\n }\n },\n \"path\": \"src/foo.py\"\n }\n }\n ]\n}\n```\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", + "description": "Search for code in the repositories of the specified workspace.\n\nNote that searches can match in the file's text (`content_matches`),\nthe path (`path_matches`), or both.\n\nYou can use the same syntax for the search query as in the UI.\nE.g. to search for \"foo\" only within the repository \"demo\",\nuse the query parameter `search_query=foo+repo:demo`.\n\nSimilar to other APIs, you can request more fields using a\n`fields` query parameter. E.g. to get some more information about\nthe repository of matched files, use the query parameter\n`search_query=foo&fields=%2Bvalues.file.commit.repository`\n(the `%2B` is a URL-encoded `+`).\n\nTry `fields=%2Bvalues.*.*.*.*` to get an idea what's possible.\n", "operationId": "searchWorkspace", "parameters": [ { @@ -18852,6 +24158,80 @@ "application/json": { "schema": { "$ref": "#/components/schemas/search_result_page" + }, + "examples": { + "response": { + "value": { + "size": 1, + "page": 1, + "pagelen": 10, + "query_substituted": false, + "values": [ + { + "type": "code_search_result", + "content_match_count": 2, + "content_matches": [ + { + "lines": [ + { + "line": 2, + "segments": [] + }, + { + "line": 3, + "segments": [ + { + "text": "def " + }, + { + "text": "foo", + "match": true + }, + { + "text": "():" + } + ] + }, + { + "line": 4, + "segments": [ + { + "text": " print(\"snek\")" + } + ] + }, + { + "line": 5, + "segments": [] + } + ] + } + ], + "path_matches": [ + { + "text": "src/" + }, + { + "text": "foo", + "match": true + }, + { + "text": ".py" + } + ], + "file": { + "path": "src/foo.py", + "type": "commit_file", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/my-workspace/demo/src/ad6964b5fe2880dbd9ddcad1c89000f1dbcbc24b/src/foo.py" + } + } + } + } + ] + } + } } } } @@ -18886,7 +24266,25 @@ } } } - } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] } } }, @@ -18921,7 +24319,7 @@ }, { "name": "Issue tracker", - "description": "The issue resources provide functionality for getting information on\nissues in an issue tracker, creating new issues, updating them and deleting\nthem.\n\nYou can access public issues without authentication, but you can't gain access\nto private repositories' issues. By authenticating, you will get the ability\nto create issues, as well as access to updating data or deleting issues you\nhave access to.\n" + "description": "The issue resources provide functionality for getting information on\nissues in an issue tracker, creating new issues, updating them and deleting\nthem.\n\nYou can access public issues without authentication, but you can't gain access\nto private repositories' issues. By authenticating, you will get the ability\nto create issues, as well as access to updating data or deleting issues you\nhave access to. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.\n" }, { "name": "Pipelines", @@ -18980,7 +24378,7 @@ "description": "A workspace is where you create repositories, collaborate on\nyour code, and organize different streams of work in your Bitbucket\nCloud account. Workspaces replace the use of teams and users in API\ncalls.\n" } ], - "x-revision": "607fbe8bfcb2", + "x-revision": "d8aa33b24a80", "x-atlassian-narrative": { "documents": [ { @@ -18988,7 +24386,7 @@ "title": "Authentication methods", "description": "How to authenticate API actions", "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOTcuNjQ3MyAxODYuODEzOCI+CiAgPGRlZnM+CiAgICA8c3R5bGU+CiAgICAgIC5jbHMtMSB7CiAgICAgICAgaXNvbGF0aW9uOiBpc29sYXRlOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6ICNkZTM1MGI7CiAgICAgIH0KCiAgICAgIC5jbHMtMyB7CiAgICAgICAgZmlsbDogI2ZmNTYzMDsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBmaWxsOiAjZGZlMWU1OwogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmFmYmZjOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIGZpbGw6ICNlYmVjZjA7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgICBzdHJva2U6ICMwMDY1ZmY7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICAgIHN0cm9rZS13aWR0aDogMnB4OwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6ICM1ZTZjODQ7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogIzI1Mzg1ODsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogIzI2ODRmZjsKICAgICAgfQoKICAgICAgLmNscy0xMSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQogICAgPC9zdHlsZT4KICA8L2RlZnM+CiAgPHRpdGxlPlNlY3VyaXR5IHdpdGggS2V5PC90aXRsZT4KICA8ZyBjbGFzcz0iY2xzLTEiPgogICAgPGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+CiAgICAgIDxnIGlkPSJPYmplY3RzIj4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik00Mi4wNjcyLDBoLjYxMTRhOCw4LDAsMCwxLDgsOFYyMy4yMzM4YTAsMCwwLDAsMSwwLDBIMzQuMDY3MmEwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDQyLjA2NzIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xMDguMjIsMGguNjExNGE4LDgsMCwwLDEsOCw4VjIzLjIzMzhhMCwwLDAsMCwxLDAsMEgxMDAuMjJhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSwxMDguMjIsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xNzQuMzcyMiwwaC42MTE0YTgsOCwwLDAsMSw4LDhWMjMuMjMzOGEwLDAsMCwwLDEsMCwwSDE2Ni4zNzIyYTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMTc0LjM3MjIsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM0LjA2NzIiIHk9IjIzLjIzMzgiIHdpZHRoPSIxNjMuNTgiIGhlaWdodD0iMTYzLjU4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNDIuMDY3MiwwSDU5LjI5YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDM0LjA2NzJhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTA3LjI0NTgsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDk5LjI0NThhMCwwLDAsMCwxLDAsMFY4YTgsOCwwLDAsMSw4LThaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTcyLjQyNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDE2NC40MjQ0YTAsMCwwLDAsMSwwLDBWOGE4LDgsMCwwLDEsOC04WiIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTcuNDU1OCIgeT0iMjMuMjMzOCIgd2lkdGg9IjE2My41OCIgaGVpZ2h0PSIxNjMuNTgiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Ik0yNS40NTU4LDBINDIuNjc4NmE4LDgsMCwwLDEsOCw4VjIzLjIyMjhhMCwwLDAsMCwxLDAsMEgxNy40NTU4YTAsMCwwLDAsMSwwLDBWOEE4LDgsMCwwLDEsMjUuNDU1OCwwWiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTkwLjYzNDQsMGgxNy4yMjI4YTgsOCwwLDAsMSw4LDhWMjMuMjIyOGEwLDAsMCwwLDEsMCwwSDgyLjYzNDRhMCwwLDAsMCwxLDAsMFY4QTgsOCwwLDAsMSw5MC42MzQ0LDBaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTU1LjgxMywwaDE3LjIyMjhhOCw4LDAsMCwxLDgsOFYyMy4yMjI4YTAsMCwwLDAsMSwwLDBIMTQ3LjgxM2EwLDAsMCwwLDEsMCwwVjhBOCw4LDAsMCwxLDE1NS44MTMsMFoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjM1Ljc1OTYiIHk9IjU2LjgwNjUiIHdpZHRoPSIzMy4yMjI4IiBoZWlnaHQ9IjE1LjYwMzgiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTIiIHg9IjEzMS4yMDE2IiB5PSIxMzYuOTYxNSIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNCIgZD0iTTU3LjM3MDksNzEuNjAzNmg3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwYTQ0LjM3NDgsNDQuMzc0OCwwLDAsMS00NC4zNzQ4LTQ0LjM3NDhWODAuNjAzNkE5LDksMCwwLDEsNTcuMzcwOSw3MS42MDM2WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNSIgZD0iTTY2LjM3MSw2Ni42NjE3aDcwLjc1YTksOSwwLDAsMSw5LDl2MzUuMzc0OWE0NC4zNzQ4LDQ0LjM3NDgsMCwwLDEtNDQuMzc0OCw0NC4zNzQ4aDBBNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLDU3LjM3MSwxMTEuMDM2NlY3NS42NjE3YTksOSwwLDAsMSw5LTlaIi8+CiAgICAgICAgPHBhdGggaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIGQ9Ik02MS4zNzEsNjYuNjYxN2g3MC43NWE5LDksMCwwLDEsOSw5djM1LjM3NDlhNDQuMzc0OCw0NC4zNzQ4LDAsMCwxLTQ0LjM3NDgsNDQuMzc0OGgwQTQ0LjM3NDgsNDQuMzc0OCwwLDAsMSw1Mi4zNzEsMTExLjAzNjZWNzUuNjYxN0E5LDksMCwwLDEsNjEuMzcxLDY2LjY2MTdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNOTYuNzQ1OSwxNDcuNzQ0MWEzNi43NDg3LDM2Ljc0ODcsMCwwLDEtMzYuNzA3NC0zNi43MDc0Vjc4LjA1ODRhMy43MzMzLDMuNzMzMywwLDAsMSwzLjcyOS0zLjcyOWg2NS45NTYzYTMuNzMzMywzLjczMzMsMCwwLDEsMy43MjksMy43Mjl2MzIuOTc4NEEzNi43NDg2LDM2Ljc0ODYsMCwwLDEsOTYuNzQ1OSwxNDcuNzQ0MVoiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik0xMDAuNjg5MywxNjMuMzE2N1YxMTEuMDk3M2EzLjk0NDMsMy45NDQzLDAsMCwwLTcuODg4NywwdjUyLjIyYTIyLjUyNTIsMjIuNTI1MiwwLDAsMC0xOC41NDc5LDIyLjE0YzAsLjQ1Ni4wMTc4LjkwNzguMDQ0NywxLjM1NzFIODIuMjFjLS4wNDE0LS40NDc0LS4wNjg4LS44OTktLjA2ODgtMS4zNTcxYTE0LjYyLDE0LjYyLDAsMCwxLDE0LjU5NzQtMTQuNjA0MWwuMDA2MS4wMDA2LjAwNjgtLjAwMDdBMTQuNjIxMSwxNC42MjExLDAsMCwxLDExMS4zNSwxODUuNDU2NmMwLC40NTgxLS4wMjczLjkxLS4wNjg4LDEuMzU3MWg3LjkxMjhjLjAyNjktLjQ0OTMuMDQ0Ny0uOTAxMS4wNDQ3LTEuMzU3MUEyMi41MjU5LDIyLjUyNTksMCwwLDAsMTAwLjY4OTMsMTYzLjMxNjdaIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIzNi40NzAyIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxNy40NTU4IiB5PSIxNTguMTIxNyIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTQ3LjgxMyIgeT0iMzYuNDcwMiIgd2lkdGg9IjMzLjIyMjgiIGhlaWdodD0iMTUuNjAzOCIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMiIgeD0iMTUwLjA2NDMiIHk9IjE1Ny41NTEzIiB3aWR0aD0iMzMuMjIyOCIgaGVpZ2h0PSIxNS42MDM4Ii8+CiAgICAgICAgPHBhdGggaWQ9Il9QYXRoXyIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtOCIgZD0iTTEwNy41MjU0LDEwMS4wMDI3YTExLjc3OTQsMTEuNzc5NCwwLDEsMC0xOS44Niw4LjU1NDhBNC4wNDE3LDQuMDQxNywwLDAsMSw4OC44NSwxMTMuNjJsLTIuMTA0LDcuMjY4MWEzLDMsMCwwLDAsMi44ODE3LDMuODM0MmgxMi4yMzcxYTMsMywwLDAsMCwyLjg4MTctMy44MzQybC0yLjA5NTktNy4yNGE0LjA3NDMsNC4wNzQzLDAsMCwxLDEuMTgwOC00LjA5NDVBMTEuNzE3MiwxMS43MTcyLDAsMCwwLDEwNy41MjU0LDEwMS4wMDI3WiIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTEwNC43NDYxLDEyMC44ODc3bC0yLjA5NTktNy4yNGE0LjA3NDQsNC4wNzQ0LDAsMCwxLDEuMTgwOC00LjA5NDUsMTEuNzYyOSwxMS43NjI5LDAsMCwwLTUuMDYtMTkuOTMxMywxMS45MSwxMS45MSwwLDAsMC04Ljc5OCwxMC45OTQ5LDExLjcxODUsMTEuNzE4NSwwLDAsMCwzLjY5MjksOC45NDFBNC4wNDE2LDQuMDQxNiwwLDAsMSw5NC44NSwxMTMuNjJsLTMuMjE0LDExLjEwMjNoMTAuMjI4OEEzLDMsMCwwLDAsMTA0Ljc0NjEsMTIwLjg4NzdaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTgxLjc5NzUsMTAwLjMxYTMuOTQzOSwzLjk0MzksMCwwLDAtMy45NDQzLTMuOTQ0M0g0MS4wNDE3YTMuOTQ0MywzLjk0NDMsMCwwLDAsMCw3Ljg4ODdINzcuODUzMkEzLjk0MzksMy45NDM5LDAsMCwwLDgxLjc5NzUsMTAwLjMxWiIvPgogICAgICAgIDxwYXRoIGlkPSJfUGF0aF8yIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy0xMSIgZD0iTTQxLjA0MTYsMTA0LjI1MzlIOTYuODUzMmEzLjk0NDMsMy45NDQzLDAsMCwwLDAtNy44ODg3SDQxLjA0MTZhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N1oiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTEwIiBkPSJNODEuNzk3NSwxMDAuMzFhMy45NDM5LDMuOTQzOSwwLDAsMC0zLjk0NDMtMy45NDQzSDQxLjA0MTdhMy45NDQzLDMuOTQ0MywwLDAsMCwwLDcuODg4N0g3Ny44NTMyQTMuOTQzOSwzLjk0MzksMCwwLDAsODEuNzk3NSwxMDAuMzFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTIyLjQ5MzIsMTIyLjgwMjlBMjIuNDkyOSwyMi40OTI5LDAsMSwxLDQ0Ljk4NTgsMTAwLjMxLDIyLjUxODUsMjIuNTE4NSwwLDAsMSwyMi40OTMyLDEyMi44MDI5Wm0wLTM3LjA5NzJBMTQuNjA0MiwxNC42MDQyLDAsMSwwLDM3LjA5NzIsMTAwLjMxLDE0LjYyMDcsMTQuNjIwNywwLDAsMCwyMi40OTMyLDg1LjcwNTdaIi8+CiAgICAgIDwvZz4KICAgIDwvZz4KICA8L2c+Cjwvc3ZnPgo='", - "body": "\nThe purpose of this section is to describe how to authenticate when making API calls using the Bitbucket REST API.\n\n-----\n\n* [Oauth 2](#oauth-2)\n * [Making requests](#making-requests)\n * [Repository cloning](#repository-cloning)\n * [Refresh tokens](#refresh-tokens)\n* [Scopes](#scopes)\n* [Basic auth](#basic-auth)\n* [Repository Access Tokens](#repository-access-tokens)\n* [App passwords](#app-passwords)\n\n---\n\n### OAuth 2.0\n\nOur OAuth 2 implementation is merged in with our existing OAuth 1 in\nsuch a way that existing OAuth 1 consumers automatically become\nvalid OAuth 2 clients. The only thing you need to do is edit your\nexisting consumer and configure a callback URL.\n\nOnce that is in place, you'll have the following 2 URLs:\n\n https://bitbucket.org/site/oauth2/authorize\n https://bitbucket.org/site/oauth2/access_token\n\nFor obtaining access/bearer tokens, we support three of RFC-6749's grant\nflows, plus a custom Bitbucket flow for exchanging JWT tokens for access tokens.\nNote that Resource Owner Password Credentials Grant (4.3) is no longer supported.\n\n\n#### 1. Authorization Code Grant (4.1)\n\nThe full-blown 3-LO flow. Request authorization from the end user by\nsending their browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code\n\nThe callback includes the `?code={}` query parameter that you can swap\nfor an access token:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=authorization_code -d code={code}\n\n\n#### 2. Implicit Grant (4.2)\n\nThis flow is useful for browser-based add-ons that operate without server-side backends.\n\nRequest the end user for authorization by directing the browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=token\n\nThat will redirect to your preconfigured callback URL with a fragment\ncontaining the access token\n(`#access_token={token}&token_type=bearer`) where your page's js can\npull it out of the URL.\n\n\n#### 3. Client Credentials Grant (4.4)\n\nSomewhat like our existing \"2-LO\" flow for OAuth 1. Obtain an access\ntoken that represents not an end user, but the owner of the\nclient/consumer:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=client_credentials\n\n\n#### 4. Bitbucket Cloud JWT Grant (urn:bitbucket:oauth2:jwt)\n\nIf your Atlassian Connect add-on uses JWT authentication, you can swap a\nJWT for an OAuth access token. The resulting access token represents the\naccount for which the add-on is installed.\n\nMake sure you send the JWT token in the Authorization request header\nusing the \"JWT\" scheme (case sensitive). Note that this custom scheme\nmakes this different from HTTP Basic Auth (and so you cannot use \"curl\n-u\").\n\n $ curl -X POST -H \"Authorization: JWT {jwt_token}\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=urn:bitbucket:oauth2:jwt\n\n\n#### Making Requests\n\nOnce you have an access token, as per RFC-6750, you can use it in a request in any of\nthe following ways (in decreasing order of desirability):\n\n1. Send it in a request header: `Authorization: Bearer {access_token}`\n2. Include it in a (application/x-www-form-urlencoded) POST body as `access_token={access_token}`\n3. Put it in the query string of a non-POST: `?access_token={access_token}`\n\n\n#### Repository Cloning\n\nSince add-ons will not be able to upload their own SSH keys to clone\nwith, access tokens can be used as Basic HTTP Auth credentials to\nclone securely over HTTPS. This is much like GitHub, yet slightly\ndifferent:\n\n $ git clone https://x-token-auth:{access_token}@bitbucket.org/user/repo.git\n\nThe literal string `x-token-auth` as a substitute for username is\nrequired (note the difference with GitHub where the actual token is in\nthe username field).\n\n\n#### Refresh Tokens\n\nOur access tokens expire in one hour. When this happens you'll get 401\nresponses.\n\nMost access tokens grant responses (Implicit and JWT excluded). Therefore, you should include a\nrefresh token that can then be used to generate a new access token,\nwithout the need for end user participation:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=refresh_token -d refresh_token={refresh_token}\n\n\n### Scopes\n\nBitbucket's API applies a number of privilege scopes to endpoints. In order to access an endpoint, a request will need to have the necessary scopes.\n\nScopes are declared in the descriptor as a list of strings, with each string being the name of a unique scope.\n\nA descriptor lacking the `scopes` element is implicitly assumed to require all scopes and as a result, Bitbucket will require end users authorizing/installing the add-on\nto explicitly accept all scopes.\n\nOur best practice suggests you add the scopes your add-on needs, but no more than it needs.\n\nInvalid scope strings will cause the descriptor to be rejected and the installation to fail.\n\nThe available scopes are:\n\n- [project](#project)\n- [project:write](#project-write)\n- [project:admin](#project-admin)\n- [repository](#repository)\n- [repository:write](#repository-write)\n- [repository:admin](#repository-admin)\n- [repository:delete](#repository-delete)\n- [pullrequest](#pullrequest)\n- [pullrequest:write](#pullrequest-write)\n- [issue](#issue)\n- [issue:write](#issue-write)\n- [wiki](#wiki)\n- [webhook](#webhook)\n- [snippet](#snippet)\n- [snippet:write](#snippet-write)\n- [email](#email)\n- [account](#account)\n- [account:write](#account-write)\n- [pipeline](#pipeline)\n- [pipeline:write](#pipeline-write)\n- [pipeline:variable](#pipeline-variable)\n- [runner](#runner)\n- [runner:write](#runner-write)\n\n#### project\n\nProvides the [`repository`](#repository) scope permission for every repository under a project or projects.\n\n#### project:write\n\nThis scope is deprecated, and has been made obsolete by `project:admin`. Please see the deprecation notice [here](/cloud/bitbucket/deprecation-notice-project-write-scope).\n\n#### project:admin\n\nProvides admin access to a project or projects. No distinction is made between public and private projects. This scope doesn't implicitly grant the [`project`](#project) scope or the [`repository:write`](#repository-write) scope on any repositories under the project. It gives access to the admin features of a project only, not direct access to its repositories' contents.\n\n* ability to create the project\n* ability to update the project\n* ability to delete the project\n\n#### repository\n\nProvides read access to a repository or repositories.\nNote that this scope does not give access to a repository's pull requests.\n\n* access to the repo's source code\n* clone over HTTPS\n* access the file browsing API\n* download zip archives of the repo's contents\n* the ability to view and use the issue tracker on any repo (created issues, comment, vote, etc)\n* the ability to view and use the wiki on any repo (create/edit pages)\n\n#### repository:write\n\nProvides write (not admin) access to a repository or repositories. No distinction is made between public and private repositories. This scope implicitly grants the [`repository`](#repository) scope, which does not need to be requested separately.\nThis scope alone does not give access to the pull requests API.\n\n* push access over HTTPS\n* fork repos\n\n#### repository:admin\n\nProvides admin access to a repository or repositories. No distinction is made between public and private repositories. This scope doesn't implicitly grant the [`repository`](#repository) or the [`repository:write`](#repository-write) scopes. It gives access to the admin features of a repo only, not direct access to its contents. This scope can be used or misused to grant read access to other users, who can then clone the repo, but users that need to read and write source code would also request explicit read or write.\nThis scope comes with access to the following functionality:\n\n* view and manipulate committer mappings\n* list and edit deploy keys\n* ability to delete the repo\n* view and edit repo permissions\n* view and edit branch permissions\n* import and export the issue tracker\n* enable and disable the issue tracker\n* list and edit issue tracker version, milestones and components\n* enable and disable the wiki\n* list and edit default reviewers\n* list and edit repo links (Jira/Bamboo/Custom)\n* list and edit the repository webhooks\n* initiate a repo ownership transfer\n\n#### repository:delete\n\nProvides access to delete a repository or repositories.\n\n#### pullrequest\n\nProvides read access to pull requests.\nThis scope implies the [`repository`](#repository) scope, giving read access to the pull request's destination repository.\n\n* see and list pull requests\n* create and resolve tasks\n* comment on pull requests\n\n#### pullrequest:write\n\nImplicitly grants the [`pullrequest`](#pullrequest) scope and adds the ability to create, merge and decline pull requests.\nThis scope also implicitly grants the [`repository:write`](#repository-write) scope, giving write access to the pull request's destination repository. This is necessary to allow merging.\n\n* merge pull requests\n* decline pull requests\n* create pull requests\n* approve pull requests\n\n#### issue\n\nAbility to interact with issue trackers the way non-repo members can.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* view, list and search issues\n* create new issues\n* comment on issues\n* watch issues\n* vote for issues\n\n#### issue:write\n\nThis scope implicitly grants the [`issue`](#issue) scope and adds the ability to transition and delete issues.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* transition issues\n* delete issues\n\n#### wiki\n\nProvides access to wikis. This scope provides both read and write access (wikis are always editable by anyone with access to them).\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* view wikis\n* create pages\n* edit pages\n* push to wikis\n* clone wikis\n\n#### webhook\n\nGives access to webhooks. This scope is required for any webhook-related operation.\n\nThis scope gives read access to existing webhook subscriptions on all\nresources the authorization mechanism can access, without needing further scopes. \nFor example:\n\n- A client can list all existing webhook subscriptions on a repository. The [`repository`](#repository) scope is not required.\n- Existing webhook subscriptions for the issue tracker on a repo can be retrieved without the [`issue`](#issue) scope. All that is required is the `webhook` scope.\n\nTo create webhooks, the client will need read access to the resource. Such as: for [`issue:created`](#issue-created), the client will need to\nhave both the `webhook` and the [`issue`](#issue) scope.\n\n* list webhook subscriptions on any accessible repository, user, team, or snippet\n* create/update/delete webhook subscriptions.\n\n#### snippet\n\nProvides read access to snippets.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\n\n* view any snippet\n* create snippet comments\n\n#### snippet:write\n\nProvides write access to snippets.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\nThis scope implicitly grants the [`snippet`](#snippet) scope which does not need to be requested separately.\n\n* create snippets\n* edit snippets\n* delete snippets\n\n#### email\n\nAbility to see the user's primary email address. This should make it easier to use Bitbucket Cloud as a login provider for apps or external applications.\n\n#### account\n\nAbility to see all the user's account information. Note that this doesn't include any ability to change any of the data.\n\n* see all email addresses\n* language\n* location\n* website\n* full name\n* SSH keys\n* user groups\n\n#### account:write\n\nAbility to change properties on the user's account.\n\n* delete the authorizing user's account\n* manage the user's groups\n* change a user's email addresses\n* change username, display name and avatar\n\n#### pipeline\n\nGives read-only access to pipelines, steps, deployment environments and variables.\n\n#### pipeline:write\n\nGives write access to pipelines. This scope allows a user to:\n* Stop pipelines\n* Rerun failed pipelines\n* Resume halted pipelines\n* Trigger manual pipelines.\n\nThis scope is not needed to trigger a build using a push. Performing a `git push` (or equivalent actions) will trigger the build. The token doing the push only needs the [`repository:write`](#repository-write) scope.\n\nThis doesn't give write access to create variables.\n\n#### pipeline:variable\n\nGives write access to create variables in pipelines at the various levels:\n* Workspace\n* Repository\n* Deployment\n\n#### runner\n\nGives read-only access to pipelines runners setup against a workspace or repository.\n\n#### runner:write\n\nGives write access to create/edit/disable/delete pipelines runners setup against a workspace or repository.\n\n### Basic auth\n\nBasic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth is available only with username and [app password](https://bitbucket.org/account/settings/app-passwords/) as credentials.\n\n### Repository Access Tokens\n\nRepository Access Tokens are passwords (or tokens) that provide access to\n_a single repository_. These tokens can authenticate with Bitbucket APIs for\nscripting, CI/CD tools, Bitbucket Cloud-connected apps, and Bitbucket Cloud\nintegrations. The level of access provided by the token is set when a repository\nadmin creates it, by setting permission scopes. Repository Access Tokens are\nlinked to their repository, not a user or a workspace, preventing them from\nbeing used to access any other repositories or workspaces.\n\nWhen using Bitbucket APIs with a Repository Access Token, the token will be\ntreated as the \"user\" in the Bitbucket UI and Bitbucket logs. This includes\nusing the Repository Access Token to leave a comment on a pull request, push a\ncommit, or merge a pull request. The Bitbucket UI and API responses will show\nthe Repository Access Token as a user. This user uses the Repository Access\nToken name and a custom icon to differentiate it from a regular user in the UI.\n\nFor details on creating, managing, and using Repository Access Tokens, visit\n[Repository Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/).\n\n#### Considerations for using Repository Access Tokens\n\n* After creation, a Repository Access Token can't be viewed or modified. The\ntoken's name, created date, last accessed date, and scopes are visible on the\nRepository Access Token page.\n* Repository Access Tokens can only be granted a limited set of Bitbucket's \npermission scopes.\n* Provided you set the correct permission scopes, you can use a Repository Access\nToken to clone (`repository`) and push (`repository:write`) code to the\ntoken's corresponding repository.\n* You can't use a Repository Access Token to log into the Bitbucket website.\n* Repository Access Tokens don't require two-step verification.\n* You can set permission scopes (specific access rights) for each Repository\nAccess Token.\n* You can't use a Repository Access Token to manipulate or query repository\npermissions.\n* Repository Access Tokens will not be listed in any repository or workspace \npermission API response.\n* Repository Access Tokens are deactivated when a repository is transferred or deleted.\n* Any content created by the Repository Access Token will persist after the\nRepository Access Token has been revoked.\n\n#### Available permissions scopes\n\nThe available scopes for Repository Access Tokens are:\n\n- [repository](#repository)\n- [repository:write](#repository-write)\n- [repository:admin](#repository-admin)\n- [repository:delete](#repository-delete)\n- [pullrequest](#pullrequest)\n- [pullrequest:write](#pullrequest-write)\n- [webhook](#webhook)\n- [pipeline](#pipeline)\n- [pipeline:write](#pipeline-write)\n- [pipeline:variable](#pipeline-variable)\n- [runner](#runner)\n- [runner:write](#runner-write)\n\nThere are some APIs which are inaccessible for Repository Access Tokens, these are: \n\n* [Add a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-post)\n* [Update a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-put)\n* [Delete a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-delete)\n\n### App passwords\n\nApp passwords allow users to make API calls to their Bitbucket account through apps such as Sourcetree.\n\nSome important points about app passwords:\n\n* You cannot view an app password or adjust permissions after you create the app password. Because app passwords are encrypted on our database and cannot be viewed by anyone. They are essentially designed to be disposable. If you need to change the scopes or lost the password just create a new one.\n* You cannot use them to log into your Bitbucket account.\n* You cannot use app passwords to manage team actions.\n\n App passwords are tied to an individual account's credentials and should not be shared. If you're sharing your app password you're essentially giving direct, authenticated, access to everything that password has been scoped to do with the Bitbucket API's.\n\n* You can use them for API call authentication, even if you don't have two-step verification enabled.\n* You can set permission scopes (specific access rights) for each app password.\n\n#### Create an app password\n\nTo create an app password:\n\n1. Select **Avatar > Bitbucket settings**.\n2. [Click **App passwords** in the Access management section.](https://bitbucket.org/account/settings/app-passwords/)\n3. Click **Create app password**.\n4. Give the app password a name related to the application that will use the password.\n5. Select the specific access and permissions you want this application password to have.\n6. Copy the generated password and either record or paste it into the application you want to give access. The password is only displayed this one time.\n\nThat's all there is to creating an app password. See your applications documentation for how to apply the app password for a specific application." + "body": "\nThe purpose of this section is to describe how to authenticate when making API calls using the Bitbucket REST API.\n\n-----\n\n* [Basic auth](#basic-auth)\n* [Access Tokens](#access-tokens)\n * [Repository Access Tokens](#repository-access-tokens)\n * [Project Access Tokens](#project-access-tokens)\n * [Workspace Access Tokens](#workspace-access-tokens)\n* [App passwords](#app-passwords)\n* [OAuth 2.0](#oauth-2-0)\n * [Making requests](#making-requests)\n * [Repository cloning](#repository-cloning)\n * [Refresh tokens](#refresh-tokens)\n* [Bitbucket OAuth 2.0 Scopes](#bitbucket-oauth-2-0-scopes)\n* [Forge App Scopes](#forge-app-scopes)\n\n---\n\n### Basic auth\n\nBasic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported).\nNote that Basic Auth is available only with username and [app password](https://bitbucket.org/account/settings/app-passwords/) as credentials.\n\n### Access Tokens\n\nAccess Tokens are passwords (or tokens) that provide access to a _single_ repository, project or workspace.\nThese tokens can authenticate with Bitbucket APIs for scripting, CI/CD tools, Bitbucket Cloud-connected apps,\nand Bitbucket Cloud integrations.\n\nAccess Tokens are linked to a repository, project, or workspace, not a user account.\nThe level of access provided by the token is set when a repository, or workspace admin creates it,\nby setting permission scopes.\n\nThere are three types of Access Token:\n\n* **Repository Access Tokens** can connect to a single repository, preventing them from accessing any other repositories or workspaces.\n* **Project Access Tokens** can connect to a single project, providing access to any repositories within the project.\n* **Workspace Access Tokens** can connect to a single workspace and have access to any projects and repositories within that workspace.\n\nWhen using Bitbucket APIs with an Access Token, the token will be treated as the \"user\" in the\nBitbucket UI and Bitbucket logs. This includes when using the Access Token to leave a comment on a pull request,\npush a commit, or merge a pull request. The Bitbucket UI and API responses will show the\nRepository/Project/Workspace Access Token as a user. The username shown in the Bitbucket UI is the Access\nToken _name_, and a custom icon is used to differentiate it from a regular user in the UI.\n\n#### Considerations for using Access Tokens\n\n* After creation, an Access Token can't be viewed or modified. The token's name, created date,\nlast accessed date, and scopes are visible on the repository, project, or workspace **Access Tokens** page.\n* Access Tokens can access a limited set of Bitbucket's permission scopes.\n* Provided you set the correct permission scopes, you can use an Access Token to clone (`repository`)\nand push (`repository:write`) code to the token's repository or the repositories the token can access.\n* You can't use an Access Token to log into the Bitbucket website.\n* Access Tokens don't require two-step verification.\n* You can set permission scopes (specific access rights) for each Access Token.\n* You can't use an Access Token to manipulate or query repository, project, or workspace permissions.\n* Access Tokens are not listed in any repository or workspace permission API response.\n* Access Tokens are deactivated when deleting the resource tied to it (a repository, project, or workspace).\nRepository Access Tokens are also revoked when transferring the repository to another workspace.\n* Any content created by the Access Token will persist after the Access Token has been revoked.\n* Access Tokens can interact with branch restriction APIs, but the token can't be configured as a user with merge access when using branch restrictions.\n\nThere are some APIs which are inaccessible for Access Tokens, these are:\n\n* [Add a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-post)\n* [Update a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-put)\n* [Delete a repository deploy key](/cloud/bitbucket/rest/api-group-deployments/#api-repositories-workspace-repo-slug-deploy-keys-key-id-delete)\n\n#### Repository Access Tokens\n\nFor details on creating, managing, and using Repository Access Tokens, visit\n[Repository Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/repository-access-tokens/).\n\nThe available scopes for Repository Access Tokens are:\n\n- [`repository`](#repository)\n- [`repository:write`](#repository-write)\n- [`repository:admin`](#repository-admin)\n- [`repository:delete`](#repository-delete)\n- [`pullrequest`](#pullrequest)\n- [`pullrequest:write`](#pullrequest-write)\n- [`webhook`](#webhook)\n- [`pipeline`](#pipeline)\n- [`pipeline:write`](#pipeline-write)\n- [`pipeline:variable`](#pipeline-variable)\n- [`runner`](#runner)\n- [`runner:write`](#runner-write)\n\n#### Project Access Tokens\n\nFor details on creating, managing, and using Project Access Tokens, visit\n[Project Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/project-access-tokens/).\n\nThe available scopes for Project Access Tokens are:\n\n- [`project`](#project)\n- [`repository`](#repository)\n- [`repository:write`](#repository-write)\n- [`repository:admin`](#repository-admin)\n- [`repository:delete`](#repository-delete)\n- [`pullrequest`](#pullrequest)\n- [`pullrequest:write`](#pullrequest-write)\n- [`webhook`](#webhook)\n- [`pipeline`](#pipeline)\n- [`pipeline:write`](#pipeline-write)\n- [`pipeline:variable`](#pipeline-variable)\n- [`runner`](#runner)\n- [`runner:write`](#runner-write)\n\n#### Workspace Access Tokens\n\nFor details on creating, managing, and using Workspace Access Tokens, visit\n[Workspace Access Tokens](https://support.atlassian.com/bitbucket-cloud/docs/workspace-access-tokens/).\n\nThe available scopes for Workspace Access Tokens are:\n\n- [`project`](#project)\n- [`project:admin`](#project-admin)\n- [`repository`](#repository)\n- [`repository:write`](#repository-write)\n- [`repository:admin`](#repository-admin)\n- [`repository:delete`](#repository-delete)\n- [`pullrequest`](#pullrequest)\n- [`pullrequest:write`](#pullrequest-write)\n- [`webhook`](#webhook)\n- [`account`](#account)\n- [`pipeline`](#pipeline)\n- [`pipeline:write`](#pipeline-write)\n- [`pipeline:variable`](#pipeline-variable)\n- [`runner`](#runner)\n- [`runner:write`](#runner-write)\n\n### App passwords\n\nApp passwords allow users to make API calls to their Bitbucket account through apps such as Sourcetree.\n\nSome important points about app passwords:\n\n* You cannot view an app password or adjust permissions after you create the app password. Because app passwords are encrypted on our database and cannot be viewed by anyone. They are essentially designed to be disposable. If you need to change the scopes or lost the password just create a new one.\n* You cannot use them to log into your Bitbucket account.\n* You cannot use app passwords to manage team actions.\n\n App passwords are tied to an individual account's credentials and should not be shared. If you're sharing your app password you're essentially giving direct, authenticated, access to everything that password has been scoped to do with the Bitbucket API's.\n\n* You can use them for API call authentication, even if you don't have two-step verification enabled.\n* You can set permission scopes (specific access rights) for each app password.\n\nFor details on creating, managing, and using App passwords, visit\n[App passwords](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/).\n\n### OAuth 2.0\n\nOur OAuth 2 implementation is merged in with our existing OAuth 1 in\nsuch a way that existing OAuth 1 consumers automatically become\nvalid OAuth 2 clients. The only thing you need to do is edit your\nexisting consumer and configure a callback URL.\n\nOnce that is in place, you'll have the following 2 URLs:\n\n https://bitbucket.org/site/oauth2/authorize\n https://bitbucket.org/site/oauth2/access_token\n\nFor obtaining access/bearer tokens, we support three of RFC-6749's grant\nflows, plus a custom Bitbucket flow for exchanging JWT tokens for access tokens.\nNote that Resource Owner Password Credentials Grant (4.3) is no longer supported.\n\n\n#### 1. Authorization Code Grant (4.1)\n\nThe full-blown 3-LO flow. Request authorization from the end user by\nsending their browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code\n\nThe callback includes the `?code={}` query parameter that you can swap\nfor an access token:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=authorization_code -d code={code}\n\n\n#### 2. Implicit Grant (4.2)\n\nThis flow is useful for browser-based add-ons that operate without server-side backends.\n\nRequest the end user for authorization by directing the browser to:\n\n https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=token\n\nThat will redirect to your preconfigured callback URL with a fragment\ncontaining the access token\n(`#access_token={token}&token_type=bearer`) where your page's js can\npull it out of the URL.\n\n\n#### 3. Client Credentials Grant (4.4)\n\nSomewhat like our existing \"2-LO\" flow for OAuth 1. Obtain an access\ntoken that represents not an end user, but the owner of the\nclient/consumer:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=client_credentials\n\n\n#### 4. Bitbucket Cloud JWT Grant (urn:bitbucket:oauth2:jwt)\n\nIf your Atlassian Connect add-on uses JWT authentication, you can swap a\nJWT for an OAuth access token. The resulting access token represents the\naccount for which the add-on is installed.\n\nMake sure you send the JWT token in the Authorization request header\nusing the \"JWT\" scheme (case sensitive). Note that this custom scheme\nmakes this different from HTTP Basic Auth (and so you cannot use \"curl\n-u\").\n\n $ curl -X POST -H \"Authorization: JWT {jwt_token}\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=urn:bitbucket:oauth2:jwt\n\n\n#### Making Requests\n\nOnce you have an access token, as per RFC-6750, you can use it in a request in any of\nthe following ways (in decreasing order of desirability):\n\n1. Send it in a request header: `Authorization: Bearer {access_token}`\n2. Include it in a (application/x-www-form-urlencoded) POST body as `access_token={access_token}`\n3. Put it in the query string of a non-POST: `?access_token={access_token}`\n\n\n#### Repository Cloning\n\nSince add-ons will not be able to upload their own SSH keys to clone\nwith, access tokens can be used as Basic HTTP Auth credentials to\nclone securely over HTTPS. This is much like GitHub, yet slightly\ndifferent:\n\n $ git clone https://x-token-auth:{access_token}@bitbucket.org/user/repo.git\n\nThe literal string `x-token-auth` as a substitute for username is\nrequired (note the difference with GitHub where the actual token is in\nthe username field).\n\n\n#### Refresh Tokens\n\nOur access tokens expire in one hour. When this happens you'll get 401\nresponses.\n\nMost access tokens grant responses (Implicit and JWT excluded). Therefore, you should include a\nrefresh token that can then be used to generate a new access token,\nwithout the need for end user participation:\n\n $ curl -X POST -u \"client_id:secret\" \\\n https://bitbucket.org/site/oauth2/access_token \\\n -d grant_type=refresh_token -d refresh_token={refresh_token}\n\n\n### Bitbucket OAuth 2.0 scopes\n\nBitbucket's API applies a number of privilege scopes to endpoints. In order to access an endpoint, a request will need to have the necessary scopes.\n\nOAuth 2.0 Scopes are applicable for OAuth 2, Access Tokens, and App passwords auth mechanisms as well as Bitbucket Connect apps.\n\nScopes are declared in the descriptor as a list of strings, with each string being the name of a unique scope.\n\nA descriptor lacking the `scopes` element is implicitly assumed to require all scopes and as a result, Bitbucket will require end users authorizing/installing the add-on\nto explicitly accept all scopes.\n\nOur best practice suggests you add only the scopes your add-on needs, but no more than it needs.\n\nInvalid scope strings will cause the descriptor to be rejected and the installation to fail.\n\nThe available scopes are:\n\n- [project](#project)\n- [project:write](#project-write)\n- [project:admin](#project-admin)\n- [repository](#repository)\n- [repository:write](#repository-write)\n- [repository:admin](#repository-admin)\n- [repository:delete](#repository-delete)\n- [pullrequest](#pullrequest)\n- [pullrequest:write](#pullrequest-write)\n- [issue](#issue)\n- [issue:write](#issue-write)\n- [wiki](#wiki)\n- [webhook](#webhook)\n- [snippet](#snippet)\n- [snippet:write](#snippet-write)\n- [email](#email)\n- [account](#account)\n- [account:write](#account-write)\n- [pipeline](#pipeline)\n- [pipeline:write](#pipeline-write)\n- [pipeline:variable](#pipeline-variable)\n- [runner](#runner)\n- [runner:write](#runner-write)\n\n#### project\n\nProvides access to view the project or projects.\nThis scope implies the [`repository`](#repository) scope, giving read access to all the repositories in a project or projects.\n\n#### project:write\n\nThis scope is deprecated, and has been made obsolete by `project:admin`. Please see the deprecation notice [here](/cloud/bitbucket/deprecation-notice-project-write-scope).\n\n#### project:admin\n\nProvides admin access to a project or projects. No distinction is made between public and private projects. This scope doesn't implicitly grant the [`project`](#project) scope or the [`repository:write`](#repository-write) scope on any repositories under the project. It gives access to the admin features of a project only, not direct access to its repositories' contents.\n\n* ability to create the project\n* ability to update the project\n* ability to delete the project\n\n#### repository\n\nProvides read access to a repository or repositories.\nNote that this scope does not give access to a repository's pull requests.\n\n* access to the repo's source code\n* clone over HTTPS\n* access the file browsing API\n* download zip archives of the repo's contents\n* the ability to view and use the issue tracker on any repo (created issues, comment, vote, etc)\n* the ability to view and use the wiki on any repo (create/edit pages)\n\n#### repository:write\n\nProvides write (not admin) access to a repository or repositories. No distinction is made between public and private repositories. This scope implicitly grants the [`repository`](#repository) scope, which does not need to be requested separately.\nThis scope alone does not give access to the pull requests API.\n\n* push access over HTTPS\n* fork repos\n\n#### repository:admin\n\nProvides admin access to a repository or repositories. No distinction is made between public and private repositories. This scope doesn't implicitly grant the [`repository`](#repository) or the [`repository:write`](#repository-write) scopes. It gives access to the admin features of a repo only, not direct access to its contents. This scope can be used or misused to grant read access to other users, who can then clone the repo, but users that need to read and write source code would also request explicit read or write.\nThis scope comes with access to the following functionality:\n\n* View and manipulate committer mappings\n* List and edit deploy keys\n* Ability to delete the repo\n* View and edit repo permissions\n* View and edit branch permissions\n* Import and export the issue tracker\n* Enable and disable the issue tracker\n* List and edit issue tracker version, milestones and components\n* Enable and disable the wiki\n* List and edit default reviewers\n* List and edit repo links (Jira/Bamboo/Custom)\n* List and edit the repository webhooks\n* Initiate a repo ownership transfer\n\n#### repository:delete\n\nProvides access to delete a repository or repositories.\n\n#### pullrequest\n\nProvides read access to pull requests.\nThis scope implies the [`repository`](#repository) scope, giving read access to the pull request's destination repository.\n\n* see and list pull requests\n* create and resolve tasks\n* comment on pull requests\n\n#### pullrequest:write\n\nImplicitly grants the [`pullrequest`](#pullrequest) scope and adds the ability to create, merge and decline pull requests.\nThis scope also implicitly grants the [`repository:write`](#repository-write) scope, giving write access to the pull request's destination repository. This is necessary to allow merging.\n\n* merge pull requests\n* decline pull requests\n* create pull requests\n* approve pull requests\n\n#### issue\n\nAbility to interact with issue trackers the way non-repo members can.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* view, list and search issues\n* create new issues\n* comment on issues\n* watch issues\n* vote for issues\n\n#### issue:write\n\nThis scope implicitly grants the [`issue`](#issue) scope and adds the ability to transition and delete issues.\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* transition issues\n* delete issues\n\n#### wiki\n\nProvides access to wikis. This scope provides both read and write access (wikis are always editable by anyone with access to them).\nThis scope doesn't implicitly grant any other scopes and doesn't give implicit access to the repository.\n\n* view wikis\n* create pages\n* edit pages\n* push to wikis\n* clone wikis\n\n#### webhook\n\nGives access to webhooks. This scope is required for any webhook-related operation.\n\nThis scope gives read access to existing webhook subscriptions on all\nresources the authorization mechanism can access, without needing further scopes.\nFor example:\n\n- A client can list all existing webhook subscriptions on a repository. The [`repository`](#repository) scope is not required.\n- Existing webhook subscriptions for the issue tracker on a repo can be retrieved without the [`issue`](#issue) scope. All that is required is the `webhook` scope.\n\nTo create webhooks, the client will need read access to the resource. Such as: for [`issue:created`](#issue-created), the client will need to\nhave both the `webhook` and the [`issue`](#issue) scope.\n\n* list webhook subscriptions on any accessible repository, user, team, or snippet\n* create/update/delete webhook subscriptions.\n\n#### snippet\n\nProvides read access to snippets.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\n\n* view any snippet\n* create snippet comments\n\n#### snippet:write\n\nProvides write access to snippets.\nNo distinction is made between public and private snippets (public snippets are accessible without any form of authentication).\nThis scope implicitly grants the [`snippet`](#snippet) scope which does not need to be requested separately.\n\n* create snippets\n* edit snippets\n* delete snippets\n\n#### email\n\nAbility to see the user's primary email address. This should make it easier to use Bitbucket Cloud as a login provider for apps or external applications.\n\n#### account\n\nWhen used for:\n* **user-related APIs** — Gives read-only access to the user's account information.\nNote that this doesn't include any ability to change any of the data. This scope allows you to view the user's:\n * email addresses\n * language\n * location\n * website\n * full name\n * SSH keys\n * user groups\n* **workspace-related APIs** — Grants access to view the workspace's:\n * users\n * user permissions\n * projects\n\n#### account:write\n\nAbility to change properties on the user's account.\n\n* delete the authorizing user's account\n* manage the user's groups\n* change a user's email addresses\n* change username, display name and avatar\n\n#### pipeline\n\nGives read-only access to pipelines, steps, deployment environments and variables.\n\n#### pipeline:write\n\nGives write access to pipelines. This scope allows a user to:\n* Stop pipelines\n* Rerun failed pipelines\n* Resume halted pipelines\n* Trigger manual pipelines.\n\nThis scope is not needed to trigger a build using a push. Performing a `git push` (or equivalent actions) will trigger the build. The token doing the push only needs the [`repository:write`](#repository-write) scope.\n\nThis doesn't give write access to create variables.\n\n#### pipeline:variable\n\nGives write access to create variables in pipelines at the various levels:\n* Workspace\n* Repository\n* Deployment\n\n#### runner\n\nGives read-only access to pipelines runners setup against a workspace or repository.\n\n#### runner:write\n\nGives write access to create/edit/disable/delete pipelines runners setup against a workspace or repository.\n### Forge app scopes\n\nIn order for a Forge app integration to access Bitbucket API endpoints, it needs to include certain privilege scopes in the app manifest. These are different from Bitbucket OAuth 2.0 scopes.\n\nUnlike OAuth 2.0 scopes, Forge app scopes do not implicitly grant other scopes, for example, `write:repository:bitbucket` does not implicitly grant `read:repository:bitbucket`.\n\nOnly a subset of Bitbucket API endpoints are currently available for Forge app integrations. These will be labeled with Forge app scopes.\n\nOur best practice suggests you only add the scopes your app needs, but no more than it needs.\n\nThe available scopes are:\n\n- [`read:repository:bitbucket`](#read-repository-bitbucket)\n- [`write:repository:bitbucket`](#write-repository-bitbucket)\n- [`admin:repository:bitbucket`](#admin-repository-bitbucket)\n- [`delete:repository:bitbucket`](#delete-repository-bitbucket)\n- [`read:pullrequest:bitbucket`](#read-pullrequest-bitbucket)\n- [`write:pullrequest:bitbucket`](#write-pullrequest-bitbucket)\n- [`read:project:bitbucket`](#read-project-bitbucket)\n- [`admin:project:bitbucket`](#admin-project-bitbucket)\n- [`read:workspace:bitbucket`](#read-workspace-bitbucket)\n- [`read:user:bitbucket`](#read-user-bitbucket)\n- [`read:pipeline:bitbucket`](#read-pipeline-bitbucket)\n- [`write:pipeline:bitbucket`](#write-pipeline-bitbucket)\n- [`admin:pipeline:bitbucket`](#admin-pipeline-bitbucket)\n- [`read:runner:bitbucket`](#read-runner-bitbucket)\n- [`write:runner:bitbucket`](#write-runner-bitbucket)\n\n#### read:repository:bitbucket\n\nAllows viewing of repository data. Note that this scope does not give access to a repository's pull requests.\n* access to the repository's source code\n* access the file browsing API\n* access to certain repository configurations such as branching model, default reviewers, etc.\n\n#### write:repository:bitbucket\n\nAllows modification of repository data. No distinction is made between public and private repositories. This scope does not imply the `read:repository:bitbucket` scope, so you need to request that separately if required. This scope alone does not give access to the pull request API.\n* update/delete source, branches, tags, etc.\n* fork repositories\n\n#### admin:repository:bitbucket\n\nAllows admin activities on repositories. No distinction is made between public and private repositories. This scope does not implicitly grant the `read:repository:bitbucket` or the `write:repository:bitbucket` scopes. It gives access to the admin features of a repository only, not direct access to its contents. This scope does not allow modification of repository permissions. This scope comes with access to the following functionality:\n* create repository\n* view repository permissions\n* view and edit branch restrictions\n* edit branching model settings\n* edit default reviewers\n* view and edit inheritance state for repository settings\n\n#### delete:repository:bitbucket\nAllows deletion of repositories.\n\n#### read:pullrequest:bitbucket\nAllows viewing of pull requests, plus the ability to comment on pull requests.\n\nThis scope does not imply the `read:repository:bitbucket` scope. With this scope, you could retrieve some data specific to the source/destination repositories of a pull request using pull request endpoints, but it does not give access to repository API endpoints.\n\n#### write:pullrequest:bitbucket\nAllows the ability to create, update, approve, decline, and merge pull requests.\n\nThis scope does not imply the `write:repository:bitbucket` scope.\n\n#### read:project:bitbucket\nAllows viewing of project and project permission data.\n\n#### admin:project:bitbucket\nAllows the ability to create, update, and delete project. No distinction is made between public and private projects.\n\nThis scope does not implicitly grant the `read:project:bitbucket` scope or any repository scopes. It gives access to the admin features of a project only, not direct access to its repositories' contents.\n\n#### read:workspace:bitbucket\nAllows viewing of workspace and workspace permission data.\n\n#### read:user:bitbucket\nAllows viewing of user data. This scope is typically required for permission related endpoints.\n\n#### read:pipeline:bitbucket\nAllows read access to all pipeline information (pipelines, steps, caches, artifacts, logs, tests, code-insights).\n\n#### write:pipeline:bitbucket\nAllows running pipelines (i.e., start/stop/create pipeline) and uploading tests/code-insights.\n\nThis scope does not imply the `read:pipeline:bitbucket` scope.\n\n#### admin:pipeline:bitbucket\nAllows admin activities, such as creating pipeline variables.\n\nThis scope does not implicitly grant the `read:pipeline:bitbucket` or the `write:pipeline:bitbucket` scopes.\n\n#### read:runner:bitbucket\nAllows viewing of runners information.\n\n#### write:runner:bitbucket\nAllows runners management.\n\nThis scope does not imply the `read:runners:bitbucket` scope.\n" }, { "anchor": "filtering", @@ -19048,6 +24446,17 @@ ], "components": { "requestBodies": { + "bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema" + } + } + }, + "description": "The permission to grant", + "required": true + }, "application_property": { "content": { "application/json": { @@ -19081,6 +24490,17 @@ "description": "The new snippet object.", "required": true }, + "bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema" + } + } + }, + "description": "The permission to grant", + "required": true + }, "pipeline_variable2": { "content": { "application/json": { @@ -19132,13 +24552,13 @@ "pipeline:variable": "Access your repositories' build pipelines and configure their variables", "runner": "Access your workspaces/repositories' runners", "runner:write": "Access and edit your workspaces/repositories' runners", - "issue": "Read your repositories' issues", - "issue:write": "Read and modify your repositories' issues", "pullrequest": "Read your repositories and their pull requests", "pullrequest:write": "Read and modify your repositories and their pull requests", + "webhook": "Read and modify your repositories' webhooks", + "issue": "Read your repositories' issues", + "issue:write": "Read and modify your repositories' issues", "snippet": "Read your snippets", "snippet:write": "Read and modify your snippets", - "webhook": "Read and modify your repositories' webhooks", "wiki": "Read and modify your repositories' wikis" } } @@ -19152,6 +24572,128 @@ } }, "schemas": { + "A_pull_request_task": { + "allOf": [ + { + "$ref": "#/components/schemas/task" + }, + { + "type": "object", + "properties": { + "links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "title": "Pull Request Task", + "description": "A pull request task." + }, + "A_pullrequest_comment_task": { + "allOf": [ + { + "$ref": "#/components/schemas/A_pull_request_task" + }, + { + "type": "object", + "properties": { + "comment": { + "$ref": "#/components/schemas/comment" + } + }, + "additionalProperties": false + } + ], + "title": "Pull Request Comment Task", + "description": "A pullrequest comment task" + }, + "A_pullrequest_task_create": { + "type": "object", + "title": "Pull Request Task Create", + "description": "A pullrequest task create", + "properties": { + "comment": { + "$ref": "#/components/schemas/comment" + }, + "content": { + "type": "object", + "title": "Task Raw Content", + "description": "task raw content", + "properties": { + "raw": { + "type": "string", + "description": "The task contents" + } + }, + "required": ["raw"], + "additionalProperties": false + }, + "pending": { + "type": "boolean" + } + }, + "required": ["content"], + "additionalProperties": false + }, + "A_pullrequest_task_update": { + "type": "object", + "title": "Pull Request Task Update", + "description": "A pullrequest task update", + "properties": { + "content": { + "type": "object", + "title": "Task Raw Content", + "description": "task raw content", + "properties": { + "raw": { + "type": "string", + "description": "The task contents" + } + }, + "required": ["raw"], + "additionalProperties": false + }, + "state": { + "type": "string", + "enum": ["RESOLVED", "UNRESOLVED"] + } + }, + "additionalProperties": false + }, "account": { "allOf": [ { @@ -19314,6 +24856,28 @@ "title": "Base Commit", "description": "The common base type for both repository and snippet commits." }, + "bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": ["read", "write", "create-repo", "admin"] + } + }, + "required": ["permission"], + "additionalProperties": false + }, + "bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema": { + "type": "object", + "properties": { + "permission": { + "type": "string", + "enum": ["read", "write", "admin"] + } + }, + "required": ["permission"], + "additionalProperties": false + }, "branch": { "allOf": [ { @@ -19672,6 +25236,26 @@ "title": "Comment", "description": "The base type for all comments. This type should be considered abstract. Each of the \"commentable\" resources defines its own subtypes (e.g. `issue_comment`)." }, + "comment_resolution": { + "type": "object", + "title": "Comment Resolution", + "description": "The resolution object for a Comment.", + "properties": { + "created_on": { + "type": "string", + "description": "The ISO8601 timestamp the resolution was created.", + "format": "date-time" + }, + "type": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/account" + } + }, + "required": ["type"], + "additionalProperties": true + }, "commit": { "allOf": [ { @@ -19809,7 +25393,7 @@ "state": { "type": "string", "description": "Provides some indication of the status of this commit", - "enum": ["INPROGRESS", "STOPPED", "FAILED", "SUCCESSFUL"] + "enum": ["STOPPED", "INPROGRESS", "FAILED", "SUCCESSFUL"] }, "updated_on": { "type": "string", @@ -20675,31 +26259,33 @@ "type": "string", "description": "The event identifier.", "enum": [ - "issue:created", - "repo:commit_status_updated", - "pullrequest:comment_created", - "pullrequest:created", + "issue:comment_created", + "repo:push", + "repo:transfer", + "pullrequest:changes_request_removed", + "pullrequest:comment_updated", "pullrequest:unapproved", - "repo:commit_status_created", + "pullrequest:comment_created", "repo:created", "pullrequest:changes_request_created", - "pullrequest:comment_updated", - "pullrequest:changes_request_removed", - "pullrequest:comment_deleted", "repo:imported", - "repo:commit_comment_created", + "repo:fork", "project:updated", - "repo:updated", + "issue:created", + "repo:deleted", "issue:updated", + "pullrequest:comment_reopened", + "pullrequest:updated", + "repo:commit_comment_created", + "pullrequest:created", + "pullrequest:approved", "pullrequest:rejected", "pullrequest:fulfilled", - "issue:comment_created", - "repo:fork", - "pullrequest:updated", - "repo:push", - "pullrequest:approved", - "repo:deleted", - "repo:transfer" + "pullrequest:comment_resolved", + "repo:commit_status_updated", + "repo:updated", + "pullrequest:comment_deleted", + "repo:commit_status_created" ] }, "label": { @@ -20869,6 +26455,7 @@ "state": { "type": "string", "enum": [ + "submitted", "new", "open", "resolved", @@ -21988,6 +27575,52 @@ } ] }, + "paginated_project_group_permissions": { + "title": "Paginated Project Group Permissions", + "description": "A paginated list of project group permissions.", + "allOf": [ + { + "$ref": "#/components/schemas/paginated" + }, + { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/project_group_permission" + }, + "minItems": 0, + "uniqueItems": true, + "description": "The values of the current page." + } + } + } + ] + }, + "paginated_project_user_permissions": { + "title": "Paginated Project User Permissions", + "description": "A paginated list of project user permissions.", + "allOf": [ + { + "$ref": "#/components/schemas/paginated" + }, + { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/project_user_permission" + }, + "minItems": 0, + "uniqueItems": true, + "description": "The values of the current page." + } + } + } + ] + }, "paginated_projects": { "title": "Paginated Projects", "description": "A paginated list of projects", @@ -22308,6 +27941,29 @@ } ] }, + "paginated_tasks": { + "title": "Paginated Tasks", + "description": "A paginated list of tasks.", + "allOf": [ + { + "$ref": "#/components/schemas/paginated" + }, + { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/A_pullrequest_comment_task" + }, + "minItems": 0, + "uniqueItems": true, + "description": "The values of the current page." + } + } + } + ] + }, "paginated_treeentries": { "title": "Paginated Tree Entry", "description": "A paginated list of commit_file and/or commit_directory objects.", @@ -22502,6 +28158,14 @@ "uuid": { "type": "string", "description": "The UUID identifying the pipeline." + }, + "variables": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_variable" + }, + "description": "The variables for the pipeline." } } } @@ -22546,6 +28210,10 @@ "type": "integer", "description": "The size of the file containing the archive of the cache." }, + "key_hash": { + "type": "string", + "description": "The key hash of the cache version." + }, "name": { "type": "string", "description": "The name of the cache." @@ -22738,17 +28406,14 @@ }, "cron_pattern": { "type": "string", - "description": "The cron expression that the schedule applies." + "description": "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day." }, "enabled": { "type": "boolean", "description": "Whether the schedule is enabled." }, - "selector": { - "$ref": "#/components/schemas/pipeline_selector" - }, "target": { - "$ref": "#/components/schemas/pipeline_target" + "$ref": "#/components/schemas/pipeline_ref_target" }, "updated_on": { "type": "string", @@ -22813,6 +28478,66 @@ } ] }, + "pipeline_schedule_post_request_body": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "properties": { + "cron_pattern": { + "type": "string", + "description": "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day." + }, + "enabled": { + "type": "boolean", + "description": "Whether the schedule is enabled." + }, + "target": { + "type": "object", + "description": "The target on which the schedule will be executed.", + "properties": { + "ref_name": { + "type": "string", + "description": "The name of the reference." + }, + "ref_type": { + "type": "string", + "description": "The type of reference (branch only).", + "enum": ["branch"] + }, + "selector": { + "$ref": "#/components/schemas/pipeline_selector" + } + }, + "required": ["selector", "ref_name", "ref_type"] + } + }, + "required": ["target", "cron_pattern"] + } + ], + "title": "Request body for Pipeline Schedule POST request" + }, + "pipeline_schedule_put_request_body": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the schedule is enabled." + } + } + } + ], + "title": "Request body for Pipeline Schedule PUT request" + }, "pipeline_selector": { "title": "Pipeline Selector", "description": "A representation of the selector that was used to identify the pipeline in the YML file.", @@ -23785,6 +29510,92 @@ "title": "Project Deploy Key", "description": "Represents deploy key for a project." }, + "project_group_permission": { + "type": "object", + "title": "Project Group Permission", + "description": "A group's permission for a given project.", + "properties": { + "group": { + "$ref": "#/components/schemas/group" + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "permission": { + "type": "string", + "enum": ["read", "write", "create-repo", "admin", "none"] + }, + "project": { + "$ref": "#/components/schemas/project" + }, + "type": { + "type": "string" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "project_user_permission": { + "type": "object", + "title": "Project User Permission", + "description": "A user's direct permission for a given project.", + "properties": { + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "permission": { + "type": "string", + "enum": ["read", "write", "create-repo", "admin", "none"] + }, + "project": { + "$ref": "#/components/schemas/project" + }, + "type": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/user" + } + }, + "required": ["type"], + "additionalProperties": true + }, "pullrequest": { "allOf": [ { @@ -24126,8 +29937,14 @@ { "type": "object", "properties": { + "pending": { + "type": "boolean" + }, "pullrequest": { "$ref": "#/components/schemas/pullrequest" + }, + "resolution": { + "$ref": "#/components/schemas/comment_resolution" } }, "additionalProperties": true @@ -24478,10 +30295,12 @@ "description": "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs." }, "has_issues": { - "type": "boolean" + "type": "boolean", + "description": "\nThe issue tracker for this repository is enabled. Issue Tracker\nfeatures are not supported for repositories in workspaces\nadministered through admin.atlassian.com.\n" }, "has_wiki": { - "type": "boolean" + "type": "boolean", + "description": "\nThe wiki for this repository is enabled. Wiki\nfeatures are not supported for repositories in workspaces\nadministered through admin.atlassian.com.\n" }, "is_private": { "type": "boolean" @@ -25245,6 +31064,63 @@ "title": "Tag", "description": "A tag object, representing a tag in a repository." }, + "task": { + "type": "object", + "title": "Task", + "description": "A task object.", + "properties": { + "content": { + "type": "object", + "properties": { + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + } + }, + "additionalProperties": false + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "creator": { + "$ref": "#/components/schemas/account" + }, + "id": { + "type": "integer" + }, + "pending": { + "type": "boolean" + }, + "resolved_by": { + "$ref": "#/components/schemas/account" + }, + "resolved_on": { + "type": "string", + "description": "The ISO8601 timestamp for when the task was resolved.", + "format": "date-time" + }, + "state": { + "type": "string", + "enum": ["RESOLVED", "UNRESOLVED"] + }, + "updated_on": { + "type": "string", + "format": "date-time" + } + }, + "required": ["created_on", "updated_on", "state", "content", "creator"], + "additionalProperties": false + }, "team": { "allOf": [ { @@ -25442,36 +31318,48 @@ "items": { "type": "string", "enum": [ - "issue:created", - "repo:commit_status_updated", - "pullrequest:comment_created", - "pullrequest:created", + "issue:comment_created", + "repo:push", + "repo:transfer", + "pullrequest:changes_request_removed", + "pullrequest:comment_updated", "pullrequest:unapproved", - "repo:commit_status_created", + "pullrequest:comment_created", "repo:created", "pullrequest:changes_request_created", - "pullrequest:comment_updated", - "pullrequest:changes_request_removed", - "pullrequest:comment_deleted", "repo:imported", - "repo:commit_comment_created", + "repo:fork", "project:updated", - "repo:updated", + "issue:created", + "repo:deleted", "issue:updated", + "pullrequest:comment_reopened", + "pullrequest:updated", + "repo:commit_comment_created", + "pullrequest:created", + "pullrequest:approved", "pullrequest:rejected", "pullrequest:fulfilled", - "issue:comment_created", - "repo:fork", - "pullrequest:updated", - "repo:push", - "pullrequest:approved", - "repo:deleted", - "repo:transfer" + "pullrequest:comment_resolved", + "repo:commit_status_updated", + "repo:updated", + "pullrequest:comment_deleted", + "repo:commit_status_created" ] }, "minItems": 1, "uniqueItems": true }, + "secret": { + "type": "string", + "description": "The secret to associate with the hook. The secret is never returned via the API. As such, this field is only used during updates. The secret can be set to `null` or \"\" to remove the secret (or create a hook with no secret). Leaving out the secret field during updates will leave the secret unchanged. Leaving out the secret during creation will create a hook with no secret.", + "minLength": 0, + "maxLength": 128 + }, + "secret_set": { + "type": "boolean", + "description": "Indicates whether or not the hook has an associated secret. It is not possible to see the hook's secret. This field is ignored during updates." + }, "subject": { "$ref": "#/components/schemas/object" }, diff --git a/plugins/bitbucket-cloud-common/src/models/index.ts b/plugins/bitbucket-cloud-common/src/models/index.ts index d868e2926c..8fce389a32 100644 --- a/plugins/bitbucket-cloud-common/src/models/index.ts +++ b/plugins/bitbucket-cloud-common/src/models/index.ts @@ -373,7 +373,19 @@ export namespace Models { * The concatenation of the repository owner's username and the slugified name, e.g. "evzijst/interruptingcow". This is the same string used in Bitbucket URLs. */ full_name?: string; + /** + * + * The issue tracker for this repository is enabled. Issue Tracker + * features are not supported for repositories in workspaces + * administered through admin.atlassian.com. + */ has_issues?: boolean; + /** + * + * The wiki for this repository is enabled. Wiki + * features are not supported for repositories in workspaces + * administered through admin.atlassian.com. + */ has_wiki?: boolean; is_private?: boolean; language?: string;