diff --git a/.env b/.env new file mode 100644 index 0000000..bef9c44 --- /dev/null +++ b/.env @@ -0,0 +1,6 @@ +BITBUCKET_CLOUD_URL=https://api.bitbucket.org/2.0 +BITBUCKET_CLOUD_USERNAME= +BITBUCKET_CLOUD_APP_PASSWORD= + +BITBUCKET_SERVER_URL= +BITBUCKET_SERVER_TOKEN= diff --git a/.github/workflows/node.js.yaml b/.github/workflows/node.js.yaml index 517fe4e..52833fe 100644 --- a/.github/workflows/node.js.yaml +++ b/.github/workflows/node.js.yaml @@ -23,3 +23,8 @@ jobs: - run: pnpm run build --noEmit - run: pnpm run lint - run: pnpm run test run + env: + BITBUCKET_CLOUD_USERNAME: ${{ secrets.BITBUCKET_CLOUD_USERNAME }} + BITBUCKET_CLOUD_APP_PASSWORD: ${{ secrets.BITBUCKET_CLOUD_APP_PASSWORD }} + BITBUCKET_SERVER_URL: ${{ secrets.BITBUCKET_SERVER_URL }} + BITBUCKET_SERVER_TOKEN: ${{ secrets.BITBUCKET_SERVER_TOKEN }} diff --git a/.markdownlint.yaml b/.markdownlint.yaml index 2125b7d..532f3e3 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -1,3 +1,6 @@ default: true line-length: false no-inline-html: false +no-hard-tabs: + code_blocks: false + spaces_per_tab: 2 diff --git a/README.md b/README.md index dfae8a5..03ecd58 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,49 @@ [![Node.js CI](https://github.com/coderabbitai/bitbucket/actions/workflows/node.js.yaml/badge.svg)](https://github.com/coderabbitai/bitbucket/actions/workflows/node.js.yaml) [![Dependabot Updates](https://github.com/coderabbitai/bitbucket/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/coderabbitai/bitbucket/actions/workflows/dependabot/dependabot-updates) [![GitHub Pages](https://github.com/coderabbitai/bitbucket/actions/workflows/github-pages.yaml/badge.svg)](https://github.com/coderabbitai/bitbucket/actions/workflows/github-pages.yaml) CodeRabbit's TypeScript API client for connecting to Bitbucket Cloud and Bitbucker Data Center. + +- Bitbucket Cloud API docs: +- Bitbucket Data Center API docs: + +This client is auto-generated by [https://github.com/openapi-ts/openapi-typescript](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-typescript) using the OpenAPI schema from the documentation above. + +## Usage + +```sh +pnpm i @coderabbitai/bitbucket +``` + +### Cloud + +```ts +import { createBitbucketCloudClient, toBase64 } from "@coderabbitai/bitbucket" +import { + BITBUCKET_CLOUD_APP_PASSWORD, + BITBUCKET_CLOUD_URL, + BITBUCKET_CLOUD_USERNAME, +} from "./env.js" + +const basic = toBase64( + BITBUCKET_CLOUD_USERNAME + ":" + BITBUCKET_CLOUD_APP_PASSWORD, +) + +export const client = createBitbucketCloudClient({ + baseUrl: BITBUCKET_CLOUD_URL.toString(), + headers: { Accept: "application/json", Authorization: `Basic ${basic}` }, +}) +``` + +### Server + +```ts +import { createBitbucketServerClient } from "@coderabbitai/bitbucket" +import { BITBUCKET_SERVER_TOKEN, BITBUCKET_SERVER_URL } from "./env.js" + +export const server = createBitbucketServerClient({ + baseUrl: BITBUCKET_SERVER_URL, + headers: { + Accept: "application/json", + Authorization: `Bearer ${BITBUCKET_SERVER_TOKEN}`, + }, +}) +``` diff --git a/package.json b/package.json index 408d976..c5877a4 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,14 @@ "lint": "eslint . && markdownlint-cli2 \"**/*.md\" && prettier --check .", "lint:fix": "eslint --fix --quiet .; markdownlint-cli2 \"**/*.md\" --fix; prettier --list-different --write .", "start": "node dist/main.js", - "test": "vitest" + "test": "vitest", + "openapi-typescript": "pnpm run openapi-typescript:cloud && pnpm run openapi-typescript:server", + "preopenapi-typescript:cloud": "curl --output ./src/cloud/openapi/swagger.v3.json https://dac-static.atlassian.com/cloud/bitbucket/swagger.v3.json", + "openapi-typescript:cloud": "openapi-typescript ./src/cloud/openapi/swagger.v3.json --output ./src/cloud/openapi/openapi-typescript.ts --immutable --empty-objects-unknown --alphabetize --root-types", + "postopenapi-typescript:cloud": "ts-autofix ./src/cloud/openapi && pnpm run lint:fix", + "preopenapi-typescript:server": "curl --output ./src/server/openapi/swagger.v3.json https://dac-static.atlassian.com/server/bitbucket/9.1.swagger.v3.json", + "openapi-typescript:server": "openapi-typescript ./src/server/openapi/swagger.v3.json --output ./src/server/openapi/openapi-typescript.ts --immutable --empty-objects-unknown --alphabetize --root-types", + "postopenapi-typescript:server": "ts-autofix ./src/server/openapi && pnpm run lint:fix" }, "devDependencies": { "@eslint/js": "^9.10.0", @@ -46,6 +53,7 @@ "eslint-config-prettier": "^9.1.0", "globals": "^15.9.0", "markdownlint-cli2": "^0.14.0", + "openapi-typescript": "^7.4.0", "prettier": "^3.3.3", "tsx": "^4.19.1", "typedoc": "^0.26.7", @@ -61,5 +69,8 @@ } }, "types": "dist/index.d.ts", - "module": "dist/index.js" + "module": "dist/index.js", + "dependencies": { + "openapi-fetch": "^0.12.0" + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d1fdcf..3c34ea6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,10 @@ settings: importers: .: + dependencies: + openapi-fetch: + specifier: ^0.12.0 + version: 0.12.0 devDependencies: '@eslint/js': specifier: ^9.10.0 @@ -29,6 +33,9 @@ importers: markdownlint-cli2: specifier: ^0.14.0 version: 0.14.0 + openapi-typescript: + specifier: ^7.4.0 + version: 7.4.0(typescript@5.5.4) prettier: specifier: ^3.3.3 version: 3.3.3 @@ -50,6 +57,18 @@ importers: packages: + '@babel/code-frame@7.24.7': + resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.24.7': + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + engines: {node: '>=6.9.0'} + + '@babel/highlight@7.24.7': + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + engines: {node: '>=6.9.0'} + '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -385,6 +404,16 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@redocly/ajv@8.11.2': + resolution: {integrity: sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==} + + '@redocly/config@0.11.0': + resolution: {integrity: sha512-vAc77vCuWsVgLx2LN02P6jqLBhHuot6O1LsSJEAAkWEvXARSGSQVon50QW7jlbCMg9OFTYYYRPN4W6K/YmnM3w==} + + '@redocly/openapi-core@1.25.3': + resolution: {integrity: sha512-dqJkyydgagW3FXX5cjtSUAnabsld4K6yq7RFgQ+ngI1m43PkEoSQt8pp+SfQDszSEoMbc7QKj8afbe7mZw17TA==} + engines: {node: '>=14.19.0', npm: '>=7.0.0'} + '@rollup/rollup-android-arm-eabi@4.21.3': resolution: {integrity: sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==} cpu: [arm] @@ -599,13 +628,25 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + agent-base@7.1.1: + resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} + engines: {node: '>= 14'} + ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -645,10 +686,17 @@ packages: resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} engines: {node: '>=12'} + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + change-case@5.4.4: + resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} + character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} @@ -659,13 +707,22 @@ packages: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + colorette@1.4.0: + resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -717,6 +774,10 @@ packages: engines: {node: '>=18'} hasBin: true + escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -841,6 +902,10 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -854,6 +919,10 @@ packages: html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + https-proxy-agent@7.0.5: + resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} + engines: {node: '>= 14'} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -866,6 +935,10 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} + index-to-position@0.1.2: + resolution: {integrity: sha512-MWDKS3AS1bGCHLBA2VLImJz42f7bJh8wQsTGCzI3j519/CASStoDONUBVz2I/VID0MpiX3SGSnbOD2xUalbE5g==} + engines: {node: '>=18'} + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -885,6 +958,13 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + js-levenshtein@1.1.6: + resolution: {integrity: sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==} + engines: {node: '>=0.10.0'} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true @@ -895,6 +975,9 @@ packages: json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} @@ -915,6 +998,9 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + lodash.isequal@4.5.0: + resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} + lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -985,6 +1071,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -1000,9 +1090,30 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + oniguruma-to-js@0.4.3: resolution: {integrity: sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==} + openapi-fetch@0.12.0: + resolution: {integrity: sha512-D/g5BUGiOAKqivR5s02veJ2+cMHzrkFJKberKP4Z8Vl2VhE6MMirI6wWOgpp8wlsYCRRK7CX0NCGVL/mt6l1fA==} + + openapi-typescript-helpers@0.0.13: + resolution: {integrity: sha512-z44WK2e7ygW3aUtAtiurfEACohf/Qt9g6BsejmIYgEoY4REHeRzgFJmO3ium0libsuzPc145I+8lE9aiiZrQvQ==} + + openapi-typescript@7.4.0: + resolution: {integrity: sha512-u4iVuTGkzKG4rHFUMA/IFXTks9tYVQzkowZsScMOdzJSvIF10qSNySWHTwnN2fD+MEeWFAM8i1f3IUBlgS92eQ==} + hasBin: true + peerDependencies: + typescript: ^5.x + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -1019,6 +1130,10 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + parse-json@8.1.0: + resolution: {integrity: sha512-rum1bPifK5SSar35Z6EKZuYPJx85pkNaFrxBK3mwdfSJ1/WKbYrjoW/zTPSjRRamfmVX1ACBIdFAO0VRErW/EA==} + engines: {node: '>=18'} + path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -1045,6 +1160,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + postcss@8.4.47: resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} @@ -1075,6 +1194,10 @@ packages: regex@4.3.2: resolution: {integrity: sha512-kK/AA3A9K6q2js89+VMymcboLOlF5lZRCYJv3gzszXFHBr6kO6qLGzbm+UIugBEV8SMMKCTR59txoY6ctRHYVw==} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -1141,10 +1264,18 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} + supports-color@9.4.0: + resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} + engines: {node: '>=12'} + text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} @@ -1170,6 +1301,9 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} @@ -1188,6 +1322,10 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} + type-fest@4.26.1: + resolution: {integrity: sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==} + engines: {node: '>=16'} + typedoc@0.26.7: resolution: {integrity: sha512-gUeI/Wk99vjXXMi8kanwzyhmeFEGv1LTdTQsiyIsmSYsBebvFxhbcyAx7Zjo4cMbpLGxM4Uz3jVIjksu/I2v6Q==} engines: {node: '>= 18'} @@ -1234,6 +1372,9 @@ packages: unist-util-visit@5.0.0: resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} + uri-js-replace@1.0.1: + resolution: {integrity: sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==} + uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} @@ -1304,6 +1445,12 @@ packages: jsdom: optional: true + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -1318,11 +1465,18 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + yaml-ast-parser@0.0.43: + resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} + yaml@2.5.1: resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} engines: {node: '>= 14'} hasBin: true + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -1332,6 +1486,20 @@ packages: snapshots: + '@babel/code-frame@7.24.7': + dependencies: + '@babel/highlight': 7.24.7 + picocolors: 1.1.0 + + '@babel/helper-validator-identifier@7.24.7': {} + + '@babel/highlight@7.24.7': + dependencies: + '@babel/helper-validator-identifier': 7.24.7 + chalk: 2.4.2 + js-tokens: 4.0.0 + picocolors: 1.1.0 + '@esbuild/aix-ppc64@0.21.5': optional: true @@ -1483,7 +1651,7 @@ snapshots: '@eslint/config-array@0.18.0': dependencies: '@eslint/object-schema': 2.1.4 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -1491,7 +1659,7 @@ snapshots: '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) espree: 10.1.0 globals: 14.0.0 ignore: 5.3.2 @@ -1528,6 +1696,32 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@redocly/ajv@8.11.2': + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js-replace: 1.0.1 + + '@redocly/config@0.11.0': {} + + '@redocly/openapi-core@1.25.3(supports-color@9.4.0)': + dependencies: + '@redocly/ajv': 8.11.2 + '@redocly/config': 0.11.0 + colorette: 1.4.0 + https-proxy-agent: 7.0.5(supports-color@9.4.0) + js-levenshtein: 1.1.6 + js-yaml: 4.1.0 + lodash.isequal: 4.5.0 + minimatch: 5.1.6 + node-fetch: 2.7.0 + pluralize: 8.0.0 + yaml-ast-parser: 0.0.43 + transitivePeerDependencies: + - encoding + - supports-color + '@rollup/rollup-android-arm-eabi@4.21.3': optional: true @@ -1645,7 +1839,7 @@ snapshots: '@typescript-eslint/types': 8.6.0 '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.5.4) '@typescript-eslint/visitor-keys': 8.6.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) eslint: 9.10.0 optionalDependencies: typescript: 5.5.4 @@ -1661,7 +1855,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.5.4) '@typescript-eslint/utils': 8.6.0(eslint@9.10.0)(typescript@5.5.4) - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) ts-api-utils: 1.3.0(typescript@5.5.4) optionalDependencies: typescript: 5.5.4 @@ -1675,7 +1869,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.6.0 '@typescript-eslint/visitor-keys': 8.6.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 @@ -1750,6 +1944,12 @@ snapshots: acorn@8.12.1: {} + agent-base@7.1.1(supports-color@9.4.0): + dependencies: + debug: 4.3.7(supports-color@9.4.0) + transitivePeerDependencies: + - supports-color + ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 @@ -1757,8 +1957,14 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ansi-colors@4.1.3: {} + ansi-regex@5.0.1: {} + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -1796,23 +2002,39 @@ snapshots: loupe: 3.1.1 pathval: 2.0.0 + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + change-case@5.4.4: {} + character-entities-html4@2.1.0: {} character-entities-legacy@3.0.0: {} check-error@2.1.1: {} + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + color-convert@2.0.1: dependencies: color-name: 1.1.4 + color-name@1.1.3: {} + color-name@1.1.4: {} + colorette@1.4.0: {} + comma-separated-tokens@2.0.3: {} concat-map@0.0.1: {} @@ -1823,9 +2045,11 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - debug@4.3.7: + debug@4.3.7(supports-color@9.4.0): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 9.4.0 deep-eql@5.0.2: {} @@ -1894,6 +2118,8 @@ snapshots: '@esbuild/win32-ia32': 0.23.1 '@esbuild/win32-x64': 0.23.1 + escape-string-regexp@1.0.5: {} + escape-string-regexp@4.0.0: {} eslint-config-prettier@9.1.0(eslint@9.10.0): @@ -1923,7 +2149,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) escape-string-regexp: 4.0.0 eslint-scope: 8.0.2 eslint-visitor-keys: 4.0.0 @@ -2040,6 +2266,8 @@ snapshots: graphemer@1.4.0: {} + has-flag@3.0.0: {} + has-flag@4.0.0: {} hast-util-to-html@9.0.3: @@ -2062,6 +2290,13 @@ snapshots: html-void-elements@3.0.0: {} + https-proxy-agent@7.0.5(supports-color@9.4.0): + dependencies: + agent-base: 7.1.1(supports-color@9.4.0) + debug: 4.3.7(supports-color@9.4.0) + transitivePeerDependencies: + - supports-color + ignore@5.3.2: {} import-fresh@3.3.0: @@ -2071,6 +2306,8 @@ snapshots: imurmurhash@0.1.4: {} + index-to-position@0.1.2: {} + is-extglob@2.1.1: {} is-glob@4.0.3: @@ -2083,6 +2320,10 @@ snapshots: isexe@2.0.0: {} + js-levenshtein@1.1.6: {} + + js-tokens@4.0.0: {} + js-yaml@4.1.0: dependencies: argparse: 2.0.1 @@ -2091,6 +2332,8 @@ snapshots: json-schema-traverse@0.4.1: {} + json-schema-traverse@1.0.0: {} + json-stable-stringify-without-jsonify@1.0.1: {} jsonc-parser@3.3.1: {} @@ -2112,6 +2355,8 @@ snapshots: dependencies: p-locate: 5.0.0 + lodash.isequal@4.5.0: {} + lodash.merge@4.6.2: {} loupe@3.1.1: @@ -2200,6 +2445,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -2210,10 +2459,32 @@ snapshots: natural-compare@1.4.0: {} + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + oniguruma-to-js@0.4.3: dependencies: regex: 4.3.2 + openapi-fetch@0.12.0: + dependencies: + openapi-typescript-helpers: 0.0.13 + + openapi-typescript-helpers@0.0.13: {} + + openapi-typescript@7.4.0(typescript@5.5.4): + dependencies: + '@redocly/openapi-core': 1.25.3(supports-color@9.4.0) + ansi-colors: 4.1.3 + change-case: 5.4.4 + parse-json: 8.1.0 + supports-color: 9.4.0 + typescript: 5.5.4 + yargs-parser: 21.1.1 + transitivePeerDependencies: + - encoding + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -2235,6 +2506,12 @@ snapshots: dependencies: callsites: 3.1.0 + parse-json@8.1.0: + dependencies: + '@babel/code-frame': 7.24.7 + index-to-position: 0.1.2 + type-fest: 4.26.1 + path-exists@4.0.0: {} path-key@3.1.1: {} @@ -2249,6 +2526,8 @@ snapshots: picomatch@2.3.1: {} + pluralize@8.0.0: {} + postcss@8.4.47: dependencies: nanoid: 3.3.7 @@ -2269,6 +2548,8 @@ snapshots: regex@4.3.2: {} + require-from-string@2.0.2: {} + resolve-from@4.0.0: {} resolve-pkg-maps@1.0.0: {} @@ -2341,10 +2622,16 @@ snapshots: strip-json-comments@3.1.1: {} + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + supports-color@7.2.0: dependencies: has-flag: 4.0.0 + supports-color@9.4.0: {} + text-table@0.2.0: {} tinybench@2.9.0: {} @@ -2361,6 +2648,8 @@ snapshots: dependencies: is-number: 7.0.0 + tr46@0.0.3: {} + trim-lines@3.0.1: {} ts-api-utils@1.3.0(typescript@5.5.4): @@ -2378,6 +2667,8 @@ snapshots: dependencies: prelude-ls: 1.2.1 + type-fest@4.26.1: {} + typedoc@0.26.7(typescript@5.5.4): dependencies: lunr: 2.3.9 @@ -2429,6 +2720,8 @@ snapshots: unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 + uri-js-replace@1.0.1: {} + uri-js@4.4.1: dependencies: punycode: 2.3.1 @@ -2446,7 +2739,7 @@ snapshots: vite-node@2.1.1(@types/node@22.5.5): dependencies: cac: 6.7.14 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) pathe: 1.1.2 vite: 5.4.6(@types/node@22.5.5) transitivePeerDependencies: @@ -2479,7 +2772,7 @@ snapshots: '@vitest/spy': 2.1.1 '@vitest/utils': 2.1.1 chai: 5.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@9.4.0) magic-string: 0.30.11 pathe: 1.1.2 std-env: 3.7.0 @@ -2503,6 +2796,13 @@ snapshots: - supports-color - terser + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + which@2.0.2: dependencies: isexe: 2.0.0 @@ -2514,8 +2814,12 @@ snapshots: word-wrap@1.2.5: {} + yaml-ast-parser@0.0.43: {} + yaml@2.5.1: {} + yargs-parser@21.1.1: {} + yocto-queue@0.1.0: {} zwitch@2.0.4: {} diff --git a/src/base64.test.ts b/src/base64.test.ts new file mode 100644 index 0000000..fd91cba --- /dev/null +++ b/src/base64.test.ts @@ -0,0 +1,12 @@ +import { test } from "vitest" +import { fromBase64, toBase64 } from "./base64.js" + +test("toBase64", ({ expect }) => { + const based = toBase64("Copyright © 2024 CodeRabbit") + expect(based).toBe("Q29weXJpZ2h0IMKpIDIwMjQgQ29kZVJhYmJpdA==") +}) + +test("fromBase64", ({ expect }) => { + const debased = fromBase64("Q29weXJpZ2h0IMKpIDIwMjQgQ29kZVJhYmJpdA==") + expect(debased).toBe("Copyright © 2024 CodeRabbit") +}) diff --git a/src/base64.ts b/src/base64.ts new file mode 100644 index 0000000..45b0941 --- /dev/null +++ b/src/base64.ts @@ -0,0 +1,11 @@ +export function toBase64(input: string): string { + const bytes = new TextEncoder().encode(input) + const string = String.fromCodePoint(...bytes) + return btoa(string) +} + +export function fromBase64(base64: string): Buffer | Uint8Array | string { + const string = atob(base64) + const bytes = Uint8Array.from(string, v => v.codePointAt(0) ?? 0) + return new TextDecoder().decode(bytes) +} diff --git a/src/cloud/client.test.ts b/src/cloud/client.test.ts new file mode 100644 index 0000000..8869c8e --- /dev/null +++ b/src/cloud/client.test.ts @@ -0,0 +1,7 @@ +import { test } from "vitest" +import { createBitbucketCloudClient } from "./client.js" + +test("createBitbucketCloudClient", ({ expect }) => { + const client = createBitbucketCloudClient() + expect(client).toBeDefined() +}) diff --git a/src/cloud/client.ts b/src/cloud/client.ts new file mode 100644 index 0000000..60763da --- /dev/null +++ b/src/cloud/client.ts @@ -0,0 +1,16 @@ +import type { Client, ClientOptions } from "openapi-fetch" +import createClient from "openapi-fetch" +import type { paths } from "./openapi/index.js" + +/** + * Creates an `openapi-fetch` client using {@link createClient}. + * + * @example + * export client = createBitbucketCloudClient({ + * baseUrl: "https://api.bitbucket.org/2.0", + * headers: { Accept: "application/json", Authorization: `Basic ${basic}` }, + * }) + */ +export const createBitbucketCloudClient: ( + clientOptions?: ClientOptions, +) => Client = createClient diff --git a/src/cloud/index.ts b/src/cloud/index.ts new file mode 100644 index 0000000..df1f4f2 --- /dev/null +++ b/src/cloud/index.ts @@ -0,0 +1,2 @@ +export * from "./client.js" +export * as cloud from "./openapi/index.js" diff --git a/src/cloud/openapi/index.ts b/src/cloud/openapi/index.ts new file mode 100644 index 0000000..a54af9b --- /dev/null +++ b/src/cloud/openapi/index.ts @@ -0,0 +1 @@ +export * from "./openapi-typescript.js" diff --git a/src/cloud/openapi/openapi-typescript.ts b/src/cloud/openapi/openapi-typescript.ts new file mode 100644 index 0000000..8533bac --- /dev/null +++ b/src/cloud/openapi/openapi-typescript.ts @@ -0,0 +1,26228 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + readonly "/addon": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update an installed app + * @description Updates the application installation for the user. + * + * This endpoint is intended to be used by Bitbucket Connect apps + * and only supports JWT authentication -- that is how Bitbucket + * identifies the particular installation of the app. Developers + * with applications registered in the "Develop Apps" section + * of Bitbucket need not use this endpoint as updates for those + * applications can be sent out via the UI of that section. + * + * Passing an empty body will update the installation using the + * existing descriptor URL. + * + * ``` + * $ curl -X PUT https://api.bitbucket.org/2.0/addon \ + * -H "Authorization: JWT " \ + * --header "Content-Type: application/json" \ + * --data '{}' + * ``` + * + * The new `descriptor` for the installation can be also provided + * in the body directly. + * + * ``` + * $ curl -X PUT https://api.bitbucket.org/2.0/addon \ + * -H "Authorization: JWT " \ + * --header "Content-Type: application/json" \ + * --data '{"descriptor": $NEW_DESCRIPTOR}' + * ``` + * + * In both these modes the URL of the descriptor cannot be changed. To + * change the descriptor location and upgrade an installation + * the request must be made exclusively with a `descriptor_url`. + * + * ``` + * $ curl -X PUT https://api.bitbucket.org/2.0/addon \ + * -H "Authorization: JWT " \ + * --header "Content-Type: application/json" \ + * --data '{"descriptor_url": $NEW_URL}' + * ``` + * + * The `descriptor_url` must exactly match the marketplace registration + * that Atlassian has for the application. Contact your Atlassian + * developer advocate to update this registration. Once the registration + * has been updated you may call this resource for each installation. + * + * Note that the scopes of the application cannot be increased + * in the new descriptor nor reduced to none. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Request has succeeded. The installation has been updated to the new descriptor. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description Scopes have increased or decreased to none. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description No authorization. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Improper authentication. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete an app + * @description Deletes the application for the user. + * + * This endpoint is intended to be used by Bitbucket Connect apps + * and only supports JWT authentication -- that is how Bitbucket + * identifies the particular installation of the app. Developers + * with applications registered in the "Develop Apps" section + * of Bitbucket Marketplace need not use this endpoint as + * updates for those applications can be sent out via the + * UI of that section. + * + * ``` + * $ curl -X DELETE https://api.bitbucket.org/2.0/addon \ + * -H "Authorization: JWT " + * ``` + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Request has succeeded. The application has been deleted for the user. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description No authorization. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Improper authentication. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/addon/linkers": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List linkers for an app + * @description Gets a list of all [linkers](/cloud/bitbucket/modules/linker/) + * for the authenticated application. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description Authentication must use app JWT */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/addon/linkers/{linker_key}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + } + readonly cookie?: never + } + /** + * Get a linker for an app + * @description Gets a [linker](/cloud/bitbucket/modules/linker/) specified by `linker_key` + * for the authenticated application. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description Authentication must use app JWT */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The linker does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/addon/linkers/{linker_key}/values": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + } + readonly cookie?: never + } + /** + * List linker values for a linker + * @description Gets a list of all [linker](/cloud/bitbucket/modules/linker/) values for the + * specified linker of the authenticated application. + * + * A linker value lets applications supply values to modify its regular expression. + * + * The base regular expression must use a Bitbucket-specific match group `(?K)` + * which will be translated to `([\w\-]+)`. A value must match this pattern. + * + * [Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues) + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description Authentication must use app JWT */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The linker does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a linker value + * @description Bulk update [linker](/cloud/bitbucket/modules/linker/) values for the specified + * linker of the authenticated application. + * + * A linker value lets applications supply values to modify its regular expression. + * + * The base regular expression must use a Bitbucket-specific match group `(?K)` + * which will be translated to `([\w\-]+)`. A value must match this pattern. + * + * [Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues) + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successfully updated the linker values. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description Invalid input. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Authentication must use app JWT */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The linker does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Create a linker value + * @description Creates a [linker](/cloud/bitbucket/modules/linker/) value for the specified + * linker of authenticated application. + * + * A linker value lets applications supply values to modify its regular expression. + * + * The base regular expression must use a Bitbucket-specific match group `(?K)` + * which will be translated to `([\w\-]+)`. A value must match this pattern. + * + * [Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues) + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successfully created the linker value. */ + readonly 201: { + headers: Readonly> + content?: never + } + /** @description Authentication must use app JWT */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The linker does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The linker already has the value being added. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Delete all linker values + * @description Delete all [linker](/cloud/bitbucket/modules/linker/) values for the + * specified linker of the authenticated application. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successfully deleted the linker values. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description Authentication must use app JWT */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The linker does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/addon/linkers/{linker_key}/values/{value_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + /** @description The numeric ID of the linker value. */ + readonly value_id: number + } + readonly cookie?: never + } + /** + * Get a linker value + * @description Get a single [linker](/cloud/bitbucket/modules/linker/) value + * of the authenticated application. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + /** @description The numeric ID of the linker value. */ + readonly value_id: number + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description Authentication must use app JWT */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The linker value does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + /** + * Delete a linker value + * @description Delete a single [linker](/cloud/bitbucket/modules/linker/) value + * of the authenticated application. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The unique key of a [linker module](/cloud/bitbucket/modules/linker/) + * as defined in an application descriptor. */ + readonly linker_key: string + /** @description The numeric ID of the linker value. */ + readonly value_id: number + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successfully deleted the linker value. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description Authentication must use app JWT */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The linker value does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/hook_events": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a webhook resource + * @description Returns the webhook resource or subject types on which webhooks can + * be registered. + * + * Each resource/subject type contains an `events` link that returns the + * paginated list of specific events each individual subject type can + * emit. + * + * This endpoint is publicly accessible and does not require + * authentication or scopes. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A mapping of resource/subject types pointing to their individual event types. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["subject_types"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/hook_events/{subject_type}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description A resource or subject type. */ + readonly subject_type: "repository" | "workspace" + } + readonly cookie?: never + } + /** + * List subscribable webhook types + * @description Returns a paginated list of all valid webhook events for the + * specified entity. + * **The team and user webhooks are deprecated, and you should use workspace instead. + * For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).** + * + * This is public data that does not require any scopes or authentication. + * + * NOTE: The example response is a truncated response object for the `workspace` `subject_type`. + * We return the same structure for the other `subject_type` objects. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description A resource or subject type. */ + readonly subject_type: "repository" | "workspace" + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of webhook types available to subscribe on. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_hook_events"] + } + } + /** @description If an invalid `{subject_type}` value was specified. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/pullrequests/{selected_user}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the username of the pull request author, the author's UUID + * surrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + /** + * List pull requests for a user + * @deprecated + * @description Returns all pull requests authored by the specified user. + * + * By default only open pull requests are returned. This can be controlled + * using the `state` query parameter. To retrieve pull requests that are + * in one of multiple states, repeat the `state` parameter for each + * individual state. + * + * This endpoint also supports filtering and sorting of the results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Only return pull requests that are in this state. This parameter can be repeated. */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" | "SUPERSEDED" + } + readonly header?: never + readonly path: { + /** @description This can either be the username of the pull request author, the author's UUID + * surrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All pull requests authored by the specified user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pullrequests"] + } + } + /** @description If the specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List public repositories + * @description Returns a paginated list of all public repositories. + * + * This endpoint also supports filtering and sorting of the results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Filter the results to include only repositories created on or + * after this [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) + * timestamp. Example: `YYYY-MM-DDTHH:mm:ss.sssZ` */ + readonly after?: string + /** @description Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * `role` parameter must also be specified. + * */ + readonly q?: string + /** @description Filters the result based on the authenticated user's role on each repository. + * + * * **member**: returns repositories to which the user has explicit read access + * * **contributor**: returns repositories to which the user has explicit write access + * * **admin**: returns repositories to which the user has explicit administrator access + * * **owner**: returns all repositories owned by the current user + * */ + readonly role?: "admin" | "contributor" | "member" | "owner" + /** @description Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * */ + readonly sort?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All public repositories. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_repositories"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List repositories in a workspace + * @description Returns a paginated list of all repositories owned by the specified + * workspace. + * + * The result can be narrowed down based on the authenticated user's role. + * + * E.g. with `?role=contributor`, only those repositories that the + * authenticated user has write access to are returned (this includes any + * repo the user is an admin on, as that implies write access). + * + * This endpoint also supports filtering and sorting of the results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * */ + readonly q?: string + /** @description + * Filters the result based on the authenticated user's role on each repository. + * + * * **member**: returns repositories to which the user has explicit read access + * * **contributor**: returns repositories to which the user has explicit write access + * * **admin**: returns repositories to which the user has explicit administrator access + * * **owner**: returns all repositories owned by the current user + * */ + readonly role?: "admin" | "contributor" | "member" | "owner" + /** @description + * Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repositories owned by the specified account. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_repositories"] + } + } + /** @description If the specified account does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified account marked as spam. */ + readonly 410: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a repository + * @description Returns the object describing this repository. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["repository"] + } + } + /** @description If the repository is private and the authenticated user does not have access to it. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If no repository exists at this location. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a repository + * @description Since this endpoint can be used to both update and to create a + * repository, the request body depends on the intent. + * + * #### Creation + * + * See the POST documentation for the repository endpoint for an example + * of the request body. + * + * #### Update + * + * Note: Changing the `name` of the repository will cause the location to + * be changed. This is because the URL of the repo is derived from the + * name (a process called slugification). In such a scenario, it is + * possible for the request to fail if the newly created slug conflicts + * with an existing repository's slug. But if there is no conflict, + * the new location will be returned in the `Location` header of the + * response. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The repository that is to be updated. + * + * Note that the elements "owner" and "full_name" are ignored since the + * URL implies them. + * */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["repository"] + } + } + readonly responses: { + /** @description The existing repository has been updated */ + readonly 200: { + headers: { + /** @description The location of the repository. This header is only + * provided when the repository's name is changed. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["repository"] + } + } + /** @description A new repository has been created */ + readonly 201: { + headers: { + /** @description The location of the newly created repository */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["repository"] + } + } + /** @description If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Create a repository + * @description Creates a new repository. + * + * Note: In order to set the project for the newly created repository, + * pass in either the project key or the project UUID as part of the + * request body as shown in the examples below: + * + * ``` + * $ curl -X POST -H "Content-Type: application/json" -d '{ + * "scm": "git", + * "project": { + * "key": "MARS" + * } + * }' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding + * ``` + * + * or + * + * ``` + * $ curl -X POST -H "Content-Type: application/json" -d '{ + * "scm": "git", + * "project": { + * "key": "{ba516952-992a-4c2d-acbd-17d502922f96}" + * } + * }' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding + * ``` + * + * The project must be assigned for all repositories. If the project is not provided, + * the repository is automatically assigned to the oldest project in the workspace. + * + * Note: In the examples above, the workspace ID `teamsinspace`, + * and/or the repository name `hablanding` can be replaced by UUIDs. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The repository that is to be created. Note that most object elements are optional. Elements "owner" and "full_name" are ignored as the URL implies them. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["repository"] + } + } + readonly responses: { + /** @description The newly created repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["repository"] + } + } + /** @description If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Delete a repository + * @description Deletes the repository. This is an irreversible operation. + * + * This does not affect its forks. + */ + readonly delete: { + readonly parameters: { + readonly query?: { + /** @description If a repository has been moved to a new location, use this parameter to + * show users a friendly message in the Bitbucket UI that the repository + * has moved to a new location. However, a GET to this endpoint will still + * return a 404. + * */ + readonly redirect_to?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates successful deletion. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the caller either does not have admin access to the repository, or the repository is set to read-only. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/branch-restrictions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List branch restrictions + * @description Returns a paginated list of all branch restrictions on the + * repository. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Branch restrictions of this type */ + readonly kind?: string + /** @description Branch restrictions applied to branches of this pattern */ + readonly pattern?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of branch restrictions */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_branchrestrictions"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the repository */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a branch restriction rule + * @description Creates a new branch restriction rule for a repository. + * + * `kind` describes what will be restricted. Allowed values include: + * `push`, `force`, `delete`, `restrict_merges`, `require_tasks_to_be_completed`, + * `require_approvals_to_merge`, `require_default_reviewer_approvals_to_merge`, + * `require_no_changes_requested`, `require_passing_builds_to_merge`, `require_commits_behind`, + * `reset_pullrequest_approvals_on_change`, `smart_reset_pullrequest_approvals`, + * `reset_pullrequest_changes_requested_on_change`, `require_all_dependencies_merged`, + * `enforce_merge_checks`, and `allow_auto_merge_when_builds_pass`. + * + * Different kinds of branch restrictions have different requirements: + * + * * `push` and `restrict_merges` require `users` and `groups` to be + * specified. Empty lists are allowed, in which case permission is + * denied for everybody. + * + * The restriction applies to all branches that match. There are + * two ways to match a branch. It is configured in `branch_match_kind`: + * + * 1. `glob`: Matches a branch against the `pattern`. A `'*'` in + * `pattern` will expand to match zero or more characters, and every + * other character matches itself. For example, `'foo*'` will match + * `'foo'` and `'foobar'`, but not `'barfoo'`. `'*'` will match all + * branches. + * 2. `branching_model`: Matches a branch against the repository's + * branching model. The `branch_type` controls the type of branch + * to match. Allowed values include: `production`, `development`, + * `bugfix`, `release`, `feature` and `hotfix`. + * + * The combination of `kind` and match must be unique. This means that + * two `glob` restrictions in a repository cannot have the same `kind` and + * `pattern`. Additionally, two `branching_model` restrictions in a + * repository cannot have the same `kind` and `branch_type`. + * + * `users` and `groups` are lists of users and groups that are except from + * the restriction. They can only be configured in `push` and + * `restrict_merges` restrictions. The `push` restriction stops a user + * pushing to matching branches unless that user is in `users` or is a + * member of a group in `groups`. The `restrict_merges` stops a user + * merging pull requests to matching branches unless that user is in + * `users` or is a member of a group in `groups`. Adding new users or + * groups to an existing restriction should be done via `PUT`. + * + * Note that branch restrictions with overlapping matchers is allowed, + * but the resulting behavior may be surprising. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The new rule */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["branchrestriction"] + } + } + readonly responses: { + /** @description A paginated list of branch restrictions */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branchrestriction"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the repository */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/branch-restrictions/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The restriction rule's id */ + readonly id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a branch restriction rule + * @description Returns a specific branch restriction rule. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The restriction rule's id */ + readonly id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The branch restriction rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branchrestriction"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the repository */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository or branch restriction id does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a branch restriction rule + * @description Updates an existing branch restriction rule. + * + * Fields not present in the request body are ignored. + * + * See [`POST`](/cloud/bitbucket/rest/api-group-branch-restrictions/#api-repositories-workspace-repo-slug-branch-restrictions-post) for details. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The restriction rule's id */ + readonly id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The new version of the existing rule */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["branchrestriction"] + } + } + readonly responses: { + /** @description The updated branch restriction rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branchrestriction"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the repository */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository or branch restriction id does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a branch restriction rule + * @description Deletes an existing branch restriction rule. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The restriction rule's id */ + readonly id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the repository */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository or branch restriction id does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/branching-model": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get the branching model for a repository + * @description Return the branching model as applied to the repository. This view is + * read-only. The branching model settings can be changed using the + * [settings](#api-repositories-workspace-repo-slug-branching-model-settings-get) API. + * + * The returned object: + * + * 1. Always has a `development` property. `development.branch` contains + * the actual repository branch object that is considered to be the + * `development` branch. `development.branch` will not be present + * if it does not exist. + * 2. Might have a `production` property. `production` will not + * be present when `production` is disabled. + * `production.branch` contains the actual branch object that is + * considered to be the `production` branch. `production.branch` will + * not be present if it does not exist. + * 3. Always has a `branch_types` array which contains all enabled branch + * types. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The branching model object */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branching_model"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have read access to the repository */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/branching-model/settings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get the branching model config for a repository + * @description Return the branching model configuration for a repository. The returned + * object: + * + * 1. Always has a `development` property for the development branch. + * 2. Always a `production` property for the production branch. The + * production branch can be disabled. + * 3. The `branch_types` contains all the branch types. + * + * This is the raw configuration for the branching model. A client + * wishing to see the branching model with its actual current branches may + * find the [active model API](/cloud/bitbucket/rest/api-group-branching-model/#api-repositories-workspace-repo-slug-branching-model-get) more useful. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The branching model configuration */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branching_model_settings"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the repository */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update the branching model config for a repository + * @description Update the branching model configuration for a repository. + * + * The `development` branch can be configured to a specific branch or to + * track the main branch. When set to a specific branch it must + * currently exist. Only the passed properties will be updated. The + * properties not passed will be left unchanged. A request without a + * `development` property will leave the development branch unchanged. + * + * It is possible for the `development` branch to be invalid. This + * happens when it points at a specific branch that has been + * deleted. This is indicated in the `is_valid` field for the branch. It is + * not possible to update the settings for `development` if that + * would leave the branch in an invalid state. Such a request will be + * rejected. + * + * The `production` branch can be a specific branch, the main + * branch or disabled. When set to a specific branch it must currently + * exist. The `enabled` property can be used to enable (`true`) or + * disable (`false`) it. Only the passed properties will be updated. The + * properties not passed will be left unchanged. A request without a + * `production` property will leave the production branch unchanged. + * + * It is possible for the `production` branch to be invalid. This + * happens when it points at a specific branch that has been + * deleted. This is indicated in the `is_valid` field for the branch. A + * request that would leave `production` enabled and invalid will be + * rejected. It is possible to update `production` and make it invalid if + * it would also be left disabled. + * + * The `branch_types` property contains the branch types to be updated. + * Only the branch types passed will be updated. All updates will be + * rejected if it would leave the branching model in an invalid state. + * For branch types this means that: + * + * 1. The prefixes for all enabled branch types are valid. For example, + * it is not possible to use '*' inside a Git prefix. + * 2. A prefix of an enabled branch type must not be a prefix of another + * enabled branch type. This is to ensure that a branch can be easily + * classified by its prefix unambiguously. + * + * It is possible to store an invalid prefix if that branch type would be + * left disabled. Only the passed properties will be updated. The + * properties not passed will be left unchanged. Each branch type must + * have a `kind` property to identify it. + * + * There is currently a side effect when using this API endpoint. If the + * repository is inheriting branching model settings from its project, + * updating the branching model for this repository will disable the + * project setting inheritance. + * + * + * We have deprecated this side effect and will remove it on 1 August 2022. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The updated branching model configuration */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branching_model_settings"] + } + } + /** @description If the request contains invalid branching model configuration */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the repository */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a commit + * @description Returns the specified commit. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The commit object */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["commit"] + } + } + /** @description If the specified commit or repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/approve": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Approve a commit + * @description Approve the specified commit as the authenticated user. + * + * This operation is only available to users that have explicit access to + * the repository. In contrast, just the fact that a repository is + * publicly accessible to users does not give them the ability to approve + * commits. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The `participant` object recording that the authenticated user approved the commit. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["participant"] + } + } + /** @description If the specified commit, or the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Unapprove a commit + * @description Redact the authenticated user's approval of the specified commit. + * + * This operation is only available to users that have explicit access to + * the repository. In contrast, just the fact that a repository is + * publicly accessible to users does not give them the ability to approve + * commits. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating the authenticated user's approval has been withdrawn. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the specified commit, or the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List a commit's comments + * @description Returns the commit's comments. + * + * This includes both global and inline comments. + * + * The default sorting is oldest to newest and can be overridden with + * the `sort` query parameter. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * */ + readonly q?: string + /** @description Field by which the results should be sorted as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of commit comments. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_commit_comments"] + } + } + } + } + readonly put?: never + /** + * Create comment for a commit + * @description Creates new comment on the specified commit. + * + * To post a reply to an existing comment, include the `parent.id` field: + * + * ``` + * $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \ + * -X POST -u evzijst \ + * -H 'Content-Type: application/json' \ + * -d '{"content": {"raw": "One more thing!"}, + * "parent": {"id": 5728901}}' + * ``` + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The specified comment. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["commit_comment"] + } + } + readonly responses: { + /** @description The newly created comment. */ + readonly 201: { + headers: { + /** @description The location of the newly created comment. */ + readonly Location?: string + readonly [name: string]: unknown + } + content?: never + } + /** @description If the comment was detected as spam, or if the parent comment is not attached to the same node as the new comment */ + readonly 400: { + headers: Readonly> + content?: never + } + /** @description If a parent ID was passed in that cannot be found */ + readonly 404: { + headers: Readonly> + content?: never + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/comments/{comment_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a commit comment + * @description Returns the specified commit comment. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The commit comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["commit_comment"] + } + } + } + } + /** + * Update a commit comment + * @description Used to update the contents of a comment. Only the content of the comment can be updated. + * + * ``` + * $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/7f71b5/comments/5728901 \ + * -X PUT -u evzijst \ + * -H 'Content-Type: application/json' \ + * -d '{"content": {"raw": "One more thing!"}' + * ``` + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The updated comment. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["commit_comment"] + } + } + readonly responses: { + /** @description The newly updated comment. */ + readonly 201: { + headers: { + /** @description The location of the newly updated comment. */ + readonly Location?: string + readonly [name: string]: unknown + } + content?: never + } + /** @description If the comment update was detected as spam */ + readonly 400: { + headers: Readonly> + content?: never + } + } + } + readonly post?: never + /** + * Delete a commit comment + * @description Deletes the specified commit comment. + * + * Note that deleting comments that have visible replies that point to + * them will not really delete the resource. This is to retain the integrity + * of the original comment tree. Instead, the `deleted` element is set to + * `true` and the content is blanked out. The comment will continue to be + * returned by the collections and self endpoints. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates the comment was deleted by this action or a previous delete. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the comment doesn't exist */ + readonly 404: { + headers: Readonly> + content?: never + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/properties/{app_key}/{property_name}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a commit application property + * @description Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a commit. + */ + readonly get: operations["getCommitHostedPropertyValue"] + /** + * Update a commit application property + * @description Update an [application property](/cloud/bitbucket/application-properties/) value stored against a commit. + */ + readonly put: operations["updateCommitHostedPropertyValue"] + readonly post?: never + /** + * Delete a commit application property + * @description Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a commit. + */ + readonly delete: operations["deleteCommitHostedPropertyValue"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List pull requests that contain a commit + * @description Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details. + */ + readonly get: operations["getPullrequestsForCommit"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List reports + * @description Returns a paginated list of Reports linked to this commit. + */ + readonly get: operations["getReportsForCommit"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a report + * @description Returns a single Report matching the provided ID. + */ + readonly get: operations["getReport"] + /** + * Create or update a report + * @description Creates or updates a report for the specified commit. + * To upload a report, make sure to generate an ID that is unique across all reports for that commit. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-001. + * + * ### Sample cURL request: + * ``` + * curl --request PUT 'https://api.bitbucket.org/2.0/repositories///commit//reports/mysystem-001' \ + * --header 'Content-Type: application/json' \ + * --data-raw '{ + * "title": "Security scan report", + * "details": "This pull request introduces 10 new dependency vulnerabilities.", + * "report_type": "SECURITY", + * "reporter": "mySystem", + * "link": "http://www.mysystem.com/reports/001", + * "result": "FAILED", + * "data": [ + * { + * "title": "Duration (seconds)", + * "type": "DURATION", + * "value": 14 + * }, + * { + * "title": "Safe to merge?", + * "type": "BOOLEAN", + * "value": false + * } + * ] + * }' + * ``` + * + * ### Possible field values: + * report_type: SECURITY, COVERAGE, TEST, BUG + * result: PASSED, FAILED, PENDING + * data.type: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT + * + * #### Data field formats + * | Type Field | Value Field Type | Value Field Display | + * |:--------------|:------------------|:--------------------| + * | None/ Omitted | Number, String or Boolean (not an array or object) | Plain text | + * | BOOLEAN | Boolean | The value will be read as a JSON boolean and displayed as 'Yes' or 'No'. | + * | DATE | Number | The value will be read as a JSON number in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise it will be displayed as an absolute date. | + * | DURATION | Number | The value will be read as a JSON number in milliseconds and will be displayed in a human readable duration format. | + * | LINK | Object: `{"text": "Link text here", "href": "https://link.to.annotation/in/external/tool"}` | The value will be read as a JSON object containing the fields "text" and "href" and will be displayed as a clickable link on the report. | + * | NUMBER | Number | The value will be read as a JSON number and large numbers will be displayed in a human readable format (e.g. 14.3k). | + * | PERCENTAGE | Number (between 0 and 100) | The value will be read as a JSON number between 0 and 100 and will be displayed with a percentage sign. | + * | TEXT | String | The value will be read as a JSON string and will be displayed as-is | + * + * Please refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information. + * + */ + readonly put: operations["createOrUpdateReport"] + readonly post?: never + /** + * Delete a report + * @description Deletes a single Report matching the provided ID. + */ + readonly delete: operations["deleteReport"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List annotations + * @description Returns a paginated list of Annotations for a specified report. + */ + readonly get: operations["getAnnotationsForReport"] + readonly put?: never + /** + * Bulk create or update annotations + * @description Bulk upload of annotations. + * Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations. + * + * Add the annotations you want to upload as objects in a JSON array and make sure each annotation has the external_id field set to a unique value. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. The external id can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). You can upload up to 100 annotations per POST request. + * + * ### Sample cURL request: + * ``` + * curl --location 'https://api.bitbucket.org/2.0/repositories///commit//reports/mysystem-001/annotations' \ + * --header 'Content-Type: application/json' \ + * --data-raw '[ + * { + * "external_id": "mysystem-annotation001", + * "title": "Security scan report", + * "annotation_type": "VULNERABILITY", + * "summary": "This line represents a security threat.", + * "severity": "HIGH", + * "path": "my-service/src/main/java/com/myCompany/mysystem/logic/Main.java", + * "line": 42 + * }, + * { + * "external_id": "mySystem-annotation002", + * "title": "Bug report", + * "annotation_type": "BUG", + * "result": "FAILED", + * "summary": "This line might introduce a bug.", + * "severity": "MEDIUM", + * "path": "my-service/src/main/java/com/myCompany/mysystem/logic/Helper.java", + * "line": 13 + * } + * ]' + * ``` + * + * ### Possible field values: + * annotation_type: VULNERABILITY, CODE_SMELL, BUG + * result: PASSED, FAILED, IGNORED, SKIPPED + * severity: HIGH, MEDIUM, LOW, CRITICAL + * + * Please refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information. + * + */ + readonly post: operations["bulkCreateOrUpdateAnnotations"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get an annotation + * @description Returns a single Annotation matching the provided ID. + */ + readonly get: operations["getAnnotation"] + /** + * Create or update an annotation + * @description Creates or updates an individual annotation for the specified report. + * Annotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations. + * + * Just as reports, annotation needs to be uploaded with a unique ID that can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. + * + * ### Sample cURL request: + * ``` + * curl --request PUT 'https://api.bitbucket.org/2.0/repositories///commit//reports/mySystem-001/annotations/mysystem-annotation001' \ + * --header 'Content-Type: application/json' \ + * --data-raw '{ + * "title": "Security scan report", + * "annotation_type": "VULNERABILITY", + * "summary": "This line represents a security thread.", + * "severity": "HIGH", + * "path": "my-service/src/main/java/com/myCompany/mysystem/logic/Main.java", + * "line": 42 + * }' + * ``` + * + * ### Possible field values: + * annotation_type: VULNERABILITY, CODE_SMELL, BUG + * result: PASSED, FAILED, IGNORED, SKIPPED + * severity: HIGH, MEDIUM, LOW, CRITICAL + * + * Please refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information. + * + */ + readonly put: operations["createOrUpdateAnnotation"] + readonly post?: never + /** + * Delete an annotation + * @description Deletes a single Annotation matching the provided ID. + */ + readonly delete: operations["deleteAnnotation"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List commit statuses for a commit + * @description Returns all statuses (e.g. build results) for a specific commit. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * */ + readonly q?: string + /** @description If specified, only return commit status objects that were either + * created without a refname, or were created with the specified refname + * */ + readonly refname?: string + /** @description Field by which the results should be sorted as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * Defaults to `created_on`. + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of all commit statuses for this commit. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_commitstatuses"] + } + } + /** @description If the repository is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description If the repository or commit does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Create a build status for a commit + * @description Creates a new build status against the specified commit. + * + * If the specified key already exists, the existing status object will + * be overwritten. + * + * Example: + * + * ``` + * curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/ -X POST -u jdoe -H 'Content-Type: application/json' -d '{ + * "key": "MY-BUILD", + * "state": "SUCCESSFUL", + * "description": "42 tests passed", + * "url": "https://www.example.org/my-build-result" + * }' + * ``` + * + * When creating a new commit status, you can use a URI template for the URL. + * Templates are URLs that contain variable names that Bitbucket will + * evaluate at runtime whenever the URL is displayed anywhere similar to + * parameter substitution in + * [Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html). + * For example, one could use `https://foo.com/builds/{repository.full_name}` + * which Bitbucket will turn into `https://foo.com/builds/foo/bar` at render time. + * The context variables available are `repository` and `commit`. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The new commit status object. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["commitstatus"] + } + } + readonly responses: { + /** @description The newly created build status object. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["commitstatus"] + } + } + /** @description If the repository is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description If the repository, commit, or build status key does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses/build/{key}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description The build status' unique key */ + readonly key: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a build status for a commit + * @description Returns the specified build status for a commit. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description The build status' unique key */ + readonly key: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The build status object with the specified key. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["commitstatus"] + } + } + /** @description If the repository is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description If the repository, commit, or build status key does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a build status for a commit + * @description Used to update the current status of a build status object on the + * specific commit. + * + * This operation can also be used to change other properties of the + * build status: + * + * * `state` + * * `name` + * * `description` + * * `url` + * * `refname` + * + * The `key` cannot be changed. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description The build status' unique key */ + readonly key: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The updated build status object */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["commitstatus"] + } + } + readonly responses: { + /** @description The updated build status object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["commitstatus"] + } + } + /** @description If the repository is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description If the repository or build does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commits": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List commits + * @description These are the repository's commits. They are paginated and returned + * in reverse chronological order, similar to the output of `git log`. + * Like these tools, the DAG can be filtered. + * + * #### GET /repositories/{workspace}/{repo_slug}/commits/ + * + * Returns all commits in the repo in topological order (newest commit + * first). All branches and tags are included (similar to + * `git log --all`). + * + * #### GET /repositories/{workspace}/{repo_slug}/commits/?exclude=master + * + * Returns all commits in the repo that are not on master + * (similar to `git log --all ^master`). + * + * #### GET /repositories/{workspace}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar + * + * Returns all commits that are on refs `foo` or `bar`, but not on `fu` or + * `fubar` (similar to `git log foo bar ^fu ^fubar`). + * + * An optional `path` parameter can be specified that will limit the + * results to commits that affect that path. `path` can either be a file + * or a directory. If a directory is specified, commits are returned that + * have modified any file in the directory tree rooted by `path`. It is + * important to note that if the `path` parameter is specified, the commits + * returned by this endpoint may no longer be a DAG, parent commits that + * do not modify the path will be omitted from the response. + * + * #### GET /repositories/{workspace}/{repo_slug}/commits/?path=README.md&include=foo&include=bar&exclude=master + * + * Returns all commits that are on refs `foo` or `bar`, but not on `master` + * that changed the file README.md. + * + * #### GET /repositories/{workspace}/{repo_slug}/commits/?path=src/&include=foo&include=bar&exclude=master + * + * Returns all commits that are on refs `foo` or `bar`, but not on `master` + * that changed to a file in any file in the directory src or its children. + * + * Because the response could include a very large number of commits, it + * is paginated. Follow the 'next' link in the response to navigate to the + * next page of commits. As with other paginated resources, do not + * construct your own links. + * + * When the include and exclude parameters are more than can fit in a + * query string, clients can use a `x-www-form-urlencoded` POST instead. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of commits */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_changeset"] + } + } + /** @description If the specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * List commits with include/exclude + * @description Identical to `GET /repositories/{workspace}/{repo_slug}/commits`, + * except that POST allows clients to place the include and exclude + * parameters in the request body to avoid URL length issues. + * + * **Note that this resource does NOT support new commit creation.** + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of commits */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_changeset"] + } + } + /** @description If the specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/commits/{revision}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit SHA1 or ref name. */ + readonly revision: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List commits for revision + * @description These are the repository's commits. They are paginated and returned + * in reverse chronological order, similar to the output of `git log`. + * Like these tools, the DAG can be filtered. + * + * #### GET /repositories/{workspace}/{repo_slug}/commits/master + * + * Returns all commits on ref `master` (similar to `git log master`). + * + * #### GET /repositories/{workspace}/{repo_slug}/commits/dev?include=foo&exclude=master + * + * Returns all commits on ref `dev` or `foo`, except those that are reachable on + * `master` (similar to `git log dev foo ^master`). + * + * An optional `path` parameter can be specified that will limit the + * results to commits that affect that path. `path` can either be a file + * or a directory. If a directory is specified, commits are returned that + * have modified any file in the directory tree rooted by `path`. It is + * important to note that if the `path` parameter is specified, the commits + * returned by this endpoint may no longer be a DAG, parent commits that + * do not modify the path will be omitted from the response. + * + * #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=README.md&include=foo&include=bar&exclude=master + * + * Returns all commits that are on refs `dev` or `foo` or `bar`, but not on `master` + * that changed the file README.md. + * + * #### GET /repositories/{workspace}/{repo_slug}/commits/dev?path=src/&include=foo&exclude=master + * + * Returns all commits that are on refs `dev` or `foo`, but not on `master` + * that changed to a file in any file in the directory src or its children. + * + * Because the response could include a very large number of commits, it + * is paginated. Follow the 'next' link in the response to navigate to the + * next page of commits. As with other paginated resources, do not + * construct your own links. + * + * When the include and exclude parameters are more than can fit in a + * query string, clients can use a `x-www-form-urlencoded` POST instead. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit SHA1 or ref name. */ + readonly revision: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of commits */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_changeset"] + } + } + /** @description If the specified revision does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * List commits for revision using include/exclude + * @description Identical to `GET /repositories/{workspace}/{repo_slug}/commits/{revision}`, + * except that POST allows clients to place the include and exclude + * parameters in the request body to avoid URL length issues. + * + * **Note that this resource does NOT support new commit creation.** + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit SHA1 or ref name. */ + readonly revision: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of commits */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_changeset"] + } + } + /** @description If the specified revision does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/components": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List components + * @description Returns the components that have been defined in the issue tracker. + * + * This resource is only available on repositories that have the issue + * tracker enabled. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The components that have been defined in the issue tracker. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_components"] + } + } + /** @description The specified repository does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/components/{component_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The component's id */ + readonly component_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a component for issues + * @description Returns the specified issue tracker component object. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The component's id */ + readonly component_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified component object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["component"] + } + } + /** @description The specified repository or component does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/default-reviewers": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List default reviewers + * @description Returns the repository's default reviewers. + * + * These are the users that are automatically added as reviewers on every + * new pull request that is created. To obtain the repository's default reviewers + * as well as the default reviewers inherited from the project, use the + * [effective-default-reveiwers](#api-repositories-workspace-repo-slug-effective-default-reviewers-get) endpoint. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The paginated list of default reviewers */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_accounts"] + } + } + /** @description If the authenticated user does not have access to view the default reviewers */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the username or the UUID of the default reviewer, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly target_username: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a default reviewer + * @description Returns the specified reviewer. + * + * This can be used to test whether a user is among the repository's + * default reviewers list. A 404 indicates that that specified user is not + * a default reviewer. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the username or the UUID of the default reviewer, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly target_username: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified user is a default reviewer */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["account"] + } + } + /** @description If the authenticated user does not have access to check if the specified user is a default reviewer */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified user does not exist or is not a default reviewer */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Add a user to the default reviewers + * @description Adds the specified user to the repository's list of default + * reviewers. + * + * This method is idempotent. Adding a user a second time has no effect. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the username or the UUID of the default reviewer, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly target_username: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified user was successfully added to the default reviewers */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["account"] + } + } + /** @description If the authenticated user tried to add a team, bot user, or user without access to the repository to the default reviewers */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have permission to modify the default reviewers */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified user does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Remove a user from the default reviewers + * @description Removes a default reviewer from the repository. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the username or the UUID of the default reviewer, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly target_username: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified user successfully removed from the default reviewers */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have access modify the default reviewers */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified user does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/deploy-keys": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List repository deploy keys + * @description Returns all deploy-keys belonging to a repository. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Deploy keys matching the repository */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_deploy_keys"] + } + } + /** @description If the specified user or repository is not accessible to the current user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user or repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Add a repository deploy key + * @description Create a new deploy key in a repository. Note: If authenticating a deploy key + * with an OAuth consumer, any changes to the OAuth consumer will subsequently + * invalidate the deploy key. + * + * + * Example: + * ``` + * $ curl -X POST \ + * -H "Authorization " \ + * -H "Content-type: application/json" \ + * https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys -d \ + * '{ + * "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8", + * "label": "mydeploykey" + * }' + * ``` + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The deploy key that was created */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["deploy_key"] + } + } + /** @description Invalid deploy key inputs */ + readonly 400: { + headers: Readonly> + content?: never + } + /** @description If the specified user or repository is not accessible to the current user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user or repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key ID matching the deploy key. */ + readonly key_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a repository deploy key + * @description Returns the deploy key belonging to a specific key. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key ID matching the deploy key. */ + readonly key_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Deploy key matching the key ID */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["deploy_key"] + } + } + /** @description If the specified user or repository is not accessible to the current user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user or repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a repository deploy key + * @description Create a new deploy key in a repository. + * + * The same key needs to be passed in but the comment and label can change. + * + * Example: + * ``` + * $ curl -X PUT \ + * -H "Authorization " \ + * -H "Content-type: application/json" \ + * https://api.bitbucket.org/2.0/repositories/mleu/test/deploy-keys/1234 -d \ + * '{ + * "label": "newlabel", + * "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 newcomment", + * }' + * ``` + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key ID matching the deploy key. */ + readonly key_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The newly updated deploy key. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["deploy_key"] + } + } + /** @description If the submitted key or related value is invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the current user does not have permission to add a key for the specified user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user, repository, or deploy key does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a repository deploy key + * @description This deletes a deploy key from a repository. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key ID matching the deploy key. */ + readonly key_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The key has been deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the current user does not have permission to delete a key for the specified user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user, repository, or deploy key does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/deployments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List deployments + * @description Find deployments + */ + readonly get: operations["getDeploymentsForRepository"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List variables for an environment + * @description Find deployment environment level variables. + */ + readonly get: operations["getDeploymentVariables"] + readonly put?: never + /** + * Create a variable for an environment + * @description Create a deployment environment level variable. + */ + readonly post: operations["createDeploymentVariable"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update a variable for an environment + * @description Update a deployment environment level variable. + */ + readonly put: operations["updateDeploymentVariable"] + readonly post?: never + /** + * Delete a variable for an environment + * @description Delete a deployment environment level variable. + */ + readonly delete: operations["deleteDeploymentVariable"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/deployments/{deployment_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a deployment + * @description Retrieve a deployment + */ + readonly get: operations["getDeploymentForRepository"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/diff/{spec}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit SHA (e.g. `3a8b42`) or a commit range using double dot + * notation (e.g. `3a8b42..9ff173`). + * */ + readonly spec: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Compare two commits + * @description Produces a raw git-style diff. + * + * #### Single commit spec + * + * If the `spec` argument to this API is a single commit, the diff is + * produced against the first parent of the specified commit. + * + * #### Two commit spec + * + * Two commits separated by `..` may be provided as the `spec`, e.g., + * `3a8b42..9ff173`. When two commits are provided and the `topic` query + * parameter is true, this API produces a 2-way three dot diff. + * This is the diff between source commit and the merge base of the source + * commit and the destination commit. When the `topic` query param is false, + * a simple git-style diff is produced. + * + * The two commits are interpreted as follows: + * + * * First commit: the commit containing the changes we wish to preview + * * Second commit: the commit representing the state to which we want to + * compare the first commit + * * **Note**: This is the opposite of the order used in `git diff`. + * + * #### Comparison to patches + * + * While similar to patches, diffs: + * + * * Don't have a commit header (username, commit message, etc) + * * Support the optional `path=foo/bar.py` query param to filter + * the diff to just that one file diff + * + * #### Response + * + * The raw diff is returned as-is, in whatever encoding the files in the + * repository use. It is not decoded into unicode. As such, the + * content-type is `text/plain`. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Generate diffs that include binary files, true if omitted. */ + readonly binary?: boolean + /** @description Generate diffs with lines of context instead of the usual three. */ + readonly context?: number + /** @description Generate diffs that ignore whitespace. */ + readonly ignore_whitespace?: boolean + /** @description This parameter is deprecated. The 'topic' parameter should be used + * instead. The 'merge' and 'topic' parameters cannot be both used at + * the same time. + * + * If true, the source commit is merged into the + * destination commit, and then a diff from the + * destination to the merge result is returned. If false, + * a simple 'two dot' diff between the source and + * destination is returned. True if omitted. */ + readonly merge?: boolean + /** @description Limit the diff to a particular file (this parameter + * can be repeated for multiple paths). */ + readonly path?: string + /** @description Whether to perform rename detection, true if omitted. */ + readonly renames?: boolean + /** @description If true, returns 2-way 'three-dot' diff. + * This is a diff between the source commit and the merge base + * of the source commit and the destination commit. + * If false, a simple 'two dot' diff between the source and + * destination is returned. */ + readonly topic?: boolean + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit SHA (e.g. `3a8b42`) or a commit range using double dot + * notation (e.g. `3a8b42..9ff173`). + * */ + readonly spec: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The raw diff */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description If the diff was too large and timed out. + * + * Since this endpoint does not employ any form of pagination, but + * instead returns the diff as a single document, it can run into + * trouble on very large diffs. If Bitbucket times out in cases + * like these, a 555 status code is returned. */ + readonly 555: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/diffstat/{spec}": { + readonly parameters: { + readonly query?: { + /** @description Generate diffs that ignore whitespace */ + readonly ignore_whitespace?: boolean + /** @description This parameter is deprecated. The 'topic' parameter should be used + * instead. The 'merge' and 'topic' parameters cannot be both used at + * the same time. + * + * If true, the source commit is merged into the + * destination commit, and then a diffstat from the + * destination to the merge result is returned. If false, + * a simple 'two dot' diffstat between the source and + * destination is returned. True if omitted. */ + readonly merge?: boolean + /** @description Limit the diffstat to a particular file (this parameter + * can be repeated for multiple paths). */ + readonly path?: string + /** @description Whether to perform rename detection, true if omitted. */ + readonly renames?: boolean + /** @description If true, returns 2-way 'three-dot' diff. + * This is a diff between the source commit and the merge base + * of the source commit and the destination commit. + * If false, a simple 'two dot' diff between the source and + * destination is returned. */ + readonly topic?: boolean + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit SHA (e.g. `3a8b42`) or a commit range using double dot + * notation (e.g. `3a8b42..9ff173`). + * */ + readonly spec: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Compare two commit diff stats + * @description Produces a response in JSON format with a record for every path + * modified, including information on the type of the change and the + * number of lines added and removed. + * + * #### Single commit spec + * + * If the `spec` argument to this API is a single commit, the diff is + * produced against the first parent of the specified commit. + * + * #### Two commit spec + * + * Two commits separated by `..` may be provided as the `spec`, e.g., + * `3a8b42..9ff173`. When two commits are provided and the `topic` query + * parameter is true, this API produces a 2-way three dot diff. + * This is the diff between source commit and the merge base of the source + * commit and the destination commit. When the `topic` query param is false, + * a simple git-style diff is produced. + * + * The two commits are interpreted as follows: + * + * * First commit: the commit containing the changes we wish to preview + * * Second commit: the commit representing the state to which we want to + * compare the first commit + * * **Note**: This is the opposite of the order used in `git diff`. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Generate diffs that ignore whitespace */ + readonly ignore_whitespace?: boolean + /** @description This parameter is deprecated. The 'topic' parameter should be used + * instead. The 'merge' and 'topic' parameters cannot be both used at + * the same time. + * + * If true, the source commit is merged into the + * destination commit, and then a diffstat from the + * destination to the merge result is returned. If false, + * a simple 'two dot' diffstat between the source and + * destination is returned. True if omitted. */ + readonly merge?: boolean + /** @description Limit the diffstat to a particular file (this parameter + * can be repeated for multiple paths). */ + readonly path?: string + /** @description Whether to perform rename detection, true if omitted. */ + readonly renames?: boolean + /** @description If true, returns 2-way 'three-dot' diff. + * This is a diff between the source commit and the merge base + * of the source commit and the destination commit. + * If false, a simple 'two dot' diff between the source and + * destination is returned. */ + readonly topic?: boolean + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit SHA (e.g. `3a8b42`) or a commit range using double dot + * notation (e.g. `3a8b42..9ff173`). + * */ + readonly spec: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The diff stats */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_diffstats"] + } + } + /** @description If generating the diffstat timed out. */ + readonly 555: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/downloads": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List download artifacts + * @description Returns a list of download links associated with the repository. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Returns a paginated list of the downloads associated with the repository. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description User is not authorized to read from the repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Upload a download artifact + * @description Upload new download artifacts. + * + * To upload files, perform a `multipart/form-data` POST containing one + * or more `files` fields: + * + * $ echo Hello World > hello.txt + * $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt + * + * When a file is uploaded with the same name as an existing artifact, + * then the existing file will be replaced. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The artifact was uploaded sucessfully. */ + readonly 201: { + headers: Readonly> + content?: never + } + /** @description Bad Request. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description User is not authorized to write to the repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Unsupported Content-Type. Use multiplart/form-data. */ + readonly 406: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/downloads/{filename}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Name of the file. */ + readonly filename: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a download artifact link + * @description Return a redirect to the contents of a download artifact. + * + * This endpoint returns the actual file contents and not the artifact's + * metadata. + * + * $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt + * Hello World + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Name of the file. */ + readonly filename: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Redirects to the url of the specified download artifact. */ + readonly 302: { + headers: Readonly> + content?: never + } + /** @description User is not authorized to read from the repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified download artifact does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + /** + * Delete a download artifact + * @description Deletes the specified download artifact from the repository. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Name of the file. */ + readonly filename: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified download artifact was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description User is not authorized to write to the repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified download does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/effective-branching-model": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** Get the effective, or currently applied, branching model for a repository */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The effective branching model object */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["effective_repo_branching_model"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have read access to the repository */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/effective-default-reviewers": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List effective default reviewers + * @description Returns the repository's effective default reviewers. This includes both default + * reviewers defined at the repository level as well as those inherited from its project. + * + * These are the users that are automatically added as reviewers on every + * new pull request that is created. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The paginated list of effective default reviewers */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_default_reviewer_and_type"] + } + } + /** @description If the authenticated user does not have access to view the default reviewers */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/environments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List environments + * @description Find environments + */ + readonly get: operations["getEnvironmentsForRepository"] + readonly put?: never + /** + * Create an environment + * @description Create an environment. + */ + readonly post: operations["createEnvironment"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get an environment + * @description Retrieve an environment + */ + readonly get: operations["getEnvironmentForRepository"] + readonly put?: never + readonly post?: never + /** + * Delete an environment + * @description Delete an environment + */ + readonly delete: operations["deleteEnvironmentForRepository"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Update an environment + * @description Update an environment + */ + readonly post: operations["updateEnvironmentForRepository"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/filehistory/{commit}/{path}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List commits that modified a file + * @description Returns a paginated list of commits that modified the specified file. + * + * Commits are returned in reverse chronological order. This is roughly + * equivalent to the following commands: + * + * $ git log --follow --date-order + * + * By default, Bitbucket will follow renames and the path name in the + * returned entries reflects that. This can be turned off using the + * `?renames=false` query parameter. + * + * Results are returned in descending chronological order by default, and + * like most endpoints you can + * [filter and sort](/cloud/bitbucket/rest/intro/#filtering) the response to + * only provide exactly the data you want. + * + * The example response returns commits made before 2011-05-18 against a file + * named `README.rst`. The results are filtered to only return the path and + * date. This request can be made using: + * + * ``` + * $ curl 'https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/filehistory/master/README.rst'\ + * '?fields=values.next,values.path,values.commit.date&q=commit.date<=2011-05-18' + * ``` + * + * In the response you can see that the file was renamed to `README.rst` + * by the commit made on 2011-05-16, and was previously named `README.txt`. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + /** @description + * When `true`, Bitbucket will follow the history of the file across + * renames (this is the default behavior). This can be turned off by + * specifying `false`. */ + readonly renames?: string + /** @description + * Name of a response property sort the result by as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results). + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of commits that modified the specified file */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_files"] + } + } + /** @description If the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/forks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List repository forks + * @description Returns a paginated list of all the forks of the specified + * repository. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * */ + readonly q?: string + /** @description Filters the result based on the authenticated user's role on each repository. + * + * * **member**: returns repositories to which the user has explicit read access + * * **contributor**: returns repositories to which the user has explicit write access + * * **admin**: returns repositories to which the user has explicit administrator access + * * **owner**: returns all repositories owned by the current user + * */ + readonly role?: "admin" | "contributor" | "member" | "owner" + /** @description Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All forks. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_repositories"] + } + } + } + } + readonly put?: never + /** + * Fork a repository + * @description Creates a new fork of the specified repository. + * + * #### Forking a repository + * + * To create a fork, specify the workspace explicitly as part of the + * request body: + * + * ``` + * $ curl -X POST -u jdoe https://api.bitbucket.org/2.0/repositories/atlassian/bbql/forks \ + * -H 'Content-Type: application/json' -d '{ + * "name": "bbql_fork", + * "workspace": { + * "slug": "atlassian" + * } + * }' + * ``` + * + * To fork a repository into the same workspace, also specify a new `name`. + * + * When you specify a value for `name`, it will also affect the `slug`. + * The `slug` is reflected in the repository URL of the new fork. It is + * derived from `name` by substituting non-ASCII characters, removes + * whitespace, and changes characters to lower case. For example, + * `My repo` would turn into `my_repo`. + * + * You need contributor access to create new forks within a workspace. + * + * + * #### Change the properties of a new fork + * + * By default the fork inherits most of its properties from the parent. + * However, since the optional POST body document follows the normal + * `repository` JSON schema and you can override the new fork's + * properties. + * + * Properties that can be overridden include: + * + * * description + * * fork_policy + * * language + * * mainbranch + * * is_private (note that a private repo's fork_policy might prohibit + * the creation of public forks, in which `is_private=False` would fail) + * * has_issues (to initialize or disable the new repo's issue tracker -- + * note that the actual contents of the parent repository's issue + * tracker are not copied during forking) + * * has_wiki (to initialize or disable the new repo's wiki -- + * note that the actual contents of the parent repository's wiki are not + * copied during forking) + * * project (when forking into a private project, the fork's `is_private` + * must be `true`) + * + * Properties that cannot be modified include: + * + * * scm + * * parent + * * full_name + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description A repository object. This can be left blank. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["repository"] + } + } + readonly responses: { + /** @description The newly created fork. */ + readonly 201: { + headers: { + /** @description The URL of the newly created fork */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["repository"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/hooks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List webhooks for a repository + * @description Returns a paginated list of webhooks installed on this repository. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The paginated list of installed webhooks. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_webhook_subscriptions"] + } + } + /** @description If the authenticated user does not have permission to access the webhooks. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a webhook for a repository + * @description Creates a new webhook on the specified repository. + * + * Example: + * + * ``` + * $ curl -X POST -u credentials -H 'Content-Type: application/json' + * https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo-slug/hooks + * -d ' + * { + * "description": "Webhook Description", + * "url": "https://example.com/", + * "active": true, + * "secret": "this is a really bad secret", + * "events": [ + * "repo:push", + * "issue:created", + * "issue:updated" + * ] + * }' + * ``` + * + * When the `secret` is provided it will be used as the key to generate a HMAC + * digest value sent in the `X-Hub-Signature` header at delivery time. Passing + * a `null` or empty `secret` or not passing a `secret` will leave the webhook's + * secret unset. Bitbucket only generates the `X-Hub-Signature` when the webhook's + * secret is set. + * + * Note that this call requires the webhook scope, as well as any scope + * that applies to the events that the webhook subscribes to. In the + * example above that means: `webhook`, `repository` and `issue`. + * + * Also note that the `url` must properly resolve and cannot be an + * internal, non-routed address. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description If the webhook was registered successfully. */ + readonly 201: { + headers: { + /** @description The URL of new newly created webhook. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["webhook_subscription"] + } + } + /** @description If the authenticated user does not have permission to install webhooks on the specified repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/hooks/{uid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description Installed webhook's ID */ + readonly uid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a webhook for a repository + * @description Returns the webhook with the specified id installed on the specified + * repository. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description Installed webhook's ID */ + readonly uid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The webhook subscription object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["webhook_subscription"] + } + } + /** @description If the webhook or repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a webhook for a repository + * @description Updates the specified webhook subscription. + * + * The following properties can be mutated: + * + * * `description` + * * `url` + * * `secret` + * * `active` + * * `events` + * + * The hook's secret is used as a key to generate the HMAC hex digest sent in the + * `X-Hub-Signature` header at delivery time. This signature is only generated + * when the hook has a secret. + * + * Set the hook's secret by passing the new value in the `secret` field. Passing a + * `null` value in the `secret` field will remove the secret from the hook. The + * hook's secret can be left unchanged by not passing the `secret` field in the + * request. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description Installed webhook's ID */ + readonly uid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The webhook subscription object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["webhook_subscription"] + } + } + /** @description If the authenticated user does not have permission to update the webhook. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the webhook or repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a webhook for a repository + * @description Deletes the specified webhook subscription from the given + * repository. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description Installed webhook's ID */ + readonly uid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description When the webhook was deleted successfully */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have permission to delete the webhook. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the webhook or repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List issues + * @description Returns the issues in the issue tracker. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of the issues matching any filter criteria that were provided. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_issues"] + } + } + /** @description The specified repository does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create an issue + * @description Creates a new issue. + * + * This call requires authentication. Private repositories or private + * issue trackers require the caller to authenticate with an account that + * has appropriate authorization. + * + * The authenticated user is used for the issue's `reporter` field. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The new issue. The only required element is `title`. All other elements can be omitted from the body. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["issue"] + } + } + readonly responses: { + /** @description The newly created issue. */ + readonly 201: { + headers: { + /** @description The (absolute) URL of the newly created issue. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["issue"] + } + } + /** @description When the request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the authenticated user isn't authorized to create the issue. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/{issue_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get an issue + * @description Returns the specified issue. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The issue object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue"] + } + } + /** @description When the authenticated user isn't authorized to access the issue. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified issue is unavailable. */ + readonly 410: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update an issue + * @description Modifies the issue. + * + * ``` + * $ curl https://api.bitbucket.org/2.0/repostories/evzijst/dogslow/issues/123 \ + * -u evzijst -s -X PUT -H 'Content-Type: application/json' \ + * -d '{ + * "title": "Updated title", + * "assignee": { + * "account_id": "5d5355e8c6b9320d9ea5b28d" + * }, + * "priority": "minor", + * "version": { + * "name": "1.0" + * }, + * "component": null + * }' + * ``` + * + * This example changes the `title`, `assignee`, `priority` and the + * `version`. It also removes the value of the `component` from the issue + * by setting the field to `null`. Any field not present keeps its existing + * value. + * + * Each time an issue is edited in the UI or through the API, an immutable + * change record is created under the `/issues/123/changes` endpoint. It + * also has a comment associated with the change. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The updated issue object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue"] + } + } + /** @description When the authenticated user isn't authorized to access the issue. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete an issue + * @description Deletes the specified issue. This requires write access to the + * repository. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The issue object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue"] + } + } + /** @description When the authenticated user isn't authorized to delete the issue. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List attachments for an issue + * @description Returns all attachments for this issue. + * + * This returns the files' meta data. This does not return the files' + * actual contents. + * + * The files are always ordered by their upload date. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of all attachments for this issue. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_issue_attachments"] + } + } + /** @description If the issue tracker is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Upload an attachment to an issue + * @description Upload new issue attachments. + * + * To upload files, perform a `multipart/form-data` POST containing one + * or more file fields. + * + * When a file is uploaded with the same name as an existing attachment, + * then the existing file will be replaced. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response document. */ + readonly 201: { + headers: { + /** @description The URL to the issue's collection of attachments. */ + readonly Location?: string + readonly [name: string]: unknown + } + content?: never + } + /** @description If no files were uploaded, or if the wrong `Content-Type` was used. */ + readonly 400: { + headers: Readonly> + content?: never + } + /** @description If the issue tracker is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get attachment for an issue + * @description Returns the contents of the specified file attachment. + * + * Note that this endpoint does not return a JSON response, but instead + * returns a redirect pointing to the actual file that in turn will return + * the raw contents. + * + * The redirect URL contains a one-time token that has a limited lifetime. + * As a result, the link should not be persisted, stored, or shared. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A redirect to the file's contents */ + readonly 302: { + headers: { + readonly Location?: string + readonly [name: string]: unknown + } + content?: never + } + /** @description If the issue tracker is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + /** + * Delete an attachment for an issue + * @description Deletes an attachment. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates that the deletion was successful */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the issue tracker is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List changes on an issue + * @description Returns the list of all changes that have been made to the specified + * issue. Changes are returned in chronological order with the oldest + * change first. + * + * Each time an issue is edited in the UI or through the API, an immutable + * change record is created under the `/issues/123/changes` endpoint. It + * also has a comment associated with the change. + * + * Note that this operation is changing significantly, due to privacy changes. + * See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-the-issue-changes-api) + * for details. + * + * Changes support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) that + * can be used to search for specific changes. For instance, to see + * when an issue transitioned to "resolved": + * + * ``` + * $ curl -s https://api.bitbucket.org/2.0/repositories/site/master/issues/1/changes \ + * -G --data-urlencode='q=changes.state.new = "resolved"' + * ``` + * + * This resource is only available on repositories that have the issue + * tracker enabled. + * + * N.B. + * + * The `changes.assignee` and `changes.assignee_account_id` fields are not + * a `user` object. Instead, they contain the raw `username` and + * `account_id` of the user. This is to protect the integrity of the audit + * log even after a user account gets deleted. + * + * The `changes.assignee` field is deprecated will disappear in the + * future. Use `changes.assignee_account_id` instead. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details. */ + readonly q?: string + /** @description + * Name of a response property to sort results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results) + * for details. + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Returns all the issue changes that were made on the specified issue. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_log_entries"] + } + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Modify the state of an issue + * @description Makes a change to the specified issue. + * + * For example, to change an issue's state and assignee, create a new + * change object that modifies these fields: + * + * ``` + * curl https://api.bitbucket.org/2.0/site/master/issues/1234/changes \ + * -s -u evzijst -X POST -H "Content-Type: application/json" \ + * -d '{ + * "changes": { + * "assignee_account_id": { + * "new": "557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443" + * }, + * "state": { + * "new": 'resolved" + * } + * } + * "message": { + * "raw": "This is now resolved." + * } + * }' + * ``` + * + * The above example also includes a custom comment to go alongside the + * change. This comment will also be visible on the issue page in the UI. + * + * The fields of the `changes` object are strings, not objects. This + * allows for immutable change log records, even after user accounts, + * milestones, or other objects recorded in a change entry, get renamed or + * deleted. + * + * The `assignee_account_id` field stores the account id. When POSTing a + * new change and changing the assignee, the client should therefore use + * the user's account_id in the `changes.assignee_account_id.new` field. + * + * This call requires authentication. Private repositories or private + * issue trackers require the caller to authenticate with an account that + * has appropriate authorization. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The new issue state change. The only required elements are `changes.[].new`. All other elements can be omitted from the body. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["issue_change"] + } + } + readonly responses: { + /** @description The newly created issue change. */ + readonly 201: { + headers: { + /** @description The (absolute) URL of the newly created issue change. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["issue_change"] + } + } + /** @description When the request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the authenticated user isn't authorized to modify the issue. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes/{change_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue change id */ + readonly change_id: string + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get issue change object + * @description Returns the specified issue change object. + * + * This resource is only available on repositories that have the issue + * tracker enabled. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue change id */ + readonly change_id: string + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified issue change object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue_change"] + } + } + /** @description The specified repository or issue change does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List comments on an issue + * @description Returns a paginated list of all comments that were made on the + * specified issue. + * + * The default sorting is oldest to newest and can be overridden with + * the `sort` query parameter. + * + * This endpoint also supports filtering and sorting of the results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + } + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of issue comments. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_issue_comments"] + } + } + } + } + readonly put?: never + /** + * Create a comment on an issue + * @description Creates a new issue comment. + * + * ``` + * $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/ \ + * -X POST -u evzijst \ + * -H 'Content-Type: application/json' \ + * -d '{"content": {"raw": "Lorem ipsum."}}' + * ``` + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The new issue comment object. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["issue_comment"] + } + } + readonly responses: { + /** @description The newly created comment. */ + readonly 201: { + headers: { + /** @description The location of the newly issue comment. */ + readonly Location?: string + readonly [name: string]: unknown + } + content?: never + } + /** @description If the input was invalid, or if the comment being created is detected as spam */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a comment on an issue + * @description Returns the specified issue comment object. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The issue comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue_comment"] + } + } + } + } + /** + * Update a comment on an issue + * @description Updates the content of the specified issue comment. Note that only + * the `content.raw` field can be modified. + * + * ``` + * $ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/5728901 \ + * -X PUT -u evzijst \ + * -H 'Content-Type: application/json' \ + * -d '{"content": {"raw": "Lorem ipsum."}' + * ``` + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The updated comment. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["issue_comment"] + } + } + readonly responses: { + /** @description The updated issue comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue_comment"] + } + } + /** @description If the input was invalid, or if the update to the comment is detected as spam */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a comment on an issue + * @description Deletes the specified comment. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates successful deletion. */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Check if current user voted for an issue + * @description Check whether the authenticated user has voted for this issue. + * A 204 status code indicates that the user has voted, while a 404 + * implies they haven't. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description If the authenticated user has not voted for this issue. */ + readonly 204: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user has not voted for this issue, or when the repo does not exist, or does not have an issue tracker. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Vote for an issue + * @description Vote for this issue. + * + * To cast your vote, do an empty PUT. The 204 status code indicates that + * the operation was successful. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicating the authenticated user has cast their vote successfully. */ + readonly 204: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Remove vote for an issue + * @description Retract your vote. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Unexpected error. */ + readonly default: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Check if current user is watching a issue + * @description Indicated whether or not the authenticated user is watching this + * issue. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description If the authenticated user is watching this issue. */ + readonly 204: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Watch an issue + * @description Start watching this issue. + * + * To start watching this issue, do an empty PUT. The 204 status code + * indicates that the operation was successful. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates that the authenticated user successfully started watching this issue. */ + readonly 204: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Stop watching an issue + * @description Stop watching this issue. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The issue id */ + readonly issue_id: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates that the authenticated user successfully stopped watching this issue. */ + readonly 204: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or issue does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/export": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Export issues + * @description A POST request to this endpoint initiates a new background celery task that archives the repo's issues. + * + * When the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the + * 'Location' response header. This url is the endpoint for where the user can obtain their zip files." + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The options to apply to the export. Available options include `project_key` and `project_name` which, if specified, are used as the project key and name in the exported Jira json format. Option `send_email` specifies whether an email should be sent upon export result. Option `include_attachments` specifies whether attachments are included in the export. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["export_options"] + } + } + readonly responses: { + /** @description The export job has been accepted */ + readonly 202: { + headers: Readonly> + content?: never + } + /** @description The request wasn't authenticated properly */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the authenticated user does not have admin permission on the repo */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The repo does not exist or does not have an issue tracker */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zip": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the repo */ + readonly repo_name: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description The ID of the export task */ + readonly task_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Check issue export status + * @description This endpoint is used to poll for the progress of an issue export + * job and return the zip file after the job is complete. + * As long as the job is running, this will return a 202 response + * with in the response body a description of the current status. + * + * After the job has been scheduled, but before it starts executing, the endpoint + * returns a 202 response with status `ACCEPTED`. + * + * Once it starts running, it is a 202 response with status `STARTED` and progress filled. + * + * After it is finished, it becomes a 200 response with status `SUCCESS` or `FAILURE`. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the repo */ + readonly repo_name: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description The ID of the export task */ + readonly task_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Export job accepted */ + readonly 202: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue_job_status"] + } + } + /** @description The request wasn't authenticated properly */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the authenticated user does not have admin permission on the repo */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description No export job has begun */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/issues/import": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Check issue import status + * @description When using GET, this endpoint reports the status of the current import task. + * + * After the job has been scheduled, but before it starts executing, the endpoint + * returns a 202 response with status `ACCEPTED`. + * + * Once it starts running, it is a 202 response with status `STARTED` and progress filled. + * + * After it is finished, it becomes a 200 response with status `SUCCESS` or `FAILURE`. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Import job complete with either FAILURE or SUCCESS status */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue_job_status"] + } + } + /** @description Import job started */ + readonly 202: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue_job_status"] + } + } + /** @description The request wasn't authenticated properly */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the authenticated user does not have admin permission on the repo */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description No export job has begun */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Import issues + * @description A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All + * existing issues will be deleted and replaced by the contents of the imported zip file. + * + * Imports are done through a multipart/form-data POST. There is one valid and required form field, with the name + * "archive," which needs to be a file field: + * + * ``` + * $ curl -u -X POST -F archive=@/path/to/file.zip https://api.bitbucket.org/2.0/repositories///issues/import + * ``` + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Import job accepted */ + readonly 202: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["issue_job_status"] + } + } + /** @description The request wasn't authenticated properly */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description When the authenticated user does not have admin permission on the repo */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description No export job has begun */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Import already running */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/merge-base/{revspec}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit range using double dot notation (e.g. `3a8b42..9ff173`). + * */ + readonly revspec: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get the common ancestor between two commits + * @description Returns the best common ancestor between two commits, specified in a revspec + * of 2 commits (e.g. 3a8b42..9ff173). + * + * If more than one best common ancestor exists, only one will be returned. It is + * unspecified which will be returned. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit range using double dot notation (e.g. `3a8b42..9ff173`). + * */ + readonly revspec: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The merge base of the provided spec. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["commit"] + } + } + /** @description If the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have access to any of the repositories specified. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository or ref in the spec does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/milestones": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List milestones + * @description Returns the milestones that have been defined in the issue tracker. + * + * This resource is only available on repositories that have the issue + * tracker enabled. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The milestones that have been defined in the issue tracker. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_milestones"] + } + } + /** @description The specified repository does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/milestones/{milestone_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The milestone's id */ + readonly milestone_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a milestone + * @description Returns the specified issue tracker milestone object. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The milestone's id */ + readonly milestone_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified milestone object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["milestone"] + } + } + /** @description The specified repository or milestone does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/override-settings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** Retrieve the inheritance state for repository settings */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository setting inheritance state */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["repository_inheritance_state"] + } + } + /** @description If no repository exists at this location */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** Set the inheritance state for repository settings + * */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository setting inheritance state was set and no content returned */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If no repository exists at this location */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/patch/{spec}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit SHA (e.g. `3a8b42`) or a commit range using double dot + * notation (e.g. `3a8b42..9ff173`). + * */ + readonly spec: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a patch for two commits + * @description Produces a raw patch for a single commit (diffed against its first + * parent), or a patch-series for a revspec of 2 commits (e.g. + * `3a8b42..9ff173` where the first commit represents the source and the + * second commit the destination). + * + * In case of the latter (diffing a revspec), a patch series is returned + * for the commits on the source branch (`3a8b42` and its ancestors in + * our example). + * + * While similar to diffs, patches: + * + * * Have a commit header (username, commit message, etc) + * * Do not support the `path=foo/bar.py` query parameter + * + * The raw patch is returned as-is, in whatever encoding the files in the + * repository use. It is not decoded into unicode. As such, the + * content-type is `text/plain`. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description A commit SHA (e.g. `3a8b42`) or a commit range using double dot + * notation (e.g. `3a8b42..9ff173`). + * */ + readonly spec: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The raw patches */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description If the diff was too large and timed out. + * + * Since this endpoint does not employ any form of pagination, but + * instead returns the diff as a single document, it can run into + * trouble on very large diffs. If Bitbucket times out in cases + * like these, a 555 status code is returned. */ + readonly 555: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/permissions-config/groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List explicit group permissions for a repository + * @description Returns a paginated list of explicit group permissions for the given repository. + * This endpoint does not support BBQL features. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Paginated of explicit group permissions on the repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_repository_group_permissions"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description One or both of the workspace and repository doesn't exist for the given identifiers. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Slug of the requested group. */ + readonly group_slug: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get an explicit group permission for a repository + * @description Returns the group permission for a given group slug and repository + * + * Only users with admin permission for the repository may access this resource. + * + * Permissions can be: + * + * * `admin` + * * `write` + * * `read` + * * `none` + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Slug of the requested group. */ + readonly group_slug: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Group permission for group slug and repository */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["repository_group_permission"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The given user, workspace, and/or repository could not be found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update an explicit group permission for a repository + * @description Updates the group permission, or grants a new permission if one does not already exist. + * + * Only users with admin permission for the repository may access this resource. + * + * The only authentication method supported for this endpoint is via app passwords. + * + * Permissions can be: + * + * * `admin` + * * `write` + * * `read` + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Slug of the requested group. */ + readonly group_slug: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema"] + readonly responses: { + /** @description Group permission updated */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["repository_group_permission"] + } + } + /** @description No permission value was provided or the value is invalid(not one of read, write, or admin) */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description You have reached your plan's user limit and must upgrade before giving access to additional users. */ + readonly 402: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the repository, or the authentication method was not via app password. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The workspace does not exist, the repository does not exist, or the group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete an explicit group permission for a repository + * @description Deletes the repository group permission between the requested repository and group, if one exists. + * + * Only users with admin permission for the repository may access this resource. + * + * The only authentication method supported for this endpoint is via app passwords. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Slug of the requested group. */ + readonly group_slug: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Group permission deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the repository, or the authentication method was not via app password. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The workspace does not exist, the repository does not exist, or the group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/permissions-config/users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List explicit user permissions for a repository + * @description Returns a paginated list of explicit user permissions for the given repository. + * This endpoint does not support BBQL features. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Paginated of explicit user permissions on the repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_repository_user_permissions"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description No repository exists for the given repository slug and workspace. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the UUID of the account, surrounded by curly-braces, for + * example: `{account UUID}`, OR an Atlassian Account ID. + * */ + readonly selected_user_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get an explicit user permission for a repository + * @description Returns the explicit user permission for a given user and repository. + * + * Only users with admin permission for the repository may access this resource. + * + * Permissions can be: + * + * * `admin` + * * `write` + * * `read` + * * `none` + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the UUID of the account, surrounded by curly-braces, for + * example: `{account UUID}`, OR an Atlassian Account ID. + * */ + readonly selected_user_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Explicit user permission for user and repository */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["repository_user_permission"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description One or both of the workspace and repository doesn't exist for the given identifiers. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update an explicit user permission for a repository + * @description Updates the explicit user permission for a given user and repository. The selected user must be a member of + * the workspace, and cannot be the workspace owner. + * Only users with admin permission for the repository may access this resource. + * + * The only authentication method for this endpoint is via app passwords. + * + * Permissions can be: + * + * * `admin` + * * `write` + * * `read` + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the UUID of the account, surrounded by curly-braces, for + * example: `{account UUID}`, OR an Atlassian Account ID. + * */ + readonly selected_user_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema"] + readonly responses: { + /** @description Explicit user permission updated */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["repository_user_permission"] + } + } + /** @description No permission value was provided or the value is invalid (not one of read, write, or admin), or the selected user is not a valid user to update. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description You have reached your plan's user limit and must upgrade before giving access to additional users. */ + readonly 402: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the repository, or the authentication method was not via app password. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description One or more of the workspace, repository, and selected user doesn't exist for the given identifiers. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete an explicit user permission for a repository + * @description Deletes the repository user permission between the requested repository and user, if one exists. + * + * Only users with admin permission for the repository may access this resource. + * + * The only authentication method for this endpoint is via app passwords. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the UUID of the account, surrounded by curly-braces, for + * example: `{account UUID}`, OR an Atlassian Account ID. + * */ + readonly selected_user_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository user permission was deleted and no content returned. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the repository, or the authentication method was not via app password. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description One or more of the workspace, repository, and user doesn't exist for the given identifiers. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List pipelines + * @description Find pipelines + */ + readonly get: operations["getPipelinesForRepository"] + readonly put?: never + /** + * Run a pipeline + * @description Endpoint to create and initiate a pipeline. + * There 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. + * # Trigger a Pipeline for a branch + * One way to trigger pipelines is by specifying the branch for which you want to trigger a pipeline. + * The 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. + * + * ### Example + * + * ``` + * $ curl -X POST -is -u username:password \ + * -H 'Content-Type: application/json' \ + * https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \ + * -d ' + * { + * "target": { + * "ref_type": "branch", + * "type": "pipeline_ref_target", + * "ref_name": "master" + * } + * }' + * ``` + * # Trigger a Pipeline for a commit on a branch or tag + * You can initiate a pipeline for a specific commit and in the context of a specified reference (e.g. a branch, tag or bookmark). + * The 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. + * + * The following reference types are supported: + * + * * `branch` + * * `named_branch` + * * `bookmark` + * * `tag` + * + * ### Example + * + * ``` + * $ curl -X POST -is -u username:password \ + * -H 'Content-Type: application/json' \ + * https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \ + * -d ' + * { + * "target": { + * "commit": { + * "type": "commit", + * "hash": "ce5b7431602f7cbba007062eeb55225c6e18e956" + * }, + * "ref_type": "branch", + * "type": "pipeline_ref_target", + * "ref_name": "master" + * } + * }' + * ``` + * # Trigger a specific pipeline definition for a commit + * You can trigger a specific pipeline that is defined in your `bitbucket-pipelines.yml` file for a specific commit. + * In 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. + * + * ### Example + * + * ``` + * $ curl -X POST -is -u username:password \ + * -H 'Content-Type: application/json' \ + * https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \ + * -d ' + * { + * "target": { + * "commit": { + * "hash":"a3c4e02c9a3755eccdc3764e6ea13facdf30f923", + * "type":"commit" + * }, + * "selector": { + * "type":"custom", + * "pattern":"Deploy to production" + * }, + * "type":"pipeline_commit_target" + * } + * }' + * ``` + * # Trigger a specific pipeline definition for a commit on a branch or tag + * You 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. + * In 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. + * + * ### Example + * + * ``` + * $ curl -X POST -is -u username:password \ + * -H 'Content-Type: application/json' \ + * https://api.bitbucket.org/2.0/repositories/jeroendr/meat-demo2/pipelines/ \ + * -d ' + * { + * "target": { + * "commit": { + * "hash":"a3c4e02c9a3755eccdc3764e6ea13facdf30f923", + * "type":"commit" + * }, + * "selector": { + * "type": "custom", + * "pattern": "Deploy to production" + * }, + * "type": "pipeline_ref_target", + * "ref_name": "master", + * "ref_type": "branch" + * } + * }' + * ``` + * + * + * # Trigger a custom pipeline with variables + * In 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). + * + * ### Example + * + * ``` + * $ curl -X POST -is -u username:password \ + * -H 'Content-Type: application/json' \ + * https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \ + * -d ' + * { + * "target": { + * "type": "pipeline_ref_target", + * "ref_type": "branch", + * "ref_name": "master", + * "selector": { + * "type": "custom", + * "pattern": "Deploy to production" + * } + * }, + * "variables": [ + * { + * "key": "var1key", + * "value": "var1value", + * "secured": true + * }, + * { + * "key": "var2key", + * "value": "var2value" + * } + * ] + * }' + * ``` + * + * # Trigger a pull request pipeline + * + * You can also initiate a pipeline for a specific pull request. + * + * ### Example + * + * ``` + * $ curl -X POST -is -u username:password \ + * -H 'Content-Type: application/json' \ + * https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/ \ + * -d ' + * { + * "target": { + * "type": "pipeline_pullrequest_target", + * "source": "pull-request-branch", + * "destination": "master", + * "destination_commit": { + * "hash": "9f848b7" + * }, + * "commit": { + * "hash": "1a372fc" + * }, + * "pullrequest": { + * "id": "3" + * }, + * "selector": { + * "type": "pull-requests", + * "pattern": "**" + * } + * } + * }' + * ``` + * + */ + readonly post: operations["createPipelineForRepository"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get configuration + * @description Retrieve the repository pipelines configuration. + */ + readonly get: operations["getRepositoryPipelineConfig"] + /** + * Update configuration + * @description Update the pipelines configuration for a repository. + */ + readonly put: operations["updateRepositoryPipelineConfig"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config/build_number": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update the next build number + * @description Update the next build number that should be assigned to a pipeline. The next build number that will be configured has to be strictly higher than the current latest build number for this repository. + */ + readonly put: operations["updateRepositoryBuildNumber"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List schedules + * @description Retrieve the configured schedules for the given repository. + */ + readonly get: operations["getRepositoryPipelineSchedules"] + readonly put?: never + /** + * Create a schedule + * @description Create a schedule for the given repository. + */ + readonly post: operations["createRepositoryPipelineSchedule"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a schedule + * @description Retrieve a schedule by its UUID. + */ + readonly get: operations["getRepositoryPipelineSchedule"] + /** + * Update a schedule + * @description Update a schedule. + */ + readonly put: operations["updateRepositoryPipelineSchedule"] + readonly post?: never + /** + * Delete a schedule + * @description Delete a schedule. + */ + readonly delete: operations["deleteRepositoryPipelineSchedule"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}/executions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List executions of a schedule + * @description Retrieve the executions of a given schedule. + */ + readonly get: operations["getRepositoryPipelineScheduleExecutions"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get SSH key pair + * @description Retrieve the repository SSH key pair excluding the SSH private key. The private key is a write only field and will never be exposed in the logs or the REST API. + */ + readonly get: operations["getRepositoryPipelineSshKeyPair"] + /** + * Update SSH key pair + * @description Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container. + */ + readonly put: operations["updateRepositoryPipelineKeyPair"] + readonly post?: never + /** + * Delete SSH key pair + * @description Delete the repository SSH key pair. + */ + readonly delete: operations["deleteRepositoryPipelineKeyPair"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List known hosts + * @description Find repository level known hosts. + */ + readonly get: operations["getRepositoryPipelineKnownHosts"] + readonly put?: never + /** + * Create a known host + * @description Create a repository level known host. + */ + readonly post: operations["createRepositoryPipelineKnownHost"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/known_hosts/{known_host_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a known host + * @description Retrieve a repository level known host. + */ + readonly get: operations["getRepositoryPipelineKnownHost"] + /** + * Update a known host + * @description Update a repository level known host. + */ + readonly put: operations["updateRepositoryPipelineKnownHost"] + readonly post?: never + /** + * Delete a known host + * @description Delete a repository level known host. + */ + readonly delete: operations["deleteRepositoryPipelineKnownHost"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config/variables": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List variables for a repository + * @description Find repository level variables. + */ + readonly get: operations["getRepositoryPipelineVariables"] + readonly put?: never + /** + * Create a variable for a repository + * @description Create a repository level variable. + */ + readonly post: operations["createRepositoryPipelineVariable"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a variable for a repository + * @description Retrieve a repository level variable. + */ + readonly get: operations["getRepositoryPipelineVariable"] + /** + * Update a variable for a repository + * @description Update a repository level variable. + */ + readonly put: operations["updateRepositoryPipelineVariable"] + readonly post?: never + /** + * Delete a variable for a repository + * @description Delete a repository level variable. + */ + readonly delete: operations["deleteRepositoryPipelineVariable"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines-config/caches": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List caches + * @description Retrieve the repository pipelines caches. + */ + readonly get: operations["getRepositoryPipelineCaches"] + readonly put?: never + readonly post?: never + /** + * Delete caches + * @description Delete repository cache versions by name. + */ + readonly delete: operations["deleteRepositoryPipelineCaches"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + readonly post?: never + /** + * Delete a cache + * @description Delete a repository cache. + */ + readonly delete: operations["deleteRepositoryPipelineCache"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines-config/caches/{cache_uuid}/content-uri": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get cache content URI + * @description Retrieve the URI of the content of the specified cache. + */ + readonly get: operations["getRepositoryPipelineCacheContentURI"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a pipeline + * @description Retrieve a specified pipeline + */ + readonly get: operations["getPipelineForRepository"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List steps for a pipeline + * @description Find steps for the given pipeline. + */ + readonly get: operations["getPipelineStepsForRepository"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a step of a pipeline + * @description Retrieve a given step of a pipeline. + */ + readonly get: operations["getPipelineStepForRepository"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/log": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get log file for a step + * @description Retrieve the log file for a given step of a pipeline. + * + * This endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files. + */ + readonly get: operations["getPipelineStepLogForRepository"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/logs/{log_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get the logs for the build container or a service container for a given step of a pipeline. + * @description Retrieve the log file for a build container or service container. + * + * This endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files. + */ + readonly get: operations["getPipelineContainerLog"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** Get a summary of test reports for a given step of a pipeline. */ + readonly get: operations["getPipelineTestReports"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** Get test cases for a given step of a pipeline. */ + readonly get: operations["getPipelineTestReportTestCases"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** Get test case reasons (output) for a given test case in a step of a pipeline. */ + readonly get: operations["getPipelineTestReportTestCaseReasons"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pipelines/{pipeline_uuid}/stopPipeline": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Stop a pipeline + * @description Signal the stop of a pipeline and all of its steps that not have completed yet. + */ + readonly post: operations["stopPipeline"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a repository application property + * @description Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a repository. + */ + readonly get: operations["getRepositoryHostedPropertyValue"] + /** + * Update a repository application property + * @description Update an [application property](/cloud/bitbucket/application-properties/) value stored against a repository. + */ + readonly put: operations["updateRepositoryHostedPropertyValue"] + readonly post?: never + /** + * Delete a repository application property + * @description Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a repository. + */ + readonly delete: operations["deleteRepositoryHostedPropertyValue"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List pull requests + * @description Returns all pull requests on the specified repository. + * + * By default only open pull requests are returned. This can be controlled + * using the `state` query parameter. To retrieve pull requests that are + * in one of multiple states, repeat the `state` parameter for each + * individual state. + * + * This endpoint also supports filtering and sorting of the results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Only return pull requests that are in this state. This parameter can be repeated. */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" | "SUPERSEDED" + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All pull requests on the specified repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pullrequests"] + } + } + /** @description If the repository is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description If the specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a pull request + * @description Creates a new pull request where the destination repository is + * this repository and the author is the authenticated user. + * + * The minimum required fields to create a pull request are `title` and + * `source`, specified by a branch name. + * + * ``` + * curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repository/pullrequests \ + * -u my-username:my-password \ + * --request POST \ + * --header 'Content-Type: application/json' \ + * --data '{ + * "title": "My Title", + * "source": { + * "branch": { + * "name": "staging" + * } + * } + * }' + * ``` + * + * If the pull request's `destination` is not specified, it will default + * to the `repository.mainbranch`. To open a pull request to a + * different branch, say from a feature branch to a staging branch, + * specify a `destination` (same format as the `source`): + * + * ``` + * { + * "title": "My Title", + * "source": { + * "branch": { + * "name": "my-feature-branch" + * } + * }, + * "destination": { + * "branch": { + * "name": "staging" + * } + * } + * } + * ``` + * + * Reviewers can be specified by adding an array of user objects as the + * `reviewers` property. + * + * ``` + * { + * "title": "My Title", + * "source": { + * "branch": { + * "name": "my-feature-branch" + * } + * }, + * "reviewers": [ + * { + * "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" + * } + * ] + * } + * ``` + * + * Other fields: + * + * * `description` - a string + * * `close_source_branch` - boolean that specifies if the source branch should be closed upon merging + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The new pull request. + * + * The request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork). + * + * Since not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["pullrequest"] + } + } + readonly responses: { + /** @description The newly created pull request. */ + readonly 201: { + headers: { + /** @description The URL of new newly created pull request. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pullrequest"] + } + } + /** @description If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a pull request + * @description Returns the specified pull request. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pull request object */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pullrequest"] + } + } + /** @description If the repository is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description If the repository or pull request does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a pull request + * @description Mutates the specified pull request. + * + * This can be used to change the pull request's branches or description. + * + * Only open pull requests can be mutated. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The pull request that is to be updated. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["pullrequest"] + } + } + readonly responses: { + /** @description The updated pull request */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pullrequest"] + } + } + /** @description If the input document was invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository or pull request id does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List a pull request activity log + * @description Returns a paginated list of the pull request's activity log. + * + * This handler serves both a v20 and internal endpoint. The v20 endpoint + * returns reviewer comments, updates, approvals and request changes. The internal + * endpoint includes those plus tasks and attachments. + * + * Comments created on a file or a line of code have an inline property. + * + * Comment example: + * ``` + * { + * "pagelen": 20, + * "values": [ + * { + * "comment": { + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088" + * } + * }, + * "deleted": false, + * "pullrequest": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * }, + * "content": { + * "raw": "inline with to a dn from lines", + * "markup": "markdown", + * "html": "

inline with to a dn from lines

", + * "type": "rendered" + * }, + * "created_on": "2019-09-27T00:33:46.039178+00:00", + * "user": { + * "display_name": "Name Lastname", + * "uuid": "{}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/%7B%7D" + * }, + * "html": { + * "href": "https://bitbucket.org/%7B%7D/" + * }, + * "avatar": { + * "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" + * } + * }, + * "type": "user", + * "nickname": "Name", + * "account_id": "" + * }, + * "created_on": "2019-09-27T00:33:46.039178+00:00", + * "user": { + * "display_name": "Name Lastname", + * "uuid": "{}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/%7B%7D" + * }, + * "html": { + * "href": "https://bitbucket.org/%7B%7D/" + * }, + * "avatar": { + * "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" + * } + * }, + * "type": "user", + * "nickname": "Name", + * "account_id": "" + * }, + * "updated_on": "2019-09-27T00:33:46.055384+00:00", + * "inline": { + * "context_lines": "", + * "to": null, + * "path": "", + * "outdated": false, + * "from": 211 + * }, + * "type": "pullrequest_comment", + * "id": 118571088 + * }, + * "pull_request": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * } + * } + * ] + * } + * ``` + * + * Updates include a state property of OPEN, MERGED, or DECLINED. + * + * Update example: + * ``` + * { + * "pagelen": 20, + * "values": [ + * { + * "update": { + * "description": "", + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it", + * "destination": { + * "commit": { + * "type": "commit", + * "hash": "6a2c16e4a152", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152" + * } + * } + * }, + * "branch": { + * "name": "master" + * }, + * "repository": { + * "name": "Atlaskit-MK-2", + * "type": "repository", + * "full_name": "atlassian/atlaskit-mk-2", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2" + * }, + * "avatar": { + * "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js" + * } + * }, + * "uuid": "{}" + * } + * }, + * "reason": "", + * "source": { + * "commit": { + * "type": "commit", + * "hash": "728c8bad1813", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813" + * } + * } + * }, + * "branch": { + * "name": "username/NONE-add-onClick-prop-for-accessibility" + * }, + * "repository": { + * "name": "Atlaskit-MK-2", + * "type": "repository", + * "full_name": "atlassian/atlaskit-mk-2", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2" + * }, + * "avatar": { + * "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js" + * } + * }, + * "uuid": "{}" + * } + * }, + * "state": "OPEN", + * "author": { + * "display_name": "Name Lastname", + * "uuid": "{}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/%7B%7D" + * }, + * "html": { + * "href": "https://bitbucket.org/%7B%7D/" + * }, + * "avatar": { + * "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" + * } + * }, + * "type": "user", + * "nickname": "Name", + * "account_id": "" + * }, + * "date": "2019-05-10T06:48:25.305565+00:00" + * }, + * "pull_request": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * } + * } + * ] + * } + * ``` + * + * Approval example: + * ``` + * { + * "pagelen": 20, + * "values": [ + * { + * "approval": { + * "date": "2019-09-27T00:37:19.849534+00:00", + * "pullrequest": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * }, + * "user": { + * "display_name": "Name Lastname", + * "uuid": "{}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/%7B%7D" + * }, + * "html": { + * "href": "https://bitbucket.org/%7B%7D/" + * }, + * "avatar": { + * "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" + * } + * }, + * "type": "user", + * "nickname": "Name", + * "account_id": "" + * } + * }, + * "pull_request": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * } + * } + * ] + * } + * ``` + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pull request activity log */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description If the repository is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description If the specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Approve a pull request + * @description Approve the specified pull request as the authenticated user. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The `participant` object recording that the authenticated user approved the pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["participant"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified pull request or the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Unapprove a pull request + * @description Redact the authenticated user's approval of the specified pull + * request. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating the authenticated user's approval has been withdrawn. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description Pull request cannot be unapproved because the pull request has already been merged. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified pull request or the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List comments on a pull request + * @description Returns a paginated list of the pull request's comments. + * + * This includes both global, inline comments and replies. + * + * The default sorting is oldest to newest and can be overridden with + * the `sort` query parameter. + * + * This endpoint also supports filtering and sorting of the results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more + * details. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of comments made on the given pull request, in chronological order. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pullrequest_comments"] + } + } + /** @description If the authenticated user does not have access to the pull request. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a comment on a pull request + * @description Creates a new pull request comment. + * + * Returns the newly created pull request comment. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The comment object. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pullrequest_comment"] + } + } + readonly responses: { + /** @description The newly created comment. */ + readonly 201: { + headers: { + /** @description The URL of the new comment */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pullrequest_comment"] + } + } + /** @description If the authenticated user does not have access to the pull request. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a comment on a pull request + * @description Returns a specific pull request comment. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pullrequest_comment"] + } + } + /** @description If the authenticated user does not have access to the pull request. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the comment does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a comment on a pull request + * @description Updates a specific pull request comment. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The contents of the updated comment. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pullrequest_comment"] + } + } + readonly responses: { + /** @description The updated comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pullrequest_comment"] + } + } + /** @description If the authenticated user does not have access to the comment. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the comment does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a comment on a pull request + * @description Deletes a specific pull request comment. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful deletion. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have access to delete the comment. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the comment does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** Resolve a comment thread */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The comment resolution details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["comment_resolution"] + } + } + /** @description If the authenticated user does not have access to the pull request, + * if the provided comment is not a top-level comment, + * or if the comment is not on the diff. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the comment does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the comment has already been resolved. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** Reopen a comment thread */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The comment is reopened. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have access to the pull request, + * or if the provided comment is not a top-level comment. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the comment does not exist, or if the comment has not been resolved */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List commits on a pull request + * @description Returns a paginated list of the pull request's commits. + * + * These are the commits that are being merged into the destination + * branch when the pull requests gets accepted. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of commits made on the given pull request, in chronological order. This list will be empty if the source branch no longer exists. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have access to the pull request. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the pull request does not exist or the source branch is from a forked repository which no longer exists. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Decline a pull request + * @description Declines the pull request. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pull request was successfully declined. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pullrequest"] + } + } + /** @description If the decline took too long and timed out. + * In this case the caller should retry the request later. */ + readonly 555: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List changes in a pull request + * @description Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) + * with the revspec that corresponds to the pull request. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) with the + * revspec that corresponds to the pull request. + * */ + readonly 302: { + headers: Readonly> + content?: never + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get the diff stat for a pull request + * @description Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get) + * with the revspec that corresponds to the pull request. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get) with + * the revspec that corresponds to pull request. + * */ + readonly 302: { + headers: Readonly> + content?: never + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Merge a pull request + * @description Merges the pull request. + */ + readonly post: { + readonly parameters: { + readonly query?: { + /** @description Default value is false. + * + * + * When set to true, runs merge asynchronously and + * immediately returns a 202 with polling link to + * the task-status API in the Location header. + * + * + * When set to false, runs merge and waits for it to + * complete, returning 200 when it succeeds. If the + * duration of the merge exceeds a timeout threshold, + * the API returns a 202 with polling link to the + * task-status API in the Location header. */ + readonly async?: boolean + } + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["pullrequest_merge_parameters"] + } + } + readonly responses: { + /** @description The pull request object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pullrequest"] + } + } + /** @description In the Location header, the URL to poll for the pull request merge status */ + readonly 202: { + headers: Readonly> + content?: never + } + /** @description If the merge took too long and timed out. + * In this case the caller should retry the request later */ + readonly 555: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description ID of the merge task */ + readonly task_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get the merge task status for a pull request + * @description When merging a pull request takes too long, the client receives a + * task ID along with a 202 status code. The task ID can be used in a call + * to this endpoint to check the status of a merge task. + * + * ``` + * curl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/ + * ``` + * + * If the merge task is not yet finished, a PENDING status will be returned. + * + * ``` + * HTTP/2 200 + * { + * "task_status": "PENDING", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/" + * } + * } + * } + * ``` + * + * If the merge was successful, a SUCCESS status will be returned. + * + * ``` + * HTTP/2 200 + * { + * "task_status": "SUCCESS", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/" + * } + * }, + * "merge_result": + * } + * ``` + * + * If the merge task failed, an error will be returned. + * + * ``` + * { + * "type": "error", + * "error": { + * "message": "" + * } + * } + * ``` + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description ID of the merge task */ + readonly task_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Returns a task status if the merge is either pending or successful, and if it is successful, a pull request */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description If the provided task ID does not relate to this pull request, or if something went wrong during the merge operation */ + readonly 400: { + headers: Readonly> + content?: never + } + /** @description The user making the request does not have permission to the repo and is different from the user who queued the task */ + readonly 403: { + headers: Readonly> + content?: never + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get the patch for a pull request + * @description Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get) + * with the revspec that corresponds to pull request. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get) with + * the revspec that corresponds to pull request. + * */ + readonly 302: { + headers: Readonly> + content?: never + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** Request changes for a pull request */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The `participant` object recording that the authenticated user requested changes on the pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["participant"] + } + } + /** @description Pull request changes cannot be requested because the pull request has already been merged. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified pull request or the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** Remove change request for a pull request */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating the authenticated user's request for change has been withdrawn. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description Pull request requested changes cannot be removed because the pull request has already been merged. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified pull request or the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List commit statuses for a pull request + * @description Returns all statuses (e.g. build results) for the given pull + * request. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * */ + readonly q?: string + /** @description Field by which the results should be sorted as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * Defaults to `created_on`. + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of all commit statuses for this pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_commitstatuses"] + } + } + /** @description If the repository is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description If the specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List tasks on a pull request + * @description Returns a paginated list of the pull request's tasks. + * + * This endpoint supports filtering and sorting of the results by the 'task' field. + * See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Current number of objects on the existing page. + * The default value is 10 with 100 being the maximum allowed value. + * Individual APIs may enforce different values. + * */ + readonly pagelen?: number + /** @description + * Query string to narrow down the response. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details. */ + readonly q?: string + /** @description + * Field by which the results should be sorted as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). + * Defaults to `created_on`. + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of pull request tasks for the given pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_tasks"] + } + } + /** @description If the user provides an invalid filter, sort, or fields query parameter. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have access to the pull request. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a task on a pull request + * @description Creates a new pull request task. + * + * Returns the newly created pull request task. + * + * Tasks can optionally be created in relation to a comment specified by the comment's ID which + * will cause the task to appear below the comment on a pull request when viewed in Bitbucket. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The contents of the task */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pullrequest_task_create"] + } + } + readonly responses: { + /** @description The newly created task. */ + readonly 201: { + headers: { + /** @description The URL of the new task */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pullrequest_comment_task"] + } + } + /** @description There is a missing required field in the request or the task content is blank. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have access to the pull request. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description The ID of the task. */ + readonly task_id: number + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a task on a pull request + * @description Returns a specific pull request task. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description The ID of the task. */ + readonly task_id: number + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The task. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pullrequest_comment_task"] + } + } + /** @description If the authenticated user does not have access to the pull request. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the task does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a task on a pull request + * @description Updates a specific pull request task. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description The ID of the task. */ + readonly task_id: number + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The updated state and content of the task. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pullrequest_task_update"] + } + } + readonly responses: { + /** @description The updated task. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pullrequest_comment_task"] + } + } + /** @description There is a missing required field in the request or the task content is blank. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have access to the pull request. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the task does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a task on a pull request + * @description Deletes a specific pull request task. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the pull request. */ + readonly pull_request_id: number + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description The ID of the task. */ + readonly task_id: number + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful deletion. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have access to delete the task. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the task does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a pull request application property + * @description Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request. + */ + readonly get: operations["getPullRequestHostedPropertyValue"] + /** + * Update a pull request application property + * @description Update an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request. + */ + readonly put: operations["updatePullRequestHostedPropertyValue"] + readonly post?: never + /** + * Delete a pull request application property + * @description Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request. + */ + readonly delete: operations["deletePullRequestHostedPropertyValue"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/pullrequests/activity": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List a pull request activity log + * @description Returns a paginated list of the pull request's activity log. + * + * This handler serves both a v20 and internal endpoint. The v20 endpoint + * returns reviewer comments, updates, approvals and request changes. The internal + * endpoint includes those plus tasks and attachments. + * + * Comments created on a file or a line of code have an inline property. + * + * Comment example: + * ``` + * { + * "pagelen": 20, + * "values": [ + * { + * "comment": { + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088" + * } + * }, + * "deleted": false, + * "pullrequest": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * }, + * "content": { + * "raw": "inline with to a dn from lines", + * "markup": "markdown", + * "html": "

inline with to a dn from lines

", + * "type": "rendered" + * }, + * "created_on": "2019-09-27T00:33:46.039178+00:00", + * "user": { + * "display_name": "Name Lastname", + * "uuid": "{}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/%7B%7D" + * }, + * "html": { + * "href": "https://bitbucket.org/%7B%7D/" + * }, + * "avatar": { + * "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" + * } + * }, + * "type": "user", + * "nickname": "Name", + * "account_id": "" + * }, + * "created_on": "2019-09-27T00:33:46.039178+00:00", + * "user": { + * "display_name": "Name Lastname", + * "uuid": "{}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/%7B%7D" + * }, + * "html": { + * "href": "https://bitbucket.org/%7B%7D/" + * }, + * "avatar": { + * "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" + * } + * }, + * "type": "user", + * "nickname": "Name", + * "account_id": "" + * }, + * "updated_on": "2019-09-27T00:33:46.055384+00:00", + * "inline": { + * "context_lines": "", + * "to": null, + * "path": "", + * "outdated": false, + * "from": 211 + * }, + * "type": "pullrequest_comment", + * "id": 118571088 + * }, + * "pull_request": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * } + * } + * ] + * } + * ``` + * + * Updates include a state property of OPEN, MERGED, or DECLINED. + * + * Update example: + * ``` + * { + * "pagelen": 20, + * "values": [ + * { + * "update": { + * "description": "", + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it", + * "destination": { + * "commit": { + * "type": "commit", + * "hash": "6a2c16e4a152", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152" + * } + * } + * }, + * "branch": { + * "name": "master" + * }, + * "repository": { + * "name": "Atlaskit-MK-2", + * "type": "repository", + * "full_name": "atlassian/atlaskit-mk-2", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2" + * }, + * "avatar": { + * "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js" + * } + * }, + * "uuid": "{}" + * } + * }, + * "reason": "", + * "source": { + * "commit": { + * "type": "commit", + * "hash": "728c8bad1813", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813" + * } + * } + * }, + * "branch": { + * "name": "username/NONE-add-onClick-prop-for-accessibility" + * }, + * "repository": { + * "name": "Atlaskit-MK-2", + * "type": "repository", + * "full_name": "atlassian/atlaskit-mk-2", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2" + * }, + * "avatar": { + * "href": "https://bytebucket.org/ravatar/%7B%7D?ts=js" + * } + * }, + * "uuid": "{}" + * } + * }, + * "state": "OPEN", + * "author": { + * "display_name": "Name Lastname", + * "uuid": "{}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/%7B%7D" + * }, + * "html": { + * "href": "https://bitbucket.org/%7B%7D/" + * }, + * "avatar": { + * "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" + * } + * }, + * "type": "user", + * "nickname": "Name", + * "account_id": "" + * }, + * "date": "2019-05-10T06:48:25.305565+00:00" + * }, + * "pull_request": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * } + * } + * ] + * } + * ``` + * + * Approval example: + * ``` + * { + * "pagelen": 20, + * "values": [ + * { + * "approval": { + * "date": "2019-09-27T00:37:19.849534+00:00", + * "pullrequest": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * }, + * "user": { + * "display_name": "Name Lastname", + * "uuid": "{}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/%7B%7D" + * }, + * "html": { + * "href": "https://bitbucket.org/%7B%7D/" + * }, + * "avatar": { + * "href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128" + * } + * }, + * "type": "user", + * "nickname": "Name", + * "account_id": "" + * } + * }, + * "pull_request": { + * "type": "pullrequest", + * "id": 5695, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695" + * } + * }, + * "title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it" + * } + * } + * ] + * } + * ``` + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pull request activity log */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description If the repository is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content?: never + } + /** @description If the specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/refs": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List branches and tags + * @description Returns the branches and tags in the repository. + * + * By default, results will be in the order the underlying source control system returns them and identical to + * the ordering one sees when running "$ git show-ref". Note that this follows simple + * lexical ordering of the ref names. + * + * This can be undesirable as it does apply any natural sorting semantics, meaning for instance that refs are + * sorted ["branch1", "branch10", "branch2", "v10", "v11", "v9"] instead of ["branch1", "branch2", + * "branch10", "v9", "v10", "v11"]. + * + * Sorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name, + * Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + /** @description + * Field by which the results should be sorted as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name` + * field is handled specially for refs in that, if specified as the sort field, it + * uses a natural sort order instead of the default lexicographical sort order. For example, + * it will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2']. */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of refs matching any filter criteria that were provided. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_refs"] + } + } + /** @description If the repository is private and the authenticated user does not have + * access to it. + * */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/refs/branches": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List open branches + * @description Returns a list of all open branches within the specified repository. + * Results will be in the order the source control manager returns them. + * + * Branches support [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) + * that can be used to search for specific branches. For instance, to find + * all branches that have "stab" in their name: + * + * ``` + * curl -s https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches -G --data-urlencode 'q=name ~ "stab"' + * ``` + * + * By default, results will be in the order the underlying source control system returns them and identical to + * the ordering one sees when running "$ git branch --list". Note that this follows simple + * lexical ordering of the ref names. + * + * This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are + * sorted ["v10", "v11", "v9"] instead of ["v9", "v10", "v11"]. + * + * Sorting can be changed using the ?q= query parameter. When using ?q=name to explicitly sort on ref name, + * Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + /** @description + * Field by which the results should be sorted as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name` + * field is handled specially for branches in that, if specified as the sort field, it + * uses a natural sort order instead of the default lexicographical sort order. For example, + * it will return ['branch1', 'branch2', 'branch10'] instead of ['branch1', 'branch10', 'branch2']. */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of branches matching any filter criteria that were provided. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_branches"] + } + } + /** @description If the repository is private and the authenticated user does not have + * access to it. + * */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a branch + * @description Creates a new branch in the specified repository. + * + * The payload of the POST should consist of a JSON document that + * contains the name of the tag and the target hash. + * + * ``` + * curl https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/branches \ + * -s -u seanfarley -X POST -H "Content-Type: application/json" \ + * -d '{ + * "name" : "smf/create-feature", + * "target" : { + * "hash" : "default", + * } + * }' + * ``` + * + * This call requires authentication. Private repositories require the + * caller to authenticate with an account that has appropriate + * authorization. + * + * The branch name should not include any prefixes (e.g. + * refs/heads). This endpoint does support using short hash prefixes for + * the commit hash, but it may return a 400 response if the provided + * prefix is ambiguous. Using a full commit hash is the preferred + * approach. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The newly created branch object. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branch"] + } + } + /** @description If the repository is private and the authenticated user does not have + * access to it. + * */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or branch does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/refs/branches/{name}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the branch. */ + readonly name: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a branch + * @description Returns a branch object within the specified repository. + * + * This call requires authentication. Private repositories require the + * caller to authenticate with an account that has appropriate + * authorization. + * + * For Git, the branch name should not include any prefixes (e.g. + * refs/heads). + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the branch. */ + readonly name: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The branch object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branch"] + } + } + /** @description If the repository is private and the authenticated user does not have + * access to it. + * */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or branch does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + /** + * Delete a branch + * @description Delete a branch in the specified repository. + * + * The main branch is not allowed to be deleted and will return a 400 + * response. + * + * The branch name should not include any prefixes (e.g. + * refs/heads). + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the branch. */ + readonly name: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates that the specified branch was successfully deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the repository is private and the authenticated user does not have + * access to it. + * */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or branch does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/refs/tags": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List tags + * @description Returns the tags in the repository. + * + * By default, results will be in the order the underlying source control system returns them and identical to + * the ordering one sees when running "$ git tag --list". Note that this follows simple + * lexical ordering of the ref names. + * + * This can be undesirable as it does apply any natural sorting semantics, meaning for instance that tags are + * sorted ["v10", "v11", "v9"] instead of ["v9", "v10", "v11"]. + * + * Sorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name, + * Bitbucket will apply natural sorting and interpret numerical values as numbers instead of strings. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + /** @description + * Field by which the results should be sorted as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). The `name` + * field is handled specially for tags in that, if specified as the sort field, it + * uses a natural sort order instead of the default lexicographical sort order. For example, + * it will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2']. */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of tags matching any filter criteria that were provided. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_tags"] + } + } + /** @description If the repository is private and the authenticated user does not have + * access to it. + * */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a tag + * @description Creates a new tag in the specified repository. + * + * The payload of the POST should consist of a JSON document that + * contains the name of the tag and the target hash. + * + * ``` + * curl https://api.bitbucket.org/2.0/repositories/jdoe/myrepo/refs/tags \ + * -s -u jdoe -X POST -H "Content-Type: application/json" \ + * -d '{ + * "name" : "new-tag-name", + * "target" : { + * "hash" : "a1b2c3d4e5f6", + * } + * }' + * ``` + * + * This endpoint does support using short hash prefixes for the commit + * hash, but it may return a 400 response if the provided prefix is + * ambiguous. Using a full commit hash is the preferred approach. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["tag"] + } + } + readonly responses: { + /** @description The newly created tag. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["tag"] + } + } + /** @description If the target hash is missing, ambiguous, or invalid, or if the name is not provided. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/refs/tags/{name}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the tag. */ + readonly name: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a tag + * @description Returns the specified tag. + * + * ``` + * $ curl -s https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8 -G | jq . + * { + * "name": "3.8", + * "links": { + * "commits": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commits/3.8" + * }, + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8" + * }, + * "html": { + * "href": "https://bitbucket.org/seanfarley/hg/commits/tag/3.8" + * } + * }, + * "tagger": { + * "raw": "Matt Mackall ", + * "type": "author", + * "user": { + * "username": "mpmselenic", + * "nickname": "mpmselenic", + * "display_name": "Matt Mackall", + * "type": "user", + * "uuid": "{a4934530-db4c-419c-a478-9ab4964c2ee7}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/mpmselenic" + * }, + * "html": { + * "href": "https://bitbucket.org/mpmselenic/" + * }, + * "avatar": { + * "href": "https://bitbucket.org/account/mpmselenic/avatar/32/" + * } + * } + * } + * }, + * "date": "2016-05-01T18:52:25+00:00", + * "message": "Added tag 3.8 for changeset f85de28eae32", + * "type": "tag", + * "target": { + * "hash": "f85de28eae32e7d3064b1a1321309071bbaaa069", + * "repository": { + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg" + * }, + * "html": { + * "href": "https://bitbucket.org/seanfarley/hg" + * }, + * "avatar": { + * "href": "https://bitbucket.org/seanfarley/hg/avatar/32/" + * } + * }, + * "type": "repository", + * "name": "hg", + * "full_name": "seanfarley/hg", + * "uuid": "{c75687fb-e99d-4579-9087-190dbd406d30}" + * }, + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069" + * }, + * "comments": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/comments" + * }, + * "patch": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/patch/f85de28eae32e7d3064b1a1321309071bbaaa069" + * }, + * "html": { + * "href": "https://bitbucket.org/seanfarley/hg/commits/f85de28eae32e7d3064b1a1321309071bbaaa069" + * }, + * "diff": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/diff/f85de28eae32e7d3064b1a1321309071bbaaa069" + * }, + * "approve": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/approve" + * }, + * "statuses": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/statuses" + * } + * }, + * "author": { + * "raw": "Sean Farley ", + * "type": "author", + * "user": { + * "username": "seanfarley", + * "nickname": "seanfarley", + * "display_name": "Sean Farley", + * "type": "user", + * "uuid": "{a295f8a8-5876-4d43-89b5-3ad8c6c3c51d}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/seanfarley" + * }, + * "html": { + * "href": "https://bitbucket.org/seanfarley/" + * }, + * "avatar": { + * "href": "https://bitbucket.org/account/seanfarley/avatar/32/" + * } + * } + * } + * }, + * "parents": [ + * { + * "hash": "9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2", + * "type": "commit", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2" + * }, + * "html": { + * "href": "https://bitbucket.org/seanfarley/hg/commits/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2" + * } + * } + * } + * ], + * "date": "2016-05-01T04:21:17+00:00", + * "message": "debian: alphabetize build deps", + * "type": "commit" + * } + * } + * ``` + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the tag. */ + readonly name: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The tag object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["tag"] + } + } + /** @description If the repository is private and the authenticated user does not have + * access to it. + * */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or tag does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + /** + * Delete a tag + * @description Delete a tag in the specified repository. + * + * The tag name should not include any prefixes (e.g. refs/tags). + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the tag. */ + readonly name: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates the specified tag was successfully deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the repository is private and the authenticated user does not have + * access to it. + * */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The specified repository or tag does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/src": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get the root directory of the main branch + * @description This endpoint redirects the client to the directory listing of the + * root directory on the main branch. + * + * This is equivalent to directly hitting + * [/2.0/repositories/{username}/{repo_slug}/src/{commit}/{path}](src/%7Bcommit%7D/%7Bpath%7D) + * without having to know the name or SHA1 of the repo's main branch. + * + * To create new commits, [POST to this endpoint](#post) + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Instead of returning the file's contents, return the (json) meta data for it. */ + readonly format?: "meta" + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description If the path matches a file, then the raw contents of the file are + * returned (unless the `format=meta` query parameter was provided, + * in which case a json document containing the file's meta data is + * returned). If the path matches a directory, then a paginated + * list of file and directory entries is returned (if the + * `format=meta` query parameter was provided, then the json document + * containing the directory's meta data is returned). + * */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_treeentries"] + } + } + /** @description If the path or commit in the URL does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a commit by uploading a file + * @description This endpoint is used to create new commits in the repository by + * uploading files. + * + * To add a new file to a repository: + * + * ``` + * $ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \ + * -F /repo/path/to/image.png=@image.png + * ``` + * + * This will create a new commit on top of the main branch, inheriting the + * contents of the main branch, but adding (or overwriting) the + * `image.png` file to the repository in the `/repo/path/to` directory. + * + * To create a commit that deletes files, use the `files` parameter: + * + * ``` + * $ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \ + * -F files=/file/to/delete/1.txt \ + * -F files=/file/to/delete/2.txt + * ``` + * + * You can add/modify/delete multiple files in a request. Rename/move a + * file by deleting the old path and adding the content at the new path. + * + * This endpoint accepts `multipart/form-data` (as in the examples above), + * as well as `application/x-www-form-urlencoded`. + * + * Note: `multipart/form-data` is currently not supported by Forge apps + * for this API. + * + * #### multipart/form-data + * + * A `multipart/form-data` post contains a series of "form fields" that + * identify both the individual files that are being uploaded, as well as + * additional, optional meta data. + * + * Files are uploaded in file form fields (those that have a + * `Content-Disposition` parameter) whose field names point to the remote + * path in the repository where the file should be stored. Path field + * names are always interpreted to be absolute from the root of the + * repository, regardless whether the client uses a leading slash (as the + * above `curl` example did). + * + * File contents are treated as bytes and are not decoded as text. + * + * The commit message, as well as other non-file meta data for the + * request, is sent along as normal form field elements. Meta data fields + * share the same namespace as the file objects. For `multipart/form-data` + * bodies that should not lead to any ambiguity, as the + * `Content-Disposition` header will contain the `filename` parameter to + * distinguish between a file named "message" and the commit message field. + * + * #### application/x-www-form-urlencoded + * + * It is also possible to upload new files using a simple + * `application/x-www-form-urlencoded` POST. This can be convenient when + * uploading pure text files: + * + * ``` + * $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src \ + * --data-urlencode "/path/to/me.txt=Lorem ipsum." \ + * --data-urlencode "message=Initial commit" \ + * --data-urlencode "author=Erik van Zijst " + * ``` + * + * There could be a field name clash if a client were to upload a file + * named "message", as this filename clashes with the meta data property + * for the commit message. To avoid this and to upload files whose names + * clash with the meta data properties, use a leading slash for the files, + * e.g. `curl --data-urlencode "/message=file contents"`. + * + * When an explicit slash is omitted for a file whose path matches that of + * a meta data parameter, then it is interpreted as meta data, not as a + * file. + * + * #### Executables and links + * + * While this API aims to facilitate the most common use cases, it is + * possible to perform some more advanced operations like creating a new + * symlink in the repository, or creating an executable file. + * + * Files can be supplied with a `x-attributes` value in the + * `Content-Disposition` header. For example, to upload an executable + * file, as well as create a symlink from `README.txt` to `README`: + * + * ``` + * --===============1438169132528273974== + * Content-Type: text/plain; charset="us-ascii" + * MIME-Version: 1.0 + * Content-Transfer-Encoding: 7bit + * Content-ID: "bin/shutdown.sh" + * Content-Disposition: attachment; filename="shutdown.sh"; x-attributes:"executable" + * + * #!/bin/sh + * halt + * + * --===============1438169132528273974== + * Content-Type: text/plain; charset="us-ascii" + * MIME-Version: 1.0 + * Content-Transfer-Encoding: 7bit + * Content-ID: "/README.txt" + * Content-Disposition: attachment; filename="README.txt"; x-attributes:"link" + * + * README + * --===============1438169132528273974==-- + * ``` + * + * Links are files that contain the target path and have + * `x-attributes:"link"` set. + * + * When overwriting links with files, or vice versa, the newly uploaded + * file determines both the new contents, as well as the attributes. That + * means uploading a file without specifying `x-attributes="link"` will + * create a regular file, even if the parent commit hosted a symlink at + * the same path. + * + * The same applies to executables. When modifying an existing executable + * file, the form-data file element must include + * `x-attributes="executable"` in order to preserve the executable status + * of the file. + * + * Note that this API does not support the creation or manipulation of + * subrepos / submodules. + */ + readonly post: { + readonly parameters: { + readonly query?: { + /** @description + * The raw string to be used as the new commit's author. + * This string follows the format + * `Erik van Zijst `. + * + * When omitted, Bitbucket uses the authenticated user's + * full/display name and primary email address. Commits cannot + * be created anonymously. */ + readonly author?: string + /** @description + * The name of the branch that the new commit should be + * created on. When omitted, the commit will be created on top + * of the main branch and will become the main branch's new + * head. + * + * When a branch name is provided that already exists in the + * repo, then the commit will be created on top of that + * branch. In this case, *if* a parent SHA1 was also provided, + * then it is asserted that the parent is the branch's + * tip/HEAD at the time the request is made. When this is not + * the case, a 409 is returned. + * + * When a new branch name is specified (that does not already + * exist in the repo), and no parent SHA1s are provided, then + * the new commit will inherit from the current main branch's + * tip/HEAD commit, but not advance the main branch. The new + * commit will be the new branch. When the request *also* + * specifies a parent SHA1, then the new commit and branch + * are created directly on top of the parent commit, + * regardless of the state of the main branch. + * + * When a branch name is not specified, but a parent SHA1 is + * provided, then Bitbucket asserts that it represents the + * main branch's current HEAD/tip, or a 409 is returned. + * + * When a branch name is not specified and the repo is empty, + * the new commit will become the repo's root commit and will + * be on the main branch. + * + * When a branch name is specified and the repo is empty, the + * new commit will become the repo's root commit and also + * define the repo's main branch going forward. + * + * This API cannot be used to create additional root commits + * in non-empty repos. + * + * The branch field cannot be repeated. + * + * As a side effect, this API can be used to create a new + * branch without modifying any files, by specifying a new + * branch name in this field, together with `parents`, but + * omitting the `files` fields, while not sending any files. + * This will create a new commit and branch with the same + * contents as the first parent. The diff of this commit + * against its first parent will be empty. + * */ + readonly branch?: string + /** @description + * Optional field that declares the files that the request is + * manipulating. When adding a new file to a repo, or when + * overwriting an existing file, the client can just upload + * the full contents of the file in a normal form field and + * the use of this `files` meta data field is redundant. + * However, when the `files` field contains a file path that + * does not have a corresponding, identically-named form + * field, then Bitbucket interprets that as the client wanting + * to replace the named file with the null set and the file is + * deleted instead. + * + * Paths in the repo that are referenced in neither files nor + * an individual file field, remain unchanged and carry over + * from the parent to the new commit. + * + * This API does not support renaming as an explicit feature. + * To rename a file, simply delete it and recreate it under + * the new name in the same commit. + * */ + readonly files?: string + /** @description The commit message. When omitted, Bitbucket uses a canned string. */ + readonly message?: string + /** @description + * A comma-separated list of SHA1s of the commits that should + * be the parents of the newly created commit. + * + * When omitted, the new commit will inherit from and become + * a child of the main branch's tip/HEAD commit. + * + * When more than one SHA1 is provided, the first SHA1 + * identifies the commit from which the content will be + * inherited.". */ + readonly parents?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description + * */ + readonly 201: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have write or admin access */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/src/{commit}/{path}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get file or directory contents + * @description This endpoints is used to retrieve the contents of a single file, + * or the contents of a directory at a specified revision. + * + * #### Raw file contents + * + * When `path` points to a file, this endpoint returns the raw contents. + * The response's Content-Type is derived from the filename + * extension (not from the contents). The file contents are not processed + * and no character encoding/recoding is performed and as a result no + * character encoding is included as part of the Content-Type. + * + * The `Content-Disposition` header will be "attachment" to prevent + * browsers from running executable files. + * + * If the file is managed by LFS, then a 301 redirect pointing to + * Atlassian's media services platform is returned. + * + * The response includes an ETag that is based on the contents of the file + * and its attributes. This means that an empty `__init__.py` always + * returns the same ETag, regardless on the directory it lives in, or the + * commit it is on. + * + * #### File meta data + * + * When the request for a file path includes the query parameter + * `?format=meta`, instead of returning the file's raw contents, Bitbucket + * instead returns the JSON object describing the file's properties: + * + * ```javascript + * $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests/__init__.py?format=meta + * { + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py" + * }, + * "meta": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta" + * } + * }, + * "path": "tests/__init__.py", + * "commit": { + * "type": "commit", + * "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335" + * } + * } + * }, + * "attributes": [], + * "type": "commit_file", + * "size": 0 + * } + * ``` + * + * File objects contain an `attributes` element that contains a list of + * possible modifiers. Currently defined values are: + * + * * `link` -- indicates that the entry is a symbolic link. The contents + * of the file represent the path the link points to. + * * `executable` -- indicates that the file has the executable bit set. + * * `subrepository` -- indicates that the entry points to a submodule or + * subrepo. The contents of the file is the SHA1 of the repository + * pointed to. + * * `binary` -- indicates whether Bitbucket thinks the file is binary. + * + * This endpoint can provide an alternative to how a HEAD request can be + * used to check for the existence of a file, or a file's size without + * incurring the overhead of receiving its full contents. + * + * + * #### Directory listings + * + * When `path` points to a directory instead of a file, the response is a + * paginated list of directory and file objects in the same order as the + * underlying SCM system would return them. + * + * For example: + * + * ```javascript + * $ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests + * { + * "pagelen": 10, + * "values": [ + * { + * "path": "tests/test_project", + * "type": "commit_directory", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/" + * }, + * "meta": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta" + * } + * }, + * "commit": { + * "type": "commit", + * "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335" + * } + * } + * } + * }, + * { + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py" + * }, + * "meta": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta" + * } + * }, + * "path": "tests/__init__.py", + * "commit": { + * "type": "commit", + * "hash": "eefd5ef5d3df01aed629f650959d6706d54cd335", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335" + * }, + * "html": { + * "href": "https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335" + * } + * } + * }, + * "attributes": [], + * "type": "commit_file", + * "size": 0 + * } + * ], + * "page": 1, + * "size": 2 + * } + * ``` + * + * When listing the contents of the repo's root directory, the use of a + * trailing slash at the end of the URL is required. + * + * The response by default is not recursive, meaning that only the direct contents of + * a path are returned. The response does not recurse down into + * subdirectories. In order to "walk" the entire directory tree, the + * client can either parse each response and follow the `self` links of each + * `commit_directory` object, or can specify a `max_depth` to recurse to. + * + * The max_depth parameter will do a breadth-first search to return the contents of the subdirectories + * up to the depth specified. Breadth-first search was chosen as it leads to the least amount of + * file system operations for git. If the `max_depth` parameter is specified to be too + * large, the call will time out and return a 555. + * + * Each returned object is either a `commit_file`, or a `commit_directory`, + * both of which contain a `path` element. This path is the absolute path + * from the root of the repository. Each object also contains a `commit` + * object which embeds the commit the file is on. Note that this is merely + * the commit that was used in the URL. It is *not* the commit that last + * modified the file. + * + * Directory objects have 2 representations. Their `self` link returns the + * paginated contents of the directory. The `meta` link on the other hand + * returns the actual `directory` object itself, e.g.: + * + * ```javascript + * { + * "path": "tests/test_project", + * "type": "commit_directory", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/" + * }, + * "meta": { + * "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta" + * } + * }, + * "commit": { ... } + * } + * ``` + * + * #### Querying, filtering and sorting + * + * Like most API endpoints, this API supports the Bitbucket + * querying/filtering syntax and so you could filter a directory listing + * to only include entries that match certain criteria. For instance, to + * list all binary files over 1kb use the expression: + * + * `size > 1024 and attributes = "binary"` + * + * which after urlencoding yields the query string: + * + * `?q=size%3E1024+and+attributes%3D%22binary%22` + * + * To change the ordering of the response, use the `?sort` parameter: + * + * `.../src/eefd5ef/?sort=-size` + * + * See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more + * details. + */ + readonly get: { + readonly parameters: { + readonly 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. 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. */ + readonly format?: "meta" | "rendered" + /** @description If provided, returns the contents of the repository and its subdirectories recursively until the specified max_depth of nested directories. When omitted, this defaults to 1. */ + readonly max_depth?: number + /** @description Optional filter expression as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + /** @description Optional sorting parameter as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results). */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description The commit's SHA1. */ + readonly commit: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description If the path matches a file, then the raw contents of the file are + * returned. If the `format=meta` query parameter is provided, + * a json document containing the file's meta data is + * returned. If the `format=rendered` query parameter is provided, + * the contents of the file in HTML-formated rendered markup is returned. + * If the path matches a directory, then a paginated + * list of file and directory entries is returned (if the + * `format=meta` query parameter was provided, then the json document + * containing the directory's meta data is returned.) + * */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_treeentries"] + } + } + /** @description If the path or commit in the URL does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the call times out, possibly because the specified recursion depth is too large. */ + readonly 555: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/versions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List defined versions for issues + * @description Returns the versions that have been defined in the issue tracker. + * + * This resource is only available on repositories that have the issue + * tracker enabled. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The versions that have been defined in the issue tracker. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_versions"] + } + } + /** @description The specified repository does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/versions/{version_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description The version's id */ + readonly version_id: number + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a defined version for issues + * @description Returns the specified issue tracker version object. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description The version's id */ + readonly version_id: number + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified version object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["version"] + } + } + /** @description The specified repository or version does not exist or does not have the issue tracker enabled. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/repositories/{workspace}/{repo_slug}/watchers": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List repositories watchers + * @description Returns a paginated list of all the watchers on the specified + * repository. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of all the watchers on the specified repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_accounts"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List snippets + * @description Returns all snippets. Like pull requests, repositories and workspaces, the + * full set of snippets is defined by what the current user has access to. + * + * This includes all snippets owned by any of the workspaces the user is a member of, + * or snippets by other users that the current user is either watching or has collaborated + * on (for instance by commenting on it). + * + * To limit the set of returned snippets, apply the + * `?role=[owner|contributor|member]` query parameter where the roles are + * defined as follows: + * + * * `owner`: all snippets owned by the current user + * * `contributor`: all snippets owned by, or watched by the current user + * * `member`: created in a workspaces or watched by the current user + * + * When no role is specified, all public snippets are returned, as well as all + * privately owned snippets watched or commented on. + * + * The returned response is a normal paginated JSON list. This endpoint + * only supports `application/json` responses and no + * `multipart/form-data` or `multipart/related`. As a result, it is not + * possible to include the file contents. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`). */ + readonly role?: "contributor" | "member" | "owner" + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of snippets. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_snippets"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a snippet + * @description Creates a new snippet under the authenticated user's account. + * + * Snippets can contain multiple files. Both text and binary files are + * supported. + * + * The simplest way to create a new snippet from a local file: + * + * $ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets -F file=@image.png + * + * Creating snippets through curl has a few limitations and so let's look + * at a more complicated scenario. + * + * Snippets are created with a multipart POST. Both `multipart/form-data` + * and `multipart/related` are supported. Both allow the creation of + * snippets with both meta data (title, etc), as well as multiple text + * and binary files. + * + * The main difference is that `multipart/related` can use rich encoding + * for the meta data (currently JSON). + * + * + * multipart/related (RFC-2387) + * ---------------------------- + * + * This is the most advanced and efficient way to create a paste. + * + * POST /2.0/snippets/evzijst HTTP/1.1 + * Content-Length: 1188 + * Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" + * MIME-Version: 1.0 + * + * --===============1438169132528273974== + * Content-Type: application/json; charset="utf-8" + * MIME-Version: 1.0 + * Content-ID: snippet + * + * { + * "title": "My snippet", + * "is_private": true, + * "scm": "git", + * "files": { + * "foo.txt": {}, + * "image.png": {} + * } + * } + * + * --===============1438169132528273974== + * Content-Type: text/plain; charset="us-ascii" + * MIME-Version: 1.0 + * Content-Transfer-Encoding: 7bit + * Content-ID: "foo.txt" + * Content-Disposition: attachment; filename="foo.txt" + * + * foo + * + * --===============1438169132528273974== + * Content-Type: image/png + * MIME-Version: 1.0 + * Content-Transfer-Encoding: base64 + * Content-ID: "image.png" + * Content-Disposition: attachment; filename="image.png" + * + * iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m + * TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB + * cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5 + * EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ + * 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN + * AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg== + * --===============1438169132528273974==-- + * + * The request contains multiple parts and is structured as follows. + * + * The first part is the JSON document that describes the snippet's + * properties or meta data. It either has to be the first part, or the + * request's `Content-Type` header must contain the `start` parameter to + * point to it. + * + * The remaining parts are the files of which there can be zero or more. + * Each file part should contain the `Content-ID` MIME header through + * which the JSON meta data's `files` element addresses it. The value + * should be the name of the file. + * + * `Content-Disposition` is an optional MIME header. The header's + * optional `filename` parameter can be used to specify the file name + * that Bitbucket should use when writing the file to disk. When present, + * `filename` takes precedence over the value of `Content-ID`. + * + * When the JSON body omits the `files` element, the remaining parts are + * not ignored. Instead, each file is added to the new snippet as if its + * name was explicitly linked (the use of the `files` elements is + * mandatory for some operations like deleting or renaming files). + * + * + * multipart/form-data + * ------------------- + * + * The use of JSON for the snippet's meta data is optional. Meta data can + * also be supplied as regular form fields in a more conventional + * `multipart/form-data` request: + * + * $ curl -X POST -u credentials https://api.bitbucket.org/2.0/snippets -F title="My snippet" -F file=@foo.txt -F file=@image.png + * + * POST /2.0/snippets HTTP/1.1 + * Content-Length: 951 + * Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f + * + * ------------------------------63a4b224c59f + * Content-Disposition: form-data; name="file"; filename="foo.txt" + * Content-Type: text/plain + * + * foo + * + * ------------------------------63a4b224c59f + * Content-Disposition: form-data; name="file"; filename="image.png" + * Content-Type: application/octet-stream + * + * ?PNG + * + * IHDR?1??I..... + * ------------------------------63a4b224c59f + * Content-Disposition: form-data; name="title" + * + * My snippet + * ------------------------------63a4b224c59f-- + * + * Here the meta data properties are included as flat, top-level form + * fields. The file attachments use the `file` field name. To attach + * multiple files, simply repeat the field. + * + * The advantage of `multipart/form-data` over `multipart/related` is + * that it can be easier to build clients. + * + * Essentially all properties are optional, `title` and `files` included. + * + * + * Sharing and Visibility + * ---------------------- + * + * Snippets can be either public (visible to anyone on Bitbucket, as well + * as anonymous users), or private (visible only to members of the workspace). + * This is controlled through the snippet's `is_private` element: + * + * * **is_private=false** -- everyone, including anonymous users can view + * the snippet + * * **is_private=true** -- only workspace members can view the snippet + * + * To create the snippet under a workspace, just append the workspace ID + * to the URL. See [`/2.0/snippets/{workspace}`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-post). + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["snippet"] + readonly responses: { + /** @description The newly created snippet object. */ + readonly 201: { + headers: { + /** @description The URL of the newly created snippet. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["snippet"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List snippets in a workspace + * @description Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-get), except that the result is further filtered + * by the snippet owner and only those that are owned by `{workspace}` are + * returned. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`). */ + readonly role?: "contributor" | "member" | "owner" + } + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of snippets. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_snippets"] + } + } + /** @description If the user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a snippet for a workspace + * @description Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-post), except that the new snippet will be + * created under the workspace specified in the path parameter + * `{workspace}`. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["snippet"] + readonly responses: { + /** @description The newly created snippet object. */ + readonly 201: { + headers: { + /** @description The URL of the newly created snippet. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["snippet"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have permission to create snippets in the specified workspace. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a snippet + * @description Retrieves a single snippet. + * + * Snippets support multiple content types: + * + * * application/json + * * multipart/related + * * multipart/form-data + * + * + * application/json + * ---------------- + * + * The default content type of the response is `application/json`. + * Since JSON is always `utf-8`, it cannot reliably contain file contents + * for files that are not text. Therefore, JSON snippet documents only + * contain the filename and links to the file contents. + * + * This means that in order to retrieve all parts of a snippet, N+1 + * requests need to be made (where N is the number of files in the + * snippet). + * + * + * multipart/related + * ----------------- + * + * To retrieve an entire snippet in a single response, use the + * `Accept: multipart/related` HTTP request header. + * + * $ curl -H "Accept: multipart/related" https://api.bitbucket.org/2.0/snippets/evzijst/1 + * + * Response: + * + * HTTP/1.1 200 OK + * Content-Length: 2214 + * Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" + * MIME-Version: 1.0 + * + * --===============1438169132528273974== + * Content-Type: application/json; charset="utf-8" + * MIME-Version: 1.0 + * Content-ID: snippet + * + * { + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj" + * }, + * "html": { + * "href": "https://bitbucket.org/snippets/evzijst/kypj" + * }, + * "comments": { + * "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/comments" + * }, + * "watchers": { + * "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/watchers" + * }, + * "commits": { + * "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/commits" + * } + * }, + * "id": kypj, + * "title": "My snippet", + * "created_on": "2014-12-29T22:22:04.790331+00:00", + * "updated_on": "2014-12-29T22:22:04.790331+00:00", + * "is_private": false, + * "files": { + * "foo.txt": { + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/foo.txt" + * }, + * "html": { + * "href": "https://bitbucket.org/snippets/evzijst/kypj#file-foo.txt" + * } + * } + * }, + * "image.png": { + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/image.png" + * }, + * "html": { + * "href": "https://bitbucket.org/snippets/evzijst/kypj#file-image.png" + * } + * } + * } + * ], + * "owner": { + * "username": "evzijst", + * "nickname": "evzijst", + * "display_name": "Erik van Zijst", + * "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/evzijst" + * }, + * "html": { + * "href": "https://bitbucket.org/evzijst" + * }, + * "avatar": { + * "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png" + * } + * } + * }, + * "creator": { + * "username": "evzijst", + * "nickname": "evzijst", + * "display_name": "Erik van Zijst", + * "uuid": "{d301aafa-d676-4ee0-88be-962be7417567}", + * "links": { + * "self": { + * "href": "https://api.bitbucket.org/2.0/users/evzijst" + * }, + * "html": { + * "href": "https://bitbucket.org/evzijst" + * }, + * "avatar": { + * "href": "https://bitbucket-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png" + * } + * } + * } + * } + * + * --===============1438169132528273974== + * Content-Type: text/plain; charset="us-ascii" + * MIME-Version: 1.0 + * Content-Transfer-Encoding: 7bit + * Content-ID: "foo.txt" + * Content-Disposition: attachment; filename="foo.txt" + * + * foo + * + * --===============1438169132528273974== + * Content-Type: image/png + * MIME-Version: 1.0 + * Content-Transfer-Encoding: base64 + * Content-ID: "image.png" + * Content-Disposition: attachment; filename="image.png" + * + * iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m + * TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB + * cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5 + * EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ + * 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN + * AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg== + * --===============1438169132528273974==-- + * + * multipart/form-data + * ------------------- + * + * As with creating new snippets, `multipart/form-data` can be used as an + * alternative to `multipart/related`. However, the inherently flat + * structure of form-data means that only basic, root-level properties + * can be returned, while nested elements like `links` are omitted: + * + * $ curl -H "Accept: multipart/form-data" https://api.bitbucket.org/2.0/snippets/evzijst/kypj + * + * Response: + * + * HTTP/1.1 200 OK + * Content-Length: 951 + * Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f + * + * ------------------------------63a4b224c59f + * Content-Disposition: form-data; name="title" + * Content-Type: text/plain; charset="utf-8" + * + * My snippet + * ------------------------------63a4b224c59f-- + * Content-Disposition: attachment; name="file"; filename="foo.txt" + * Content-Type: text/plain + * + * foo + * + * ------------------------------63a4b224c59f + * Content-Disposition: attachment; name="file"; filename="image.png" + * Content-Transfer-Encoding: base64 + * Content-Type: application/octet-stream + * + * iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m + * TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB + * cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5 + * EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ + * 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN + * AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg== + * ------------------------------5957323a6b76-- + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The snippet object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["snippet"] + readonly "multipart/form-data": components["schemas"]["snippet"] + readonly "multipart/related": components["schemas"]["snippet"] + } + } + /** @description If the snippet is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If authenticated user does not have access to the private snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If the snippet marked as spam. */ + readonly 410: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + } + } + /** + * Update a snippet + * @description Used to update a snippet. Use this to add and delete files and to + * change a snippet's title. + * + * To update a snippet, one can either PUT a full snapshot, or only the + * parts that need to be changed. + * + * The contract for PUT on this API is that properties missing from the + * request remain untouched so that snippets can be efficiently + * manipulated with differential payloads. + * + * To delete a property (e.g. the title, or a file), include its name in + * the request, but omit its value (use `null`). + * + * As in Git, explicit renaming of files is not supported. Instead, to + * rename a file, delete it and add it again under another name. This can + * be done atomically in a single request. Rename detection is left to + * the SCM. + * + * PUT supports three different content types for both request and + * response bodies: + * + * * `application/json` + * * `multipart/related` + * * `multipart/form-data` + * + * The content type used for the request body can be different than that + * used for the response. Content types are specified using standard HTTP + * headers. + * + * Use the `Content-Type` and `Accept` headers to select the desired + * request and response format. + * + * + * application/json + * ---------------- + * + * As with creation and retrieval, the content type determines what + * properties can be manipulated. `application/json` does not support + * file contents and is therefore limited to a snippet's meta data. + * + * To update the title, without changing any of its files: + * + * $ curl -X POST -H "Content-Type: application/json" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{"title": "Updated title"}' + * + * + * To delete the title: + * + * $ curl -X POST -H "Content-Type: application/json" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{"title": null}' + * + * Not all parts of a snippet can be manipulated. The owner and creator + * for instance are immutable. + * + * + * multipart/related + * ----------------- + * + * `multipart/related` can be used to manipulate all of a snippet's + * properties. The body is identical to a POST. properties omitted from + * the request are left unchanged. Since the `start` part contains JSON, + * the mechanism for manipulating the snippet's meta data is identical + * to `application/json` requests. + * + * To update one of a snippet's file contents, while also changing its + * title: + * + * PUT /2.0/snippets/evzijst/kypj HTTP/1.1 + * Content-Length: 288 + * Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" + * MIME-Version: 1.0 + * + * --===============1438169132528273974== + * Content-Type: application/json; charset="utf-8" + * MIME-Version: 1.0 + * Content-ID: snippet + * + * { + * "title": "My updated snippet", + * "files": { + * "foo.txt": {} + * } + * } + * + * --===============1438169132528273974== + * Content-Type: text/plain; charset="us-ascii" + * MIME-Version: 1.0 + * Content-Transfer-Encoding: 7bit + * Content-ID: "foo.txt" + * Content-Disposition: attachment; filename="foo.txt" + * + * Updated file contents. + * + * --===============1438169132528273974==-- + * + * Here only the parts that are changed are included in the body. The + * other files remain untouched. + * + * Note the use of the `files` list in the JSON part. This list contains + * the files that are being manipulated. This list should have + * corresponding multiparts in the request that contain the new contents + * of these files. + * + * If a filename in the `files` list does not have a corresponding part, + * it will be deleted from the snippet, as shown below: + * + * PUT /2.0/snippets/evzijst/kypj HTTP/1.1 + * Content-Length: 188 + * Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" + * MIME-Version: 1.0 + * + * --===============1438169132528273974== + * Content-Type: application/json; charset="utf-8" + * MIME-Version: 1.0 + * Content-ID: snippet + * + * { + * "files": { + * "image.png": {} + * } + * } + * + * --===============1438169132528273974==-- + * + * To simulate a rename, delete a file and add the same file under + * another name: + * + * PUT /2.0/snippets/evzijst/kypj HTTP/1.1 + * Content-Length: 212 + * Content-Type: multipart/related; start="snippet"; boundary="===============1438169132528273974==" + * MIME-Version: 1.0 + * + * --===============1438169132528273974== + * Content-Type: application/json; charset="utf-8" + * MIME-Version: 1.0 + * Content-ID: snippet + * + * { + * "files": { + * "foo.txt": {}, + * "bar.txt": {} + * } + * } + * + * --===============1438169132528273974== + * Content-Type: text/plain; charset="us-ascii" + * MIME-Version: 1.0 + * Content-Transfer-Encoding: 7bit + * Content-ID: "bar.txt" + * Content-Disposition: attachment; filename="bar.txt" + * + * foo + * + * --===============1438169132528273974==-- + * + * + * multipart/form-data + * ----------------- + * + * Again, one can also use `multipart/form-data` to manipulate file + * contents and meta data atomically. + * + * $ curl -X PUT http://localhost:12345/2.0/snippets/evzijst/kypj -F title="My updated snippet" -F file=@foo.txt + * + * PUT /2.0/snippets/evzijst/kypj HTTP/1.1 + * Content-Length: 351 + * Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f + * + * ------------------------------63a4b224c59f + * Content-Disposition: form-data; name="file"; filename="foo.txt" + * Content-Type: text/plain + * + * foo + * + * ------------------------------63a4b224c59f + * Content-Disposition: form-data; name="title" + * + * My updated snippet + * ------------------------------63a4b224c59f + * + * To delete a file, omit its contents while including its name in the + * `files` field: + * + * $ curl -X PUT https://api.bitbucket.org/2.0/snippets/evzijst/kypj -F files=image.png + * + * PUT /2.0/snippets/evzijst/kypj HTTP/1.1 + * Content-Length: 149 + * Content-Type: multipart/form-data; boundary=----------------------------ef8871065a86 + * + * ------------------------------ef8871065a86 + * Content-Disposition: form-data; name="files" + * + * image.png + * ------------------------------ef8871065a86-- + * + * The explicit use of the `files` element in `multipart/related` and + * `multipart/form-data` is only required when deleting files. + * The default mode of operation is for file parts to be processed, + * regardless of whether or not they are listed in `files`, as a + * convenience to the client. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The updated snippet object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["snippet"] + readonly "multipart/form-data": components["schemas"]["snippet"] + readonly "multipart/related": components["schemas"]["snippet"] + } + } + /** @description If the snippet is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If authenticated user does not have permission to update the private snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a snippet + * @description Deletes a snippet and returns an empty response. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description If the snippet was deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the snippet is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If authenticated user does not have permission to delete the private snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/{node_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A commit revision (SHA1). */ + readonly node_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a previous revision of a snippet + * @description Identical to `GET /snippets/encoded_id`, except that this endpoint + * can be used to retrieve the contents of the snippet as it was at an + * older revision, while `/snippets/encoded_id` always returns the + * snippet's current revision. + * + * Note that only the snippet's file contents are versioned, not its + * meta data properties like the title. + * + * Other than that, the two endpoints are identical in behavior. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A commit revision (SHA1). */ + readonly node_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The snippet object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["snippet"] + readonly "multipart/form-data": components["schemas"]["snippet"] + readonly "multipart/related": components["schemas"]["snippet"] + } + } + /** @description If the snippet is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If authenticated user does not have access to the private snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If the snippet, or the revision does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + } + } + /** + * Update a previous revision of a snippet + * @description Identical to `UPDATE /snippets/encoded_id`, except that this endpoint + * takes an explicit commit revision. Only the snippet's "HEAD"/"tip" + * (most recent) version can be updated and requests on all other, + * older revisions fail by returning a 405 status. + * + * Usage of this endpoint over the unrestricted `/snippets/encoded_id` + * could be desired if the caller wants to be sure no concurrent + * modifications have taken place between the moment of the UPDATE + * request and the original GET. + * + * This can be considered a so-called "Compare And Swap", or CAS + * operation. + * + * Other than that, the two endpoints are identical in behavior. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A commit revision (SHA1). */ + readonly node_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The updated snippet object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["snippet"] + readonly "multipart/form-data": components["schemas"]["snippet"] + readonly "multipart/related": components["schemas"]["snippet"] + } + } + /** @description If the snippet is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If authenticated user does not have permission to update the private snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If the snippet or the revision does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + /** @description If `{node_id}` is not the latest revision. */ + readonly 405: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + readonly "multipart/form-data": components["schemas"]["error"] + readonly "multipart/related": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a previous revision of a snippet + * @description Deletes the snippet. + * + * Note that this only works for versioned URLs that point to the latest + * commit of the snippet. Pointing to an older commit results in a 405 + * status code. + * + * To delete a snippet, regardless of whether or not concurrent changes + * are being made to it, use `DELETE /snippets/{encoded_id}` instead. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A commit revision (SHA1). */ + readonly node_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description If the snippet was deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the snippet is private and the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If authenticated user does not have permission to delete the private snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If `{node_id}` is not the latest revision. */ + readonly 405: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/{node_id}/files/{path}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A commit revision (SHA1). */ + readonly node_id: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a snippet's raw file + * @description Retrieves the raw contents of a specific file in the snippet. The + * `Content-Disposition` header will be "attachment" to avoid issues with + * malevolent executable files. + * + * The file's mime type is derived from its filename and returned in the + * `Content-Type` header. + * + * Note that for text files, no character encoding is included as part of + * the content type. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A commit revision (SHA1). */ + readonly node_id: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Returns the contents of the specified file. */ + readonly 200: { + headers: { + /** @description attachment */ + readonly "Content-Disposition"?: string + /** @description The mime type as derived from the filename */ + readonly "Content-Type"?: string + readonly [name: string]: unknown + } + content?: never + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the file or snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/{revision}/diff": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`. */ + readonly revision: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get snippet changes between versions + * @description Returns the diff of the specified commit against its first parent. + * + * Note that this resource is different in functionality from the `patch` + * resource. + * + * The differences between a diff and a patch are: + * + * * patches have a commit header with the username, message, etc + * * diffs support the optional `path=foo/bar.py` query param to filter the + * diff to just that one file diff (not supported for patches) + * * for a merge, the diff will show the diff between the merge commit and + * its first parent (identical to how PRs work), while patch returns a + * response containing separate patches for each commit on the second + * parent's ancestry, up to the oldest common ancestor (identical to + * its reachability). + * + * Note that the character encoding of the contents of the diff is + * unspecified as Git does not track this, making it hard for + * Bitbucket to reliably determine this. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description When used, only one the diff of the specified file will be returned. */ + readonly path?: string + } + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`. */ + readonly revision: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The raw diff contents. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/{revision}/patch": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`. */ + readonly revision: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get snippet patch between versions + * @description Returns the patch of the specified commit against its first + * parent. + * + * Note that this resource is different in functionality from the `diff` + * resource. + * + * The differences between a diff and a patch are: + * + * * patches have a commit header with the username, message, etc + * * diffs support the optional `path=foo/bar.py` query param to filter the + * diff to just that one file diff (not supported for patches) + * * for a merge, the diff will show the diff between the merge commit and + * its first parent (identical to how PRs work), while patch returns a + * response containing separate patches for each commit on the second + * parent's ancestry, up to the oldest common ancestor (identical to + * its reachability). + * + * Note that the character encoding of the contents of the patch is + * unspecified as Git does not track this, making it hard for + * Bitbucket to reliably determine this. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`. */ + readonly revision: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The raw patch contents. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/comments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List comments on a snippet + * @description Used to retrieve a paginated list of all comments for a specific + * snippet. + * + * This resource works identical to commit and pull request comments. + * + * The default sorting is oldest to newest and can be overridden with + * the `sort` query parameter. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A paginated list of snippet comments, ordered by creation date. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_snippet_comments"] + } + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a comment on a snippet + * @description Creates a new comment. + * + * The only required field in the body is `content.raw`. + * + * To create a threaded reply to an existing comment, include `parent.id`. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The contents of the new comment. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["snippet_comment"] + } + } + readonly responses: { + /** @description The newly created comment. */ + readonly 201: { + headers: { + /** @description The URL of the new comment */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["snippet_comment"] + } + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/comments/{comment_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a comment on a snippet + * @description Returns the specific snippet comment. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["snippet_comment"] + } + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the comment or snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a comment on a snippet + * @description Updates a comment. + * + * The only required field in the body is `content.raw`. + * + * Comments can only be updated by their author. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The contents to update the comment to. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["snippet_comment"] + } + } + readonly responses: { + /** @description The updated comment object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["snippet_comment"] + } + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the comment or snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a comment on a snippet + * @description Deletes a snippet comment. + * + * Comments can only be removed by the comment author, snippet creator, or workspace admin. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The id of the comment. */ + readonly comment_id: number + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates the comment was deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user is not the author of the comment. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the comment or the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/commits": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List snippet changes + * @description Returns the changes (commits) made on this snippet. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The paginated list of snippet commits. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_snippet_commit"] + } + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/commits/{revision}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description The commit's SHA1. */ + readonly revision: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a previous snippet change + * @description Returns the changes made on this snippet in this commit. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description The commit's SHA1. */ + readonly revision: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified snippet commit. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["snippet_commit"] + } + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the commit or the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/files/{path}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a snippet's raw file at HEAD + * @description Convenience resource for getting to a snippet's raw files without the + * need for first having to retrieve the snippet itself and having to pull + * out the versioned file links. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description Path to the file. */ + readonly path: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A redirect to the most recent revision of the specified file. */ + readonly 302: { + headers: { + /** @description The URL of the most recent file revision. */ + readonly Location?: string + readonly [name: string]: unknown + } + content?: never + } + /** @description If the authenticated user does not have access to the snippet. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/watch": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Check if the current user is watching a snippet + * @description Used to check if the current user is watching a specific snippet. + * + * Returns 204 (No Content) if the user is watching the snippet and 404 if + * not. + * + * Hitting this endpoint anonymously always returns a 404. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description If the authenticated user is watching the snippet. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the snippet does not exist, or if the authenticated user is not watching the snippet. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Watch a snippet + * @description Used to start watching a specific snippet. Returns 204 (No Content). + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates the authenticated user is now watching the snippet. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Stop watching a snippet + * @description Used to stop watching a specific snippet. Returns 204 (No Content) + * to indicate success. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Indicates the user stopped watching the snippet successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the request was not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/snippets/{workspace}/{encoded_id}/watchers": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List users watching a snippet + * @deprecated + * @description Returns a paginated list of all users watching a specific snippet. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The snippet id. */ + readonly encoded_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The paginated list of users watching this snippet */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_accounts"] + } + } + /** @description If the snippet does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/teams/{username}/pipelines_config/variables": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List variables for an account + * @deprecated + * @description Find account level variables. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly get: operations["getPipelineVariablesForTeam"] + readonly put?: never + /** + * Create a variable for a user + * @deprecated + * @description Create an account level variable. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly post: operations["createPipelineVariableForTeam"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/teams/{username}/pipelines_config/variables/{variable_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a variable for a team + * @deprecated + * @description Retrieve a team level variable. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly get: operations["getPipelineVariableForTeam"] + /** + * Update a variable for a team + * @deprecated + * @description Update a team level variable. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly put: operations["updatePipelineVariableForTeam"] + readonly post?: never + /** + * Delete a variable for a team + * @deprecated + * @description Delete a team level variable. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly delete: operations["deletePipelineVariableForTeam"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/teams/{username}/search/code": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search for code in a team's repositories + * @description Search for code in the repositories of the specified team. + * + * Note that searches can match in the file's text (`content_matches`), + * the path (`path_matches`), or both. + * + * You can use the same syntax for the search query as in the UI. + * E.g. to search for "foo" only within the repository "demo", + * use the query parameter `search_query=foo+repo:demo`. + * + * Similar to other APIs, you can request more fields using a + * `fields` query parameter. E.g. to get some more information about + * the repository of matched files, use the query parameter + * `search_query=foo&fields=%2Bvalues.file.commit.repository` + * (the `%2B` is a URL-encoded `+`). + * + * Try `fields=%2Bvalues.*.*.*.*` to get an idea what's possible. + * + */ + readonly get: operations["searchTeam"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/user": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get current user + * @description Returns the currently logged in user. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The current user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["account"] + } + } + /** @description When the request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/user/emails": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List email addresses for current user + * @description Returns all the authenticated user's email addresses. Both + * confirmed and unconfirmed. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Unexpected error. */ + readonly default: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/user/emails/{email}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Email address of the user. */ + readonly email: string + } + readonly cookie?: never + } + /** + * Get an email address for current user + * @description Returns details about a specific one of the authenticated user's + * email addresses. + * + * Details describe whether the address has been confirmed by the user and + * whether it is the user's primary address or not. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Email address of the user. */ + readonly email: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Unexpected error. */ + readonly default: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/user/permissions/repositories": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List repository permissions for a user + * @description Returns an object for each repository the caller has explicit access + * to and their effective permission — the highest level of permission the + * caller has. This does not return public repositories that the user was + * not granted any specific permission in, and does not distinguish between + * explicit and implicit privileges. + * + * Permissions can be: + * + * * `admin` + * * `write` + * * `read` + * + * Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by + * repository or permission by adding the following query string + * parameters: + * + * * `q=repository.name="geordi"` or `q=permission>"read"` + * * `sort=repository.name` + * + * Note that the query parameter values need to be URL escaped so that `=` + * would become `%3D`. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + /** @description + * Name of a response property sort the result by as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly sort?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Repository permissions for the repositories a caller has explicit access to. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_repository_permissions"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/user/permissions/workspaces": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List workspaces for the current user + * @description Returns an object for each workspace the caller is a member of, and + * their effective role - the highest level of privilege the caller has. + * If a user is a member of multiple groups with distinct roles, only the + * highest level is returned. + * + * Permissions can be: + * + * * `owner` + * * `collaborator` + * * `member` + * + * **The `collaborator` role is being removed from the Bitbucket Cloud API. For more information, + * see the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).** + * + * **When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on + * `workspace_membership` will no longer be present: `last_accessed` and `added_on`. See the + * [deprecation announcement](/cloud/bitbucket/announcement-breaking-change-workspace-membership/).** + * + * Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by + * workspace or permission by adding the following query string parameters: + * + * * `q=workspace.slug="bbworkspace1"` or `q=permission="owner"` + * * `sort=workspace.slug` + * + * Note that the query parameter values need to be URL escaped so that `=` + * would become `%3D`. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details. */ + readonly q?: string + /** @description + * Name of a response property to sort results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results) + * for details. + * */ + readonly sort?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All of the workspace memberships for the authenticated user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_workspace_memberships"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/users/{selected_user}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be an Atlassian Account ID OR the UUID of the account, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + /** + * Get a user + * @description Gets the public information associated with a user account. + * + * If the user's profile is private, `location`, `website` and + * `created_on` elements are omitted. + * + * Note that the user object returned by this operation is changing significantly, due to privacy changes. + * See the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-bitbucket-user-objects) for details. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be an Atlassian Account ID OR the UUID of the account, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user object */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["account"] + } + } + /** @description If no user exists for the specified UUID, or if the specified account is a team account, not a personal account. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/users/{selected_user}/pipelines_config/variables": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List variables for a user + * @deprecated + * @description Find user level variables. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly get: operations["getPipelineVariablesForUser"] + readonly put?: never + /** + * Create a variable for a user + * @deprecated + * @description Create a user level variable. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly post: operations["createPipelineVariableForUser"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/users/{selected_user}/pipelines_config/variables/{variable_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a variable for a user + * @deprecated + * @description Retrieve a user level variable. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly get: operations["getPipelineVariableForUser"] + /** + * Update a variable for a user + * @deprecated + * @description Update a user level variable. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly put: operations["updatePipelineVariableForUser"] + readonly post?: never + /** + * Delete a variable for a user + * @deprecated + * @description Delete an account level variable. + * This endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/). + */ + readonly delete: operations["deletePipelineVariableForUser"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/users/{selected_user}/properties/{app_key}/{property_name}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a user application property + * @description Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a user. + */ + readonly get: operations["retrieveUserHostedPropertyValue"] + /** + * Update a user application property + * @description Update an [application property](/cloud/bitbucket/application-properties/) value stored against a user. + */ + readonly put: operations["updateUserHostedPropertyValue"] + readonly post?: never + /** + * Delete a user application property + * @description Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a user. + */ + readonly delete: operations["deleteUserHostedPropertyValue"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/users/{selected_user}/search/code": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search for code in a user's repositories + * @description Search for code in the repositories of the specified user. + * + * Note that searches can match in the file's text (`content_matches`), + * the path (`path_matches`), or both. + * + * You can use the same syntax for the search query as in the UI. + * E.g. to search for "foo" only within the repository "demo", + * use the query parameter `search_query=foo+repo:demo`. + * + * Similar to other APIs, you can request more fields using a + * `fields` query parameter. E.g. to get some more information about + * the repository of matched files, use the query parameter + * `search_query=foo&fields=%2Bvalues.file.commit.repository` + * (the `%2B` is a URL-encoded `+`). + * + */ + readonly get: operations["searchAccount"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/users/{selected_user}/ssh-keys": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be an Atlassian Account ID OR the UUID of the account, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + /** + * List SSH keys + * @description Returns a paginated list of the user's SSH public keys. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be an Atlassian Account ID OR the UUID of the account, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A list of the SSH keys associated with the account. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_ssh_user_keys"] + } + } + /** @description If the specified user's keys are not accessible to the current user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Add a new SSH key + * @description Adds a new SSH public key to the specified user account and returns the resulting key. + * + * Example: + * + * ``` + * $ 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 + * ``` + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be an Atlassian Account ID OR the UUID of the account, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + /** @description The new SSH key object. Note that the username property has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis). */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["ssh_account_key"] + } + } + readonly responses: { + /** @description The newly created SSH key. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ssh_account_key"] + } + } + /** @description If the submitted key or related value is invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the current user does not have permission to add a key for the specified user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/users/{selected_user}/ssh-keys/{key_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The SSH key's UUID value. */ + readonly key_id: string + /** @description This can either be an Atlassian Account ID OR the UUID of the account, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + /** + * Get a SSH key + * @description Returns a specific SSH public key belonging to a user. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The SSH key's UUID value. */ + readonly key_id: string + /** @description This can either be an Atlassian Account ID OR the UUID of the account, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specific SSH key matching the user and UUID */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ssh_account_key"] + } + } + /** @description If the specified user or key is not accessible to the current user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user or key does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a SSH key + * @description Updates a specific SSH public key on a user's account + * + * Note: 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. + * + * Example: + * + * ``` + * $ 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} + * ``` + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The SSH key's UUID value. */ + readonly key_id: string + /** @description This can either be an Atlassian Account ID OR the UUID of the account, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + /** @description The updated SSH key object */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["ssh_account_key"] + } + } + readonly responses: { + /** @description The newly updated SSH key. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ssh_account_key"] + } + } + /** @description If the submitted key or related value is invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the current user does not have permission to add a key for the specified user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a SSH key + * @description Deletes a specific SSH public key from a user's account. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The SSH key's UUID value. */ + readonly key_id: string + /** @description This can either be an Atlassian Account ID OR the UUID of the account, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The key has been deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the submitted key or related value is invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the current user does not have permission to add a key for the specified user */ + readonly 403: { + headers: Readonly> + content?: never + } + /** @description If the specified user does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List workspaces for user + * @description Returns a list of workspaces accessible by the authenticated user. + * + * Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) by + * workspace or permission by adding the following query string parameters: + * + * * `q=slug="bbworkspace1"` or `q=is_private=true` + * * `sort=created_on` + * + * Note that the query parameter values need to be URL escaped so that `=` + * would become `%3D`. + * + * **The `collaborator` role is being removed from the Bitbucket Cloud API. For more information, + * see the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).** + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details. */ + readonly q?: string + /** @description + * Filters the workspaces based on the authenticated user's role on each workspace. + * + * * **member**: returns a list of all the workspaces which the caller is a member of + * at least one workspace group or repository + * * **collaborator**: returns a list of workspaces which the caller has write access + * to at least one repository in the workspace + * * **owner**: returns a list of workspaces which the caller has administrator access + * */ + readonly role?: "collaborator" | "member" | "owner" + /** @description + * Name of a response property to sort results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results) + * for details. + * */ + readonly sort?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of workspaces accessible by the authenticated user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_workspaces"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a workspace + * @description Returns the requested workspace. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The workspace. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["workspace"] + } + } + /** @description If no workspace exists for the specified name or UUID. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/hooks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List webhooks for a workspace + * @description Returns a paginated list of webhooks installed on this workspace. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The paginated list of installed webhooks. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_webhook_subscriptions"] + } + } + /** @description If the authenticated user is not an owner on the specified workspace. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified workspace does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a webhook for a workspace + * @description Creates a new webhook on the specified workspace. + * + * Workspace webhooks are fired for events from all repositories contained + * by that workspace. + * + * Example: + * + * ``` + * $ curl -X POST -u credentials -H 'Content-Type: application/json' + * https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks + * -d ' + * { + * "description": "Webhook Description", + * "url": "https://example.com/", + * "active": true, + * "secret": "this is a really bad secret", + * "events": [ + * "repo:push", + * "issue:created", + * "issue:updated" + * ] + * }' + * ``` + * + * When the `secret` is provided it will be used as the key to generate a HMAC + * digest value sent in the `X-Hub-Signature` header at delivery time. Passing + * a `null` or empty `secret` or not passing a `secret` will leave the webhook's + * secret unset. Bitbucket only generates the `X-Hub-Signature` when the webhook's + * secret is set. + * + * This call requires the webhook scope, as well as any scope + * that applies to the events that the webhook subscribes to. In the + * example above that means: `webhook`, `repository` and `issue`. + * + * The `url` must properly resolve and cannot be an internal, non-routed address. + * + * Only workspace owners can install webhooks on workspaces. + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description If the webhook was registered successfully. */ + readonly 201: { + headers: { + /** @description The URL of new newly created webhook. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["webhook_subscription"] + } + } + /** @description If the authenticated user does not have permission to install webhooks on the specified workspace. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified workspace does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/hooks/{uid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Installed webhook's ID */ + readonly uid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a webhook for a workspace + * @description Returns the webhook with the specified id installed on the given + * workspace. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Installed webhook's ID */ + readonly uid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The webhook subscription object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["webhook_subscription"] + } + } + /** @description If the webhook or workspace does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a webhook for a workspace + * @description Updates the specified webhook subscription. + * + * The following properties can be mutated: + * + * * `description` + * * `url` + * * `secret` + * * `active` + * * `events` + * + * The hook's secret is used as a key to generate the HMAC hex digest sent in the + * `X-Hub-Signature` header at delivery time. This signature is only generated + * when the hook has a secret. + * + * Set the hook's secret by passing the new value in the `secret` field. Passing a + * `null` value in the `secret` field will remove the secret from the hook. The + * hook's secret can be left unchanged by not passing the `secret` field in the + * request. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Installed webhook's ID */ + readonly uid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The webhook subscription object. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["webhook_subscription"] + } + } + /** @description If the authenticated user does not have permission to update the webhook. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the webhook or workspace does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a webhook for a workspace + * @description Deletes the specified webhook subscription from the given workspace. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Installed webhook's ID */ + readonly uid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description When the webhook was deleted successfully */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the authenticated user does not have permission to delete the webhook. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the webhook or workspace does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/members": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List users in a workspace + * @description Returns all members of the requested workspace. + * + * This endpoint additionally supports [filtering](/cloud/bitbucket/rest/intro/#filtering) by + * email address, if called by a workspace administrator, integration or workspace access + * token. This is done by adding the following query string parameter: + * + * * `q=user.email IN ("user1@org.com","user2@org.com")` + * + * When filtering by email, you can query up to 90 addresses at a time. + * Note that the query parameter values need to be URL escaped, so the final query string + * should be: + * + * * `q=user.email%20IN%20(%22user1@org.com%22,%22user2@org.com%22)` + * + * Email addresses that you filter by (and only these email addresses) can be included in the + * response using the `fields` query parameter: + * + * * `&fields=+values.user.email` - add the `email` field to the default `user` response object + * * `&fields=values.user.email,values.user.account_id` - only return user email addresses and + * account IDs + * + * Once again, all query parameter values must be URL escaped. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of users that are part of a workspace. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_workspace_memberships"] + } + } + /** @description When more than 90 emails were provided when querying by email. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/members/{member}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Member's UUID or Atlassian ID. */ + readonly member: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get user membership for a workspace + * @description Returns the workspace membership, which includes + * a `User` object for the member and a `Workspace` object + * for the requested workspace. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Member's UUID or Atlassian ID. */ + readonly member: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user that is part of a workspace. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["workspace_membership"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A workspace cannot be found, or a user cannot be found, or the user is not a a member of the workspace. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/permissions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List user permissions in a workspace + * @description Returns the list of members in a workspace + * and their permission levels. + * Permission can be: + * * `owner` + * * `collaborator` + * * `member` + * + * **The `collaborator` role is being removed from the Bitbucket Cloud API. For more information, + * see the [deprecation announcement](/cloud/bitbucket/deprecation-notice-collaborator-role/).** + * + * **When you move your administration from Bitbucket Cloud to admin.atlassian.com, the following fields on + * `workspace_membership` will no longer be present: `last_accessed` and `added_on`. See the + * [deprecation announcement](/cloud/bitbucket/announcement-breaking-change-workspace-membership/).** + * + * Results may be further [filtered](/cloud/bitbucket/rest/intro/#filtering) by + * permission by adding the following query string parameters: + * + * * `q=permission="owner"` + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of users that are part of a workspace, along with their permission. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_workspace_memberships"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/permissions/repositories": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List all repository permissions for a workspace + * @description Returns an object for each repository permission for all of a + * workspace's repositories. + * + * Permissions returned are effective permissions: the highest level of + * permission the user has. This does not distinguish between direct and + * indirect (group) privileges. + * + * Only users with admin permission for the team may access this resource. + * + * Permissions can be: + * + * * `admin` + * * `write` + * * `read` + * + * Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) + * by repository, user, or permission by adding the following query string + * parameters: + * + * * `q=repository.name="geordi"` or `q=permission>"read"` + * * `sort=user.display_name` + * + * Note that the query parameter values need to be URL escaped so that `=` + * would become `%3D`. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + /** @description + * Name of a response property sort the result by as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results). + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description List of workspace's repository permissions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_repository_permissions"] + } + } + /** @description The requesting user isn't an admin of the workspace. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/permissions/repositories/{repo_slug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List a repository permissions for a workspace + * @description Returns an object for the repository permission of each user in the + * requested repository. + * + * Permissions returned are effective permissions: the highest level of + * permission the user has. This does not distinguish between direct and + * indirect (group) privileges. + * + * Only users with admin permission for the repository may access this resource. + * + * Permissions can be: + * + * * `admin` + * * `write` + * * `read` + * + * Results may be further [filtered or sorted](/cloud/bitbucket/rest/intro/#filtering) + * by user, or permission by adding the following query string parameters: + * + * * `q=permission>"read"` + * * `sort=user.display_name` + * + * Note that the query parameter values need to be URL escaped so that `=` + * would become `%3D`. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description + * Query string to narrow down the response as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering). */ + readonly q?: string + /** @description + * Name of a response property sort the result by as per + * [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results). + * */ + readonly sort?: string + } + readonly header?: never + readonly path: { + /** @description This can either be the repository slug or the UUID of the repository, + * surrounded by curly-braces, for example: `{repository UUID}`. + * */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository permission for all users in this repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_repository_permissions"] + } + } + /** @description The requesting user isn't an admin of the repository. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/pipelines-config/identity/oidc/.well-known/openid-configuration": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get OpenID configuration for OIDC in Pipelines + * @description This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/ + */ + readonly get: operations["getOIDCConfiguration"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/pipelines-config/identity/oidc/keys.json": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get keys for OIDC in Pipelines + * @description This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/ + */ + readonly get: operations["getOIDCKeys"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/pipelines-config/variables": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * List variables for a workspace + * @description Find workspace level variables. + */ + readonly get: operations["getPipelineVariablesForWorkspace"] + readonly put?: never + /** + * Create a variable for a workspace + * @description Create a workspace level variable. + */ + readonly post: operations["createPipelineVariableForWorkspace"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get variable for a workspace + * @description Retrieve a workspace level variable. + */ + readonly get: operations["getPipelineVariableForWorkspace"] + /** + * Update variable for a workspace + * @description Update a workspace level variable. + */ + readonly put: operations["updatePipelineVariableForWorkspace"] + readonly post?: never + /** + * Delete a variable for a workspace + * @description Delete a workspace level variable. + */ + readonly delete: operations["deletePipelineVariableForWorkspace"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List projects in a workspace + * @description Returns the list of projects in this workspace. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of projects in this workspace. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_projects"] + } + } + /** @description A workspace doesn't exist at this location. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a project in a workspace + * @description Creates a new project. + * + * Note that the avatar has to be embedded as either a data-url + * or a URL to an external image as shown in the examples below: + * + * ``` + * $ body=$(cat << EOF + * { + * "name": "Mars Project", + * "key": "MARS", + * "description": "Software for colonizing mars.", + * "links": { + * "avatar": { + * "href": "data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/..." + * } + * }, + * "is_private": false + * } + * EOF + * ) + * $ curl -H "Content-Type: application/json" \ + * -X POST \ + * -d "$body" \ + * https://api.bitbucket.org/2.0/workspaces/teams-in-space/projects/ | jq . + * { + * // Serialized project document + * } + * ``` + * + * or even: + * + * ``` + * $ body=$(cat << EOF + * { + * "name": "Mars Project", + * "key": "MARS", + * "description": "Software for colonizing mars.", + * "links": { + * "avatar": { + * "href": "http://i.imgur.com/72tRx4w.gif" + * } + * }, + * "is_private": false + * } + * EOF + * ) + * $ curl -H "Content-Type: application/json" \ + * -X POST \ + * -d "$body" \ + * https://api.bitbucket.org/2.0/workspaces/teams-in-space/projects/ | jq . + * { + * // Serialized project document + * } + * ``` + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["project"] + readonly responses: { + /** @description A new project has been created. */ + readonly 201: { + headers: { + /** @description The location of the newly created project */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["project"] + } + } + /** @description The user requesting to create a project does not have the necessary permissions. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A workspace doesn't exist at this location. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a project for a workspace + * @description Returns the requested project. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The project that is part of a workspace. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["project"] + } + } + /** @description The request wasn't authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't authorized to access the project. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A project isn't hosted at this location. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update a project for a workspace + * @description Since this endpoint can be used to both update and to create a + * project, the request body depends on the intent. + * + * #### Creation + * + * See the POST documentation for the project collection for an + * example of the request body. + * + * Note: The `key` should not be specified in the body of request + * (since it is already present in the URL). The `name` is required, + * everything else is optional. + * + * #### Update + * + * See the POST documentation for the project collection for an + * example of the request body. + * + * Note: The key is not required in the body (since it is already in + * the URL). The key may be specified in the body, if the intent is + * to change the key itself. In such a scenario, the location of the + * project is changed and is returned in the `Location` header of the + * response. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["project"] + readonly responses: { + /** @description The existing project is has been updated. */ + readonly 200: { + headers: { + /** @description The location of the project. This header is only provided + * when the project key is updated. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["project"] + } + } + /** @description A new project has been created. */ + readonly 201: { + headers: { + /** @description The location of the newly created project */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["project"] + } + } + /** @description The requesting user isn't authorized to update or create the project. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A workspace doesn't exist at the location. Note that the project's absence from this location doesn't raise a 404, since a PUT at a non-existent location can be used to create a new project. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete a project for a workspace + * @description Deletes this project. This is an irreversible operation. + * + * You cannot delete a project that still contains repositories. + * To delete the project, [delete](/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-delete) + * or transfer the repositories first. + * + * Example: + * ``` + * $ curl -X DELETE https://api.bitbucket.org/2.0/workspaces/bbworkspace1/projects/PROJ + * ``` + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful deletion. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The requesting user isn't authorized to delete the project or the project isn't empty. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A project isn't hosted at this location. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/branching-model": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get the branching model for a project + * @description Return the branching model set at the project level. This view is + * read-only. The branching model settings can be changed using the + * [settings](#api-workspaces-workspace-projects-project-key-branching-model-settings-get) + * API. + * + * The returned object: + * + * 1. Always has a `development` property. `development.name` is + * the user-specified branch that can be inherited by an individual repository's + * branching model. + * 2. Might have a `production` property. `production` will not + * be present when `production` is disabled. + * `production.name` is the user-specified branch that can be + * inherited by an individual repository's branching model. + * 3. Always has a `branch_types` array which contains all enabled branch + * types. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The branching model object */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["project_branching_model"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have read access to the project */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/branching-model/settings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get the branching model config for a project + * @description Return the branching model configuration for a project. The returned + * object: + * + * 1. Always has a `development` property for the development branch. + * 2. Always a `production` property for the production branch. The + * production branch can be disabled. + * 3. The `branch_types` contains all the branch types. + * + * + * This is the raw configuration for the branching model. A client + * wishing to see the branching model with its actual current branches may find the + * [active model API](#api-workspaces-workspace-projects-project-key-branching-model-get) + * more useful. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The branching model configuration */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branching_model_settings"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the project */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update the branching model config for a project + * @description Update the branching model configuration for a project. + * + * The `development` branch can be configured to a specific branch or to + * track the main branch. Any branch name can be supplied, but will only + * successfully be applied to a repository via inheritance if that branch + * exists for that repository. Only the passed properties will be updated. The + * properties not passed will be left unchanged. A request without a + * `development` property will leave the development branch unchanged. + * + * The `production` branch can be a specific branch, the main + * branch or disabled. Any branch name can be supplied, but will only + * successfully be applied to a repository via inheritance if that branch + * exists for that repository. The `enabled` property can be used to enable (`true`) + * or disable (`false`) it. Only the passed properties will be updated. The + * properties not passed will be left unchanged. A request without a + * `production` property will leave the production branch unchanged. + * + * The `branch_types` property contains the branch types to be updated. + * Only the branch types passed will be updated. All updates will be + * rejected if it would leave the branching model in an invalid state. + * For branch types this means that: + * + * 1. The prefixes for all enabled branch types are valid. For example, + * it is not possible to use '*' inside a Git prefix. + * 2. A prefix of an enabled branch type must not be a prefix of another + * enabled branch type. This is to ensure that a branch can be easily + * classified by its prefix unambiguously. + * + * It is possible to store an invalid prefix if that branch type would be + * left disabled. Only the passed properties will be updated. The + * properties not passed will be left unchanged. Each branch type must + * have a `kind` property to identify it. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The updated branching model configuration */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["branching_model_settings"] + } + } + /** @description If the request contains an invalid branching model configuration */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the project */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/default-reviewers": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List the default reviewers in a project + * @description Return a list of all default reviewers for a project. This is a list of users that will be added as default + * reviewers to pull requests for any repository within the project. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of project default reviewers */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_default_reviewer_and_type"] + } + } + /** @description If the authenticated user does not have admin access to the project */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the workspace or project does not exist at this location */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/default-reviewers/{selected_user}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This can either be the actual `key` assigned + * to the project or the `UUID` (surrounded by curly-braces (`{}`)). + * */ + readonly project_key: string + /** @description This can either be the username or the UUID of the default reviewer, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a default reviewer + * @description Returns the specified default reviewer. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This can either be the actual `key` assigned + * to the project or the `UUID` (surrounded by curly-braces (`{}`)). + * */ + readonly project_key: string + /** @description This can either be the username or the UUID of the default reviewer, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified user that is a default reviewer */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["user"] + } + } + /** @description If the specified user is not a default reviewer for the project */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the project */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified user, project, or workspace does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Add the specific user as a default reviewer for the project + * @description Adds the specified user to the project's list of default reviewers. The method is + * idempotent. Accepts an optional body containing the `uuid` of the user to be added. + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This can either be the actual `key` assigned + * to the project or the `UUID` (surrounded by curly-braces (`{}`)). + * */ + readonly project_key: string + /** @description This can either be the username or the UUID of the default reviewer, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified user was added as a project default reviewer */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["user"] + } + } + /** @description If the specified user cannot be added as a default reviewer for the project */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the project */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified user, project, or workspace does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Remove the specific user from the project's default reviewers + * @description Removes a default reviewer from the project. + * + * Example: + * ``` + * $ curl https://api.bitbucket.org/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D + * + * HTTP/1.1 204 + * ``` + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This can either be the actual `key` assigned + * to the project or the `UUID` (surrounded by curly-braces (`{}`)). + * */ + readonly project_key: string + /** @description This can either be the username or the UUID of the default reviewer, + * surrounded by curly-braces, for example: `{account UUID}`. + * */ + readonly selected_user: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified user was removed from the list of project default reviewers */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the specified user is not a default reviewer for the project */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the authenticated user does not have admin access to the project */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified user, project, or workspace does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/deploy-keys": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List project deploy keys + * @description Returns all deploy keys belonging to a project. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Deploy keys matching the project */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_project_deploy_keys"] + } + } + /** @description If the specified workspace or project is not accessible to the current user */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified workspace or project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + /** + * Create a project deploy key + * @description Create a new deploy key in a project. + * + * Example: + * ``` + * $ curl -X POST \ + * -H "Authorization " \ + * -H "Content-type: application/json" \ + * https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/ -d \ + * '{ + * "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5 mleu@C02W454JHTD8", + * "label": "mydeploykey" + * }' + * ``` + */ + readonly post: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The project deploy key that was created */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["project_deploy_key"] + } + } + /** @description Invalid deploy key inputs */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified workspace or project is not accessible to the current user */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified workspace or project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/deploy-keys/{key_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key ID matching the project deploy key. */ + readonly key_id: string + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get a project deploy key + * @description Returns the deploy key belonging to a specific key ID. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key ID matching the project deploy key. */ + readonly key_id: string + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Project deploy key matching the key ID */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["project_deploy_key"] + } + } + /** @description If the specified workspace or project is not accessible to the current user */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified workspace or project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + /** + * Delete a deploy key from a project + * @description This deletes a deploy key from a project. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key ID matching the project deploy key. */ + readonly key_id: string + /** @description The project in question. This is the actual `key` assigned + * to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The project deploy key has been deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description If the current user does not have permission to delete a key for the specified project */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description If the specified workspace, project, or project deploy key does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/permissions-config/groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List explicit group permissions for a project + * @description Returns a paginated list of explicit group permissions for the given project. + * This endpoint does not support BBQL features. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Paginated list of project group permissions */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_project_group_permissions"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The user doesn't have admin access to the project. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description One or both of the workspace and project don't exist for the given identifiers or the requesting user is not authenticated */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/permissions-config/groups/{group_slug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Slug of the requested group. */ + readonly group_slug: string + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get an explicit group permission for a project + * @description Returns the group permission for a given group and project. + * + * Only users with admin permission for the project may access this resource. + * + * Permissions can be: + * + * * `admin` + * * `create-repo` + * * `write` + * * `read` + * * `none` + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Slug of the requested group. */ + readonly group_slug: string + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Project group permission */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["project_group_permission"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The user doesn't have admin access to the project. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update an explicit group permission for a project + * @description Updates the group permission, or grants a new permission if one does not already exist. + * + * Only users with admin permission for the project may access this resource. + * + * Due to security concerns, the JWT and OAuth authentication methods are unsupported. + * This is to ensure integrations and add-ons are not allowed to change permissions. + * + * Permissions can be: + * + * * `admin` + * * `create-repo` + * * `write` + * * `read` + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Slug of the requested group. */ + readonly group_slug: string + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema"] + readonly responses: { + /** @description Project group permission updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["project_group_permission"] + } + } + /** @description No permission value was provided or the value is invalid(not one of read, write, create-repo, or admin). */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description You have reached your plan's user limit and must upgrade before giving access to additional users. */ + readonly 402: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the project, or the authentication method was not via app password. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete an explicit group permission for a project + * @description Deletes the project group permission between the requested project and group, if one exists. + * + * Only users with admin permission for the project may access this resource. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Slug of the requested group. */ + readonly group_slug: string + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The project group permission was deleted and no content returned. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the project, or the authentication method was not via app password. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description One or more of the workspace, project, and group doesn't exist for the given identifiers or the requesting user is not authenticated */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/permissions-config/users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List explicit user permissions for a project + * @description Returns a paginated list of explicit user permissions for the given project. + * This endpoint does not support BBQL features. + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Paginated list of explicit user permissions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_project_user_permissions"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The user doesn't have admin access to the project. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description One or both of the workspace and project don't exist for the given identifiers or the requesting user is not authenticated */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/projects/{project_key}/permissions-config/users/{selected_user_id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the username, the user's UUID surrounded by curly-braces, + * for example: {account UUID}, or the user's Atlassian ID. + * */ + readonly selected_user_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * Get an explicit user permission for a project + * @description Returns the explicit user permission for a given user and project. + * + * Only users with admin permission for the project may access this resource. + * + * Permissions can be: + * + * * `admin` + * * `create-repo` + * * `write` + * * `read` + * * `none` + */ + readonly get: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the username, the user's UUID surrounded by curly-braces, + * for example: {account UUID}, or the user's Atlassian ID. + * */ + readonly selected_user_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Explicit user permission for user and project */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["project_user_permission"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the project. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @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 */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + /** + * Update an explicit user permission for a project + * @description Updates the explicit user permission for a given user and project. The selected + * user must be a member of the workspace, and cannot be the workspace owner. + * + * Only users with admin permission for the project may access this resource. + * + * Due to security concerns, the JWT and OAuth authentication methods are unsupported. + * This is to ensure integrations and add-ons are not allowed to change permissions. + * + * Permissions can be: + * + * * `admin` + * * `create-repo` + * * `write` + * * `read` + */ + readonly put: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the username, the user's UUID surrounded by curly-braces, + * for example: {account UUID}, or the user's Atlassian ID. + * */ + readonly selected_user_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema"] + readonly responses: { + /** @description Explicit user permission updated */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["project_user_permission"] + } + } + /** @description No permission value was provided or the value is invalid (not one of read, write, create-repo, or admin) */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description You have reached your plan's user limit and must upgrade before giving access to additional users. */ + readonly 402: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the project, or the authentication method was not via app password. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @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 */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly post?: never + /** + * Delete an explicit user permission for a project + * @description Deletes the project user permission between the requested project and user, if one exists. + * + * Only users with admin permission for the project may access this resource. + * + * Due to security concerns, the JWT and OAuth authentication methods are unsupported. + * This is to ensure integrations and add-ons are not allowed to change permissions. + */ + readonly delete: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project in question. This is the actual key assigned to the project. + * */ + readonly project_key: string + /** @description This can either be the username, the user's UUID surrounded by curly-braces, + * for example: {account UUID}, or the user's Atlassian ID. + * */ + readonly selected_user_id: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The project user permission was deleted and no content returned. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The user couldn't be authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The requesting user isn't an admin of the project, or the authentication method was not via app password. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @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 */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/pullrequests/{selected_user}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the username of the pull request author, the author's UUID + * surrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID. + * */ + readonly selected_user: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + /** + * List workspace pull requests for a user + * @description Returns all workspace pull requests authored by the specified user. + * + * By default only open pull requests are returned. This can be controlled + * using the `state` query parameter. To retrieve pull requests that are + * in one of multiple states, repeat the `state` parameter for each + * individual state. + * + * This endpoint also supports filtering and sorting of the results. See + * [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details. + */ + readonly get: { + readonly parameters: { + readonly query?: { + /** @description Only return pull requests that are in this state. This parameter can be repeated. */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" | "SUPERSEDED" + } + readonly header?: never + readonly path: { + /** @description This can either be the username of the pull request author, the author's UUID + * surrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID. + * */ + readonly selected_user: string + /** @description This can either be the workspace ID (slug) or the workspace UUID + * surrounded by curly-braces, for example: `{workspace UUID}`. + * */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All pull requests authored by the specified user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pullrequests"] + } + } + /** @description If the specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/workspaces/{workspace}/search/code": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search for code in a workspace + * @description Search for code in the repositories of the specified workspace. + * + * Note that searches can match in the file's text (`content_matches`), + * the path (`path_matches`), or both. + * + * You can use the same syntax for the search query as in the UI. + * E.g. to search for "foo" only within the repository "demo", + * use the query parameter `search_query=foo+repo:demo`. + * + * Similar to other APIs, you can request more fields using a + * `fields` query parameter. E.g. to get some more information about + * the repository of matched files, use the query parameter + * `search_query=foo&fields=%2Bvalues.file.commit.repository` + * (the `%2B` is a URL-encoded `+`). + * + * Try `fields=%2Bvalues.*.*.*.*` to get an idea what's possible. + * + */ + readonly get: operations["searchWorkspace"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } +} +export type webhooks = Record +export interface components { + schemas: { + readonly account: { + readonly type: "account" + } & (Omit & + (Readonly> & { + /** Format: date-time */ + readonly created_on?: string + readonly display_name?: string + readonly links?: components["schemas"]["account_links"] + readonly uuid?: string + })) + /** + * Account Links + * @description Links related to an Account. + */ + readonly account_links: Readonly> & { + readonly avatar?: components["schemas"]["link"] + } + readonly app_user: { + readonly type: "app_user" + } & (Omit & + (Readonly> & { + /** @description The user's Atlassian account ID. */ + readonly account_id?: string + /** @description The status of the account. Currently the only possible value is "active", but more values may be added in the future. */ + readonly account_status?: string + /** @description The kind of App User. */ + readonly kind?: string + })) + /** + * Application Property + * @description An application property. It is a caller defined JSON object that Bitbucket will store and return. + * The `_attributes` field at its top level can be used to control who is allowed to read and update the property. + * The keys of the JSON object must match an allowed pattern. For details, + * see [Application properties](/cloud/bitbucket/application-properties/). + * + */ + readonly application_property: Readonly> & { + readonly _attributes?: readonly ("public" | "read_only")[] + } + readonly author: { + readonly type: "author" + } & (Omit & + (Readonly> & { + /** @description The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket. */ + readonly raw?: string + readonly user?: components["schemas"]["account"] + })) + readonly base_commit: { + readonly type: "base_commit" + } & (Omit & + (Readonly> & { + readonly author?: components["schemas"]["author"] + /** Format: date-time */ + readonly date?: string + readonly hash?: string + readonly message?: string + readonly parents?: readonly components["schemas"]["base_commit"][] + readonly summary?: { + /** @description The user's content rendered as HTML. */ + readonly html?: string + /** + * @description The type of markup language the raw content is to be interpreted in. + * @enum {string} + */ + readonly markup?: "creole" | "markdown" | "plaintext" + /** @description The text as it was typed by a user. */ + readonly raw?: string + } + })) + readonly "bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema": { + /** @enum {string} */ + readonly permission: "admin" | "create-repo" | "read" | "write" + } + readonly "bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema": { + /** @enum {string} */ + readonly permission: "admin" | "read" | "write" + } + readonly branch: components["schemas"]["ref"] & + (Readonly> & { + /** @description The default merge strategy for pull requests targeting this branch. */ + readonly default_merge_strategy?: string + /** @description Available merge strategies for pull requests targeting this branch. */ + readonly merge_strategies?: readonly ( + | "fast_forward" + | "merge_commit" + | "squash" + )[] + }) + readonly branching_model: { + readonly type: "branching_model" + } & (Omit & + (Readonly> & { + /** @description The active branch types. */ + readonly branch_types?: readonly { + /** + * @description The kind of branch. + * @enum {string} + */ + readonly kind: "bugfix" | "feature" | "hotfix" | "release" + /** @description The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`. */ + readonly prefix: string + }[] + readonly development?: { + readonly branch?: components["schemas"]["branch"] + /** @description Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty. */ + readonly name: string + /** @description Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). */ + readonly use_mainbranch: boolean + } + readonly production?: { + readonly branch?: components["schemas"]["branch"] + /** @description Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty. */ + readonly name: string + /** @description Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). */ + readonly use_mainbranch: boolean + } + })) + readonly branching_model_settings: { + readonly type: "branching_model_settings" + } & (Omit & + (Readonly> & { + readonly branch_types?: readonly { + /** @description Whether the branch type is enabled or not. A disabled branch type may contain an invalid `prefix`. */ + readonly enabled?: boolean + /** + * @description The kind of the branch type. + * @enum {string} + */ + readonly kind: "bugfix" | "feature" | "hotfix" | "release" + /** @description The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The `prefix` of an enabled branch type must be a valid branch prefix.Additionally, it cannot be blank, empty or `null`. The `prefix` for a disabled branch type can be empty or invalid. */ + readonly prefix?: string + }[] + readonly development?: { + /** @description Indicates if the configured branch is valid, that is, if the configured branch actually exists currently. Is always `true` when `use_mainbranch` is `true` (even if the main branch does not exist). This field is read-only. This field is ignored when updating/creating settings. */ + readonly is_valid?: boolean + /** @description The configured branch. It must be `null` when `use_mainbranch` is `true`. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set). In this case `is_valid` will be `false`. The branch must exist when updating/setting the `name` or an error will occur. */ + readonly name?: string + /** @description Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). When `true` the `name` must be `null` or not provided. When `false` the `name` must contain a non-empty branch name. */ + readonly use_mainbranch?: boolean + } + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly production?: { + /** @description Indicates if branch is enabled or not. */ + readonly enabled?: boolean + /** @description Indicates if the configured branch is valid, that is, if the configured branch actually exists currently. Is always `true` when `use_mainbranch` is `true` (even if the main branch does not exist). This field is read-only. This field is ignored when updating/creating settings. */ + readonly is_valid?: boolean + /** @description The configured branch. It must be `null` when `use_mainbranch` is `true`. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set). In this case `is_valid` will be `false`. The branch must exist when updating/setting the `name` or an error will occur. */ + readonly name?: string + /** @description Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). When `true` the `name` must be `null` or not provided. When `false` the `name` must contain a non-empty branch name. */ + readonly use_mainbranch?: boolean + } + })) + readonly branchrestriction: { + readonly type: "branchrestriction" + } & (Omit & + (Readonly> & { + /** + * @description Indicates how the restriction is matched against a branch. The default is `glob`. + * @enum {string} + */ + readonly branch_match_kind: "branching_model" | "glob" + /** + * @description Apply the restriction to branches of this type. Active when `branch_match_kind` is `branching_model`. The branch type will be calculated using the branching model configured for the repository. + * @enum {string} + */ + readonly branch_type?: + | "bugfix" + | "development" + | "feature" + | "hotfix" + | "production" + | "release" + readonly groups?: readonly components["schemas"]["group"][] + /** @description The branch restriction status' id. */ + readonly id?: number + /** + * @description The type of restriction that is being applied. + * @enum {string} + */ + readonly kind: + | "allow_auto_merge_when_builds_pass" + | "delete" + | "enforce_merge_checks" + | "force" + | "push" + | "require_all_comments_resolved" + | "require_all_dependencies_merged" + | "require_approvals_to_merge" + | "require_commits_behind" + | "require_default_reviewer_approvals_to_merge" + | "require_no_changes_requested" + | "require_passing_builds_to_merge" + | "require_review_group_approvals_to_merge" + | "require_tasks_to_be_completed" + | "reset_pullrequest_approvals_on_change" + | "reset_pullrequest_changes_requested_on_change" + | "restrict_merges" + | "smart_reset_pullrequest_approvals" + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @description Apply the restriction to branches that match this pattern. Active when `branch_match_kind` is `glob`. Will be empty when `branch_match_kind` is `branching_model`. */ + readonly pattern: string + readonly users?: readonly components["schemas"]["account"][] + /** @description Value with kind-specific semantics: + * + * * `require_approvals_to_merge` uses it to require a minimum number of approvals on a PR. + * + * * `require_default_reviewer_approvals_to_merge` uses it to require a minimum number of approvals from default reviewers on a PR. + * + * * `require_passing_builds_to_merge` uses it to require a minimum number of passing builds. + * + * * `require_commits_behind` uses it to require the current branch is up to a maximum number of commits behind it destination. */ + readonly value?: number + })) + readonly comment: { + readonly type: "comment" + } & (Omit & + (Readonly> & { + readonly content?: { + /** @description The user's content rendered as HTML. */ + readonly html?: string + /** + * @description The type of markup language the raw content is to be interpreted in. + * @enum {string} + */ + readonly markup?: "creole" | "markdown" | "plaintext" + /** @description The text as it was typed by a user. */ + readonly raw?: string + } + /** Format: date-time */ + readonly created_on?: string + readonly deleted?: boolean + readonly id?: number + readonly inline?: { + /** @description The comment's anchor line in the old version of the file. */ + readonly from?: number + /** @description The path of the file this comment is anchored to. */ + readonly path: string + /** @description The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed. */ + readonly to?: number + } + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly code?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly parent?: components["schemas"]["comment"] + /** Format: date-time */ + readonly updated_on?: string + readonly user?: components["schemas"]["account"] + })) + /** + * Comment Resolution + * @description The resolution object for a Comment. + */ + readonly comment_resolution: Readonly> & { + /** + * Format: date-time + * @description The ISO8601 timestamp the resolution was created. + */ + readonly created_on?: string + readonly type: string + readonly user?: components["schemas"]["account"] + } + readonly commit: { + readonly type: "commit" + } & (Omit & + (Readonly> & { + readonly participants?: readonly components["schemas"]["participant"][] + readonly repository?: components["schemas"]["repository"] + })) + readonly commit_comment: { + readonly type: "commit_comment" + } & (Omit & + (Readonly> & { + readonly commit?: components["schemas"]["commit"] + })) + /** + * Commit File + * @description A file object, representing a file at a commit in a repository + */ + readonly commit_file: Readonly> & { + /** @enum {string} */ + readonly attributes?: + | "binary" + | "executable" + | "lfs" + | "link" + | "subrepository" + readonly commit?: components["schemas"]["commit"] + /** @description The escaped version of the path as it appears in a diff. If the path does not require escaping this will be the same as path. */ + readonly escaped_path?: string + /** @description The path in the repository */ + readonly path?: string + readonly type: string + } + readonly commitstatus: { + readonly type: "commitstatus" + } & (Omit & + (Readonly> & { + /** Format: date-time */ + readonly created_on?: string + /** @description A description of the build (e.g. "Unit tests in Bamboo") */ + readonly description?: string + /** @description An identifier for the status that's unique to + * its type (current "build" is the only supported type) and the vendor, + * e.g. BB-DEPLOY */ + readonly key?: string + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly commit?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @description An identifier for the build itself, e.g. BB-DEPLOY-1 */ + readonly name?: string + /** @description + * The name of the ref that pointed to this commit at the time the status + * object was created. Note that this the ref may since have moved off of + * the commit. This optional field can be useful for build systems whose + * build triggers and configuration are branch-dependent (e.g. a Pipeline + * build). + * It is legitimate for this field to not be set, or even apply (e.g. a + * static linting job). */ + readonly refname?: string + /** + * @description Provides some indication of the status of this commit + * @enum {string} + */ + readonly state?: "FAILED" | "INPROGRESS" | "STOPPED" | "SUCCESSFUL" + /** Format: date-time */ + readonly updated_on?: string + /** @description A URL linking back to the vendor or build system, for providing more information about whatever process produced this status. Accepts context variables `repository` and `commit` that Bitbucket will evaluate at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name} which Bitbucket will turn into https://foo.com/builds/foo/bar at render time. */ + readonly url?: string + /** @description The commit status' id. */ + readonly uuid?: string + })) + readonly component: { + readonly type: "component" + } & (Omit & + (Readonly> & { + readonly id?: number + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly name?: string + })) + /** + * Default Reviewer and Type + * @description Object containing a user that is a default reviewer and the type of reviewer + */ + readonly default_reviewer_and_type: Readonly> & { + readonly reviewer_type?: string + readonly type: string + readonly user?: components["schemas"]["user"] + } + readonly deploy_key: { + readonly type: "deploy_key" + } & (Omit & + (Readonly> & { + /** Format: date-time */ + readonly added_on?: string + /** @description The comment parsed from the deploy key (if present) */ + readonly comment?: string + /** @description The deploy key value. */ + readonly key?: string + /** @description The user-defined label for the deploy key */ + readonly label?: string + /** Format: date-time */ + readonly last_used?: string + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly owner?: components["schemas"]["account"] + readonly repository?: components["schemas"]["repository"] + })) + readonly deployment: { + readonly type: "deployment" + } & (Omit & + (Readonly> & { + readonly environment?: components["schemas"]["deployment_environment"] + readonly release?: components["schemas"]["deployment_release"] + readonly state?: components["schemas"]["deployment_state"] + /** @description The UUID identifying the deployment. */ + readonly uuid?: string + })) + readonly deployment_environment: { + readonly type: "deployment_environment" + } & (Omit & + (Readonly> & { + /** @description The name of the environment. */ + readonly name?: string + /** @description The UUID identifying the environment. */ + readonly uuid?: string + })) + readonly deployment_release: { + readonly type: "deployment_release" + } & (Omit & + (Readonly> & { + readonly commit?: components["schemas"]["commit"] + /** + * Format: date-time + * @description The timestamp when the release was created. + */ + readonly created_on?: string + /** @description The name of the release. */ + readonly name?: string + /** + * Format: uri + * @description Link to the pipeline that produced the release. + */ + readonly url?: string + /** @description The UUID identifying the release. */ + readonly uuid?: string + })) + readonly deployment_state: { + readonly type: "deployment_state" + } & (Omit & + Readonly>) + readonly deployment_state_completed: { + readonly type: "deployment_state_completed" + } & (Omit & + (Readonly> & { + /** + * Format: date-time + * @description The timestamp when the deployment completed. + */ + readonly completion_date?: string + readonly deployer?: components["schemas"]["account"] + /** + * @description The name of deployment state (COMPLETED). + * @enum {string} + */ + readonly name?: "COMPLETED" + /** + * Format: date-time + * @description The timestamp when the deployment was started. + */ + readonly start_date?: string + readonly status?: components["schemas"]["deployment_state_completed_status"] + /** + * Format: uri + * @description Link to the deployment result. + */ + readonly url?: string + })) + readonly deployment_state_completed_status: { + readonly type: "deployment_state_completed_status" + } & (Omit & + Readonly>) + readonly deployment_state_completed_status_failed: { + readonly type: "deployment_state_completed_status_failed" + } & (Omit< + components["schemas"]["deployment_state_completed_status"], + "type" + > & + (Readonly> & { + /** + * @description The name of the completed deployment status (FAILED). + * @enum {string} + */ + readonly name?: "FAILED" + })) + readonly deployment_state_completed_status_stopped: { + readonly type: "deployment_state_completed_status_stopped" + } & (Omit< + components["schemas"]["deployment_state_completed_status"], + "type" + > & + (Readonly> & { + /** + * @description The name of the completed deployment status (STOPPED). + * @enum {string} + */ + readonly name?: "STOPPED" + })) + readonly deployment_state_completed_status_successful: { + readonly type: "deployment_state_completed_status_successful" + } & (Omit< + components["schemas"]["deployment_state_completed_status"], + "type" + > & + (Readonly> & { + /** + * @description The name of the completed deployment status (SUCCESSFUL). + * @enum {string} + */ + readonly name?: "SUCCESSFUL" + })) + readonly deployment_state_in_progress: { + readonly type: "deployment_state_in_progress" + } & (Omit & + (Readonly> & { + readonly deployer?: components["schemas"]["account"] + /** + * @description The name of deployment state (IN_PROGRESS). + * @enum {string} + */ + readonly name?: "IN_PROGRESS" + /** + * Format: date-time + * @description The timestamp when the deployment was started. + */ + readonly start_date?: string + /** + * Format: uri + * @description Link to the deployment result. + */ + readonly url?: string + })) + readonly deployment_state_undeployed: { + readonly type: "deployment_state_undeployed" + } & (Omit & + (Readonly> & { + /** + * @description The name of deployment state (UNDEPLOYED). + * @enum {string} + */ + readonly name?: "UNDEPLOYED" + /** + * Format: uri + * @description Link to trigger the deployment. + */ + readonly trigger_url?: string + })) + readonly deployment_variable: { + readonly type: "deployment_variable" + } & (Omit & + (Readonly> & { + /** @description The unique name of the variable. */ + readonly key?: string + /** @description If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API. */ + readonly secured?: boolean + /** @description The UUID identifying the variable. */ + readonly uuid?: string + /** @description The value of the variable. If the variable is secured, this will be empty. */ + readonly value?: string + })) + /** + * Diff Stat + * @description A diffstat object that includes a summary of changes made to a file between two commits. + */ + readonly diffstat: Readonly> & { + readonly lines_added?: number + readonly lines_removed?: number + readonly new?: components["schemas"]["commit_file"] + readonly old?: components["schemas"]["commit_file"] + /** @enum {string} */ + readonly status?: "added" | "modified" | "removed" | "renamed" + readonly type: string + } + readonly effective_repo_branching_model: { + readonly type: "effective_repo_branching_model" + } & (Omit & + (Readonly> & { + /** @description The active branch types. */ + readonly branch_types?: readonly { + /** + * @description The kind of branch. + * @enum {string} + */ + readonly kind: "bugfix" | "feature" | "hotfix" | "release" + /** @description The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`. */ + readonly prefix: string + }[] + readonly development?: { + readonly branch?: components["schemas"]["branch"] + /** @description Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty. */ + readonly name: string + /** @description Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). */ + readonly use_mainbranch: boolean + } + readonly production?: { + readonly branch?: components["schemas"]["branch"] + /** @description Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty. */ + readonly name: string + /** @description Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). */ + readonly use_mainbranch: boolean + } + })) + /** + * Error + * @description Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. + */ + readonly error: Readonly> & { + readonly error?: { + /** @description Optional structured data that is endpoint-specific. */ + readonly data?: Readonly> + readonly detail?: string + readonly message: string + } + readonly type: string + } + /** + * Export Options + * @description Options for issue export. + */ + readonly export_options: Readonly> & { + readonly include_attachments?: boolean + readonly project_key?: string + readonly project_name?: string + readonly send_email?: boolean + readonly type: string + } + readonly group: { + readonly type: "group" + } & (Omit & + (Readonly> & { + /** @description The concatenation of the workspace's slug and the group's slug, + * separated with a colon (e.g. `acme:developers`) + * */ + readonly full_slug?: string + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly name?: string + readonly owner?: components["schemas"]["account"] + /** @description The "sluggified" version of the group's name. This contains only ASCII + * characters and can therefore be slightly different than the name */ + readonly slug?: string + readonly workspace?: components["schemas"]["workspace"] + })) + /** + * Hook Event + * @description An event, associated with a resource or subject type. + */ + readonly hook_event: { + /** @description The category this event belongs to. */ + readonly category?: string + /** @description More detailed description of the webhook event type. */ + readonly description?: string + /** + * @description The event identifier. + * @enum {string} + */ + readonly event?: + | "issue:comment_created" + | "issue:created" + | "issue:updated" + | "project:updated" + | "pullrequest:approved" + | "pullrequest:changes_request_created" + | "pullrequest:changes_request_removed" + | "pullrequest:comment_created" + | "pullrequest:comment_deleted" + | "pullrequest:comment_reopened" + | "pullrequest:comment_resolved" + | "pullrequest:comment_updated" + | "pullrequest:created" + | "pullrequest:fulfilled" + | "pullrequest:push" + | "pullrequest:rejected" + | "pullrequest:unapproved" + | "pullrequest:updated" + | "repo:commit_comment_created" + | "repo:commit_status_created" + | "repo:commit_status_updated" + | "repo:created" + | "repo:deleted" + | "repo:fork" + | "repo:imported" + | "repo:push" + | "repo:transfer" + | "repo:updated" + /** @description Summary of the webhook event type. */ + readonly label?: string + } + readonly issue: { + readonly type: "issue" + } & (Omit & + (Readonly> & { + readonly assignee?: components["schemas"]["account"] + readonly component?: components["schemas"]["component"] + readonly content?: { + /** @description The user's content rendered as HTML. */ + readonly html?: string + /** + * @description The type of markup language the raw content is to be interpreted in. + * @enum {string} + */ + readonly markup?: "creole" | "markdown" | "plaintext" + /** @description The text as it was typed by a user. */ + readonly raw?: string + } + /** Format: date-time */ + readonly created_on?: string + /** Format: date-time */ + readonly edited_on?: string + readonly id?: number + /** @enum {string} */ + readonly kind?: "bug" | "enhancement" | "proposal" | "task" + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly attachments?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly comments?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly vote?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly watch?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly milestone?: components["schemas"]["milestone"] + /** @enum {string} */ + readonly priority?: + | "blocker" + | "critical" + | "major" + | "minor" + | "trivial" + readonly reporter?: components["schemas"]["account"] + readonly repository?: components["schemas"]["repository"] + /** @enum {string} */ + readonly state?: + | "closed" + | "duplicate" + | "invalid" + | "new" + | "on hold" + | "open" + | "resolved" + | "submitted" + | "wontfix" + readonly title?: string + /** Format: date-time */ + readonly updated_on?: string + readonly version?: components["schemas"]["version"] + readonly votes?: number + })) + readonly issue_attachment: { + readonly type: "issue_attachment" + } & (Omit & + (Readonly> & { + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly name?: string + })) + /** + * Issue Change + * @description An issue change. + */ + readonly issue_change: Readonly> & { + readonly changes?: { + readonly assignee?: { + readonly new?: string + readonly old?: string + } + readonly component?: { + readonly new?: string + readonly old?: string + } + readonly content?: { + readonly new?: string + readonly old?: string + } + readonly kind?: { + readonly new?: string + readonly old?: string + } + readonly milestone?: { + readonly new?: string + readonly old?: string + } + readonly priority?: { + readonly new?: string + readonly old?: string + } + readonly state?: { + readonly new?: string + readonly old?: string + } + readonly title?: { + readonly new?: string + readonly old?: string + } + readonly version?: { + readonly new?: string + readonly old?: string + } + } + /** Format: date-time */ + readonly created_on?: string + readonly issue?: components["schemas"]["issue"] + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly issue?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly message?: { + /** @description The user's content rendered as HTML. */ + readonly html?: string + /** + * @description The type of markup language the raw content is to be interpreted in. + * @enum {string} + */ + readonly markup?: "creole" | "markdown" | "plaintext" + /** @description The text as it was typed by a user. */ + readonly raw?: string + } + readonly name?: string + readonly type: string + readonly user?: components["schemas"]["account"] + } + readonly issue_comment: { + readonly type: "issue_comment" + } & (Omit & + (Readonly> & { + readonly issue?: components["schemas"]["issue"] + })) + /** + * Issue Job Status + * @description The status of an import or export job + */ + readonly issue_job_status: { + /** @description The total number of issues already imported/exported */ + readonly count?: number + /** @description The percentage of issues already imported/exported */ + readonly pct?: number + /** @description The phase of the import/export job */ + readonly phase?: string + /** + * @description The status of the import/export job + * @enum {string} + */ + readonly status?: "ACCEPTED" | "FAILURE" | "RUNNING" | "STARTED" + /** @description The total number of issues being imported/exported */ + readonly total?: number + readonly type?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly link: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + readonly milestone: { + readonly type: "milestone" + } & (Omit & + (Readonly> & { + readonly id?: number + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly name?: string + })) + /** @description Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. */ + readonly object: Readonly> & { + readonly type: string + } + /** + * Paginated Accounts + * @description A paginated list of accounts. + */ + readonly paginated_accounts: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["account"][] + } + /** + * Paginated Annotations + * @description A paginated list of annotations. + */ + readonly paginated_annotations: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["report_annotation"][] + } + /** + * Paginated Branches + * @description A paginated list of branches. + */ + readonly paginated_branches: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["branch"][] + } + /** + * Paginated Branch Restrictions + * @description A paginated list of branch restriction rules. + */ + readonly paginated_branchrestrictions: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["branchrestriction"][] + } + /** + * Page + * @description A paginated list of commits. + */ + readonly paginated_changeset: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["base_commit"][] + } + /** + * Paginated Commit Comments + * @description A paginated list of commit comments. + */ + readonly paginated_commit_comments: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["commit_comment"][] + } + /** + * Paginated Commit Statuses + * @description A paginated list of commit status objects. + */ + readonly paginated_commitstatuses: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["commitstatus"][] + } + /** + * Paginated Components + * @description A paginated list of issue tracker components. + */ + readonly paginated_components: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["component"][] + } + /** + * Paginated Default Reviewer and Type + * @description A paginated list of default reviewers with reviewer type. + */ + readonly paginated_default_reviewer_and_type: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["default_reviewer_and_type"][] + } + /** + * Paginated Deploy Keys + * @description A paginated list of deploy keys. + */ + readonly paginated_deploy_keys: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["deploy_key"][] + } + /** + * Paginated Deployment Variables + * @description A paged list of deployment variables. + */ + readonly paginated_deployment_variable: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["deployment_variable"][] + } + /** + * Paginated Deployments + * @description A paged list of deployments + */ + readonly paginated_deployments: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["deployment"][] + } + /** + * Paginated Diff Stat + * @description A paginated list of diffstats. + */ + readonly paginated_diffstats: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 500 with 5000 being the maximum allowed value. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["diffstat"][] + } + /** + * Paginated Deployment Environments + * @description A paged list of environments + */ + readonly paginated_environments: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["deployment_environment"][] + } + /** + * Paginated Files + * @description A paginated list of commit_file objects. + */ + readonly paginated_files: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["commit_file"][] + } + /** + * Paginated Hook Events + * @description A paginated list of webhook types available to subscribe on. + */ + readonly paginated_hook_events: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["hook_event"][] + } + /** + * Paginated Issue Attachment + * @description A paginated list of issue attachments. + */ + readonly paginated_issue_attachments: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["issue_attachment"][] + } + /** + * Paginated Issue Comments + * @description A paginated list of issue comments. + */ + readonly paginated_issue_comments: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["issue_comment"][] + } + /** + * Paginated Issues + * @description A paginated list of issues. + */ + readonly paginated_issues: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["issue"][] + } + /** + * Paginated Log Entries + * @description A paginated list of issue changes. + */ + readonly paginated_log_entries: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["issue_change"][] + } + /** + * Paginated Milestones + * @description A paginated list of issue tracker milestones. + */ + readonly paginated_milestones: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["milestone"][] + } + /** + * Paginated Pipeline Cache + * @description A paged list of pipeline caches + */ + readonly paginated_pipeline_caches: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["pipeline_cache"][] + } + /** + * Paginated Pipeline Known Hosts + * @description A paged list of known hosts. + */ + readonly paginated_pipeline_known_hosts: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["pipeline_known_host"][] + } + /** + * Paginated Pipeline Schedule Executions + * @description A paged list of the executions of a schedule. + */ + readonly paginated_pipeline_schedule_executions: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["pipeline_schedule_execution"][] + } + /** + * Paginated Pipeline Schedule + * @description A paged list of schedules + */ + readonly paginated_pipeline_schedules: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["pipeline_schedule"][] + } + /** + * Paginated Pipeline Steps + * @description A paged list of pipeline steps. + */ + readonly paginated_pipeline_steps: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["pipeline_step"][] + } + /** + * Paginated Pipeline Variables + * @description A paged list of variables. + */ + readonly paginated_pipeline_variables: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["pipeline_variable"][] + } + /** + * Paginated Pipelines + * @description A paged list of pipelines + */ + readonly paginated_pipelines: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["pipeline"][] + } + /** + * Paginated Project Deploy Keys + * @description A paginated list of project deploy keys. + */ + readonly paginated_project_deploy_keys: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["project_deploy_key"][] + } + /** + * Paginated Project Group Permissions + * @description A paginated list of project group permissions. + */ + readonly paginated_project_group_permissions: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["project_group_permission"][] + } + /** + * Paginated Project User Permissions + * @description A paginated list of project user permissions. + */ + readonly paginated_project_user_permissions: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["project_user_permission"][] + } + /** + * Paginated Projects + * @description A paginated list of projects + */ + readonly paginated_projects: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["project"][] + } + /** + * Paginated Pull Request Comments + * @description A paginated list of pullrequest comments. + */ + readonly paginated_pullrequest_comments: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["pullrequest_comment"][] + } + /** + * Paginated Pull Requests + * @description A paginated list of pullrequests. + */ + readonly paginated_pullrequests: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["pullrequest"][] + } + /** + * Paginated Refs + * @description A paginated list of refs. + */ + readonly paginated_refs: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["ref"][] + } + /** + * Paginated Reports + * @description A paginated list of reports. + */ + readonly paginated_reports: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + /** @description The values of the current page. */ + readonly values?: readonly components["schemas"]["report"][] + } + /** + * Paginated Repositories + * @description A paginated list of repositories. + */ + readonly paginated_repositories: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["repository"][] + } + /** + * Paginated Repository Group Permissions + * @description A paginated list of repository group permissions. + */ + readonly paginated_repository_group_permissions: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["repository_group_permission"][] + } + /** + * Paginated Repository Permissions + * @description A paginated list of repository permissions. + */ + readonly paginated_repository_permissions: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["repository_permission"][] + } + /** + * Paginated Repository User Permissions + * @description A paginated list of repository user permissions. + */ + readonly paginated_repository_user_permissions: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["repository_user_permission"][] + } + /** + * Paginated Snippet Comments + * @description A paginated list of snippet comments. + */ + readonly paginated_snippet_comments: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["snippet_comment"][] + } + /** + * Paginated Snippet Commits + * @description A paginated list of snippet commits. + */ + readonly paginated_snippet_commit: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["snippet_commit"][] + } + /** + * Paginated Snippets + * @description A paginated list of snippets. + */ + readonly paginated_snippets: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["snippet"][] + } + /** + * Paginated SSH User Keys + * @description A paginated list of SSH keys. + */ + readonly paginated_ssh_user_keys: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["ssh_account_key"][] + } + /** + * Paginated Tags + * @description A paginated list of tags. + */ + readonly paginated_tags: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["tag"][] + } + /** + * Paginated Tasks + * @description A paginated list of tasks. + */ + readonly paginated_tasks: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["pullrequest_comment_task"][] + } + /** + * Paginated Tree Entry + * @description A paginated list of commit_file and/or commit_directory objects. + */ + readonly paginated_treeentries: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["treeentry"][] + } + /** + * Paginated Versions + * @description A paginated list of issue tracker versions. + */ + readonly paginated_versions: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["version"][] + } + /** + * Paginated Webhook Subscriptions + * @description A paginated list of webhook subscriptions + */ + readonly paginated_webhook_subscriptions: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["webhook_subscription"][] + } + /** + * Paginated Workspace Memberships + * @description A paginated list of workspace memberships. + */ + readonly paginated_workspace_memberships: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["workspace_membership"][] + } + /** + * Paginated Workspaces + * @description A paginated list of workspaces. + */ + readonly paginated_workspaces: { + /** + * Format: uri + * @description Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly next?: string + /** @description Page number of the current results. This is an optional element that is not provided in all responses. */ + readonly page?: number + /** @description Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. */ + readonly pagelen?: number + /** + * Format: uri + * @description Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. + */ + readonly previous?: string + /** @description Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. */ + readonly size?: number + readonly values?: readonly components["schemas"]["workspace"][] + } + readonly participant: { + readonly type: "participant" + } & (Omit & + (Readonly> & { + readonly approved?: boolean + /** + * Format: date-time + * @description The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented. + */ + readonly participated_on?: string + /** @enum {string} */ + readonly role?: "PARTICIPANT" | "REVIEWER" + /** @enum {string} */ + readonly state?: "approved" | "changes_requested" | null + readonly user?: components["schemas"]["account"] + })) + readonly pipeline: { + readonly type: "pipeline" + } & (Omit & + (Readonly> & { + /** @description The build number of the pipeline. */ + readonly build_number?: number + /** @description The number of build seconds used by this pipeline. */ + readonly build_seconds_used?: number + /** + * Format: date-time + * @description The timestamp when the Pipeline was completed. This is not set if the pipeline is still in progress. + */ + readonly completed_on?: string + /** @description An ordered list of sources of the pipeline configuration */ + readonly configuration_sources?: readonly components["schemas"]["pipeline_configuration_source"][] + /** + * Format: date-time + * @description The timestamp when the pipeline was created. + */ + readonly created_on?: string + readonly creator?: components["schemas"]["account"] + readonly links?: components["schemas"]["pipelines_pipeline_links"] + readonly repository?: components["schemas"]["repository"] + readonly state?: components["schemas"]["pipeline_state"] + readonly target?: components["schemas"]["pipeline_target"] + readonly trigger?: components["schemas"]["pipeline_trigger"] + /** @description The UUID identifying the pipeline. */ + readonly uuid?: string + /** @description The variables for the pipeline. */ + readonly variables?: readonly components["schemas"]["pipeline_variable"][] + })) + readonly pipeline_build_number: { + readonly type: "pipeline_build_number" + } & (Omit & + (Readonly> & { + /** @description The next number that will be used as build number. */ + readonly next?: number + })) + readonly pipeline_cache: { + readonly type: "pipeline_cache" + } & (Omit & + (Readonly> & { + /** + * Format: date-time + * @description The timestamp when the cache was created. + */ + readonly created_on?: string + /** @description The size of the file containing the archive of the cache. */ + readonly file_size_bytes?: number + /** @description The key hash of the cache version. */ + readonly key_hash?: string + /** @description The name of the cache. */ + readonly name?: string + /** @description The path where the cache contents were retrieved from. */ + readonly path?: string + /** @description The UUID of the pipeline that created the cache. */ + readonly pipeline_uuid?: string + /** @description The uuid of the step that created the cache. */ + readonly step_uuid?: string + /** @description The UUID identifying the pipeline cache. */ + readonly uuid?: string + })) + /** + * Pipeline Cache Content URI + * @description A representation of the location of pipeline cache content. + */ + readonly pipeline_cache_content_uri: { + /** + * Format: uri + * @description The uri for pipeline cache content. + */ + readonly uri?: string + } + /** + * Pipeline Command + * @description An executable pipeline command. + */ + readonly pipeline_command: { + /** @description The executable command. */ + readonly command?: string + /** @description The name of the command. */ + readonly name?: string + } + readonly pipeline_commit_target: { + readonly type: "pipeline_commit_target" + } & (Omit & + (Readonly> & { + readonly commit?: components["schemas"]["commit"] + readonly selector?: components["schemas"]["pipeline_selector"] + })) + /** @description Information about the source of the pipeline configuration */ + readonly pipeline_configuration_source: { + /** @description Identifier of the configuration source */ + readonly source: string + /** + * Format: uri + * @description Link to the configuration source view or its immediate content + */ + readonly uri: string + } + readonly pipeline_error: { + readonly type: "pipeline_error" + } & (Omit & + (Readonly> & { + /** @description The error key. */ + readonly key?: string + /** @description The error message. */ + readonly message?: string + })) + /** + * Pipeline Image + * @description The definition of a Docker image that can be used for a Bitbucket Pipelines step execution context. + */ + readonly pipeline_image: { + /** @description The email needed to authenticate with the Docker registry. Only required when using a private Docker image. */ + readonly email?: string + /** @description The name of the image. If the image is hosted on DockerHub the short name can be used, otherwise the fully qualified name is required here. */ + readonly name?: string + /** @description The password needed to authenticate with the Docker registry. Only required when using a private Docker image. */ + readonly password?: string + /** @description The username needed to authenticate with the Docker registry. Only required when using a private Docker image. */ + readonly username?: string + } + readonly pipeline_known_host: { + readonly type: "pipeline_known_host" + } & (Omit & + (Readonly> & { + /** @description The hostname of the known host. */ + readonly hostname?: string + readonly public_key?: components["schemas"]["pipeline_ssh_public_key"] + /** @description The UUID identifying the known host. */ + readonly uuid?: string + })) + readonly pipeline_ref_target: { + readonly type: "pipeline_ref_target" + } & (Omit & + (Readonly> & { + readonly commit?: components["schemas"]["commit"] + /** @description The name of the reference. */ + readonly ref_name?: string + /** + * @description The type of reference (branch/tag). + * @enum {string} + */ + readonly ref_type?: "bookmark" | "branch" | "named_branch" | "tag" + readonly selector?: components["schemas"]["pipeline_selector"] + })) + readonly pipeline_schedule: { + readonly type: "pipeline_schedule" + } & (Omit & + (Readonly> & { + /** + * Format: date-time + * @description The timestamp when the schedule was created. + */ + readonly created_on?: 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. */ + readonly cron_pattern?: string + /** @description Whether the schedule is enabled. */ + readonly enabled?: boolean + readonly target?: components["schemas"]["pipeline_ref_target"] + /** + * Format: date-time + * @description The timestamp when the schedule was updated. + */ + readonly updated_on?: string + /** @description The UUID identifying the schedule. */ + readonly uuid?: string + })) + readonly pipeline_schedule_execution: { + readonly type: "pipeline_schedule_execution" + } & (Omit & + Readonly>) + readonly pipeline_schedule_execution_errored: { + readonly type: "pipeline_schedule_execution_errored" + } & (Omit & + (Readonly> & { + readonly error?: components["schemas"]["pipeline_error"] + })) + readonly pipeline_schedule_execution_executed: { + readonly type: "pipeline_schedule_execution_executed" + } & (Omit & + (Readonly> & { + readonly pipeline?: components["schemas"]["pipeline"] + })) + readonly pipeline_schedule_post_request_body: { + readonly type: "pipeline_schedule_post_request_body" + } & (Omit & + (Readonly> & { + /** @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. */ + readonly cron_pattern: string + /** @description Whether the schedule is enabled. */ + readonly enabled?: boolean + /** @description The target on which the schedule will be executed. */ + readonly target: { + /** @description The name of the reference. */ + readonly ref_name: string + /** + * @description The type of reference (branch only). + * @enum {string} + */ + readonly ref_type: "branch" + readonly selector: components["schemas"]["pipeline_selector"] + } + })) + readonly pipeline_schedule_put_request_body: { + readonly type: "pipeline_schedule_put_request_body" + } & (Omit & + (Readonly> & { + /** @description Whether the schedule is enabled. */ + readonly enabled?: boolean + })) + readonly pipeline_selector: { + readonly type: "pipeline_selector" + } & (Omit & + (Readonly> & { + /** @description The name of the matching pipeline definition. */ + readonly pattern?: string + /** + * @description The type of selector. + * @enum {string} + */ + readonly type?: "bookmarks" | "branches" | "custom" | "default" | "tags" + })) + readonly pipeline_ssh_key_pair: { + readonly type: "pipeline_ssh_key_pair" + } & (Omit & + (Readonly> & { + /** @description The SSH private key. This value will be empty when retrieving the SSH key pair. */ + readonly private_key?: string + /** @description The SSH public key. */ + readonly public_key?: string + })) + readonly pipeline_ssh_public_key: { + readonly type: "pipeline_ssh_public_key" + } & (Omit & + (Readonly> & { + /** @description The base64 encoded public key. */ + readonly key?: string + /** @description The type of the public key. */ + readonly key_type?: string + /** @description The MD5 fingerprint of the public key. */ + readonly md5_fingerprint?: string + /** @description The SHA-256 fingerprint of the public key. */ + readonly sha256_fingerprint?: string + })) + readonly pipeline_state: { + readonly type: "pipeline_state" + } & (Omit & + Readonly>) + readonly pipeline_state_completed: { + readonly type: "pipeline_state_completed" + } & (Omit & + (Readonly> & { + /** + * @description The name of pipeline state (COMPLETED). + * @enum {string} + */ + readonly name?: "COMPLETED" + readonly result?: components["schemas"]["pipeline_state_completed_result"] + })) + readonly pipeline_state_completed_error: { + readonly type: "pipeline_state_completed_error" + } & (Omit< + components["schemas"]["pipeline_state_completed_result"], + "type" + > & + (Readonly> & { + readonly error?: components["schemas"]["pipeline_error"] + /** + * @description The name of the result (ERROR) + * @enum {string} + */ + readonly name?: "ERROR" + })) + readonly pipeline_state_completed_expired: { + readonly type: "pipeline_state_completed_expired" + } & (Omit< + components["schemas"]["pipeline_state_completed_result"], + "type" + > & + (Readonly> & { + /** + * @description The name of the stopped result (EXPIRED). + * @enum {string} + */ + readonly name?: "EXPIRED" + })) + readonly pipeline_state_completed_failed: { + readonly type: "pipeline_state_completed_failed" + } & (Omit< + components["schemas"]["pipeline_state_completed_result"], + "type" + > & + (Readonly> & { + /** + * @description The name of the failed result (FAILED). + * @enum {string} + */ + readonly name?: "FAILED" + })) + readonly pipeline_state_completed_result: { + readonly type: "pipeline_state_completed_result" + } & (Omit & + Readonly>) + readonly pipeline_state_completed_stopped: { + readonly type: "pipeline_state_completed_stopped" + } & (Omit< + components["schemas"]["pipeline_state_completed_result"], + "type" + > & + (Readonly> & { + /** + * @description The name of the stopped result (STOPPED). + * @enum {string} + */ + readonly name?: "STOPPED" + })) + readonly pipeline_state_completed_successful: { + readonly type: "pipeline_state_completed_successful" + } & (Omit< + components["schemas"]["pipeline_state_completed_result"], + "type" + > & + (Readonly> & { + /** + * @description The name of the successful result (SUCCESSFUL). + * @enum {string} + */ + readonly name?: "SUCCESSFUL" + })) + readonly pipeline_state_in_progress: { + readonly type: "pipeline_state_in_progress" + } & (Omit & + (Readonly> & { + /** + * @description The name of pipeline state (IN_PROGRESS). + * @enum {string} + */ + readonly name?: "IN_PROGRESS" + readonly stage?: components["schemas"]["pipeline_state_in_progress_stage"] + })) + readonly pipeline_state_in_progress_paused: { + readonly type: "pipeline_state_in_progress_paused" + } & (Omit< + components["schemas"]["pipeline_state_in_progress_stage"], + "type" + > & + (Readonly> & { + /** + * @description The name of the stage (PAUSED) + * @enum {string} + */ + readonly name?: "PAUSED" + })) + readonly pipeline_state_in_progress_running: { + readonly type: "pipeline_state_in_progress_running" + } & (Omit< + components["schemas"]["pipeline_state_in_progress_stage"], + "type" + > & + (Readonly> & { + /** + * @description The name of the stage (RUNNING) + * @enum {string} + */ + readonly name?: "RUNNING" + })) + readonly pipeline_state_in_progress_stage: { + readonly type: "pipeline_state_in_progress_stage" + } & (Omit & + Readonly>) + readonly pipeline_state_pending: { + readonly type: "pipeline_state_pending" + } & (Omit & + (Readonly> & { + /** + * @description The name of pipeline state (PENDING). + * @enum {string} + */ + readonly name?: "PENDING" + })) + readonly pipeline_step: { + readonly type: "pipeline_step" + } & (Omit & + (Readonly> & { + /** + * Format: date-time + * @description The timestamp when the step execution was completed. This is not set if the step is still in progress. + */ + readonly completed_on?: string + readonly image?: components["schemas"]["pipeline_image"] + /** @description The list of build commands. These commands are executed in the build container. */ + readonly script_commands?: readonly components["schemas"]["pipeline_command"][] + /** @description The list of commands that are executed as part of the setup phase of the build. These commands are executed outside the build container. */ + readonly setup_commands?: readonly components["schemas"]["pipeline_command"][] + /** + * Format: date-time + * @description The timestamp when the step execution was started. This is not set when the step hasn't executed yet. + */ + readonly started_on?: string + readonly state?: components["schemas"]["pipeline_step_state"] + /** @description The UUID identifying the step. */ + readonly uuid?: string + })) + readonly pipeline_step_error: { + readonly type: "pipeline_step_error" + } & (Omit & + (Readonly> & { + /** @description The error key. */ + readonly key?: string + /** @description The error message. */ + readonly message?: string + })) + readonly pipeline_step_state: { + readonly type: "pipeline_step_state" + } & (Omit & + Readonly>) + readonly pipeline_step_state_completed: { + readonly type: "pipeline_step_state_completed" + } & (Omit & + (Readonly> & { + /** + * @description The name of pipeline step state (COMPLETED). + * @enum {string} + */ + readonly name?: "COMPLETED" + readonly result?: components["schemas"]["pipeline_step_state_completed_result"] + })) + readonly pipeline_step_state_completed_error: { + readonly type: "pipeline_step_state_completed_error" + } & (Omit< + components["schemas"]["pipeline_step_state_completed_result"], + "type" + > & + (Readonly> & { + readonly error?: components["schemas"]["pipeline_step_error"] + /** + * @description The name of the result (ERROR) + * @enum {string} + */ + readonly name?: "ERROR" + })) + readonly pipeline_step_state_completed_expired: { + readonly type: "pipeline_step_state_completed_expired" + } & (Omit< + components["schemas"]["pipeline_step_state_completed_result"], + "type" + > & + (Readonly> & { + /** + * @description The name of the result (EXPIRED) + * @enum {string} + */ + readonly name?: "EXPIRED" + })) + readonly pipeline_step_state_completed_failed: { + readonly type: "pipeline_step_state_completed_failed" + } & (Omit< + components["schemas"]["pipeline_step_state_completed_result"], + "type" + > & + (Readonly> & { + /** + * @description The name of the result (FAILED) + * @enum {string} + */ + readonly name?: "FAILED" + })) + readonly pipeline_step_state_completed_not_run: { + readonly type: "pipeline_step_state_completed_not_run" + } & (Omit< + components["schemas"]["pipeline_step_state_completed_result"], + "type" + > & + (Readonly> & { + /** + * @description The name of the result (NOT_RUN) + * @enum {string} + */ + readonly name?: "NOT_RUN" + })) + readonly pipeline_step_state_completed_result: { + readonly type: "pipeline_step_state_completed_result" + } & (Omit & + Readonly>) + readonly pipeline_step_state_completed_stopped: { + readonly type: "pipeline_step_state_completed_stopped" + } & (Omit< + components["schemas"]["pipeline_step_state_completed_result"], + "type" + > & + (Readonly> & { + /** + * @description The name of the result (STOPPED) + * @enum {string} + */ + readonly name?: "STOPPED" + })) + readonly pipeline_step_state_completed_successful: { + readonly type: "pipeline_step_state_completed_successful" + } & (Omit< + components["schemas"]["pipeline_step_state_completed_result"], + "type" + > & + (Readonly> & { + /** + * @description The name of the result (SUCCESSFUL) + * @enum {string} + */ + readonly name?: "SUCCESSFUL" + })) + readonly pipeline_step_state_in_progress: { + readonly type: "pipeline_step_state_in_progress" + } & (Omit & + (Readonly> & { + /** + * @description The name of pipeline step state (IN_PROGRESS). + * @enum {string} + */ + readonly name?: "IN_PROGRESS" + })) + readonly pipeline_step_state_pending: { + readonly type: "pipeline_step_state_pending" + } & (Omit & + (Readonly> & { + /** + * @description The name of pipeline step state (PENDING). + * @enum {string} + */ + readonly name?: "PENDING" + })) + readonly pipeline_step_state_ready: { + readonly type: "pipeline_step_state_ready" + } & (Omit & + (Readonly> & { + /** + * @description The name of pipeline step state (READY). + * @enum {string} + */ + readonly name?: "READY" + })) + readonly pipeline_target: { + readonly type: "pipeline_target" + } & (Omit & + Readonly>) + readonly pipeline_trigger: { + readonly type: "pipeline_trigger" + } & (Omit & + Readonly>) + readonly pipeline_trigger_manual: { + readonly type: "pipeline_trigger_manual" + } & (Omit & + Readonly>) + readonly pipeline_trigger_push: { + readonly type: "pipeline_trigger_push" + } & (Omit & + Readonly>) + readonly pipeline_variable: { + readonly type: "pipeline_variable" + } & (Omit & + (Readonly> & { + /** @description The unique name of the variable. */ + readonly key?: string + /** @description If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API. */ + readonly secured?: boolean + /** @description The UUID identifying the variable. */ + readonly uuid?: string + /** @description The value of the variable. If the variable is secured, this will be empty. */ + readonly value?: string + })) + readonly pipelines_config: { + readonly type: "pipelines_config" + } & (Omit & + (Readonly> & { + /** @description Whether Pipelines is enabled for the repository. */ + readonly enabled?: boolean + readonly repository?: components["schemas"]["repository"] + })) + readonly pipelines_links_section_href: { + readonly type: "pipelines_links_section_href" + } & (Omit & + (Readonly> & { + /** + * Format: uri + * @description A link + */ + readonly href?: string + })) + readonly pipelines_pipeline_links: { + readonly type: "pipelines_pipeline_links" + } & (Omit & + (Readonly> & { + readonly self?: components["schemas"]["pipelines_links_section_href"] + readonly steps?: components["schemas"]["pipelines_links_section_href"] + })) + readonly project: { + readonly type: "project" + } & (Omit & + (Readonly> & { + /** Format: date-time */ + readonly created_on?: string + readonly description?: string + /** @description + * Indicates whether the project contains publicly visible repositories. + * Note that private projects cannot contain public repositories. */ + readonly has_publicly_visible_repos?: boolean + /** @description + * Indicates whether the project is publicly accessible, or whether it is + * private to the team and consequently only visible to team members. + * Note that private projects cannot contain public repositories. */ + readonly is_private?: boolean + /** @description The project's key. */ + readonly key?: string + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly avatar?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @description The name of the project. */ + readonly name?: string + readonly owner?: components["schemas"]["team"] + /** Format: date-time */ + readonly updated_on?: string + /** @description The project's immutable id. */ + readonly uuid?: string + })) + readonly project_branching_model: { + readonly type: "project_branching_model" + } & (Omit & + (Readonly> & { + /** @description The active branch types. */ + readonly branch_types?: readonly { + /** + * @description The kind of branch. + * @enum {string} + */ + readonly kind: "bugfix" | "feature" | "hotfix" | "release" + /** @description The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`. */ + readonly prefix: string + }[] + readonly development?: { + /** @description Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist. */ + readonly name: string + /** @description Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). */ + readonly use_mainbranch: boolean + } + readonly production?: { + /** @description Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist. */ + readonly name: string + /** @description Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). */ + readonly use_mainbranch: boolean + } + })) + readonly project_deploy_key: { + readonly type: "project_deploy_key" + } & (Omit & + (Readonly> & { + /** Format: date-time */ + readonly added_on?: string + /** @description The comment parsed from the deploy key (if present) */ + readonly comment?: string + readonly created_by?: components["schemas"]["account"] + /** @description The deploy key value. */ + readonly key?: string + /** @description The user-defined label for the deploy key */ + readonly label?: string + /** Format: date-time */ + readonly last_used?: string + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly project?: components["schemas"]["project"] + })) + /** + * Project Group Permission + * @description A group's permission for a given project. + */ + readonly project_group_permission: Readonly> & { + readonly group?: components["schemas"]["group"] + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @enum {string} */ + readonly permission?: "admin" | "create-repo" | "none" | "read" | "write" + readonly project?: components["schemas"]["project"] + readonly type: string + } + /** + * Project User Permission + * @description A user's direct permission for a given project. + */ + readonly project_user_permission: Readonly> & { + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @enum {string} */ + readonly permission?: "admin" | "create-repo" | "none" | "read" | "write" + readonly project?: components["schemas"]["project"] + readonly type: string + readonly user?: components["schemas"]["user"] + } + readonly pullrequest: { + readonly type: "pullrequest" + } & (Omit & + (Readonly> & { + readonly author?: components["schemas"]["account"] + /** @description A boolean flag indicating if merging the pull request closes the source branch. */ + readonly close_source_branch?: boolean + readonly closed_by?: components["schemas"]["account"] + /** @description The number of comments for a specific pull request. */ + readonly comment_count?: number + /** + * Format: date-time + * @description The ISO8601 timestamp the request was created. + */ + readonly created_on?: string + readonly destination?: components["schemas"]["pullrequest_endpoint"] + /** @description The pull request's unique ID. Note that pull request IDs are only unique within their associated repository. */ + readonly id?: number + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly activity?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly approve?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly comments?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly commits?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly decline?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly diff?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly diffstat?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly merge?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** Pull Request Commit */ + readonly merge_commit?: { + readonly hash?: string + } + /** @description The list of users that are collaborating on this pull request. + * Collaborators are user that: + * + * * are added to the pull request as a reviewer (part of the reviewers + * list) + * * are not explicit reviewers, but have commented on the pull request + * * are not explicit reviewers, but have approved the pull request + * + * Each user is wrapped in an object that indicates the user's role and + * whether they have approved the pull request. For performance reasons, + * the API only returns this list when an API requests a pull request by + * id. + * */ + readonly participants?: readonly components["schemas"]["participant"][] + /** @description Explains why a pull request was declined. This field is only applicable to pull requests in rejected state. */ + readonly reason?: string + /** + * Rendered Pull Request Markup + * @description User provided pull request text, interpreted in a markup language and rendered in HTML + */ + readonly rendered?: { + readonly description?: { + /** @description The user's content rendered as HTML. */ + readonly html?: string + /** + * @description The type of markup language the raw content is to be interpreted in. + * @enum {string} + */ + readonly markup?: "creole" | "markdown" | "plaintext" + /** @description The text as it was typed by a user. */ + readonly raw?: string + } + readonly reason?: { + /** @description The user's content rendered as HTML. */ + readonly html?: string + /** + * @description The type of markup language the raw content is to be interpreted in. + * @enum {string} + */ + readonly markup?: "creole" | "markdown" | "plaintext" + /** @description The text as it was typed by a user. */ + readonly raw?: string + } + readonly title?: { + /** @description The user's content rendered as HTML. */ + readonly html?: string + /** + * @description The type of markup language the raw content is to be interpreted in. + * @enum {string} + */ + readonly markup?: "creole" | "markdown" | "plaintext" + /** @description The text as it was typed by a user. */ + readonly raw?: string + } + } + /** @description The list of users that were added as reviewers on this pull request when it was created. For performance reasons, the API only includes this list on a pull request's `self` URL. */ + readonly reviewers?: readonly components["schemas"]["account"][] + readonly source?: components["schemas"]["pullrequest_endpoint"] + /** + * @description The pull request's current status. + * @enum {string} + */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" | "SUPERSEDED" + readonly summary?: { + /** @description The user's content rendered as HTML. */ + readonly html?: string + /** + * @description The type of markup language the raw content is to be interpreted in. + * @enum {string} + */ + readonly markup?: "creole" | "markdown" | "plaintext" + /** @description The text as it was typed by a user. */ + readonly raw?: string + } + /** @description The number of open tasks for a specific pull request. */ + readonly task_count?: number + /** @description Title of the pull request. */ + readonly title?: string + /** + * Format: date-time + * @description The ISO8601 timestamp the request was last updated. + */ + readonly updated_on?: string + })) + readonly pullrequest_comment: { + readonly type: "pullrequest_comment" + } & (Omit & + (Readonly> & { + readonly pending?: boolean + readonly pullrequest?: components["schemas"]["pullrequest"] + readonly resolution?: components["schemas"]["comment_resolution"] + })) + readonly pullrequest_comment_task: components["schemas"]["pullrequest_task"] & { + readonly comment?: components["schemas"]["comment"] + } + /** Pull Request Endpoint */ + readonly pullrequest_endpoint: { + /** Pull Request Branch */ + readonly branch?: { + /** @description The default merge strategy, when this endpoint is the destination of the pull request. */ + readonly default_merge_strategy?: string + /** @description Available merge strategies, when this endpoint is the destination of the pull request. */ + readonly merge_strategies?: readonly ( + | "fast_forward" + | "merge_commit" + | "squash" + )[] + readonly name?: string + } + /** Pull Request Commit */ + readonly commit?: { + readonly hash?: string + } + readonly repository?: components["schemas"]["repository"] + } + /** + * Pull Request Merge Parameters + * @description The metadata that describes a pull request merge. + */ + readonly pullrequest_merge_parameters: Readonly> & { + /** @description Whether the source branch should be deleted. If this is not provided, we fallback to the value used when the pull request was created, which defaults to False */ + readonly close_source_branch?: boolean + /** + * @description The merge strategy that will be used to merge the pull request. + * @default merge_commit + * @enum {string} + */ + readonly merge_strategy?: "fast_forward" | "merge_commit" | "squash" + /** @description The commit message that will be used on the resulting commit. Note that the size of the message is limited to 128 KiB. */ + readonly message?: string + readonly type: string + } + readonly pullrequest_task: components["schemas"]["task"] & { + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + } + /** + * Pull Request Task Create + * @description A pullrequest task create + */ + readonly pullrequest_task_create: { + readonly comment?: components["schemas"]["comment"] + /** + * Task Raw Content + * @description task raw content + */ + readonly content: { + /** @description The task contents */ + readonly raw: string + } + readonly pending?: boolean + } + /** + * Pull Request Task Update + * @description A pullrequest task update + */ + readonly pullrequest_task_update: { + /** + * Task Raw Content + * @description task raw content + */ + readonly content?: { + /** @description The task contents */ + readonly raw: string + } + /** @enum {string} */ + readonly state?: "RESOLVED" | "UNRESOLVED" + } + /** + * Ref + * @description A ref object, representing a branch or tag in a repository. + */ + readonly ref: Readonly> & { + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly commits?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @description The name of the ref. */ + readonly name?: string + readonly target?: components["schemas"]["commit"] + readonly type: string + } + readonly report: { + readonly type: "report" + } & (Omit & + (Readonly> & { + /** + * Format: date-time + * @description The timestamp when the report was created. + */ + readonly created_on?: string + /** @description An array of data fields to display information on the report. Maximum 10. */ + readonly data?: readonly components["schemas"]["report_data"][] + /** @description A string to describe the purpose of the report. */ + readonly details?: string + /** @description ID of the report provided by the report creator. It can be used to identify the report as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the report creator for updating or deleting this specific report. Needs to be unique. */ + readonly external_id?: string + /** + * Format: uri + * @description A URL linking to the results of the report in an external tool. + */ + readonly link?: string + /** + * Format: uri + * @description A URL to the report logo. If none is provided, the default insights logo will be used. + */ + readonly logo_url?: string + /** @description If enabled, a remote link is created in Jira for the issue associated with the commit the report belongs to. */ + readonly remote_link_enabled?: boolean + /** + * @description The type of the report. + * @enum {string} + */ + readonly report_type?: "BUG" | "COVERAGE" | "SECURITY" | "TEST" + /** @description A string to describe the tool or company who created the report. */ + readonly reporter?: string + /** + * @description The state of the report. May be set to PENDING and later updated. + * @enum {string} + */ + readonly result?: "FAILED" | "PASSED" | "PENDING" + /** @description The title of the report. */ + readonly title?: string + /** + * Format: date-time + * @description The timestamp when the report was updated. + */ + readonly updated_on?: string + /** @description The UUID that can be used to identify the report. */ + readonly uuid?: string + })) + readonly report_annotation: { + readonly type: "report_annotation" + } & (Omit & + (Readonly> & { + /** + * @description The type of the report. + * @enum {string} + */ + readonly annotation_type?: "BUG" | "CODE_SMELL" | "VULNERABILITY" + /** + * Format: date-time + * @description The timestamp when the report was created. + */ + readonly created_on?: string + /** @description The details to show to users when clicking on the annotation. */ + readonly details?: string + /** @description ID of the annotation provided by the annotation creator. It can be used to identify the annotation as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the annotation creator for updating or deleting this specific annotation. Needs to be unique. */ + readonly external_id?: string + /** @description The line number that the annotation should belong to. If no line number is provided, then it will default to 0 and in a pull request it will appear at the top of the file specified by the path field. */ + readonly line?: number + /** + * Format: uri + * @description A URL linking to the annotation in an external tool. + */ + readonly link?: string + /** @description The path of the file on which this annotation should be placed. This is the path of the file relative to the git repository. If no path is provided, then it will appear in the overview modal on all pull requests where the tip of the branch is the given commit, regardless of which files were modified. */ + readonly path?: string + /** + * @description The state of the report. May be set to PENDING and later updated. + * @enum {string} + */ + readonly result?: "FAILED" | "IGNORED" | "PASSED" | "SKIPPED" + /** + * @description The severity of the annotation. + * @enum {string} + */ + readonly severity?: "CRITICAL" | "HIGH" | "LOW" | "MEDIUM" + /** @description The message to display to users. */ + readonly summary?: string + /** + * Format: date-time + * @description The timestamp when the report was updated. + */ + readonly updated_on?: string + /** @description The UUID that can be used to identify the annotation. */ + readonly uuid?: string + })) + /** + * Report Data + * @description A key-value element that will be displayed along with the report. + */ + readonly report_data: { + /** @description A string describing what this data field represents. */ + readonly title?: string + /** + * @description The type of data contained in the value field. If not provided, then the value will be detected as a boolean, number or string. + * @enum {string} + */ + readonly type?: + | "BOOLEAN" + | "DATE" + | "DURATION" + | "LINK" + | "NUMBER" + | "PERCENTAGE" + | "TEXT" + /** @description The value of the data element. */ + readonly value?: Record + } + readonly repository: { + readonly type: "repository" + } & (Omit & + (Readonly> & { + /** Format: date-time */ + readonly created_on?: string + readonly description?: string + /** + * @description + * Controls the rules for forking this repository. + * + * * **allow_forks**: unrestricted forking + * * **no_public_forks**: restrict forking to private forks (forks cannot + * be made public later) + * * **no_forks**: deny all forking + * + * @enum {string} + */ + readonly fork_policy?: "allow_forks" | "no_forks" | "no_public_forks" + /** @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. */ + readonly full_name?: string + /** @description + * The issue tracker for this repository is enabled. Issue Tracker + * features are not supported for repositories in workspaces + * administered through admin.atlassian.com. + * */ + readonly has_issues?: boolean + /** @description + * The wiki for this repository is enabled. Wiki + * features are not supported for repositories in workspaces + * administered through admin.atlassian.com. + * */ + readonly has_wiki?: boolean + readonly is_private?: boolean + readonly language?: string + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly avatar?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + readonly clone?: readonly { + /** Format: uri */ + readonly href?: string + readonly name?: string + }[] + /** + * Link + * @description A link to a resource related to this object. + */ + readonly commits?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly downloads?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly forks?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly hooks?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly pullrequests?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly watchers?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly mainbranch?: components["schemas"]["branch"] + readonly name?: string + readonly owner?: components["schemas"]["account"] + readonly parent?: components["schemas"]["repository"] + readonly project?: components["schemas"]["project"] + /** @enum {string} */ + readonly scm?: "git" + readonly size?: number + /** Format: date-time */ + readonly updated_on?: string + /** @description The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user. */ + readonly uuid?: string + })) + /** + * Repository Group Permission + * @description A group's permission for a given repository. + */ + readonly repository_group_permission: Readonly> & { + readonly group?: components["schemas"]["group"] + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @enum {string} */ + readonly permission?: "admin" | "none" | "read" | "write" + readonly repository?: components["schemas"]["repository"] + readonly type: string + } + /** + * Repository Inheritance State + * @description A json object representing the repository's inheritance state values + */ + readonly repository_inheritance_state: Readonly> & { + readonly override_settings?: Record + readonly type: string + } + /** + * Repository Permission + * @description A user's permission for a given repository. + */ + readonly repository_permission: Readonly> & { + /** @enum {string} */ + readonly permission?: "admin" | "none" | "read" | "write" + readonly repository?: components["schemas"]["repository"] + readonly type: string + readonly user?: components["schemas"]["user"] + } + /** + * Repository User Permission + * @description A user's direct permission for a given repository. + */ + readonly repository_user_permission: Readonly> & { + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @enum {string} */ + readonly permission?: "admin" | "none" | "read" | "write" + readonly repository?: components["schemas"]["repository"] + readonly type: string + readonly user?: components["schemas"]["user"] + } + readonly search_code_search_result: { + /** Format: int64 */ + readonly content_match_count?: number + readonly content_matches?: readonly components["schemas"]["search_content_match"][] + readonly file?: components["schemas"]["commit_file"] + readonly path_matches?: readonly components["schemas"]["search_segment"][] + readonly type?: string + } + readonly search_content_match: { + readonly lines?: readonly components["schemas"]["search_line"][] + } + readonly search_line: { + /** Format: int32 */ + readonly line?: number + readonly segments?: readonly components["schemas"]["search_segment"][] + } + readonly search_result_page: { + /** Format: uri */ + readonly next?: string + /** Format: int32 */ + readonly page?: number + /** Format: int32 */ + readonly pagelen?: number + /** Format: uri */ + readonly previous?: string + readonly query_substituted?: boolean + /** Format: int64 */ + readonly size?: number + readonly values?: readonly components["schemas"]["search_code_search_result"][] + } + readonly search_segment: { + readonly match?: boolean + readonly text?: string + } + readonly snippet: { + readonly type: "snippet" + } & (Omit & + (Readonly> & { + /** Format: date-time */ + readonly created_on?: string + readonly creator?: components["schemas"]["account"] + readonly id?: number + readonly is_private?: boolean + readonly owner?: components["schemas"]["account"] + /** + * @description The DVCS used to store the snippet. + * @enum {string} + */ + readonly scm?: "git" + readonly title?: string + /** Format: date-time */ + readonly updated_on?: string + })) + readonly snippet_comment: { + readonly type: "snippet_comment" + } & (Omit & + (Readonly> & { + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly snippet?: components["schemas"]["snippet"] + })) + readonly snippet_commit: { + readonly type: "snippet_commit" + } & (Omit & + (Readonly> & { + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly diff?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly snippet?: components["schemas"]["snippet"] + })) + readonly ssh_account_key: { + readonly type: "ssh_account_key" + } & (Omit & + (Readonly> & { + readonly owner?: components["schemas"]["account"] + })) + readonly ssh_key: { + readonly type: "ssh_key" + } & (Omit & + (Readonly> & { + /** @description The comment parsed from the SSH key (if present) */ + readonly comment?: string + /** Format: date-time */ + readonly created_on?: string + /** @description The SSH public key value in OpenSSH format. */ + readonly key?: string + /** @description The user-defined label for the SSH key */ + readonly label?: string + /** Format: date-time */ + readonly last_used?: string + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @description The SSH key's immutable ID. */ + readonly uuid?: string + })) + /** + * Subject Types + * @description The mapping of resource/subject types pointing to their individual event types. + */ + readonly subject_types: { + readonly repository?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly events?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly workspace?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly events?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + } + readonly tag: components["schemas"]["ref"] & + (Readonly> & { + /** + * Format: date-time + * @description The date that the tag was created, if available + */ + readonly date?: string + /** @description The message associated with the tag, if available. */ + readonly message?: string + readonly tagger?: components["schemas"]["author"] + }) + /** + * Task + * @description A task object. + */ + readonly task: { + readonly content: { + /** @description The user's content rendered as HTML. */ + readonly html?: string + /** + * @description The type of markup language the raw content is to be interpreted in. + * @enum {string} + */ + readonly markup?: "creole" | "markdown" | "plaintext" + /** @description The text as it was typed by a user. */ + readonly raw?: string + } + /** Format: date-time */ + readonly created_on: string + readonly creator: components["schemas"]["account"] + readonly id?: number + readonly pending?: boolean + readonly resolved_by?: components["schemas"]["account"] + /** + * Format: date-time + * @description The ISO8601 timestamp for when the task was resolved. + */ + readonly resolved_on?: string + /** @enum {string} */ + readonly state: "RESOLVED" | "UNRESOLVED" + /** Format: date-time */ + readonly updated_on: string + } + readonly team: { + readonly type: "team" + } & (Omit & + (Readonly> & { + readonly links?: components["schemas"]["team_links"] + })) + readonly team_links: components["schemas"]["account_links"] & + (Readonly> & { + readonly html?: components["schemas"]["link"] + readonly members?: components["schemas"]["link"] + readonly projects?: components["schemas"]["link"] + readonly repositories?: components["schemas"]["link"] + readonly self?: components["schemas"]["link"] + }) + /** + * Tree Entry + * @description Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. + */ + readonly treeentry: Readonly> & { + readonly commit?: components["schemas"]["commit"] + /** @description The path in the repository */ + readonly path?: string + readonly type: string + } + readonly user: { + readonly type: "user" + } & (Omit & + (Readonly> & { + /** @description The user's Atlassian account ID. */ + readonly account_id?: string + /** @description The status of the account. Currently the only possible value is "active", but more values may be added in the future. */ + readonly account_status?: string + readonly has_2fa_enabled?: boolean + readonly is_staff?: boolean + readonly links?: components["schemas"]["user_links"] + /** @description Account name defined by the owner. Should be used instead of the "username" field. Note that "nickname" cannot be used in place of "username" in URLs and queries, as "nickname" is not guaranteed to be unique. */ + readonly nickname?: string + })) + readonly user_links: components["schemas"]["account_links"] & + (Readonly> & { + readonly html?: components["schemas"]["link"] + readonly repositories?: components["schemas"]["link"] + readonly self?: components["schemas"]["link"] + }) + readonly version: { + readonly type: "version" + } & (Omit & + (Readonly> & { + readonly id?: number + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly name?: string + })) + readonly webhook_subscription: { + readonly type: "webhook_subscription" + } & (Omit & + (Readonly> & { + readonly active?: boolean + /** Format: date-time */ + readonly created_at?: string + /** @description A user-defined description of the webhook. */ + readonly description?: string + /** @description The events this webhook is subscribed to. */ + readonly events?: readonly ( + | "issue:comment_created" + | "issue:created" + | "issue:updated" + | "project:updated" + | "pullrequest:approved" + | "pullrequest:changes_request_created" + | "pullrequest:changes_request_removed" + | "pullrequest:comment_created" + | "pullrequest:comment_deleted" + | "pullrequest:comment_reopened" + | "pullrequest:comment_resolved" + | "pullrequest:comment_updated" + | "pullrequest:created" + | "pullrequest:fulfilled" + | "pullrequest:push" + | "pullrequest:rejected" + | "pullrequest:unapproved" + | "pullrequest:updated" + | "repo:commit_comment_created" + | "repo:commit_status_created" + | "repo:commit_status_updated" + | "repo:created" + | "repo:deleted" + | "repo:fork" + | "repo:imported" + | "repo:push" + | "repo:transfer" + | "repo:updated" + )[] + /** @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. */ + readonly secret?: string + /** @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. */ + readonly secret_set?: boolean + readonly subject?: components["schemas"]["object"] + /** + * @description The type of entity. Set to either `repository` or `workspace` based on where the subscription is defined. + * @enum {string} + */ + readonly subject_type?: "repository" | "workspace" + /** + * Format: uri + * @description The URL events get delivered to. + */ + readonly url?: string + /** @description The webhook's id */ + readonly uuid?: string + })) + readonly workspace: { + readonly type: "workspace" + } & (Omit & + (Readonly> & { + /** Format: date-time */ + readonly created_on?: string + /** @description Indicates whether the workspace enforces private content, or whether it allows public content. */ + readonly is_privacy_enforced?: boolean + /** @description Indicates whether the workspace is publicly accessible, or whether it is + * private to the members and consequently only visible to members. */ + readonly is_private?: boolean + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly avatar?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly html?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly members?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly owners?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly projects?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly repositories?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + /** + * Link + * @description A link to a resource related to this object. + */ + readonly snippets?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + /** @description The name of the workspace. */ + readonly name?: string + /** @description The short label that identifies this workspace. */ + readonly slug?: string + /** Format: date-time */ + readonly updated_on?: string + /** @description The workspace's immutable id. */ + readonly uuid?: string + })) + readonly workspace_membership: { + readonly type: "workspace_membership" + } & (Omit & + (Readonly> & { + readonly links?: { + /** + * Link + * @description A link to a resource related to this object. + */ + readonly self?: { + /** Format: uri */ + readonly href?: string + readonly name?: string + } + } + readonly user?: components["schemas"]["account"] + readonly workspace?: components["schemas"]["workspace"] + })) + } + responses: never + parameters: never + requestBodies: { + /** @description The application property to create or update. */ + readonly application_property: { + readonly content: { + readonly "application/json": components["schemas"]["application_property"] + } + } + /** @description The permission to grant */ + readonly "bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema": { + readonly content: { + readonly "application/json": components["schemas"]["bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema"] + } + } + /** @description The permission to grant */ + readonly "bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema": { + readonly content: { + readonly "application/json": components["schemas"]["bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema"] + } + } + /** @description The updated variable. */ + readonly pipeline_variable: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The variable to create. */ + readonly pipeline_variable2: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + readonly project: { + readonly content: { + readonly "application/json": components["schemas"]["project"] + } + } + /** @description The new snippet object. */ + readonly snippet: { + readonly content: { + readonly "application/json": components["schemas"]["snippet"] + } + } + } + headers: never + pathItems: never +} +export type SchemaAccount = components["schemas"]["account"] +export type SchemaAccountLinks = components["schemas"]["account_links"] +export type SchemaAppUser = components["schemas"]["app_user"] +export type SchemaApplicationProperty = + components["schemas"]["application_property"] +export type SchemaAuthor = components["schemas"]["author"] +export type SchemaBaseCommit = components["schemas"]["base_commit"] +export type SchemaBitbucketAppsPermissionsSerializersProjectPermissionUpdateSchema = + components["schemas"]["bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema"] +export type SchemaBitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema = + components["schemas"]["bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema"] +export type SchemaBranch = components["schemas"]["branch"] +export type SchemaBranchingModel = components["schemas"]["branching_model"] +export type SchemaBranchingModelSettings = + components["schemas"]["branching_model_settings"] +export type SchemaBranchrestriction = components["schemas"]["branchrestriction"] +export type SchemaComment = components["schemas"]["comment"] +export type SchemaCommentResolution = + components["schemas"]["comment_resolution"] +export type SchemaCommit = components["schemas"]["commit"] +export type SchemaCommitComment = components["schemas"]["commit_comment"] +export type SchemaCommitFile = components["schemas"]["commit_file"] +export type SchemaCommitstatus = components["schemas"]["commitstatus"] +export type SchemaComponent = components["schemas"]["component"] +export type SchemaDefaultReviewerAndType = + components["schemas"]["default_reviewer_and_type"] +export type SchemaDeployKey = components["schemas"]["deploy_key"] +export type SchemaDeployment = components["schemas"]["deployment"] +export type SchemaDeploymentEnvironment = + components["schemas"]["deployment_environment"] +export type SchemaDeploymentRelease = + components["schemas"]["deployment_release"] +export type SchemaDeploymentState = components["schemas"]["deployment_state"] +export type SchemaDeploymentStateCompleted = + components["schemas"]["deployment_state_completed"] +export type SchemaDeploymentStateCompletedStatus = + components["schemas"]["deployment_state_completed_status"] +export type SchemaDeploymentStateCompletedStatusFailed = + components["schemas"]["deployment_state_completed_status_failed"] +export type SchemaDeploymentStateCompletedStatusStopped = + components["schemas"]["deployment_state_completed_status_stopped"] +export type SchemaDeploymentStateCompletedStatusSuccessful = + components["schemas"]["deployment_state_completed_status_successful"] +export type SchemaDeploymentStateInProgress = + components["schemas"]["deployment_state_in_progress"] +export type SchemaDeploymentStateUndeployed = + components["schemas"]["deployment_state_undeployed"] +export type SchemaDeploymentVariable = + components["schemas"]["deployment_variable"] +export type SchemaDiffstat = components["schemas"]["diffstat"] +export type SchemaEffectiveRepoBranchingModel = + components["schemas"]["effective_repo_branching_model"] +export type SchemaError = components["schemas"]["error"] +export type SchemaExportOptions = components["schemas"]["export_options"] +export type SchemaGroup = components["schemas"]["group"] +export type SchemaHookEvent = components["schemas"]["hook_event"] +export type SchemaIssue = components["schemas"]["issue"] +export type SchemaIssueAttachment = components["schemas"]["issue_attachment"] +export type SchemaIssueChange = components["schemas"]["issue_change"] +export type SchemaIssueComment = components["schemas"]["issue_comment"] +export type SchemaIssueJobStatus = components["schemas"]["issue_job_status"] +export type SchemaLink = components["schemas"]["link"] +export type SchemaMilestone = components["schemas"]["milestone"] +export type SchemaObject = components["schemas"]["object"] +export type SchemaPaginatedAccounts = + components["schemas"]["paginated_accounts"] +export type SchemaPaginatedAnnotations = + components["schemas"]["paginated_annotations"] +export type SchemaPaginatedBranches = + components["schemas"]["paginated_branches"] +export type SchemaPaginatedBranchrestrictions = + components["schemas"]["paginated_branchrestrictions"] +export type SchemaPaginatedChangeset = + components["schemas"]["paginated_changeset"] +export type SchemaPaginatedCommitComments = + components["schemas"]["paginated_commit_comments"] +export type SchemaPaginatedCommitstatuses = + components["schemas"]["paginated_commitstatuses"] +export type SchemaPaginatedComponents = + components["schemas"]["paginated_components"] +export type SchemaPaginatedDefaultReviewerAndType = + components["schemas"]["paginated_default_reviewer_and_type"] +export type SchemaPaginatedDeployKeys = + components["schemas"]["paginated_deploy_keys"] +export type SchemaPaginatedDeploymentVariable = + components["schemas"]["paginated_deployment_variable"] +export type SchemaPaginatedDeployments = + components["schemas"]["paginated_deployments"] +export type SchemaPaginatedDiffstats = + components["schemas"]["paginated_diffstats"] +export type SchemaPaginatedEnvironments = + components["schemas"]["paginated_environments"] +export type SchemaPaginatedFiles = components["schemas"]["paginated_files"] +export type SchemaPaginatedHookEvents = + components["schemas"]["paginated_hook_events"] +export type SchemaPaginatedIssueAttachments = + components["schemas"]["paginated_issue_attachments"] +export type SchemaPaginatedIssueComments = + components["schemas"]["paginated_issue_comments"] +export type SchemaPaginatedIssues = components["schemas"]["paginated_issues"] +export type SchemaPaginatedLogEntries = + components["schemas"]["paginated_log_entries"] +export type SchemaPaginatedMilestones = + components["schemas"]["paginated_milestones"] +export type SchemaPaginatedPipelineCaches = + components["schemas"]["paginated_pipeline_caches"] +export type SchemaPaginatedPipelineKnownHosts = + components["schemas"]["paginated_pipeline_known_hosts"] +export type SchemaPaginatedPipelineScheduleExecutions = + components["schemas"]["paginated_pipeline_schedule_executions"] +export type SchemaPaginatedPipelineSchedules = + components["schemas"]["paginated_pipeline_schedules"] +export type SchemaPaginatedPipelineSteps = + components["schemas"]["paginated_pipeline_steps"] +export type SchemaPaginatedPipelineVariables = + components["schemas"]["paginated_pipeline_variables"] +export type SchemaPaginatedPipelines = + components["schemas"]["paginated_pipelines"] +export type SchemaPaginatedProjectDeployKeys = + components["schemas"]["paginated_project_deploy_keys"] +export type SchemaPaginatedProjectGroupPermissions = + components["schemas"]["paginated_project_group_permissions"] +export type SchemaPaginatedProjectUserPermissions = + components["schemas"]["paginated_project_user_permissions"] +export type SchemaPaginatedProjects = + components["schemas"]["paginated_projects"] +export type SchemaPaginatedPullrequestComments = + components["schemas"]["paginated_pullrequest_comments"] +export type SchemaPaginatedPullrequests = + components["schemas"]["paginated_pullrequests"] +export type SchemaPaginatedRefs = components["schemas"]["paginated_refs"] +export type SchemaPaginatedReports = components["schemas"]["paginated_reports"] +export type SchemaPaginatedRepositories = + components["schemas"]["paginated_repositories"] +export type SchemaPaginatedRepositoryGroupPermissions = + components["schemas"]["paginated_repository_group_permissions"] +export type SchemaPaginatedRepositoryPermissions = + components["schemas"]["paginated_repository_permissions"] +export type SchemaPaginatedRepositoryUserPermissions = + components["schemas"]["paginated_repository_user_permissions"] +export type SchemaPaginatedSnippetComments = + components["schemas"]["paginated_snippet_comments"] +export type SchemaPaginatedSnippetCommit = + components["schemas"]["paginated_snippet_commit"] +export type SchemaPaginatedSnippets = + components["schemas"]["paginated_snippets"] +export type SchemaPaginatedSshUserKeys = + components["schemas"]["paginated_ssh_user_keys"] +export type SchemaPaginatedTags = components["schemas"]["paginated_tags"] +export type SchemaPaginatedTasks = components["schemas"]["paginated_tasks"] +export type SchemaPaginatedTreeentries = + components["schemas"]["paginated_treeentries"] +export type SchemaPaginatedVersions = + components["schemas"]["paginated_versions"] +export type SchemaPaginatedWebhookSubscriptions = + components["schemas"]["paginated_webhook_subscriptions"] +export type SchemaPaginatedWorkspaceMemberships = + components["schemas"]["paginated_workspace_memberships"] +export type SchemaPaginatedWorkspaces = + components["schemas"]["paginated_workspaces"] +export type SchemaParticipant = components["schemas"]["participant"] +export type SchemaPipeline = components["schemas"]["pipeline"] +export type SchemaPipelineBuildNumber = + components["schemas"]["pipeline_build_number"] +export type SchemaPipelineCache = components["schemas"]["pipeline_cache"] +export type SchemaPipelineCacheContentUri = + components["schemas"]["pipeline_cache_content_uri"] +export type SchemaPipelineCommand = components["schemas"]["pipeline_command"] +export type SchemaPipelineCommitTarget = + components["schemas"]["pipeline_commit_target"] +export type SchemaPipelineConfigurationSource = + components["schemas"]["pipeline_configuration_source"] +export type SchemaPipelineError = components["schemas"]["pipeline_error"] +export type SchemaPipelineImage = components["schemas"]["pipeline_image"] +export type SchemaPipelineKnownHost = + components["schemas"]["pipeline_known_host"] +export type SchemaPipelineRefTarget = + components["schemas"]["pipeline_ref_target"] +export type SchemaPipelineSchedule = components["schemas"]["pipeline_schedule"] +export type SchemaPipelineScheduleExecution = + components["schemas"]["pipeline_schedule_execution"] +export type SchemaPipelineScheduleExecutionErrored = + components["schemas"]["pipeline_schedule_execution_errored"] +export type SchemaPipelineScheduleExecutionExecuted = + components["schemas"]["pipeline_schedule_execution_executed"] +export type SchemaPipelineSchedulePostRequestBody = + components["schemas"]["pipeline_schedule_post_request_body"] +export type SchemaPipelineSchedulePutRequestBody = + components["schemas"]["pipeline_schedule_put_request_body"] +export type SchemaPipelineSelector = components["schemas"]["pipeline_selector"] +export type SchemaPipelineSshKeyPair = + components["schemas"]["pipeline_ssh_key_pair"] +export type SchemaPipelineSshPublicKey = + components["schemas"]["pipeline_ssh_public_key"] +export type SchemaPipelineState = components["schemas"]["pipeline_state"] +export type SchemaPipelineStateCompleted = + components["schemas"]["pipeline_state_completed"] +export type SchemaPipelineStateCompletedError = + components["schemas"]["pipeline_state_completed_error"] +export type SchemaPipelineStateCompletedExpired = + components["schemas"]["pipeline_state_completed_expired"] +export type SchemaPipelineStateCompletedFailed = + components["schemas"]["pipeline_state_completed_failed"] +export type SchemaPipelineStateCompletedResult = + components["schemas"]["pipeline_state_completed_result"] +export type SchemaPipelineStateCompletedStopped = + components["schemas"]["pipeline_state_completed_stopped"] +export type SchemaPipelineStateCompletedSuccessful = + components["schemas"]["pipeline_state_completed_successful"] +export type SchemaPipelineStateInProgress = + components["schemas"]["pipeline_state_in_progress"] +export type SchemaPipelineStateInProgressPaused = + components["schemas"]["pipeline_state_in_progress_paused"] +export type SchemaPipelineStateInProgressRunning = + components["schemas"]["pipeline_state_in_progress_running"] +export type SchemaPipelineStateInProgressStage = + components["schemas"]["pipeline_state_in_progress_stage"] +export type SchemaPipelineStatePending = + components["schemas"]["pipeline_state_pending"] +export type SchemaPipelineStep = components["schemas"]["pipeline_step"] +export type SchemaPipelineStepError = + components["schemas"]["pipeline_step_error"] +export type SchemaPipelineStepState = + components["schemas"]["pipeline_step_state"] +export type SchemaPipelineStepStateCompleted = + components["schemas"]["pipeline_step_state_completed"] +export type SchemaPipelineStepStateCompletedError = + components["schemas"]["pipeline_step_state_completed_error"] +export type SchemaPipelineStepStateCompletedExpired = + components["schemas"]["pipeline_step_state_completed_expired"] +export type SchemaPipelineStepStateCompletedFailed = + components["schemas"]["pipeline_step_state_completed_failed"] +export type SchemaPipelineStepStateCompletedNotRun = + components["schemas"]["pipeline_step_state_completed_not_run"] +export type SchemaPipelineStepStateCompletedResult = + components["schemas"]["pipeline_step_state_completed_result"] +export type SchemaPipelineStepStateCompletedStopped = + components["schemas"]["pipeline_step_state_completed_stopped"] +export type SchemaPipelineStepStateCompletedSuccessful = + components["schemas"]["pipeline_step_state_completed_successful"] +export type SchemaPipelineStepStateInProgress = + components["schemas"]["pipeline_step_state_in_progress"] +export type SchemaPipelineStepStatePending = + components["schemas"]["pipeline_step_state_pending"] +export type SchemaPipelineStepStateReady = + components["schemas"]["pipeline_step_state_ready"] +export type SchemaPipelineTarget = components["schemas"]["pipeline_target"] +export type SchemaPipelineTrigger = components["schemas"]["pipeline_trigger"] +export type SchemaPipelineTriggerManual = + components["schemas"]["pipeline_trigger_manual"] +export type SchemaPipelineTriggerPush = + components["schemas"]["pipeline_trigger_push"] +export type SchemaPipelineVariable = components["schemas"]["pipeline_variable"] +export type SchemaPipelinesConfig = components["schemas"]["pipelines_config"] +export type SchemaPipelinesLinksSectionHref = + components["schemas"]["pipelines_links_section_href"] +export type SchemaPipelinesPipelineLinks = + components["schemas"]["pipelines_pipeline_links"] +export type SchemaProject = components["schemas"]["project"] +export type SchemaProjectBranchingModel = + components["schemas"]["project_branching_model"] +export type SchemaProjectDeployKey = components["schemas"]["project_deploy_key"] +export type SchemaProjectGroupPermission = + components["schemas"]["project_group_permission"] +export type SchemaProjectUserPermission = + components["schemas"]["project_user_permission"] +export type SchemaPullrequest = components["schemas"]["pullrequest"] +export type SchemaPullrequestComment = + components["schemas"]["pullrequest_comment"] +export type SchemaPullrequestCommentTask = + components["schemas"]["pullrequest_comment_task"] +export type SchemaPullrequestEndpoint = + components["schemas"]["pullrequest_endpoint"] +export type SchemaPullrequestMergeParameters = + components["schemas"]["pullrequest_merge_parameters"] +export type SchemaPullrequestTask = components["schemas"]["pullrequest_task"] +export type SchemaPullrequestTaskCreate = + components["schemas"]["pullrequest_task_create"] +export type SchemaPullrequestTaskUpdate = + components["schemas"]["pullrequest_task_update"] +export type SchemaRef = components["schemas"]["ref"] +export type SchemaReport = components["schemas"]["report"] +export type SchemaReportAnnotation = components["schemas"]["report_annotation"] +export type SchemaReportData = components["schemas"]["report_data"] +export type SchemaRepository = components["schemas"]["repository"] +export type SchemaRepositoryGroupPermission = + components["schemas"]["repository_group_permission"] +export type SchemaRepositoryInheritanceState = + components["schemas"]["repository_inheritance_state"] +export type SchemaRepositoryPermission = + components["schemas"]["repository_permission"] +export type SchemaRepositoryUserPermission = + components["schemas"]["repository_user_permission"] +export type SchemaSearchCodeSearchResult = + components["schemas"]["search_code_search_result"] +export type SchemaSearchContentMatch = + components["schemas"]["search_content_match"] +export type SchemaSearchLine = components["schemas"]["search_line"] +export type SchemaSearchResultPage = components["schemas"]["search_result_page"] +export type SchemaSearchSegment = components["schemas"]["search_segment"] +export type SchemaSnippet = components["schemas"]["snippet"] +export type SchemaSnippetComment = components["schemas"]["snippet_comment"] +export type SchemaSnippetCommit = components["schemas"]["snippet_commit"] +export type SchemaSshAccountKey = components["schemas"]["ssh_account_key"] +export type SchemaSshKey = components["schemas"]["ssh_key"] +export type SchemaSubjectTypes = components["schemas"]["subject_types"] +export type SchemaTag = components["schemas"]["tag"] +export type SchemaTask = components["schemas"]["task"] +export type SchemaTeam = components["schemas"]["team"] +export type SchemaTeamLinks = components["schemas"]["team_links"] +export type SchemaTreeentry = components["schemas"]["treeentry"] +export type SchemaUser = components["schemas"]["user"] +export type SchemaUserLinks = components["schemas"]["user_links"] +export type SchemaVersion = components["schemas"]["version"] +export type SchemaWebhookSubscription = + components["schemas"]["webhook_subscription"] +export type SchemaWorkspace = components["schemas"]["workspace"] +export type SchemaWorkspaceMembership = + components["schemas"]["workspace_membership"] +export type RequestBodyApplicationProperty = + components["requestBodies"]["application_property"] +export type RequestBodyBitbucketAppsPermissionsSerializersProjectPermissionUpdateSchema = + components["requestBodies"]["bitbucket.apps.permissions.serializers.ProjectPermissionUpdateSchema"] +export type RequestBodyBitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema = + components["requestBodies"]["bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema"] +export type RequestBodyPipelineVariable = + components["requestBodies"]["pipeline_variable"] +export type RequestBodyPipelineVariable2 = + components["requestBodies"]["pipeline_variable2"] +export type RequestBodyProject = components["requestBodies"]["project"] +export type RequestBodySnippet = components["requestBodies"]["snippet"] +export type $defs = Record +export interface operations { + readonly getCommitHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The commit. */ + readonly commit: string + /** @description The name of the property. */ + readonly property_name: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The repository container; either the workspace slug or the UUID in curly braces. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The value of the property. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["application_property"] + } + } + } + } + readonly updateCommitHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The commit. */ + readonly commit: string + /** @description The name of the property. */ + readonly property_name: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The repository container; either the workspace slug or the UUID in curly braces. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["application_property"] + readonly responses: { + /** @description An empty response. */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly deleteCommitHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The commit. */ + readonly commit: string + /** @description The name of the property. */ + readonly property_name: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The repository container; either the workspace slug or the UUID in curly braces. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response. */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly getPullrequestsForCommit: { + readonly parameters: { + readonly query?: { + /** @description Which page to retrieve */ + readonly page?: number + /** @description How many pull requests to retrieve per page */ + readonly pagelen?: number + } + readonly header?: never + readonly path: { + /** @description The SHA1 of the commit */ + readonly commit: string + /** @description The repository; either the UUID in curly braces, or the slug */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The paginated list of pull requests. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pullrequests"] + } + } + /** @description The repository's pull requests are still being indexed. */ + readonly 202: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pullrequests"] + } + } + /** @description Either the repository does not exist, or pull request commit links have not yet been indexed. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getReportsForCommit: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit for which to retrieve reports. */ + readonly commit: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description OK */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_reports"] + } + } + } + } + readonly getReport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit the report belongs to. */ + readonly commit: string + /** @description The repository. */ + readonly repo_slug: string + /** @description Either the uuid or external-id of the report. */ + readonly reportId: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description OK */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["report"] + } + } + /** @description The report with the given ID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly createOrUpdateReport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit the report belongs to. */ + readonly commit: string + /** @description The repository. */ + readonly repo_slug: string + /** @description Either the uuid or external-id of the report. */ + readonly reportId: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The report to create or update */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["report"] + } + } + readonly responses: { + /** @description OK */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["report"] + } + } + /** @description The provided Report object is malformed or incomplete. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteReport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit the report belongs to. */ + readonly commit: string + /** @description The repository. */ + readonly repo_slug: string + /** @description Either the uuid or external-id of the report. */ + readonly reportId: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description No content */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly getAnnotationsForReport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit for which to retrieve reports. */ + readonly commit: string + /** @description The repository. */ + readonly repo_slug: string + /** @description Uuid or external-if of the report for which to get annotations for. */ + readonly reportId: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description OK */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_annotations"] + } + } + } + } + readonly bulkCreateOrUpdateAnnotations: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit for which to retrieve reports. */ + readonly commit: string + /** @description The repository. */ + readonly repo_slug: string + /** @description Uuid or external-if of the report for which to get annotations for. */ + readonly reportId: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The annotations to create or update */ + readonly requestBody: { + readonly content: { + readonly "application/json": readonly components["schemas"]["report_annotation"][] + } + } + readonly responses: { + /** @description OK */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": readonly components["schemas"]["report_annotation"][] + } + } + } + } + readonly getAnnotation: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Either the uuid or external-id of the annotation. */ + readonly annotationId: string + /** @description The commit the report belongs to. */ + readonly commit: string + /** @description The repository. */ + readonly repo_slug: string + /** @description Either the uuid or external-id of the report. */ + readonly reportId: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description OK */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["report_annotation"] + } + } + /** @description The annotation with the given ID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly createOrUpdateAnnotation: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Either the uuid or external-id of the annotation. */ + readonly annotationId: string + /** @description The commit the report belongs to. */ + readonly commit: string + /** @description The repository. */ + readonly repo_slug: string + /** @description Either the uuid or external-id of the report. */ + readonly reportId: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The annotation to create or update */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["report_annotation"] + } + } + readonly responses: { + /** @description OK */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["report_annotation"] + } + } + /** @description The provided Annotation object is malformed or incomplete. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteAnnotation: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Either the uuid or external-id of the annotation. */ + readonly annotationId: string + /** @description The commit the annotation belongs to. */ + readonly commit: string + /** @description The repository. */ + readonly repo_slug: string + /** @description Either the uuid or external-id of the annotation. */ + readonly reportId: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description No content */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly getDeploymentsForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The matching deployments. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_deployments"] + } + } + } + } + readonly getDeploymentVariables: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The environment. */ + readonly environment_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The retrieved deployment variables. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_deployment_variable"] + } + } + } + } + readonly createDeploymentVariable: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The environment. */ + readonly environment_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The variable to create */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["deployment_variable"] + } + } + readonly responses: { + /** @description The variable was created. */ + readonly 201: { + headers: { + /** @description The URL of the newly created variable. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["deployment_variable"] + } + } + /** @description The account, repository, environment or variable with the given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A variable with the provided key already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly updateDeploymentVariable: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The environment. */ + readonly environment_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the variable to update. */ + readonly variable_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The updated deployment variable. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["deployment_variable"] + } + } + readonly responses: { + /** @description The deployment variable was updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["deployment_variable"] + } + } + /** @description The account, repository, environment or variable with the given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteDeploymentVariable: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The environment. */ + readonly environment_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the variable to delete. */ + readonly variable_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The variable was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The account, repository, environment or variable with given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getDeploymentForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The deployment UUID. */ + readonly deployment_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The deployment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["deployment"] + } + } + /** @description No account, repository or deployment with the UUID provided exists. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getEnvironmentsForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The matching environments. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_environments"] + } + } + } + } + readonly createEnvironment: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The environment to create. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["deployment_environment"] + } + } + readonly responses: { + /** @description The environment was created. */ + readonly 201: { + headers: { + /** @description The URL of the newly created environment. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["deployment_environment"] + } + } + /** @description The account or repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description An environment host with the provided name already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getEnvironmentForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The environment UUID. */ + readonly environment_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The environment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["deployment_environment"] + } + } + /** @description No account, repository or environment with the UUID provided exists. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteEnvironmentForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The environment UUID. */ + readonly environment_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The environment was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description No account or repository with the UUID provided exists. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly updateEnvironmentForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The environment UUID. */ + readonly environment_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The environment update request was accepted. */ + readonly 202: { + headers: Readonly> + content?: never + } + /** @description No account, repository or environment with the UUID provided exists. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelinesForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The matching pipelines. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipelines"] + } + } + } + } + readonly createPipelineForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The pipeline to initiate. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline"] + } + } + readonly responses: { + /** @description The initiated pipeline. */ + readonly 201: { + headers: { + /** @description The URL of the newly created pipeline. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pipeline"] + } + } + /** @description The account or repository is not enabled, the yml file does not exist in the repository for the given revision, or the request body contained invalid properties. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The account or repository was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineConfig: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The account. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository pipelines configuration. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipelines_config"] + } + } + } + } + readonly updateRepositoryPipelineConfig: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The updated repository pipelines configuration. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipelines_config"] + } + } + readonly responses: { + /** @description The repository pipelines configuration was updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipelines_config"] + } + } + } + } + readonly updateRepositoryBuildNumber: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The build number to update. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_build_number"] + } + } + readonly responses: { + /** @description The build number has been configured. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_build_number"] + } + } + /** @description The update failed because the next number was invalid (it should be higher than the current number). */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The account or repository was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineSchedules: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of schedules. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipeline_schedules"] + } + } + /** @description The account or repository was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly createRepositoryPipelineSchedule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The schedule to create. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_schedule_post_request_body"] + } + } + readonly responses: { + /** @description The created schedule. */ + readonly 201: { + headers: { + /** @description The URL of the newly created schedule. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pipeline_schedule"] + } + } + /** @description There were errors validating the request. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The maximum limit of schedules for this repository was reached. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description The account or repository was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineSchedule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The uuid of the schedule. */ + readonly schedule_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested schedule. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_schedule"] + } + } + /** @description The account, repository or schedule was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly updateRepositoryPipelineSchedule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The uuid of the schedule. */ + readonly schedule_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The schedule to update. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_schedule_put_request_body"] + } + } + readonly responses: { + /** @description The schedule is updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_schedule"] + } + } + /** @description The account, repository or schedule was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteRepositoryPipelineSchedule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The uuid of the schedule. */ + readonly schedule_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The schedule was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The account, repository or schedule was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineScheduleExecutions: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The uuid of the schedule. */ + readonly schedule_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of executions of a schedule. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipeline_schedule_executions"] + } + } + /** @description The account or repository was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineSshKeyPair: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The SSH key pair. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_ssh_key_pair"] + } + } + /** @description The account, repository or SSH key pair was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly updateRepositoryPipelineKeyPair: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The created or updated SSH key pair. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_ssh_key_pair"] + } + } + readonly responses: { + /** @description The SSH key pair was created or updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_ssh_key_pair"] + } + } + /** @description The account, repository or SSH key pair was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteRepositoryPipelineKeyPair: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The SSH key pair was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The account, repository or SSH key pair was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineKnownHosts: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The retrieved known hosts. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipeline_known_hosts"] + } + } + } + } + readonly createRepositoryPipelineKnownHost: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The known host to create. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_known_host"] + } + } + readonly responses: { + /** @description The known host was created. */ + readonly 201: { + headers: { + /** @description The URL of the newly created pipeline known host. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pipeline_known_host"] + } + } + /** @description The account or repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A known host with the provided hostname already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineKnownHost: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the known host to retrieve. */ + readonly known_host_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The known host. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_known_host"] + } + } + /** @description The account, repository or known host with the specified UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly updateRepositoryPipelineKnownHost: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the known host to update. */ + readonly known_host_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The updated known host. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_known_host"] + } + } + readonly responses: { + /** @description The known host was updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_known_host"] + } + } + /** @description The account, repository or known host with the given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteRepositoryPipelineKnownHost: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the known host to delete. */ + readonly known_host_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The known host was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The account, repository or known host with given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineVariables: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The retrieved variables. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipeline_variables"] + } + } + } + } + readonly createRepositoryPipelineVariable: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The variable to create. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + readonly responses: { + /** @description The variable was created. */ + readonly 201: { + headers: { + /** @description The URL of the newly created pipeline variable. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The account or repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A variable with the provided key already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineVariable: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the variable to retrieve. */ + readonly variable_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The variable. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The account, repository or variable with the specified UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly updateRepositoryPipelineVariable: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the variable to update. */ + readonly variable_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + /** @description The updated variable */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + readonly responses: { + /** @description The variable was updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The account, repository or variable with the given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteRepositoryPipelineVariable: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the variable to delete. */ + readonly variable_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The variable was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The account, repository or variable with given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineCaches: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The account. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of caches for the given repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipeline_caches"] + } + } + /** @description The account or repository was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteRepositoryPipelineCaches: { + readonly parameters: { + readonly query: { + /** @description The cache name. */ + readonly name: string + } + readonly header?: never + readonly path: { + /** @description The repository. */ + readonly repo_slug: string + /** @description The account. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The caches were deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The workspace, repository or cache name was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deleteRepositoryPipelineCache: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the cache to delete. */ + readonly cache_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The account. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The cache was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The workspace, repository or cache_uuid with given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryPipelineCacheContentURI: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the cache. */ + readonly cache_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The account. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The cache content uri. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_cache_content_uri"] + } + } + /** @description The workspace, repository or cache_uuid with given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The pipeline UUID. */ + readonly pipeline_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pipeline. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline"] + } + } + /** @description No account, repository or pipeline with the UUID provided exists. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineStepsForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the pipeline. */ + readonly pipeline_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The steps. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipeline_steps"] + } + } + } + } + readonly getPipelineStepForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the pipeline. */ + readonly pipeline_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the step. */ + readonly step_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The step. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_step"] + } + } + /** @description No account, repository, pipeline or step with the UUID provided exists for the pipeline with the UUID provided. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineStepLogForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the pipeline. */ + readonly pipeline_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the step. */ + readonly step_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The raw log file for this pipeline step. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description The log has the same etag as the provided If-None-Match header. */ + readonly 304: { + headers: Readonly> + content: { + readonly "application/octet-stream": components["schemas"]["error"] + } + } + /** @description A pipeline with the given UUID does not exist, a step with the given UUID does not exist in the pipeline or a log file does not exist for the given step. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/octet-stream": components["schemas"]["error"] + } + } + /** @description The requested range does not exist for requests that specified the [HTTP Range header](https://tools.ietf.org/html/rfc7233#section-3.1). */ + readonly 416: { + headers: Readonly> + content: { + readonly "application/octet-stream": components["schemas"]["error"] + } + } + } + } + readonly getPipelineContainerLog: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description For the main build container specify the step UUID; for a service container specify the service container UUID */ + readonly log_uuid: string + /** @description The UUID of the pipeline. */ + readonly pipeline_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the step. */ + readonly step_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The raw log file for the build container or service container. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description No account, repository, pipeline, step or log exist for the provided path. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/octet-stream": components["schemas"]["error"] + } + } + } + } + readonly getPipelineTestReports: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the pipeline. */ + readonly pipeline_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the step. */ + readonly step_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A summary of test reports for this pipeline step. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description No account, repository, pipeline, step or test reports exist for the provided path. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineTestReportTestCases: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the pipeline. */ + readonly pipeline_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the step. */ + readonly step_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Test cases for this pipeline step. */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description No account, repository, pipeline, step or test reports exist for the provided path. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineTestReportTestCaseReasons: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the pipeline. */ + readonly pipeline_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The UUID of the step. */ + readonly step_uuid: string + /** @description The UUID of the test case. */ + readonly test_case_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Test case reasons (output). */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description No account, repository, pipeline, step or test case with the UUID provided exists for the pipeline with the UUID provided. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly stopPipeline: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the pipeline. */ + readonly pipeline_uuid: string + /** @description The repository. */ + readonly repo_slug: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pipeline has been signaled to stop. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The specified pipeline has already completed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Either the account, repository or pipeline with the given UUID does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getRepositoryHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The name of the property. */ + readonly property_name: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The repository container; either the workspace slug or the UUID in curly braces. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The value of the property. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["application_property"] + } + } + } + } + readonly updateRepositoryHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The name of the property. */ + readonly property_name: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The repository container; either the workspace slug or the UUID in curly braces. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["application_property"] + readonly responses: { + /** @description An empty response. */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly deleteRepositoryHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The name of the property. */ + readonly property_name: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The repository container; either the workspace slug or the UUID in curly braces. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response. */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly getPullRequestHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The name of the property. */ + readonly property_name: string + /** @description The pull request ID. */ + readonly pullrequest_id: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The repository container; either the workspace slug or the UUID in curly braces. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The value of the property. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["application_property"] + } + } + } + } + readonly updatePullRequestHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The name of the property. */ + readonly property_name: string + /** @description The pull request ID. */ + readonly pullrequest_id: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The repository container; either the workspace slug or the UUID in curly braces. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["application_property"] + readonly responses: { + /** @description An empty response. */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly deletePullRequestHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The name of the property. */ + readonly property_name: string + /** @description The pull request ID. */ + readonly pullrequest_id: string + /** @description The repository. */ + readonly repo_slug: string + /** @description The repository container; either the workspace slug or the UUID in curly braces. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response. */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly getPipelineVariablesForTeam: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The account. */ + readonly username: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The found account level variables. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipeline_variables"] + } + } + } + } + readonly createPipelineVariableForTeam: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The account. */ + readonly username: string + } + readonly cookie?: never + } + readonly requestBody?: components["requestBodies"]["pipeline_variable2"] + readonly responses: { + /** @description The created variable. */ + readonly 201: { + headers: { + /** @description The URL of the newly created pipeline variable. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The account does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A variable with the provided key already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineVariableForTeam: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The account. */ + readonly username: string + /** @description The UUID of the variable to retrieve. */ + readonly variable_uuid: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The variable. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The account or variable with the given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly updatePipelineVariableForTeam: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The account. */ + readonly username: string + /** @description The UUID of the variable. */ + readonly variable_uuid: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["pipeline_variable"] + readonly responses: { + /** @description The variable was updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The account or the variable was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deletePipelineVariableForTeam: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The account. */ + readonly username: string + /** @description The UUID of the variable to delete. */ + readonly variable_uuid: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The variable was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The account or the variable with the provided UUID does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly searchTeam: { + readonly parameters: { + readonly query: { + /** @description Which page of the search results to retrieve */ + readonly page?: number + /** @description How many search results to retrieve per page */ + readonly pagelen?: number + /** @description The search query */ + readonly search_query: string + } + readonly header?: never + readonly path: { + /** @description The account to search in; either the username or the UUID in curly braces */ + readonly username: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful search */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["search_result_page"] + } + } + /** @description If the search request was invalid due to one of the + * following reasons: + * + * * the specified type of target account doesn''t match the actual + * account type; + * + * * malformed pagination properties; + * + * * missing or malformed search query, in the latter case an error + * key will be returned in `error.data.key` property. + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Search is not enabled for the requested team, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Too many requests, try again later */ + readonly 429: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineVariablesForUser: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The found user level variables. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipeline_variables"] + } + } + } + } + readonly createPipelineVariableForUser: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: components["requestBodies"]["pipeline_variable2"] + readonly responses: { + /** @description The created variable. */ + readonly 201: { + headers: { + /** @description The URL of the newly created pipeline variable. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The account does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A variable with the provided key already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineVariableForUser: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. */ + readonly selected_user: string + /** @description The UUID of the variable to retrieve. */ + readonly variable_uuid: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The variable. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The account or variable with the given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly updatePipelineVariableForUser: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. */ + readonly selected_user: string + /** @description The UUID of the variable. */ + readonly variable_uuid: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["pipeline_variable"] + readonly responses: { + /** @description The variable was updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The account or the variable was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deletePipelineVariableForUser: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. */ + readonly selected_user: string + /** @description The UUID of the variable to delete. */ + readonly variable_uuid: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The variable was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The account or the variable with the provided UUID does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly retrieveUserHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The name of the property. */ + readonly property_name: string + /** @description Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The value of the property. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["application_property"] + } + } + } + } + readonly updateUserHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The name of the property. */ + readonly property_name: string + /** @description Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["application_property"] + readonly responses: { + /** @description An empty response. */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly deleteUserHostedPropertyValue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key of the Connect app. */ + readonly app_key: string + /** @description The name of the property. */ + readonly property_name: string + /** @description Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response. */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly searchAccount: { + readonly parameters: { + readonly query: { + /** @description Which page of the search results to retrieve */ + readonly page?: number + /** @description How many search results to retrieve per page */ + readonly pagelen?: number + /** @description The search query */ + readonly search_query: string + } + readonly header?: never + readonly path: { + /** @description Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID. */ + readonly selected_user: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful search */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["search_result_page"] + } + } + /** @description If the search request was invalid due to one of the + * following reasons: + * + * * the specified type of target account doesn''t match the actual + * account type; + * + * * malformed pagination properties; + * + * * missing or malformed search query, in the latter case an error + * key will be returned in `error.data.key` property. + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Search is not enabled for the requested user, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Too many requests, try again later */ + readonly 429: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getOIDCConfiguration: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The OpenID configuration */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description The workspace was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getOIDCKeys: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The keys in JSON web key format */ + readonly 200: { + headers: Readonly> + content?: never + } + /** @description The workspace was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineVariablesForWorkspace: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The found workspace level variables. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["paginated_pipeline_variables"] + } + } + } + } + readonly createPipelineVariableForWorkspace: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: components["requestBodies"]["pipeline_variable2"] + readonly responses: { + /** @description The created variable. */ + readonly 201: { + headers: { + /** @description The URL of the newly created pipeline variable. */ + readonly Location?: string + readonly [name: string]: unknown + } + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The workspace does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description A variable with the provided key already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly getPipelineVariableForWorkspace: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the variable to retrieve. */ + readonly variable_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The variable. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The workspace or variable with the given UUID was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly updatePipelineVariableForWorkspace: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the variable. */ + readonly variable_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody: components["requestBodies"]["pipeline_variable"] + readonly responses: { + /** @description The variable was updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["pipeline_variable"] + } + } + /** @description The workspace or the variable was not found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly deletePipelineVariableForWorkspace: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The UUID of the variable to delete. */ + readonly variable_uuid: string + /** @description This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`. */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The variable was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The workspace or the variable with the provided UUID does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } + readonly searchWorkspace: { + readonly parameters: { + readonly query: { + /** @description Which page of the search results to retrieve */ + readonly page?: number + /** @description How many search results to retrieve per page */ + readonly pagelen?: number + /** @description The search query */ + readonly search_query: string + } + readonly header?: never + readonly path: { + /** @description The workspace to search in; either the slug or the UUID in curly braces */ + readonly workspace: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successful search */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["search_result_page"] + } + } + /** @description If the search request was invalid due to one of the + * following reasons: + * + * * the specified type of target account doesn''t match the actual + * account type; + * + * * malformed pagination properties; + * + * * missing or malformed search query, in the latter case an error + * key will be returned in `error.data.key` property. + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Search is not enabled for the requested workspace, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + /** @description Too many requests, try again later */ + readonly 429: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["error"] + } + } + } + } +} diff --git a/src/cloud/openapi/swagger.v3.json b/src/cloud/openapi/swagger.v3.json new file mode 100644 index 0000000..f7fafc1 --- /dev/null +++ b/src/cloud/openapi/swagger.v3.json @@ -0,0 +1,32618 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Bitbucket API", + "description": "Code against the Bitbucket API to automate simple tasks, embed Bitbucket data into your own site, build mobile or desktop apps, or even add custom UI add-ons into Bitbucket itself using the Connect framework.", + "version": "2.0", + "termsOfService": "https://www.atlassian.com/legal/customer-agreement", + "contact": { + "name": "Bitbucket Support", + "url": "https://support.atlassian.com/bitbucket-cloud/", + "email": "support@bitbucket.org" + } + }, + "paths": { + "/addon": { + "delete": { + "tags": ["Addon"], + "description": "Deletes the application for the user.\n\nThis endpoint is intended to be used by Bitbucket Connect apps\nand only supports JWT authentication -- that is how Bitbucket\nidentifies the particular installation of the app. Developers\nwith applications registered in the \"Develop Apps\" section\nof Bitbucket Marketplace need not use this endpoint as\nupdates for those applications can be sent out via the\nUI of that section.\n\n```\n$ curl -X DELETE https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \"\n```", + "summary": "Delete an app", + "responses": { + "204": { + "description": "Request has succeeded. The application has been deleted for the user." + }, + "401": { + "description": "No authorization.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "Improper authentication.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Addon"], + "description": "Updates the application installation for the user.\n\nThis endpoint is intended to be used by Bitbucket Connect apps\nand only supports JWT authentication -- that is how Bitbucket\nidentifies the particular installation of the app. Developers\nwith applications registered in the \"Develop Apps\" section\nof Bitbucket need not use this endpoint as updates for those\napplications can be sent out via the UI of that section.\n\nPassing an empty body will update the installation using the\nexisting descriptor URL.\n\n```\n$ curl -X PUT https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \" \\\n --header \"Content-Type: application/json\" \\\n --data '{}'\n```\n\nThe new `descriptor` for the installation can be also provided\nin the body directly.\n\n```\n$ curl -X PUT https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \" \\\n --header \"Content-Type: application/json\" \\\n --data '{\"descriptor\": $NEW_DESCRIPTOR}'\n```\n\nIn both these modes the URL of the descriptor cannot be changed. To\nchange the descriptor location and upgrade an installation\nthe request must be made exclusively with a `descriptor_url`.\n\n ```\n$ curl -X PUT https://api.bitbucket.org/2.0/addon \\\n -H \"Authorization: JWT \" \\\n --header \"Content-Type: application/json\" \\\n --data '{\"descriptor_url\": $NEW_URL}'\n```\n\nThe `descriptor_url` must exactly match the marketplace registration\nthat Atlassian has for the application. Contact your Atlassian\ndeveloper advocate to update this registration. Once the registration\nhas been updated you may call this resource for each installation.\n\nNote that the scopes of the application cannot be increased\nin the new descriptor nor reduced to none.", + "summary": "Update an installed app", + "responses": { + "204": { + "description": "Request has succeeded. The installation has been updated to the new descriptor." + }, + "400": { + "description": "Scopes have increased or decreased to none.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "No authorization.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "Improper authentication.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/addon/linkers": { + "get": { + "tags": ["Addon"], + "description": "Gets a list of all [linkers](/cloud/bitbucket/modules/linker/)\nfor the authenticated application.", + "summary": "List linkers for an app", + "responses": { + "200": { + "description": "Successful." + }, + "401": { + "description": "Authentication must use app JWT", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/addon/linkers/{linker_key}": { + "get": { + "tags": ["Addon"], + "description": "Gets a [linker](/cloud/bitbucket/modules/linker/) specified by `linker_key`\nfor the authenticated application.", + "summary": "Get a linker for an app", + "responses": { + "200": { + "description": "Successful." + }, + "401": { + "description": "Authentication must use app JWT", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The linker does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "linker_key", + "in": "path", + "description": "The unique key of a [linker module](/cloud/bitbucket/modules/linker/)\nas defined in an application descriptor.", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/addon/linkers/{linker_key}/values": { + "delete": { + "tags": ["Addon"], + "description": "Delete all [linker](/cloud/bitbucket/modules/linker/) values for the\nspecified linker of the authenticated application.", + "summary": "Delete all linker values", + "responses": { + "204": { + "description": "Successfully deleted the linker values." + }, + "401": { + "description": "Authentication must use app JWT", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The linker does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Addon"], + "description": "Gets a list of all [linker](/cloud/bitbucket/modules/linker/) values for the\nspecified linker of the authenticated application.\n\nA linker value lets applications supply values to modify its regular expression.\n\nThe base regular expression must use a Bitbucket-specific match group `(?K)`\nwhich will be translated to `([\\w\\-]+)`. A value must match this pattern.\n\n[Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)", + "summary": "List linker values for a linker", + "responses": { + "200": { + "description": "Successful." + }, + "401": { + "description": "Authentication must use app JWT", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The linker does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Addon"], + "description": "Creates a [linker](/cloud/bitbucket/modules/linker/) value for the specified\nlinker of authenticated application.\n\nA linker value lets applications supply values to modify its regular expression.\n\nThe base regular expression must use a Bitbucket-specific match group `(?K)`\nwhich will be translated to `([\\w\\-]+)`. A value must match this pattern.\n\n[Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)", + "summary": "Create a linker value", + "responses": { + "201": { + "description": "Successfully created the linker value." + }, + "401": { + "description": "Authentication must use app JWT", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The linker does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "The linker already has the value being added.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Addon"], + "description": "Bulk update [linker](/cloud/bitbucket/modules/linker/) values for the specified\nlinker of the authenticated application.\n\nA linker value lets applications supply values to modify its regular expression.\n\nThe base regular expression must use a Bitbucket-specific match group `(?K)`\nwhich will be translated to `([\\w\\-]+)`. A value must match this pattern.\n\n[Read more about linker values](/cloud/bitbucket/modules/linker/#usingthebitbucketapitosupplyvalues)", + "summary": "Update a linker value", + "responses": { + "204": { + "description": "Successfully updated the linker values." + }, + "400": { + "description": "Invalid input.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "Authentication must use app JWT", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The linker does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "linker_key", + "in": "path", + "description": "The unique key of a [linker module](/cloud/bitbucket/modules/linker/)\nas defined in an application descriptor.", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/addon/linkers/{linker_key}/values/{value_id}": { + "delete": { + "tags": ["Addon"], + "description": "Delete a single [linker](/cloud/bitbucket/modules/linker/) value\nof the authenticated application.", + "summary": "Delete a linker value", + "responses": { + "204": { + "description": "Successfully deleted the linker value." + }, + "401": { + "description": "Authentication must use app JWT", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The linker value does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Addon"], + "description": "Get a single [linker](/cloud/bitbucket/modules/linker/) value\nof the authenticated application.", + "summary": "Get a linker value", + "responses": { + "200": { + "description": "Successful." + }, + "401": { + "description": "Authentication must use app JWT", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The linker value does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "linker_key", + "in": "path", + "description": "The unique key of a [linker module](/cloud/bitbucket/modules/linker/)\nas defined in an application descriptor.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value_id", + "in": "path", + "description": "The numeric ID of the linker value.", + "required": true, + "schema": { + "type": "integer" + } + } + ] + }, + "/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.", + "summary": "Get a webhook resource", + "responses": { + "200": { + "description": "A mapping of resource/subject types pointing to their individual event types.", + "content": { + "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" + } + } + } + } + } + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/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\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": { + "description": "A paginated list of webhook types available to subscribe on.", + "content": { + "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" + } + ] + } + } + } + } + } + }, + "404": { + "description": "If an invalid `{subject_type}` value was specified.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "subject_type", + "in": "path", + "description": "A resource or subject type.", + "required": true, + "schema": { + "type": "string", + "enum": ["repository", "workspace"] + } + } + ] + }, + "/pullrequests/{selected_user}": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns all pull requests authored by the specified user.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List pull requests for a user", + "responses": { + "200": { + "description": "All pull requests authored by the specified user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pullrequests" + } + } + } + }, + "404": { + "description": "If the specified user does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "state", + "in": "query", + "description": "Only return pull requests that are in this state. This parameter can be repeated.", + "schema": { + "type": "string", + "enum": ["OPEN", "MERGED", "DECLINED", "SUPERSEDED"] + } + } + ], + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "deprecated": true + }, + "parameters": [ + { + "name": "selected_user", + "in": "path", + "description": "This can either be the username of the pull request author, the author's UUID\nsurrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID.\n", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/repositories": { + "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of all public repositories.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List public repositories", + "responses": { + "200": { + "description": "All public repositories.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_repositories" + } + } + } + } + }, + "parameters": [ + { + "name": "after", + "in": "query", + "description": "Filter the results to include only repositories created on or\nafter this [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)\n timestamp. Example: `YYYY-MM-DDTHH:mm:ss.sssZ`", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "role", + "in": "query", + "description": "Filters the result based on the authenticated user's role on each repository.\n\n* **member**: returns repositories to which the user has explicit read access\n* **contributor**: returns repositories to which the user has explicit write access\n* **admin**: returns repositories to which the user has explicit administrator access\n* **owner**: returns all repositories owned by the current user\n", + "required": false, + "schema": { + "type": "string", + "enum": ["admin", "contributor", "member", "owner"] + } + }, + { + "name": "q", + "in": "query", + "description": "Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n`role` parameter must also be specified.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/repositories/{workspace}": { + "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of all repositories owned by the specified\nworkspace.\n\nThe result can be narrowed down based on the authenticated user's role.\n\nE.g. with `?role=contributor`, only those repositories that the\nauthenticated user has write access to are returned (this includes any\nrepo the user is an admin on, as that implies write access).\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List repositories in a workspace", + "responses": { + "200": { + "description": "The repositories owned by the specified account.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_repositories" + } + } + } + }, + "404": { + "description": "If the specified account does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "410": { + "description": "If the specified account marked as spam.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "role", + "in": "query", + "description": "\nFilters the result based on the authenticated user's role on each repository.\n\n* **member**: returns repositories to which the user has explicit read access\n* **contributor**: returns repositories to which the user has explicit write access\n* **admin**: returns repositories to which the user has explicit administrator access\n* **owner**: returns all repositories owned by the current user\n", + "required": false, + "schema": { + "type": "string", + "enum": ["admin", "contributor", "member", "owner"] + } + }, + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "\nField by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "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}": { + "delete": { + "tags": ["Repositories"], + "description": "Deletes the repository. This is an irreversible operation.\n\nThis does not affect its forks.", + "summary": "Delete a repository", + "responses": { + "204": { + "description": "Indicates successful deletion." + }, + "403": { + "description": "If the caller either does not have admin access to the repository, or the repository is set to read-only.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "redirect_to", + "in": "query", + "description": "If a repository has been moved to a new location, use this parameter to\nshow users a friendly message in the Bitbucket UI that the repository\nhas moved to a new location. However, a GET to this endpoint will still\nreturn a 404.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository:delete"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["delete:repository:bitbucket"] + } + ] + }, + "get": { + "tags": ["Repositories"], + "description": "Returns the object describing this repository.", + "summary": "Get a repository", + "responses": { + "200": { + "description": "The repository object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository" + } + } + } + }, + "403": { + "description": "If the repository is private and the authenticated user does not have access to it.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If no repository exists at this location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "post": { + "tags": ["Repositories"], + "description": "Creates a new repository.\n\nNote: In order to set the project for the newly created repository,\npass in either the project key or the project UUID as part of the\nrequest body as shown in the examples below:\n\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\n \"scm\": \"git\",\n \"project\": {\n \"key\": \"MARS\"\n }\n}' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding\n```\n\nor\n\n```\n$ curl -X POST -H \"Content-Type: application/json\" -d '{\n \"scm\": \"git\",\n \"project\": {\n \"key\": \"{ba516952-992a-4c2d-acbd-17d502922f96}\"\n }\n}' https://api.bitbucket.org/2.0/repositories/teamsinspace/hablanding\n```\n\nThe project must be assigned for all repositories. If the project is not provided,\nthe repository is automatically assigned to the oldest project in the workspace.\n\nNote: In the examples above, the workspace ID `teamsinspace`,\nand/or the repository name `hablanding` can be replaced by UUIDs.", + "summary": "Create a repository", + "responses": { + "200": { + "description": "The newly created repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository" + } + } + } + }, + "400": { + "description": "If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "If the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository" + } + } + }, + "description": "The repository that is to be created. Note that most object elements are optional. Elements \"owner\" and \"full_name\" are ignored as the URL implies them." + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "put": { + "tags": ["Repositories"], + "description": "Since this endpoint can be used to both update and to create a\nrepository, the request body depends on the intent.\n\n#### Creation\n\nSee the POST documentation for the repository endpoint for an example\nof the request body.\n\n#### Update\n\nNote: Changing the `name` of the repository will cause the location to\nbe changed. This is because the URL of the repo is derived from the\nname (a process called slugification). In such a scenario, it is\npossible for the request to fail if the newly created slug conflicts\nwith an existing repository's slug. But if there is no conflict,\nthe new location will be returned in the `Location` header of the\nresponse.", + "summary": "Update a repository", + "responses": { + "200": { + "description": "The existing repository has been updated", + "headers": { + "Location": { + "description": "The location of the repository. This header is only\nprovided when the repository's name is changed.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository" + } + } + } + }, + "201": { + "description": "A new repository has been created", + "headers": { + "Location": { + "description": "The location of the newly created repository", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository" + } + } + } + }, + "400": { + "description": "If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "If the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository" + } + } + }, + "description": "The repository that is to be updated.\n\nNote that the elements \"owner\" and \"full_name\" are ignored since the\nURL implies them.\n" + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/branch-restrictions": { + "get": { + "tags": ["Branch restrictions"], + "description": "Returns a paginated list of all branch restrictions on the\nrepository.", + "summary": "List branch restrictions", + "responses": { + "200": { + "description": "A paginated list of branch restrictions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_branchrestrictions" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "kind", + "in": "query", + "description": "Branch restrictions of this type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pattern", + "in": "query", + "description": "Branch restrictions applied to branches of this pattern", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "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`, `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": { + "description": "A paginated list of branch restrictions", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/branchrestriction" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/branchrestriction" + } + } + }, + "description": "The new rule", + "required": true + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/branch-restrictions/{id}": { + "delete": { + "tags": ["Branch restrictions"], + "description": "Deletes an existing branch restriction rule.", + "summary": "Delete a branch restriction rule", + "responses": { + "204": { + "description": "" + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository or branch restriction id does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "get": { + "tags": ["Branch restrictions"], + "description": "Returns a specific branch restriction rule.", + "summary": "Get a branch restriction rule", + "responses": { + "200": { + "description": "The branch restriction rule", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/branchrestriction" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository or branch restriction id does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "put": { + "tags": ["Branch restrictions"], + "description": "Updates an existing branch restriction rule.\n\nFields not present in the request body are ignored.\n\nSee [`POST`](/cloud/bitbucket/rest/api-group-branch-restrictions/#api-repositories-workspace-repo-slug-branch-restrictions-post) for details.", + "summary": "Update a branch restriction rule", + "responses": { + "200": { + "description": "The updated branch restriction rule", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/branchrestriction" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository or branch restriction id does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/branchrestriction" + } + } + }, + "description": "The new version of the existing rule", + "required": true + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The restriction rule's id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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.", + "summary": "Get the branching model for a repository", + "responses": { + "200": { + "description": "The branching model object", + "content": { + "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" + } + } + } + } + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have read access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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.", + "summary": "Get the branching model config for a repository", + "responses": { + "200": { + "description": "The branching model configuration", + "content": { + "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" + } + } + } + } + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "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\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": { + "description": "The updated branching model configuration", + "content": { + "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 + } + ] + } + } + } + } + } + }, + "400": { + "description": "If the request contains invalid branching model configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/commit/{commit}": { + "get": { + "tags": ["Commits"], + "description": "Returns the specified commit.", + "summary": "Get a commit", + "responses": { + "200": { + "description": "The commit object", + "content": { + "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" + } + } + } + } + } + }, + "404": { + "description": "If the specified commit or repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "commit", + "in": "path", + "description": "The commit's SHA1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/commit/{commit}/approve": { + "delete": { + "tags": ["Commits"], + "description": "Redact the authenticated user's approval of the specified commit.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", + "summary": "Unapprove a commit", + "responses": { + "204": { + "description": "An empty response indicating the authenticated user's approval has been withdrawn." + }, + "404": { + "description": "If the specified commit, or the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } + ] + }, + "post": { + "tags": ["Commits"], + "description": "Approve the specified commit as the authenticated user.\n\nThis operation is only available to users that have explicit access to\nthe repository. In contrast, just the fact that a repository is\npublicly accessible to users does not give them the ability to approve\ncommits.", + "summary": "Approve a commit", + "responses": { + "200": { + "description": "The `participant` object recording that the authenticated user approved the commit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/participant" + } + } + } + }, + "404": { + "description": "If the specified commit, or the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:repository:bitbucket", + "write:repository:bitbucket" + ] + } + ] + }, + "parameters": [ + { + "name": "commit", + "in": "path", + "description": "The commit's SHA1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/commit/{commit}/comments": { + "get": { + "tags": ["Commits"], + "description": "Returns the commit's comments.\n\nThis includes both global and inline comments.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.", + "summary": "List a commit's comments", + "responses": { + "200": { + "description": "A paginated list of commit comments.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_commit_comments" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "Query string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "Field by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "post": { + "tags": ["Commits"], + "description": "Creates new comment on the specified commit.\n\nTo post a reply to an existing comment, include the `parent.id` field:\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \\\n -X POST -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"One more thing!\"},\n \"parent\": {\"id\": 5728901}}'\n```", + "summary": "Create comment for a commit", + "responses": { + "201": { + "description": "The newly created comment.", + "headers": { + "Location": { + "description": "The location of the newly created comment.", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "If the comment was detected as spam, or if the parent comment is not attached to the same node as the new comment" + }, + "404": { + "description": "If a parent ID was passed in that cannot be found" + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commit_comment" + } + } + }, + "description": "The specified comment.", + "required": true + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "commit", + "in": "path", + "description": "The commit's SHA1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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.", + "summary": "Get a commit comment", + "responses": { + "200": { + "description": "The commit comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commit_comment" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "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": [ + { + "name": "comment_id", + "in": "path", + "description": "The id of the comment.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "commit", + "in": "path", + "description": "The commit's SHA1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/commit/{commit}/properties/{app_key}/{property_name}": { + "put": { + "responses": { + "204": { + "description": "An empty response." + } + }, + "operationId": "updateCommitHostedPropertyValue", + "summary": "Update a commit application property", + "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "repo_slug", + "description": "The repository.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "commit", + "description": "The commit.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/application_property" + }, + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "An empty response." + } + }, + "operationId": "deleteCommitHostedPropertyValue", + "summary": "Delete a commit application property", + "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "repo_slug", + "description": "The repository.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "commit", + "description": "The commit.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "responses": { + "200": { + "description": "The value of the property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_property" + } + } + } + } + }, + "operationId": "getCommitHostedPropertyValue", + "summary": "Get a commit application property", + "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a commit.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "repo_slug", + "description": "The repository.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "commit", + "description": "The commit.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests": { + "get": { + "tags": ["Pullrequests"], + "summary": "List pull requests that contain a commit", + "description": "Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.", + "operationId": "getPullrequestsForCommit", + "parameters": [ + { + "name": "workspace", + "in": "path", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "The repository; either the UUID in curly braces, or the slug", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "in": "path", + "description": "The SHA1 of the commit", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Which page to retrieve", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pagelen", + "in": "query", + "description": "How many pull requests to retrieve per page", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 30 + } + } + ], + "responses": { + "200": { + "description": "The paginated list of pull requests.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pullrequests" + } + } + } + }, + "202": { + "description": "The repository's pull requests are still being indexed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pullrequests" + } + } + } + }, + "404": { + "description": "Either the repository does not exist, or pull request commit links have not yet been indexed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "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": { + "get": { + "tags": ["Reports", "Commits"], + "description": "Returns a paginated list of Reports linked to this commit.", + "summary": "List reports", + "operationId": "getReportsForCommit", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit for which to retrieve reports.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_reports" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}": { + "put": { + "tags": ["Reports", "Commits"], + "description": "Creates or updates a report for the specified commit.\nTo upload a report, make sure to generate an ID that is unique across all reports for that commit. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-001.\n\n### Sample cURL request:\n```\ncurl --request PUT 'https://api.bitbucket.org/2.0/repositories///commit//reports/mysystem-001' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"title\": \"Security scan report\",\n \"details\": \"This pull request introduces 10 new dependency vulnerabilities.\",\n \"report_type\": \"SECURITY\",\n \"reporter\": \"mySystem\",\n \"link\": \"http://www.mysystem.com/reports/001\",\n \"result\": \"FAILED\",\n \"data\": [\n {\n \"title\": \"Duration (seconds)\",\n \"type\": \"DURATION\",\n \"value\": 14\n },\n {\n \"title\": \"Safe to merge?\",\n \"type\": \"BOOLEAN\",\n \"value\": false\n }\n ]\n}'\n```\n\n### Possible field values:\nreport_type: SECURITY, COVERAGE, TEST, BUG\nresult: PASSED, FAILED, PENDING\ndata.type: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT\n\n#### Data field formats\n| Type Field | Value Field Type | Value Field Display |\n|:--------------|:------------------|:--------------------|\n| None/ Omitted | Number, String or Boolean (not an array or object) | Plain text |\n| BOOLEAN\t| Boolean | The value will be read as a JSON boolean and displayed as 'Yes' or 'No'. |\n| DATE | Number | The value will be read as a JSON number in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise it will be displayed as an absolute date. |\n| DURATION | Number | The value will be read as a JSON number in milliseconds and will be displayed in a human readable duration format. |\n| LINK | Object: `{\"text\": \"Link text here\", \"href\": \"https://link.to.annotation/in/external/tool\"}` | The value will be read as a JSON object containing the fields \"text\" and \"href\" and will be displayed as a clickable link on the report. |\n| NUMBER | Number | The value will be read as a JSON number and large numbers will be displayed in a human readable format (e.g. 14.3k). |\n| PERCENTAGE | Number (between 0 and 100) | The value will be read as a JSON number between 0 and 100 and will be displayed with a percentage sign. |\n| TEXT | String | The value will be read as a JSON string and will be displayed as-is |\n\nPlease refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.\n", + "operationId": "createOrUpdateReport", + "summary": "Create or update a report", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit the report belongs to.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Either the uuid or external-id of the report.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/report" + } + } + }, + "description": "The report to create or update", + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/report" + } + } + } + }, + "400": { + "description": "The provided Report object is malformed or incomplete.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Reports", "Commits"], + "description": "Returns a single Report matching the provided ID.", + "summary": "Get a report", + "operationId": "getReport", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit the report belongs to.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Either the uuid or external-id of the report.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/report" + } + } + } + }, + "404": { + "description": "The report with the given ID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Reports", "Commits"], + "description": "Deletes a single Report matching the provided ID.", + "summary": "Delete a report", + "operationId": "deleteReport", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit the report belongs to.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Either the uuid or external-id of the report.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No content" + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations": { + "get": { + "tags": ["Reports", "Commits"], + "description": "Returns a paginated list of Annotations for a specified report.", + "summary": "List annotations", + "operationId": "getAnnotationsForReport", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit for which to retrieve reports.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Uuid or external-if of the report for which to get annotations for.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_annotations" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Reports", "Commits"], + "description": "Bulk upload of annotations.\nAnnotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.\n\nAdd the annotations you want to upload as objects in a JSON array and make sure each annotation has the external_id field set to a unique value. If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001. The external id can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). You can upload up to 100 annotations per POST request.\n\n### Sample cURL request:\n```\ncurl --location 'https://api.bitbucket.org/2.0/repositories///commit//reports/mysystem-001/annotations' \\\n--header 'Content-Type: application/json' \\\n--data-raw '[\n {\n \"external_id\": \"mysystem-annotation001\",\n \"title\": \"Security scan report\",\n \"annotation_type\": \"VULNERABILITY\",\n \"summary\": \"This line represents a security threat.\",\n \"severity\": \"HIGH\",\n \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Main.java\",\n \"line\": 42\n },\n {\n \"external_id\": \"mySystem-annotation002\",\n \"title\": \"Bug report\",\n \"annotation_type\": \"BUG\",\n \"result\": \"FAILED\",\n \"summary\": \"This line might introduce a bug.\",\n \"severity\": \"MEDIUM\",\n \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Helper.java\",\n \"line\": 13\n }\n]'\n```\n\n### Possible field values:\nannotation_type: VULNERABILITY, CODE_SMELL, BUG\nresult: PASSED, FAILED, IGNORED, SKIPPED\nseverity: HIGH, MEDIUM, LOW, CRITICAL\n\nPlease refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.\n", + "operationId": "bulkCreateOrUpdateAnnotations", + "summary": "Bulk create or update annotations", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit for which to retrieve reports.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Uuid or external-if of the report for which to get annotations for.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/report_annotation" + }, + "minItems": 1, + "maxItems": 100 + } + } + }, + "description": "The annotations to create or update", + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/report_annotation" + } + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/commit/{commit}/reports/{reportId}/annotations/{annotationId}": { + "get": { + "tags": ["Reports", "Commits"], + "description": "Returns a single Annotation matching the provided ID.", + "summary": "Get an annotation", + "operationId": "getAnnotation", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit the report belongs to.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Either the uuid or external-id of the report.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "annotationId", + "description": "Either the uuid or external-id of the annotation.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/report_annotation" + } + } + } + }, + "404": { + "description": "The annotation with the given ID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Reports", "Commits"], + "description": "Creates or updates an individual annotation for the specified report.\nAnnotations are individual findings that have been identified as part of a report, for example, a line of code that represents a vulnerability. These annotations can be attached to a specific file and even a specific line in that file, however, that is optional. Annotations are not mandatory and a report can contain up to 1000 annotations.\n\nJust as reports, annotation needs to be uploaded with a unique ID that can later be used to identify the report as an alternative to the generated [UUID](https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#uuid). If you want to use an existing id from your own system, we recommend prefixing it with your system's name to avoid collisions, for example, mySystem-annotation001.\n\n### Sample cURL request:\n```\ncurl --request PUT 'https://api.bitbucket.org/2.0/repositories///commit//reports/mySystem-001/annotations/mysystem-annotation001' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n \"title\": \"Security scan report\",\n \"annotation_type\": \"VULNERABILITY\",\n \"summary\": \"This line represents a security thread.\",\n \"severity\": \"HIGH\",\n \"path\": \"my-service/src/main/java/com/myCompany/mysystem/logic/Main.java\",\n \"line\": 42\n}'\n```\n\n### Possible field values:\nannotation_type: VULNERABILITY, CODE_SMELL, BUG\nresult: PASSED, FAILED, IGNORED, SKIPPED\nseverity: HIGH, MEDIUM, LOW, CRITICAL\n\nPlease refer to the [Code Insights documentation](https://confluence.atlassian.com/bitbucket/code-insights-994316785.html) for more information.\n", + "operationId": "createOrUpdateAnnotation", + "summary": "Create or update an annotation", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit the report belongs to.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Either the uuid or external-id of the report.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "annotationId", + "description": "Either the uuid or external-id of the annotation.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/report_annotation" + } + } + }, + "description": "The annotation to create or update", + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/report_annotation" + } + } + } + }, + "400": { + "description": "The provided Annotation object is malformed or incomplete.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Reports", "Commits"], + "description": "Deletes a single Annotation matching the provided ID.", + "summary": "Delete an annotation", + "operationId": "deleteAnnotation", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "commit", + "description": "The commit the annotation belongs to.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "description": "Either the uuid or external-id of the annotation.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "annotationId", + "description": "Either the uuid or external-id of the annotation.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "No content" + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/commit/{commit}/statuses": { + "get": { + "tags": ["Commit statuses"], + "description": "Returns all statuses (e.g. build results) for a specific commit.", + "summary": "List commit statuses for a commit", + "responses": { + "200": { + "description": "A paginated list of all commit statuses for this commit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_commitstatuses" + } + } + } + }, + "401": { + "description": "If the repository is private and the request was not authenticated." + }, + "404": { + "description": "If the repository or commit does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "refname", + "in": "query", + "description": "If specified, only return commit status objects that were either\ncreated without a refname, or were created with the specified refname\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "q", + "in": "query", + "description": "Query string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "Field by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\nDefaults to `created_on`.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "commit", + "in": "path", + "description": "The commit's SHA1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/commit/{commit}/statuses/build": { + "post": { + "tags": ["Commit statuses"], + "description": "Creates a new build status against the specified commit.\n\nIf the specified key already exists, the existing status object will\nbe overwritten.\n\nExample:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repo/commit/e10dae226959c2194f2b07b077c07762d93821cf/statuses/build/ -X POST -u jdoe -H 'Content-Type: application/json' -d '{\n \"key\": \"MY-BUILD\",\n \"state\": \"SUCCESSFUL\",\n \"description\": \"42 tests passed\",\n \"url\": \"https://www.example.org/my-build-result\"\n }'\n```\n\nWhen creating a new commit status, you can use a URI template for the URL.\nTemplates are URLs that contain variable names that Bitbucket will\nevaluate at runtime whenever the URL is displayed anywhere similar to\nparameter substitution in\n[Bitbucket Connect](https://developer.atlassian.com/bitbucket/concepts/context-parameters.html).\nFor example, one could use `https://foo.com/builds/{repository.full_name}`\nwhich Bitbucket will turn into `https://foo.com/builds/foo/bar` at render time.\nThe context variables available are `repository` and `commit`.", + "summary": "Create a build status for a commit", + "responses": { + "201": { + "description": "The newly created build status object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commitstatus" + } + } + } + }, + "401": { + "description": "If the repository is private and the request was not authenticated." + }, + "404": { + "description": "If the repository, commit, or build status key does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commitstatus" + } + } + }, + "description": "The new commit status object." + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "commit", + "in": "path", + "description": "The commit's SHA1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/commit/{commit}/statuses/build/{key}": { + "get": { + "tags": ["Commit statuses"], + "description": "Returns the specified build status for a commit.", + "summary": "Get a build status for a commit", + "responses": { + "200": { + "description": "The build status object with the specified key.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commitstatus" + } + } + } + }, + "401": { + "description": "If the repository is private and the request was not authenticated." + }, + "404": { + "description": "If the repository, commit, or build status key does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "put": { + "tags": ["Commit statuses"], + "description": "Used to update the current status of a build status object on the\nspecific commit.\n\nThis operation can also be used to change other properties of the\nbuild status:\n\n* `state`\n* `name`\n* `description`\n* `url`\n* `refname`\n\nThe `key` cannot be changed.", + "summary": "Update a build status for a commit", + "responses": { + "200": { + "description": "The updated build status object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commitstatus" + } + } + } + }, + "401": { + "description": "If the repository is private and the request was not authenticated." + }, + "404": { + "description": "If the repository or build does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commitstatus" + } + } + }, + "description": "The updated build status object" + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "commit", + "in": "path", + "description": "The commit's SHA1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "key", + "in": "path", + "description": "The build status' unique key", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/commits": { + "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/\n\nReturns all commits in the repo in topological order (newest commit\nfirst). All branches and tags are included (similar to\n`git log --all`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?exclude=master\n\nReturns all commits in the repo that are not on master\n(similar to `git log --all ^master`).\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?include=foo&include=bar&exclude=fu&exclude=fubar\n\nReturns all commits that are on refs `foo` or `bar`, but not on `fu` or\n`fubar` (similar to `git log foo bar ^fu ^fubar`).\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/?path=README.md&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `foo` or `bar`, but not on `master`\nthat changed the file README.md.\n\n#### GET /repositories/{workspace}/{repo_slug}/commits/?path=src/&include=foo&include=bar&exclude=master\n\nReturns all commits that are on refs `foo` or `bar`, 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", + "responses": { + "200": { + "description": "A paginated list of commits", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_changeset" + } + } + } + }, + "404": { + "description": "If the specified repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "post": { + "tags": ["Commits"], + "description": "Identical to `GET /repositories/{workspace}/{repo_slug}/commits`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**", + "summary": "List commits with include/exclude", + "responses": { + "200": { + "description": "A paginated list of commits", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_changeset" + } + } + } + }, + "404": { + "description": "If the specified repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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 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": { + "description": "A paginated list of commits", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_changeset" + } + } + } + }, + "404": { + "description": "If the specified revision does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "post": { + "tags": ["Commits"], + "description": "Identical to `GET /repositories/{workspace}/{repo_slug}/commits/{revision}`,\nexcept that POST allows clients to place the include and exclude\nparameters in the request body to avoid URL length issues.\n\n**Note that this resource does NOT support new commit creation.**", + "summary": "List commits for revision using include/exclude", + "responses": { + "200": { + "description": "A paginated list of commits", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_changeset" + } + } + } + }, + "404": { + "description": "If the specified revision does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "revision", + "in": "path", + "description": "A commit SHA1 or ref name.", + "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}/components": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns the components that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", + "summary": "List components", + "responses": { + "200": { + "description": "The components that have been defined in the issue tracker.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_components" + } + } + } + }, + "404": { + "description": "The specified repository does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/components/{component_id}": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue tracker component object.", + "summary": "Get a component for issues", + "responses": { + "200": { + "description": "The specified component object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/component" + } + } + } + }, + "404": { + "description": "The specified repository or component does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "component_id", + "in": "path", + "description": "The component's id", + "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}/default-reviewers": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns the repository's default reviewers.\n\nThese are the users that are automatically added as reviewers on every\nnew pull request that is created. To obtain the repository's default reviewers\nas well as the default reviewers inherited from the project, use the\n[effective-default-reveiwers](#api-repositories-workspace-repo-slug-effective-default-reviewers-get) endpoint.", + "summary": "List default reviewers", + "responses": { + "200": { + "description": "The paginated list of default reviewers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_accounts" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to view the default reviewers", + "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": [ + { + "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}/default-reviewers/{target_username}": { + "delete": { + "tags": ["Pullrequests"], + "description": "Removes a default reviewer from the repository.", + "summary": "Remove a user from the default reviewers", + "responses": { + "204": { + "description": "The specified user successfully removed from the default reviewers" + }, + "403": { + "description": "If the authenticated user does not have access modify the default reviewers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified user does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "get": { + "tags": ["Pullrequests"], + "description": "Returns the specified reviewer.\n\nThis can be used to test whether a user is among the repository's\ndefault reviewers list. A 404 indicates that that specified user is not\na default reviewer.", + "summary": "Get a default reviewer", + "responses": { + "200": { + "description": "The specified user is a default reviewer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to check if the specified user is a default reviewer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified user does not exist or is not a default reviewer", + "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": "Adds the specified user to the repository's list of default\nreviewers.\n\nThis method is idempotent. Adding a user a second time has no effect.", + "summary": "Add a user to the default reviewers", + "responses": { + "200": { + "description": "The specified user was successfully added to the default reviewers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + } + }, + "400": { + "description": "If the authenticated user tried to add a team, bot user, or user without access to the repository to the default reviewers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have permission to modify the default reviewers", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified user does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "target_username", + "in": "path", + "description": "This can either be the username or the UUID of the default reviewer,\nsurrounded by curly-braces, for example: `{account 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}/deploy-keys": { + "get": { + "tags": ["Deployments"], + "description": "Returns all deploy-keys belonging to a repository.", + "summary": "List repository deploy keys", + "responses": { + "200": { + "description": "Deploy keys matching the repository", + "content": { + "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 + } + } + } + } + } + }, + "403": { + "description": "If the specified user or repository is not accessible to the current user" + }, + "404": { + "description": "If the specified user or repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository", "repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "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 -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": { + "description": "The deploy key that was created", + "content": { + "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" + } + } + } + } + } + }, + "400": { + "description": "Invalid deploy key inputs" + }, + "403": { + "description": "If the specified user or repository is not accessible to the current user" + }, + "404": { + "description": "If the specified user or repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository", "repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/deploy-keys/{key_id}": { + "delete": { + "tags": ["Deployments"], + "description": "This deletes a deploy key from a repository.", + "summary": "Delete a repository deploy key", + "responses": { + "204": { + "description": "The key has been deleted" + }, + "403": { + "description": "If the current user does not have permission to delete a key for the specified user" + }, + "404": { + "description": "If the specified user, repository, or deploy key does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository", "repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Deployments"], + "description": "Returns the deploy key belonging to a specific key.", + "summary": "Get a repository deploy key", + "responses": { + "200": { + "description": "Deploy key matching the key ID", + "content": { + "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" + } + } + } + } + } + }, + "403": { + "description": "If the specified user or repository is not accessible to the current user" + }, + "404": { + "description": "If the specified user or repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository", "repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "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 -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": { + "description": "The newly updated deploy key.", + "content": { + "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" + } + } + } + } + } + }, + "400": { + "description": "If the submitted key or related value is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the current user does not have permission to add a key for the specified user" + }, + "404": { + "description": "If the specified user, repository, or deploy key does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository", "repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The key ID matching the deploy key.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/deployments": { + "get": { + "tags": ["Deployments"], + "description": "Find deployments", + "summary": "List deployments", + "operationId": "getDeploymentsForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The matching deployments.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_deployments" + } + } + } + } + }, + "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}": { + "get": { + "tags": ["Deployments"], + "description": "Retrieve a deployment", + "summary": "Get a deployment", + "operationId": "getDeploymentForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "deployment_uuid", + "description": "The deployment UUID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The deployment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment" + } + } + } + }, + "404": { + "description": "No account, repository or deployment with the UUID provided exists.", + "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}/deployments_config/environments/{environment_uuid}/variables": { + "get": { + "tags": ["Pipelines"], + "description": "Find deployment environment level variables.", + "summary": "List variables for an environment", + "operationId": "getDeploymentVariables", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "environment_uuid", + "description": "The environment.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The retrieved deployment variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_deployment_variable" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Pipelines"], + "description": "Create a deployment environment level variable.", + "summary": "Create a variable for an environment", + "operationId": "createDeploymentVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "environment_uuid", + "description": "The environment.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment_variable" + } + } + }, + "description": "The variable to create", + "required": true + }, + "responses": { + "201": { + "description": "The variable was created.", + "headers": { + "Location": { + "description": "The URL of the newly created variable.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment_variable" + } + } + } + }, + "404": { + "description": "The account, repository, environment or variable with the given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "A variable with the provided key already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/{variable_uuid}": { + "put": { + "tags": ["Pipelines"], + "description": "Update a deployment environment level variable.", + "summary": "Update a variable for an environment", + "operationId": "updateDeploymentVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "environment_uuid", + "description": "The environment.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to update.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment_variable" + } + } + }, + "description": "The updated deployment variable.", + "required": true + }, + "responses": { + "200": { + "description": "The deployment variable was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment_variable" + } + } + } + }, + "404": { + "description": "The account, repository, environment or variable with the given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Pipelines"], + "description": "Delete a deployment environment level variable.", + "summary": "Delete a variable for an environment", + "operationId": "deleteDeploymentVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "environment_uuid", + "description": "The environment.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The variable was deleted." + }, + "404": { + "description": "The account, repository, environment or variable with given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "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, 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": { + "description": "The raw diff" + }, + "555": { + "description": "If the diff was too large and timed out.\n\nSince this endpoint does not employ any form of pagination, but\ninstead returns the diff as a single document, it can run into\ntrouble on very large diffs. If Bitbucket times out in cases\nlike these, a 555 status code is returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "context", + "in": "query", + "description": "Generate diffs with lines of context instead of the usual three.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "path", + "in": "query", + "description": "Limit the diff to a particular file (this parameter\ncan be repeated for multiple paths).", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "ignore_whitespace", + "in": "query", + "description": "Generate diffs that ignore whitespace.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "binary", + "in": "query", + "description": "Generate diffs that include binary files, true if omitted.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "renames", + "in": "query", + "description": "Whether to perform rename detection, true if omitted.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "merge", + "in": "query", + "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" + } + }, + { + "name": "topic", + "in": "query", + "description": "If true, returns 2-way 'three-dot' diff.\nThis is a diff between the source commit and the merge base\nof the source commit and the destination commit.\nIf false, a simple 'two dot' diff between the source and\ndestination is returned.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "spec", + "in": "path", + "description": "A commit SHA (e.g. `3a8b42`) or a commit range using double dot\nnotation (e.g. `3a8b42..9ff173`).\n", + "required": true, + "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}/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, 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": { + "description": "The diff stats", + "content": { + "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 + } + } + } + } + } + }, + "555": { + "description": "If generating the diffstat timed out.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "ignore_whitespace", + "in": "query", + "description": "Generate diffs that ignore whitespace", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "merge", + "in": "query", + "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" + } + }, + { + "name": "path", + "in": "query", + "description": "Limit the diffstat to a particular file (this parameter\ncan be repeated for multiple paths).", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "renames", + "in": "query", + "description": "Whether to perform rename detection, true if omitted.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "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": "spec", + "in": "path", + "description": "A commit SHA (e.g. `3a8b42`) or a commit range using double dot\nnotation (e.g. `3a8b42..9ff173`).\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "topic", + "in": "query", + "description": "If true, returns 2-way 'three-dot' diff.\nThis is a diff between the source commit and the merge base\nof the source commit and the destination commit.\nIf false, a simple 'two dot' diff between the source and\ndestination is returned.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "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}/downloads": { + "get": { + "tags": ["Downloads"], + "description": "Returns a list of download links associated with the repository.", + "summary": "List download artifacts", + "responses": { + "200": { + "description": "Returns a paginated list of the downloads associated with the repository." + }, + "403": { + "description": "User is not authorized to read from the repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "post": { + "tags": ["Downloads"], + "description": "Upload new download artifacts.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more `files` fields:\n\n $ echo Hello World > hello.txt\n $ curl -s -u evzijst -X POST https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads -F files=@hello.txt\n\nWhen a file is uploaded with the same name as an existing artifact,\nthen the existing file will be replaced.", + "summary": "Upload a download artifact", + "responses": { + "201": { + "description": "The artifact was uploaded sucessfully." + }, + "400": { + "description": "Bad Request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "User is not authorized to write to the repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "406": { + "description": "Unsupported Content-Type. Use multiplart/form-data.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/downloads/{filename}": { + "delete": { + "tags": ["Downloads"], + "description": "Deletes the specified download artifact from the repository.", + "summary": "Delete a download artifact", + "responses": { + "204": { + "description": "The specified download artifact was deleted." + }, + "403": { + "description": "User is not authorized to write to the repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified download does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } + ] + }, + "get": { + "tags": ["Downloads"], + "description": "Return a redirect to the contents of a download artifact.\n\nThis endpoint returns the actual file contents and not the artifact's\nmetadata.\n\n $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt\n Hello World", + "summary": "Get a download artifact link", + "responses": { + "302": { + "description": "Redirects to the url of the specified download artifact." + }, + "403": { + "description": "User is not authorized to read from the repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified download artifact does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "filename", + "in": "path", + "description": "Name of the file.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/effective-branching-model": { + "get": { + "tags": ["Branching model"], + "description": "", + "summary": "Get the effective, or currently applied, branching model for a repository", + "responses": { + "200": { + "description": "The effective branching model object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/effective_repo_branching_model" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have read access to the repository", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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.", + "summary": "List effective default reviewers", + "responses": { + "200": { + "description": "The paginated list of effective default reviewers", + "content": { + "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 + } + } + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to view the default reviewers", + "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": [ + { + "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}/environments": { + "get": { + "tags": ["Deployments"], + "description": "Find environments", + "summary": "List environments", + "operationId": "getEnvironmentsForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The matching environments.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_environments" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Deployments"], + "description": "Create an environment.", + "summary": "Create an environment", + "operationId": "createEnvironment", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment_environment" + } + } + }, + "description": "The environment to create.", + "required": true + }, + "responses": { + "201": { + "description": "The environment was created.", + "headers": { + "Location": { + "description": "The URL of the newly created environment.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment_environment" + } + } + } + }, + "404": { + "description": "The account or repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "An environment host with the provided name already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}": { + "get": { + "tags": ["Deployments"], + "summary": "Get an environment", + "description": "Retrieve an environment", + "operationId": "getEnvironmentForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "environment_uuid", + "description": "The environment UUID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The environment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deployment_environment" + } + } + } + }, + "404": { + "description": "No account, repository or environment with the UUID provided exists.", + "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": ["Deployments"], + "description": "Delete an environment", + "summary": "Delete an environment", + "operationId": "deleteEnvironmentForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "environment_uuid", + "description": "The environment UUID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The environment was deleted." + }, + "404": { + "description": "No account or repository with the UUID provided exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}/changes": { + "post": { + "tags": ["Deployments"], + "description": "Update an environment", + "summary": "Update an environment", + "operationId": "updateEnvironmentForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "environment_uuid", + "description": "The environment UUID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "202": { + "description": "The environment update request was accepted." + }, + "404": { + "description": "No account, repository or environment with the UUID provided exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "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\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": { + "description": "A paginated list of commits that modified the specified file", + "content": { + "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" + } + ] + } + } + } + } + } + }, + "404": { + "description": "If the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "renames", + "in": "query", + "description": "\nWhen `true`, Bitbucket will follow the history of the file across\nrenames (this is the default behavior). This can be turned off by\nspecifying `false`.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "\nName of a response property sort the result by as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "commit", + "in": "path", + "description": "The commit's SHA1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "path", + "description": "Path to the file.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/forks": { + "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of all the forks of the specified\nrepository.", + "summary": "List repository forks", + "responses": { + "200": { + "description": "All forks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_repositories" + } + } + } + } + }, + "parameters": [ + { + "name": "role", + "in": "query", + "description": "Filters the result based on the authenticated user's role on each repository.\n\n* **member**: returns repositories to which the user has explicit read access\n* **contributor**: returns repositories to which the user has explicit write access\n* **admin**: returns repositories to which the user has explicit administrator access\n* **owner**: returns all repositories owned by the current user\n", + "required": false, + "schema": { + "type": "string", + "enum": ["admin", "contributor", "member", "owner"] + } + }, + { + "name": "q", + "in": "query", + "description": "Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "post": { + "tags": ["Repositories"], + "description": "Creates a new fork of the specified repository.\n\n#### Forking a repository\n\nTo create a fork, specify the workspace explicitly as part of the\nrequest body:\n\n```\n$ curl -X POST -u jdoe https://api.bitbucket.org/2.0/repositories/atlassian/bbql/forks \\\n -H 'Content-Type: application/json' -d '{\n \"name\": \"bbql_fork\",\n \"workspace\": {\n \"slug\": \"atlassian\"\n }\n}'\n```\n\nTo fork a repository into the same workspace, also specify a new `name`.\n\nWhen you specify a value for `name`, it will also affect the `slug`.\nThe `slug` is reflected in the repository URL of the new fork. It is\nderived from `name` by substituting non-ASCII characters, removes\nwhitespace, and changes characters to lower case. For example,\n`My repo` would turn into `my_repo`.\n\nYou need contributor access to create new forks within a workspace.\n\n\n#### Change the properties of a new fork\n\nBy default the fork inherits most of its properties from the parent.\nHowever, since the optional POST body document follows the normal\n`repository` JSON schema and you can override the new fork's\nproperties.\n\nProperties that can be overridden include:\n\n* description\n* fork_policy\n* language\n* mainbranch\n* is_private (note that a private repo's fork_policy might prohibit\n the creation of public forks, in which `is_private=False` would fail)\n* has_issues (to initialize or disable the new repo's issue tracker --\n note that the actual contents of the parent repository's issue\n tracker are not copied during forking)\n* has_wiki (to initialize or disable the new repo's wiki --\n note that the actual contents of the parent repository's wiki are not\n copied during forking)\n* project (when forking into a private project, the fork's `is_private`\n must be `true`)\n\nProperties that cannot be modified include:\n\n* scm\n* parent\n* full_name", + "summary": "Fork a repository", + "responses": { + "201": { + "description": "The newly created fork.", + "headers": { + "Location": { + "description": "The URL of the newly created fork", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository" + } + } + }, + "description": "A repository object. This can be left blank." + }, + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:repository:bitbucket", + "write:repository:bitbucket" + ] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/hooks": { + "get": { + "tags": ["Repositories", "Webhooks"], + "description": "Returns a paginated list of webhooks installed on this repository.", + "summary": "List webhooks for a repository", + "responses": { + "200": { + "description": "The paginated list of installed webhooks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_webhook_subscriptions" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have permission to access the webhooks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "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 \"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": { + "description": "If the webhook was registered successfully.", + "headers": { + "Location": { + "description": "The URL of new newly created webhook.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_subscription" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have permission to install webhooks on the specified repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/hooks/{uid}": { + "delete": { + "tags": ["Repositories", "Webhooks"], + "description": "Deletes the specified webhook subscription from the given\nrepository.", + "summary": "Delete a webhook for a repository", + "responses": { + "204": { + "description": "When the webhook was deleted successfully" + }, + "403": { + "description": "If the authenticated user does not have permission to delete the webhook.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the webhook or repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Repositories", "Webhooks"], + "description": "Returns the webhook with the specified id installed on the specified\nrepository.", + "summary": "Get a webhook for a repository", + "responses": { + "200": { + "description": "The webhook subscription object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_subscription" + } + } + } + }, + "404": { + "description": "If the webhook or repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Repositories", "Webhooks"], + "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": { + "description": "The webhook subscription object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_subscription" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have permission to update the webhook.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the webhook or repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "uid", + "in": "path", + "description": "Installed webhook's ID", + "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}/issues": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns the issues in the issue tracker.", + "summary": "List issues", + "responses": { + "200": { + "description": "A paginated list of the issues matching any filter criteria that were provided.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_issues" + } + } + } + }, + "404": { + "description": "The specified repository does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Issue tracker"], + "description": "Creates a new issue.\n\nThis call requires authentication. Private repositories or private\nissue trackers require the caller to authenticate with an account that\nhas appropriate authorization.\n\nThe authenticated user is used for the issue's `reporter` field.", + "summary": "Create an issue", + "responses": { + "201": { + "description": "The newly created issue.", + "headers": { + "Location": { + "description": "The (absolute) URL of the newly created issue.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue" + } + } + } + }, + "401": { + "description": "When the request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "When the authenticated user isn't authorized to create the issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue" + } + } + }, + "description": "The new issue. The only required element is `title`. All other elements can be omitted from the body.", + "required": true + }, + "security": [ + { + "oauth2": ["issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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\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": { + "description": "The export job has been accepted" + }, + "401": { + "description": "The request wasn't authenticated properly", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "When the authenticated user does not have admin permission on the repo", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The repo does not exist or does not have an issue tracker", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/export_options" + } + } + }, + "description": "The options to apply to the export. Available options include `project_key` and `project_name` which, if specified, are used as the project key and name in the exported Jira json format. Option `send_email` specifies whether an email should be sent upon export result. Option `include_attachments` specifies whether attachments are included in the export." + }, + "security": [ + { + "oauth2": ["issue", "repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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 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": { + "description": "Export job accepted", + "content": { + "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 + } + } + } + } + } + }, + "401": { + "description": "The request wasn't authenticated properly", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "When the authenticated user does not have admin permission on the repo", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "No export job has begun", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue", "repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_name", + "in": "path", + "description": "The name of the repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "task_id", + "in": "path", + "description": "The ID of the export task", + "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}/issues/import": { + "get": { + "tags": ["Issue tracker"], + "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": { + "description": "Import job complete with either FAILURE or SUCCESS status", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue_job_status" + } + } + } + }, + "202": { + "description": "Import job started", + "content": { + "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 + } + } + } + } + } + }, + "401": { + "description": "The request wasn't authenticated properly", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "When the authenticated user does not have admin permission on the repo", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "No export job has begun", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue:write", "repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "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```", + "summary": "Import issues", + "responses": { + "202": { + "description": "Import job accepted", + "content": { + "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 + } + } + } + } + } + }, + "401": { + "description": "The request wasn't authenticated properly", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "When the authenticated user does not have admin permission on the repo", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "No export job has begun", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "Import already running", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue:write", "repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/issues/{issue_id}": { + "delete": { + "tags": ["Issue tracker"], + "description": "Deletes the specified issue. This requires write access to the\nrepository.", + "summary": "Delete an issue", + "responses": { + "200": { + "description": "The issue object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue" + } + } + } + }, + "403": { + "description": "When the authenticated user isn't authorized to delete the issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue.", + "summary": "Get an issue", + "responses": { + "200": { + "description": "The issue object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue" + } + } + } + }, + "403": { + "description": "When the authenticated user isn't authorized to access the issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "410": { + "description": "The specified issue is unavailable.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Issue tracker"], + "description": "Modifies the issue.\n\n```\n$ curl https://api.bitbucket.org/2.0/repostories/evzijst/dogslow/issues/123 \\\n -u evzijst -s -X PUT -H 'Content-Type: application/json' \\\n -d '{\n \"title\": \"Updated title\",\n \"assignee\": {\n \"account_id\": \"5d5355e8c6b9320d9ea5b28d\"\n },\n \"priority\": \"minor\",\n \"version\": {\n \"name\": \"1.0\"\n },\n \"component\": null\n}'\n```\n\nThis example changes the `title`, `assignee`, `priority` and the\n`version`. It also removes the value of the `component` from the issue\nby setting the field to `null`. Any field not present keeps its existing\nvalue.\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.", + "summary": "Update an issue", + "responses": { + "200": { + "description": "The updated issue object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue" + } + } + } + }, + "403": { + "description": "When the authenticated user isn't authorized to access the issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "issue_id", + "in": "path", + "description": "The issue id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/issues/{issue_id}/attachments": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns all attachments for this issue.\n\nThis returns the files' meta data. This does not return the files'\nactual contents.\n\nThe files are always ordered by their upload date.", + "summary": "List attachments for an issue", + "responses": { + "200": { + "description": "A paginated list of all attachments for this issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_issue_attachments" + } + } + } + }, + "401": { + "description": "If the issue tracker is private and the request was not authenticated." + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Issue tracker"], + "description": "Upload new issue attachments.\n\nTo upload files, perform a `multipart/form-data` POST containing one\nor more file fields.\n\nWhen a file is uploaded with the same name as an existing attachment,\nthen the existing file will be replaced.", + "summary": "Upload an attachment to an issue", + "responses": { + "201": { + "description": "An empty response document.", + "headers": { + "Location": { + "description": "The URL to the issue's collection of attachments.", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "If no files were uploaded, or if the wrong `Content-Type` was used." + }, + "401": { + "description": "If the issue tracker is private and the request was not authenticated." + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "issue_id", + "in": "path", + "description": "The issue id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/issues/{issue_id}/attachments/{path}": { + "delete": { + "tags": ["Issue tracker"], + "description": "Deletes an attachment.", + "summary": "Delete an attachment for an issue", + "responses": { + "204": { + "description": "Indicates that the deletion was successful" + }, + "401": { + "description": "If the issue tracker is private and the request was not authenticated." + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Issue tracker"], + "description": "Returns the contents of the specified file attachment.\n\nNote that this endpoint does not return a JSON response, but instead\nreturns a redirect pointing to the actual file that in turn will return\nthe raw contents.\n\nThe redirect URL contains a one-time token that has a limited lifetime.\nAs a result, the link should not be persisted, stored, or shared.", + "summary": "Get attachment for an issue", + "responses": { + "302": { + "description": "A redirect to the file's contents", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "If the issue tracker is private and the request was not authenticated." + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "issue_id", + "in": "path", + "description": "The issue id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "path", + "description": "Path to the file.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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\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": { + "description": "Returns all the issue changes that were made on the specified issue.", + "content": { + "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 + } + } + } + } + } + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "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": "\nName of a response property to sort results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results)\nfor details.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Issue tracker"], + "description": "Makes a change to the specified issue.\n\nFor example, to change an issue's state and assignee, create a new\nchange object that modifies these fields:\n\n```\ncurl https://api.bitbucket.org/2.0/site/master/issues/1234/changes \\\n -s -u evzijst -X POST -H \"Content-Type: application/json\" \\\n -d '{\n \"changes\": {\n \"assignee_account_id\": {\n \"new\": \"557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443\"\n },\n \"state\": {\n \"new\": 'resolved\"\n }\n }\n \"message\": {\n \"raw\": \"This is now resolved.\"\n }\n }'\n```\n\nThe above example also includes a custom comment to go alongside the\nchange. This comment will also be visible on the issue page in the UI.\n\nThe fields of the `changes` object are strings, not objects. This\nallows for immutable change log records, even after user accounts,\nmilestones, or other objects recorded in a change entry, get renamed or\ndeleted.\n\nThe `assignee_account_id` field stores the account id. When POSTing a\nnew change and changing the assignee, the client should therefore use\nthe user's account_id in the `changes.assignee_account_id.new` field.\n\nThis call requires authentication. Private repositories or private\nissue trackers require the caller to authenticate with an account that\nhas appropriate authorization.", + "summary": "Modify the state of an issue", + "responses": { + "201": { + "description": "The newly created issue change.", + "headers": { + "Location": { + "description": "The (absolute) URL of the newly created issue change.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue_change" + } + } + } + }, + "401": { + "description": "When the request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "When the authenticated user isn't authorized to modify the issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue_change" + } + } + }, + "description": "The new issue state change. The only required elements are `changes.[].new`. All other elements can be omitted from the body.", + "required": true + }, + "security": [ + { + "oauth2": ["issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "issue_id", + "in": "path", + "description": "The issue id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/issues/{issue_id}/changes/{change_id}": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue change object.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", + "summary": "Get issue change object", + "responses": { + "200": { + "description": "The specified issue change object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue_change" + } + } + } + }, + "404": { + "description": "The specified repository or issue change does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "change_id", + "in": "path", + "description": "The issue change id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "issue_id", + "in": "path", + "description": "The issue id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/issues/{issue_id}/comments": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns a paginated list of all comments that were made on the\nspecified issue.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List comments on an issue", + "responses": { + "200": { + "description": "A paginated list of issue comments.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_issue_comments" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Issue tracker"], + "description": "Creates a new issue comment.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/ \\\n -X POST -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"Lorem ipsum.\"}}'\n```", + "summary": "Create a comment on an issue", + "responses": { + "201": { + "description": "The newly created comment.", + "headers": { + "Location": { + "description": "The location of the newly issue comment.", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "If the input was invalid, or if the comment being created is detected as spam ", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue_comment" + } + } + }, + "description": "The new issue comment object.", + "required": true + }, + "security": [ + { + "oauth2": ["issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "issue_id", + "in": "path", + "description": "The issue id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/issues/{issue_id}/comments/{comment_id}": { + "delete": { + "tags": ["Issue tracker"], + "description": "Deletes the specified comment.", + "summary": "Delete a comment on an issue", + "responses": { + "204": { + "description": "Indicates successful deletion." + } + }, + "security": [ + { + "oauth2": ["issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue comment object.", + "summary": "Get a comment on an issue", + "responses": { + "200": { + "description": "The issue comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue_comment" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Issue tracker"], + "description": "Updates the content of the specified issue comment. Note that only\nthe `content.raw` field can be modified.\n\n```\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/5728901 \\\n -X PUT -u evzijst \\\n -H 'Content-Type: application/json' \\\n -d '{\"content\": {\"raw\": \"Lorem ipsum.\"}'\n```", + "summary": "Update a comment on an issue", + "responses": { + "200": { + "description": "The updated issue comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue_comment" + } + } + } + }, + "400": { + "description": "If the input was invalid, or if the update to the comment is detected as spam ", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/issue_comment" + } + } + }, + "description": "The updated comment.", + "required": true + }, + "security": [ + { + "oauth2": ["issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "comment_id", + "in": "path", + "description": "The id of the comment.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "issue_id", + "in": "path", + "description": "The issue id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/issues/{issue_id}/vote": { + "delete": { + "tags": ["Issue tracker"], + "description": "Retract your vote.", + "summary": "Remove vote for an issue", + "responses": { + "default": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account:write", "issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Issue tracker"], + "description": "Check whether the authenticated user has voted for this issue.\nA 204 status code indicates that the user has voted, while a 404\nimplies they haven't.", + "summary": "Check if current user voted for an issue", + "responses": { + "204": { + "description": "If the authenticated user has not voted for this issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "When the request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the authenticated user has not voted for this issue, or when the repo does not exist, or does not have an issue tracker.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account", "issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Issue tracker"], + "description": "Vote for this issue.\n\nTo cast your vote, do an empty PUT. The 204 status code indicates that\nthe operation was successful.", + "summary": "Vote for an issue", + "responses": { + "204": { + "description": "Indicating the authenticated user has cast their vote successfully.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "When the request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account:write", "issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "issue_id", + "in": "path", + "description": "The issue id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/issues/{issue_id}/watch": { + "delete": { + "tags": ["Issue tracker"], + "description": "Stop watching this issue.", + "summary": "Stop watching an issue", + "responses": { + "204": { + "description": "Indicates that the authenticated user successfully stopped watching this issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "When the request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or issue does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account:write", "issue:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Issue tracker"], + "description": "Indicated whether or not the authenticated user is watching this\nissue.", + "summary": "Check if current user is watching a issue", + "responses": { + "204": { + "description": "If the authenticated user is watching this issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "When the request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account", "issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Issue tracker"], + "description": "Start watching this issue.\n\nTo start watching this issue, do an empty PUT. The 204 status code\nindicates that the operation was successful.", + "summary": "Watch an issue", + "responses": { + "204": { + "description": "Indicates that the authenticated user successfully started watching this issue.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "When the request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the authenticated user is not watching this issue, or when the repo does not exist, or does not have an issue tracker.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account:write", "issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "issue_id", + "in": "path", + "description": "The issue id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/merge-base/{revspec}": { + "get": { + "tags": ["Commits"], + "description": "Returns the best common ancestor between two commits, specified in a revspec\nof 2 commits (e.g. 3a8b42..9ff173).\n\nIf more than one best common ancestor exists, only one will be returned. It is\nunspecified which will be returned.", + "summary": "Get the common ancestor between two commits", + "responses": { + "200": { + "description": "The merge base of the provided spec.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commit" + } + } + } + }, + "401": { + "description": "If the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to any of the repositories specified.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository or ref in the spec does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "revspec", + "in": "path", + "description": "A commit range using double dot notation (e.g. `3a8b42..9ff173`).\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}/milestones": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns the milestones that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", + "summary": "List milestones", + "responses": { + "200": { + "description": "The milestones that have been defined in the issue tracker.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_milestones" + } + } + } + }, + "404": { + "description": "The specified repository does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/milestones/{milestone_id}": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue tracker milestone object.", + "summary": "Get a milestone", + "responses": { + "200": { + "description": "The specified milestone object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/milestone" + } + } + } + }, + "404": { + "description": "The specified repository or milestone does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "milestone_id", + "in": "path", + "description": "The milestone's id", + "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}/override-settings": { + "get": { + "tags": ["Repositories"], + "description": "", + "summary": "Retrieve the inheritance state for repository settings", + "responses": { + "200": { + "description": "The repository setting inheritance state", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/repository_inheritance_state" + } + } + } + }, + "404": { + "description": "If no repository exists at this location", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "put": { + "tags": ["Repositories"], + "description": "", + "summary": "Set the inheritance state for repository settings\n ", + "responses": { + "204": { + "description": "The repository setting inheritance state was set and no content returned" + }, + "404": { + "description": "If no repository exists at this location", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/patch/{spec}": { + "get": { + "tags": ["Commits"], + "description": "Produces a raw patch for a single commit (diffed against its first\nparent), or a patch-series for a revspec of 2 commits (e.g.\n`3a8b42..9ff173` where the first commit represents the source and the\nsecond commit the destination).\n\nIn case of the latter (diffing a revspec), a patch series is returned\nfor the commits on the source branch (`3a8b42` and its ancestors in\nour example).\n\nWhile similar to diffs, patches:\n\n* Have a commit header (username, commit message, etc)\n* Do not support the `path=foo/bar.py` query parameter\n\nThe raw patch is returned as-is, in whatever encoding the files in the\nrepository use. It is not decoded into unicode. As such, the\ncontent-type is `text/plain`.", + "summary": "Get a patch for two commits", + "responses": { + "200": { + "description": "The raw patches" + }, + "555": { + "description": "If the diff was too large and timed out.\n\nSince this endpoint does not employ any form of pagination, but\ninstead returns the diff as a single document, it can run into\ntrouble on very large diffs. If Bitbucket times out in cases\nlike these, a 555 status code is returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "spec", + "in": "path", + "description": "A commit SHA (e.g. `3a8b42`) or a commit range using double dot\nnotation (e.g. `3a8b42..9ff173`).\n", + "required": true, + "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}/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.", + "summary": "List explicit group permissions for a repository", + "responses": { + "200": { + "description": "Paginated of explicit group permissions on the repository.", + "content": { + "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 + } + } + } + } + } + }, + "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 repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or both of the workspace and repository doesn't exist for the given identifiers.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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\nThe only authentication method supported for this endpoint is via app passwords.", + "summary": "Delete an explicit group permission for a repository", + "responses": { + "204": { + "description": "Group permission deleted" + }, + "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 repository, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The workspace does not exist, the repository does not exist, or the group does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "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`", + "summary": "Get an explicit group permission for a repository", + "responses": { + "200": { + "description": "Group permission for group slug and repository", + "content": { + "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" + } + } + } + } + } + } + } + }, + "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 repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The given user, workspace, and/or repository could not be found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "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, 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": { + "description": "Group permission updated", + "content": { + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "No permission value was provided or the value is invalid(not one of read, write, 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 repository, or the authentication method was not via app password.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The workspace does not exist, the repository does not exist, or the group does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema" + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "group_slug", + "in": "path", + "description": "Slug of the requested group.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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.", + "summary": "List explicit user permissions for a repository", + "responses": { + "200": { + "description": "Paginated of explicit user permissions on the repository.", + "content": { + "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 + } + } + } + } + } + }, + "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 repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "No repository exists for the given repository slug and workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/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.", + "summary": "Delete an explicit user permission for a repository", + "responses": { + "204": { + "description": "The repository 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 repository, 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, repository, and user doesn't exist for the given identifiers.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "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`", + "summary": "Get an explicit user permission for a repository", + "responses": { + "200": { + "description": "Explicit user permission for user and repository", + "content": { + "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" + } + } + } + } + } + } + } + }, + "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 repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "One or both of the workspace and repository doesn't exist for the given identifiers.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "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`", + "summary": "Update an explicit user permission for a repository", + "responses": { + "200": { + "description": "Explicit user permission updated", + "content": { + "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" + } + } + } + } + } + } + } + }, + "400": { + "description": "No permission value was provided or the value is invalid (not one of read, write, or admin), or the selected user is not a valid user to update.", + "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 repository, 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, repository, and selected user doesn't exist for the given identifiers.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/bitbucket.apps.permissions.serializers.RepoPermissionUpdateSchema" + }, + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "selected_user_id", + "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", + "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}/pipelines": { + "get": { + "tags": ["Pipelines"], + "summary": "List pipelines", + "description": "Find pipelines", + "operationId": "getPipelinesForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The matching pipelines.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipelines" + } + } + } + } + }, + "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 \"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": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline" + } + } + }, + "description": "The pipeline to initiate.", + "required": true + }, + "responses": { + "201": { + "description": "The initiated pipeline.", + "headers": { + "Location": { + "description": "The URL of the newly created pipeline.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline" + } + } + } + }, + "400": { + "description": "The account or repository is not enabled, the yml file does not exist in the repository for the given revision, or the request body contained invalid properties.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "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", "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}": { + "get": { + "tags": ["Pipelines"], + "summary": "Get a pipeline", + "description": "Retrieve a specified pipeline", + "operationId": "getPipelineForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The pipeline UUID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The pipeline.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline" + } + } + } + }, + "404": { + "description": "No account, repository or pipeline with the UUID provided exists.", + "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}/steps": { + "get": { + "tags": ["Pipelines"], + "summary": "List steps for a pipeline", + "description": "Find steps for the given pipeline.", + "operationId": "getPipelineStepsForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The UUID of the pipeline.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The steps.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_steps" + } + } + } + } + }, + "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}": { + "get": { + "tags": ["Pipelines"], + "summary": "Get a step of a pipeline", + "description": "Retrieve a given step of a pipeline.", + "operationId": "getPipelineStepForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The UUID of the pipeline.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "step_uuid", + "description": "The UUID of the step.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The step.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_step" + } + } + } + }, + "404": { + "description": "No account, repository, pipeline or step with the UUID provided exists for the pipeline with the UUID provided.", + "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}/steps/{step_uuid}/log": { + "get": { + "tags": ["Pipelines"], + "summary": "Get log file for a step", + "description": "Retrieve the log file for a given step of a pipeline.\n\nThis endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.", + "operationId": "getPipelineStepLogForRepository", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The UUID of the pipeline.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "step_uuid", + "description": "The UUID of the step.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The raw log file for this pipeline step." + }, + "304": { + "description": "The log has the same etag as the provided If-None-Match header.", + "content": { + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "A pipeline with the given UUID does not exist, a step with the given UUID does not exist in the pipeline or a log file does not exist for the given step.", + "content": { + "application/octet-stream": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "416": { + "description": "The requested range does not exist for requests that specified the [HTTP Range header](https://tools.ietf.org/html/rfc7233#section-3.1).", + "content": { + "application/octet-stream": { + "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}/steps/{step_uuid}/logs/{log_uuid}": { + "get": { + "tags": ["Pipelines"], + "summary": "Get the logs for the build container or a service container for a given step of a pipeline.", + "description": "Retrieve the log file for a build container or service container.\n\nThis endpoint supports (and encourages!) the use of [HTTP Range requests](https://tools.ietf.org/html/rfc7233) to deal with potentially very large log files.", + "operationId": "getPipelineContainerLog", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The UUID of the pipeline.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "step_uuid", + "description": "The UUID of the step.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "log_uuid", + "description": "For the main build container specify the step UUID; for a service container specify the service container UUID", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The raw log file for the build container or service container." + }, + "404": { + "description": "No account, repository, pipeline, step or log exist for the provided path.", + "content": { + "application/octet-stream": { + "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}/steps/{step_uuid}/test_reports": { + "get": { + "tags": ["Pipelines"], + "summary": "Get a summary of test reports for a given step of a pipeline.", + "operationId": "getPipelineTestReports", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The UUID of the pipeline.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "step_uuid", + "description": "The UUID of the step.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "A summary of test reports for this pipeline step." + }, + "404": { + "description": "No account, repository, pipeline, step or test reports exist for the provided path.", + "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}/steps/{step_uuid}/test_reports/test_cases": { + "get": { + "tags": ["Pipelines"], + "summary": "Get test cases for a given step of a pipeline.", + "operationId": "getPipelineTestReportTestCases", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The UUID of the pipeline.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "step_uuid", + "description": "The UUID of the step.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Test cases for this pipeline step." + }, + "404": { + "description": "No account, repository, pipeline, step or test reports exist for the provided path.", + "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}/steps/{step_uuid}/test_reports/test_cases/{test_case_uuid}/test_case_reasons": { + "get": { + "tags": ["Pipelines"], + "summary": "Get test case reasons (output) for a given test case in a step of a pipeline.", + "operationId": "getPipelineTestReportTestCaseReasons", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The UUID of the pipeline.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "step_uuid", + "description": "The UUID of the step.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "test_case_uuid", + "description": "The UUID of the test case.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Test case reasons (output)." + }, + "404": { + "description": "No account, repository, pipeline, step or test case with the UUID provided exists for the pipeline with the UUID provided.", + "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}/stopPipeline": { + "post": { + "tags": ["Pipelines"], + "summary": "Stop a pipeline", + "description": "Signal the stop of a pipeline and all of its steps that not have completed yet.", + "operationId": "stopPipeline", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "pipeline_uuid", + "description": "The UUID of the pipeline.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The pipeline has been signaled to stop." + }, + "400": { + "description": "The specified pipeline has already completed.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "Either the account, repository or pipeline with the given UUID does not exist.", + "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": { + "get": { + "tags": ["Pipelines"], + "summary": "Get configuration", + "description": "Retrieve the repository pipelines configuration.", + "operationId": "getRepositoryPipelineConfig", + "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 repository pipelines configuration.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipelines_config" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update configuration", + "description": "Update the pipelines configuration for a repository.", + "operationId": "updateRepositoryPipelineConfig", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipelines_config" + } + } + }, + "description": "The updated repository pipelines configuration.", + "required": true + }, + "responses": { + "200": { + "description": "The repository pipelines configuration was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipelines_config" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config/build_number": { + "put": { + "tags": ["Pipelines"], + "summary": "Update the next build number", + "description": "Update the next build number that should be assigned to a pipeline. The next build number that will be configured has to be strictly higher than the current latest build number for this repository.", + "operationId": "updateRepositoryBuildNumber", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_build_number" + } + } + }, + "description": "The build number to update.", + "required": true + }, + "responses": { + "200": { + "description": "The build number has been configured.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_build_number" + } + } + } + }, + "400": { + "description": "The update failed because the next number was invalid (it should be higher than the current number).", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "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": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules": { + "post": { + "tags": ["Pipelines"], + "summary": "Create a schedule", + "description": "Create a schedule for the given repository.", + "operationId": "createRepositoryPipelineSchedule", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_schedule_post_request_body" + } + } + }, + "description": "The schedule to create.", + "required": true + }, + "responses": { + "201": { + "description": "The created schedule.", + "headers": { + "Location": { + "description": "The URL of the newly created schedule.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_schedule" + } + } + } + }, + "400": { + "description": "There were errors validating the request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "The maximum limit of schedules for this repository was reached.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "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", "write:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Pipelines"], + "summary": "List schedules", + "description": "Retrieve the configured schedules for the given repository.", + "operationId": "getRepositoryPipelineSchedules", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The list of schedules.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_schedules" + } + } + } + }, + "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": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config/schedules/{schedule_uuid}": { + "get": { + "tags": ["Pipelines"], + "summary": "Get a schedule", + "description": "Retrieve a schedule by its UUID.", + "operationId": "getRepositoryPipelineSchedule", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "schedule_uuid", + "description": "The uuid of the schedule.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The requested schedule.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_schedule" + } + } + } + }, + "404": { + "description": "The account, repository or schedule 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": [] + } + ] + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update a schedule", + "description": "Update a schedule.", + "operationId": "updateRepositoryPipelineSchedule", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "schedule_uuid", + "description": "The uuid of the schedule.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_schedule_put_request_body" + } + } + }, + "description": "The schedule to update.", + "required": true + }, + "responses": { + "200": { + "description": "The schedule is updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_schedule" + } + } + } + }, + "404": { + "description": "The account, repository or schedule was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "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"], + "summary": "Delete a schedule", + "description": "Delete a schedule.", + "operationId": "deleteRepositoryPipelineSchedule", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "schedule_uuid", + "description": "The uuid of the schedule.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The schedule was deleted." + }, + "404": { + "description": "The account, repository or schedule 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/schedules/{schedule_uuid}/executions": { + "get": { + "tags": ["Pipelines"], + "summary": "List executions of a schedule", + "description": "Retrieve the executions of a given schedule.", + "operationId": "getRepositoryPipelineScheduleExecutions", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "schedule_uuid", + "description": "The uuid of the schedule.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The list of executions of a schedule.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_schedule_executions" + } + } + } + }, + "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": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/pipelines_config/ssh/key_pair": { + "get": { + "tags": ["Pipelines"], + "summary": "Get SSH key pair", + "description": "Retrieve the repository SSH key pair excluding the SSH private key. The private key is a write only field and will never be exposed in the logs or the REST API.", + "operationId": "getRepositoryPipelineSshKeyPair", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The SSH key pair.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_ssh_key_pair" + } + } + } + }, + "404": { + "description": "The account, repository or SSH key pair 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": [] + } + ] + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update SSH key pair", + "description": "Create or update the repository SSH key pair. The private key will be set as a default SSH identity in your build container.", + "operationId": "updateRepositoryPipelineKeyPair", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_ssh_key_pair" + } + } + }, + "description": "The created or updated SSH key pair.", + "required": true + }, + "responses": { + "200": { + "description": "The SSH key pair was created or updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_ssh_key_pair" + } + } + } + }, + "404": { + "description": "The account, repository or SSH key pair was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Pipelines"], + "summary": "Delete SSH key pair", + "description": "Delete the repository SSH key pair.", + "operationId": "deleteRepositoryPipelineKeyPair", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The SSH key pair was deleted." + }, + "404": { + "description": "The account, repository or SSH key pair was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "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": { + "get": { + "tags": ["Pipelines"], + "summary": "List known hosts", + "description": "Find repository level known hosts.", + "operationId": "getRepositoryPipelineKnownHosts", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The retrieved known hosts.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_known_hosts" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Pipelines"], + "summary": "Create a known host", + "description": "Create a repository level known host.", + "operationId": "createRepositoryPipelineKnownHost", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_known_host" + } + } + }, + "description": "The known host to create.", + "required": true + }, + "responses": { + "201": { + "description": "The known host was created.", + "headers": { + "Location": { + "description": "The URL of the newly created pipeline known host.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_known_host" + } + } + } + }, + "404": { + "description": "The account or repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "A known host with the provided hostname already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "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/{known_host_uuid}": { + "get": { + "tags": ["Pipelines"], + "summary": "Get a known host", + "description": "Retrieve a repository level known host.", + "operationId": "getRepositoryPipelineKnownHost", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "known_host_uuid", + "description": "The UUID of the known host to retrieve.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The known host.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_known_host" + } + } + } + }, + "404": { + "description": "The account, repository or known host with the specified 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": [] + } + ] + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update a known host", + "description": "Update a repository level known host.", + "operationId": "updateRepositoryPipelineKnownHost", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "known_host_uuid", + "description": "The UUID of the known host to update.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_known_host" + } + } + }, + "description": "The updated known host.", + "required": true + }, + "responses": { + "200": { + "description": "The known host was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_known_host" + } + } + } + }, + "404": { + "description": "The account, repository or known host with the given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Pipelines"], + "summary": "Delete a known host", + "description": "Delete a repository level known host.", + "operationId": "deleteRepositoryPipelineKnownHost", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "known_host_uuid", + "description": "The UUID of the known host to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The known host was deleted." + }, + "404": { + "description": "The account, repository or known host with given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "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": { + "get": { + "tags": ["Pipelines"], + "summary": "List variables for a repository", + "description": "Find repository level variables.", + "operationId": "getRepositoryPipelineVariables", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The retrieved variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_variables" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Pipelines"], + "summary": "Create a variable for a repository", + "description": "Create a repository level variable.", + "operationId": "createRepositoryPipelineVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + }, + "description": "The variable to create.", + "required": true + }, + "responses": { + "201": { + "description": "The variable was created.", + "headers": { + "Location": { + "description": "The URL of the newly created pipeline variable.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account or repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "A variable with the provided key already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "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/{variable_uuid}": { + "get": { + "tags": ["Pipelines"], + "summary": "Get a variable for a repository", + "description": "Retrieve a repository level variable.", + "operationId": "getRepositoryPipelineVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to retrieve.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The variable.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account, repository or variable with the specified 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": [] + } + ] + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update a variable for a repository", + "description": "Update a repository level variable.", + "operationId": "updateRepositoryPipelineVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to update.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + }, + "description": "The updated variable", + "required": true + }, + "responses": { + "200": { + "description": "The variable was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account, repository or variable with the given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Pipelines"], + "summary": "Delete a variable for a repository", + "description": "Delete a repository level variable.", + "operationId": "deleteRepositoryPipelineVariable", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "description": "The repository.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The variable was deleted." + }, + "404": { + "description": "The account, repository or variable with given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "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}": { + "put": { + "responses": { + "204": { + "description": "An empty response." + } + }, + "operationId": "updateRepositoryHostedPropertyValue", + "summary": "Update a repository application property", + "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "repo_slug", + "description": "The repository.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/application_property" + }, + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "An empty response." + } + }, + "operationId": "deleteRepositoryHostedPropertyValue", + "summary": "Delete a repository application property", + "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "repo_slug", + "description": "The repository.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "responses": { + "200": { + "description": "The value of the property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_property" + } + } + } + } + }, + "operationId": "getRepositoryHostedPropertyValue", + "summary": "Get a repository application property", + "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a repository.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "repo_slug", + "description": "The repository.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/pullrequests": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns all pull requests on the specified repository.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List pull requests", + "responses": { + "200": { + "description": "All pull requests on the specified repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pullrequests" + } + } + } + }, + "401": { + "description": "If the repository is private and the request was not authenticated." + }, + "404": { + "description": "If the specified repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "state", + "in": "query", + "description": "Only return pull requests that are in this state. This parameter can be repeated.", + "schema": { + "type": "string", + "enum": ["OPEN", "MERGED", "DECLINED", "SUPERSEDED"] + } + } + ], + "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 where the destination repository is\nthis repository and the author is the authenticated user.\n\nThe minimum required fields to create a pull request are `title` and\n`source`, specified by a branch name.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repository/pullrequests \\\n -u my-username:my-password \\\n --request POST \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"staging\"\n }\n }\n }'\n```\n\nIf the pull request's `destination` is not specified, it will default\nto the `repository.mainbranch`. To open a pull request to a\ndifferent branch, say from a feature branch to a staging branch,\nspecify a `destination` (same format as the `source`):\n\n```\n{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"my-feature-branch\"\n }\n },\n \"destination\": {\n \"branch\": {\n \"name\": \"staging\"\n }\n }\n}\n```\n\nReviewers can be specified by adding an array of user objects as the\n`reviewers` property.\n\n```\n{\n \"title\": \"My Title\",\n \"source\": {\n \"branch\": {\n \"name\": \"my-feature-branch\"\n }\n },\n \"reviewers\": [\n {\n \"uuid\": \"{504c3b62-8120-4f0c-a7bc-87800b9d6f70}\"\n }\n ]\n}\n```\n\nOther fields:\n\n* `description` - a string\n* `close_source_branch` - boolean that specifies if the source branch should be closed upon merging", + "summary": "Create a pull request", + "responses": { + "201": { + "description": "The newly created pull request.", + "headers": { + "Location": { + "description": "The URL of new newly created pull request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest" + } + } + } + }, + "400": { + "description": "If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "If the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest" + } + } + }, + "description": "The new pull request.\n\nThe request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork).\n\nSince not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title." + }, + "security": [ + { + "oauth2": ["pullrequest:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write:pullrequest:bitbucket" + ] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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/activity": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's activity log.\n\nThis handler serves both a v20 and internal endpoint. The v20 endpoint\nreturns reviewer comments, updates, approvals and request changes. The internal\nendpoint includes those plus tasks and attachments.\n\nComments created on a file or a line of code have an inline property.\n\nComment example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"comment\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\"\n }\n },\n \"deleted\": false,\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"content\": {\n \"raw\": \"inline with to a dn from lines\",\n \"markup\": \"markdown\",\n \"html\": \"

inline with to a dn from lines

\",\n \"type\": \"rendered\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\",\n \"inline\": {\n \"context_lines\": \"\",\n \"to\": null,\n \"path\": \"\",\n \"outdated\": false,\n \"from\": 211\n },\n \"type\": \"pullrequest_comment\",\n \"id\": 118571088\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nUpdates include a state property of OPEN, MERGED, or DECLINED.\n\nUpdate example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"update\": {\n \"description\": \"\",\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\",\n \"destination\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"6a2c16e4a152\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\"\n }\n }\n },\n \"branch\": {\n \"name\": \"master\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"reason\": \"\",\n \"source\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"728c8bad1813\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\"\n }\n }\n },\n \"branch\": {\n \"name\": \"username/NONE-add-onClick-prop-for-accessibility\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"state\": \"OPEN\",\n \"author\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"date\": \"2019-05-10T06:48:25.305565+00:00\"\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nApproval example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"approval\": {\n \"date\": \"2019-09-27T00:37:19.849534+00:00\",\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n }\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```", + "summary": "List a pull request activity log", + "responses": { + "200": { + "description": "The pull request activity log" + }, + "401": { + "description": "If the repository is private and the request was not authenticated." + }, + "404": { + "description": "If the specified repository does not exist.", + "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": [ + { + "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}": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns the specified pull request.", + "summary": "Get a pull request", + "responses": { + "200": { + "description": "The pull request object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest" + } + } + } + }, + "401": { + "description": "If the repository is private and the request was not authenticated." + }, + "404": { + "description": "If the repository or pull request does not exist", + "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": "Mutates the specified pull request.\n\nThis can be used to change the pull request's branches or description.\n\nOnly open pull requests can be mutated.", + "summary": "Update a pull request", + "responses": { + "200": { + "description": "The updated pull request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest" + } + } + } + }, + "400": { + "description": "If the input document was invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "If the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository or pull request id does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest" + } + } + }, + "description": "The pull request that is to be updated." + }, + "security": [ + { + "oauth2": ["pullrequest:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write: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}/activity": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's activity log.\n\nThis handler serves both a v20 and internal endpoint. The v20 endpoint\nreturns reviewer comments, updates, approvals and request changes. The internal\nendpoint includes those plus tasks and attachments.\n\nComments created on a file or a line of code have an inline property.\n\nComment example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"comment\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088\"\n }\n },\n \"deleted\": false,\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"content\": {\n \"raw\": \"inline with to a dn from lines\",\n \"markup\": \"markdown\",\n \"html\": \"

inline with to a dn from lines

\",\n \"type\": \"rendered\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"created_on\": \"2019-09-27T00:33:46.039178+00:00\",\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"updated_on\": \"2019-09-27T00:33:46.055384+00:00\",\n \"inline\": {\n \"context_lines\": \"\",\n \"to\": null,\n \"path\": \"\",\n \"outdated\": false,\n \"from\": 211\n },\n \"type\": \"pullrequest_comment\",\n \"id\": 118571088\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nUpdates include a state property of OPEN, MERGED, or DECLINED.\n\nUpdate example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"update\": {\n \"description\": \"\",\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\",\n \"destination\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"6a2c16e4a152\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152\"\n }\n }\n },\n \"branch\": {\n \"name\": \"master\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"reason\": \"\",\n \"source\": {\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"728c8bad1813\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813\"\n }\n }\n },\n \"branch\": {\n \"name\": \"username/NONE-add-onClick-prop-for-accessibility\"\n },\n \"repository\": {\n \"name\": \"Atlaskit-MK-2\",\n \"type\": \"repository\",\n \"full_name\": \"atlassian/atlaskit-mk-2\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2\"\n },\n \"avatar\": {\n \"href\": \"https://bytebucket.org/ravatar/%7B%7D?ts=js\"\n }\n },\n \"uuid\": \"{}\"\n }\n },\n \"state\": \"OPEN\",\n \"author\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n },\n \"date\": \"2019-05-10T06:48:25.305565+00:00\"\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```\n\nApproval example:\n```\n{\n \"pagelen\": 20,\n \"values\": [\n {\n \"approval\": {\n \"date\": \"2019-09-27T00:37:19.849534+00:00\",\n \"pullrequest\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n },\n \"user\": {\n \"display_name\": \"Name Lastname\",\n \"uuid\": \"{}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/%7B%7D\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/%7B%7D/\"\n },\n \"avatar\": {\n \"href\": \"https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128\"\n }\n },\n \"type\": \"user\",\n \"nickname\": \"Name\",\n \"account_id\": \"\"\n }\n },\n \"pull_request\": {\n \"type\": \"pullrequest\",\n \"id\": 5695,\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695\"\n }\n },\n \"title\": \"username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it\"\n }\n }\n ]\n}\n```", + "summary": "List a pull request activity log", + "responses": { + "200": { + "description": "The pull request activity log" + }, + "401": { + "description": "If the repository is private and the request was not authenticated." + }, + "404": { + "description": "If the specified repository does not exist.", + "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": [ + { + "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}/approve": { + "delete": { + "tags": ["Pullrequests"], + "description": "Redact the authenticated user's approval of the specified pull\nrequest.", + "summary": "Unapprove a pull request", + "responses": { + "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": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified pull request or the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pullrequest:bitbucket"] + } + ] + }, + "post": { + "tags": ["Pullrequests"], + "description": "Approve the specified pull request as the authenticated user.", + "summary": "Approve a pull request", + "responses": { + "200": { + "description": "The `participant` object recording that the authenticated user approved the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/participant" + } + } + } + }, + "401": { + "description": "The request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified pull request or the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write: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}/comments": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's comments.\n\nThis includes both global, inline comments and replies.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more\ndetails.", + "summary": "List comments on a pull request", + "responses": { + "200": { + "description": "A paginated list of comments made on the given pull request, in chronological order.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pullrequest_comments" + } + } + } + }, + "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" + } + } + } + } + }, + "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 comment.\n\nReturns the newly created pull request comment.", + "summary": "Create a comment on a pull request", + "responses": { + "201": { + "description": "The newly created comment.", + "headers": { + "Location": { + "description": "The URL of the new comment", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest_comment" + } + } + } + }, + "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/pullrequest_comment" + } + } + }, + "description": "The comment object.", + "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}/comments/{comment_id}": { + "delete": { + "tags": ["Pullrequests"], + "description": "Deletes a specific pull request comment.", + "summary": "Delete a comment on a pull request", + "responses": { + "204": { + "description": "Successful deletion." + }, + "403": { + "description": "If the authenticated user does not have access to delete the comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the comment 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 comment.", + "summary": "Get a comment on a pull request", + "responses": { + "200": { + "description": "The comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest_comment" + } + } + } + }, + "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 comment 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 comment.", + "summary": "Update a comment on a pull request", + "responses": { + "200": { + "description": "The updated comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest_comment" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the comment does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest_comment" + } + } + }, + "description": "The contents of the updated comment.", + "required": true + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "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": [ + { + "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}/commits": { + "get": { + "tags": ["Pullrequests"], + "description": "Returns a paginated list of the pull request's commits.\n\nThese are the commits that are being merged into the destination\nbranch when the pull requests gets accepted.", + "summary": "List commits on a pull request", + "responses": { + "200": { + "description": "A paginated list of commits made on the given pull request, in chronological order. This list will be empty if the source branch no longer exists." + }, + "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 or the source branch is from a forked repository which no longer exists.", + "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": [ + { + "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}/decline": { + "post": { + "tags": ["Pullrequests"], + "description": "Declines the pull request.", + "summary": "Decline a pull request", + "responses": { + "200": { + "description": "The pull request was successfully declined.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest" + } + } + } + }, + "555": { + "description": "If the decline took too long and timed out.\nIn this case the caller should retry the request later.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write: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}/diff": { + "get": { + "tags": ["Pullrequests"], + "description": "Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get)\nwith the revspec that corresponds to the pull request.", + "summary": "List changes in a pull request", + "responses": { + "302": { + "description": "Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) with the\nrevspec that corresponds to the pull request.\n" + } + }, + "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}/diffstat": { + "get": { + "tags": ["Pullrequests"], + "description": "Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get)\nwith the revspec that corresponds to the pull request.", + "summary": "Get the diff stat for a pull request", + "responses": { + "302": { + "description": "Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get) with\nthe revspec that corresponds to pull request.\n" + } + }, + "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}/merge": { + "post": { + "tags": ["Pullrequests"], + "description": "Merges the pull request.", + "summary": "Merge a pull request", + "responses": { + "200": { + "description": "The pull request object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest" + } + } + } + }, + "202": { + "description": "In the Location header, the URL to poll for the pull request merge status" + }, + "555": { + "description": "If the merge took too long and timed out.\nIn this case the caller should retry the request later", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "async", + "in": "query", + "description": "Default value is false.\n\n\nWhen set to true, runs merge asynchronously and\nimmediately returns a 202 with polling link to\nthe task-status API in the Location header.\n\n\nWhen set to false, runs merge and waits for it to\ncomplete, returning 200 when it succeeds. If the\nduration of the merge exceeds a timeout threshold,\nthe API returns a 202 with polling link to the\ntask-status API in the Location header.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pullrequest_merge_parameters" + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write: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}/merge/task-status/{task_id}": { + "get": { + "tags": ["Pullrequests"], + "description": "When merging a pull request takes too long, the client receives a\ntask ID along with a 202 status code. The task ID can be used in a call\nto this endpoint to check the status of a merge task.\n\n```\ncurl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\n```\n\nIf the merge task is not yet finished, a PENDING status will be returned.\n\n```\nHTTP/2 200\n{\n \"task_status\": \"PENDING\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\"\n }\n }\n}\n```\n\nIf the merge was successful, a SUCCESS status will be returned.\n\n```\nHTTP/2 200\n{\n \"task_status\": \"SUCCESS\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/\"\n }\n },\n \"merge_result\": \n}\n```\n\nIf the merge task failed, an error will be returned.\n\n```\n{\n \"type\": \"error\",\n \"error\": {\n \"message\": \"\"\n }\n}\n```", + "summary": "Get the merge task status for a pull request", + "responses": { + "200": { + "description": "Returns a task status if the merge is either pending or successful, and if it is successful, a pull request" + }, + "400": { + "description": "If the provided task ID does not relate to this pull request, or if something went wrong during the merge operation" + }, + "403": { + "description": "The user making the request does not have permission to the repo and is different from the user who queued the task" + } + }, + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "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": "ID of the merge task", + "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}/patch": { + "get": { + "tags": ["Pullrequests"], + "description": "Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get)\nwith the revspec that corresponds to pull request.", + "summary": "Get the patch for a pull request", + "responses": { + "302": { + "description": "Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get) with\nthe revspec that corresponds to pull request.\n" + } + }, + "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}/request-changes": { + "delete": { + "tags": ["Pullrequests"], + "description": "", + "summary": "Remove change request for a pull request", + "responses": { + "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": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified pull request or the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:pullrequest:bitbucket"] + } + ] + }, + "post": { + "tags": ["Pullrequests"], + "description": "", + "summary": "Request changes for a pull request", + "responses": { + "200": { + "description": "The `participant` object recording that the authenticated user requested changes on the pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/participant" + } + } + } + }, + "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": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified pull request or the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pullrequest:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "read:pullrequest:bitbucket", + "write: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}/statuses": { + "get": { + "tags": ["Pullrequests", "Commit statuses"], + "description": "Returns all statuses (e.g. build results) for the given pull\nrequest.", + "summary": "List commit statuses for a pull request", + "responses": { + "200": { + "description": "A paginated list of all commit statuses for this pull request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_commitstatuses" + } + } + } + }, + "401": { + "description": "If the repository is private and the request was not authenticated." + }, + "404": { + "description": "If the specified repository or pull request does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "Query string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "Field by which the results should be sorted as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\nDefaults to `created_on`.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "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": { + "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/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/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/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/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/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": { + "204": { + "description": "An empty response." + } + }, + "operationId": "updatePullRequestHostedPropertyValue", + "summary": "Update a pull request application property", + "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "repo_slug", + "description": "The repository.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "pullrequest_id", + "description": "The pull request ID.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/application_property" + }, + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "An empty response." + } + }, + "operationId": "deletePullRequestHostedPropertyValue", + "summary": "Delete a pull request application property", + "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "repo_slug", + "description": "The repository.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "pullrequest_id", + "description": "The pull request ID.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "responses": { + "200": { + "description": "The value of the property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_property" + } + } + } + } + }, + "operationId": "getPullRequestHostedPropertyValue", + "summary": "Get a pull request application property", + "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a pull request.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "workspace", + "description": "The repository container; either the workspace slug or the UUID in curly braces.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "repo_slug", + "description": "The repository.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "pullrequest_id", + "description": "The pull request ID.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/repositories/{workspace}/{repo_slug}/refs": { + "get": { + "tags": ["Refs"], + "description": "Returns the branches and tags in the repository.\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 show-ref\". 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 refs are\nsorted [\"branch1\", \"branch10\", \"branch2\", \"v10\", \"v11\", \"v9\"] instead of [\"branch1\", \"branch2\",\n\"branch10\", \"v9\", \"v10\", \"v11\"].\n\nSorting can be changed using the ?sort= query parameter. When using ?sort=name to explicitly sort on ref name,\nBitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.", + "summary": "List branches and tags", + "responses": { + "200": { + "description": "A paginated list of refs matching any filter criteria that were provided.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_refs" + } + } + } + }, + "403": { + "description": "If the repository is private and the authenticated user does not have\naccess to it.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "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). The `name`\nfield is handled specially for refs in that, if specified as the sort field, it\nuses a natural sort order instead of the default lexicographical sort order. For example,\nit will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2'].", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/refs/branches": { + "get": { + "tags": ["Refs"], + "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": { + "description": "A paginated list of branches matching any filter criteria that were provided.", + "content": { + "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" + } + } + } + } + } + }, + "403": { + "description": "If the repository is private and the authenticated user does not have\naccess to it.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "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). The `name`\nfield is handled specially for branches in that, if specified as the sort field, it\nuses a natural sort order instead of the default lexicographical sort order. For example,\nit will return ['branch1', 'branch2', 'branch10'] instead of ['branch1', 'branch10', 'branch2'].", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "post": { + "tags": ["Refs"], + "description": "Creates a new branch in the specified repository.\n\nThe payload of the POST should consist of a JSON document that\ncontains the name of the tag and the target hash.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/branches \\\n-s -u seanfarley -X POST -H \"Content-Type: application/json\" \\\n-d '{\n \"name\" : \"smf/create-feature\",\n \"target\" : {\n \"hash\" : \"default\",\n }\n}'\n```\n\nThis call requires authentication. Private repositories require the\ncaller to authenticate with an account that has appropriate\nauthorization.\n\nThe branch name should not include any prefixes (e.g.\nrefs/heads). This endpoint does support using short hash prefixes for\nthe commit hash, but it may return a 400 response if the provided\nprefix is ambiguous. Using a full commit hash is the preferred\napproach.", + "summary": "Create a branch", + "responses": { + "201": { + "description": "The newly created branch object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/branch" + } + } + } + }, + "403": { + "description": "If the repository is private and the authenticated user does not have\naccess to it.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or branch does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "write:repository:bitbucket", + "read:repository:bitbucket" + ] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/refs/branches/{name}": { + "delete": { + "tags": ["Refs"], + "description": "Delete a branch in the specified repository.\n\nThe main branch is not allowed to be deleted and will return a 400\nresponse.\n\nThe branch name should not include any prefixes (e.g.\nrefs/heads).", + "summary": "Delete a branch", + "responses": { + "204": { + "description": "Indicates that the specified branch was successfully deleted." + }, + "403": { + "description": "If the repository is private and the authenticated user does not have\naccess to it.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or branch does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "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\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": { + "description": "The branch object.", + "content": { + "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" + } + } + } + } + } + } + }, + "403": { + "description": "If the repository is private and the authenticated user does not have\naccess to it.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or branch does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "The name of the branch.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/refs/tags": { + "get": { + "tags": ["Refs"], + "description": "Returns the tags in the repository.\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 tag --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 ?sort= query parameter. When using ?sort=name to explicitly sort on ref name,\nBitbucket will apply natural sorting and interpret numerical values as numbers instead of strings.", + "summary": "List tags", + "responses": { + "200": { + "description": "A paginated list of tags matching any filter criteria that were provided.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_tags" + } + } + } + }, + "403": { + "description": "If the repository is private and the authenticated user does not have\naccess to it.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "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). The `name`\nfield is handled specially for tags in that, if specified as the sort field, it\nuses a natural sort order instead of the default lexicographical sort order. For example,\nit will return ['1.1', '1.2', '1.10'] instead of ['1.1', '1.10', '1.2'].", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "post": { + "tags": ["Refs"], + "description": "Creates a new tag in the specified repository.\n\nThe payload of the POST should consist of a JSON document that\ncontains the name of the tag and the target hash.\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/jdoe/myrepo/refs/tags \\\n-s -u jdoe -X POST -H \"Content-Type: application/json\" \\\n-d '{\n \"name\" : \"new-tag-name\",\n \"target\" : {\n \"hash\" : \"a1b2c3d4e5f6\",\n }\n}'\n```\n\nThis endpoint does support using short hash prefixes for the commit\nhash, but it may return a 400 response if the provided prefix is\nambiguous. Using a full commit hash is the preferred approach.", + "summary": "Create a tag", + "responses": { + "201": { + "description": "The newly created tag.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag" + } + } + } + }, + "400": { + "description": "If the target hash is missing, ambiguous, or invalid, or if the name is not provided.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag" + } + } + }, + "required": true + }, + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": [ + "write:repository:bitbucket", + "read:repository:bitbucket" + ] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/refs/tags/{name}": { + "delete": { + "tags": ["Refs"], + "description": "Delete a tag in the specified repository.\n\nThe tag name should not include any prefixes (e.g. refs/tags).", + "summary": "Delete a tag", + "responses": { + "204": { + "description": "Indicates the specified tag was successfully deleted." + }, + "403": { + "description": "If the repository is private and the authenticated user does not have\naccess to it.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or tag does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } + ] + }, + "get": { + "tags": ["Refs"], + "description": "Returns the specified tag.\n\n```\n$ curl -s https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8 -G | jq .\n{\n \"name\": \"3.8\",\n \"links\": {\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commits/3.8\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/refs/tags/3.8\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/commits/tag/3.8\"\n }\n },\n \"tagger\": {\n \"raw\": \"Matt Mackall \",\n \"type\": \"author\",\n \"user\": {\n \"username\": \"mpmselenic\",\n \"nickname\": \"mpmselenic\",\n \"display_name\": \"Matt Mackall\",\n \"type\": \"user\",\n \"uuid\": \"{a4934530-db4c-419c-a478-9ab4964c2ee7}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/mpmselenic\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/mpmselenic/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/mpmselenic/avatar/32/\"\n }\n }\n }\n },\n \"date\": \"2016-05-01T18:52:25+00:00\",\n \"message\": \"Added tag 3.8 for changeset f85de28eae32\",\n \"type\": \"tag\",\n \"target\": {\n \"hash\": \"f85de28eae32e7d3064b1a1321309071bbaaa069\",\n \"repository\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/avatar/32/\"\n }\n },\n \"type\": \"repository\",\n \"name\": \"hg\",\n \"full_name\": \"seanfarley/hg\",\n \"uuid\": \"{c75687fb-e99d-4579-9087-190dbd406d30}\"\n },\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/comments\"\n },\n \"patch\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/patch/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/commits/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"diff\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/diff/f85de28eae32e7d3064b1a1321309071bbaaa069\"\n },\n \"approve\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/approve\"\n },\n \"statuses\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/f85de28eae32e7d3064b1a1321309071bbaaa069/statuses\"\n }\n },\n \"author\": {\n \"raw\": \"Sean Farley \",\n \"type\": \"author\",\n \"user\": {\n \"username\": \"seanfarley\",\n \"nickname\": \"seanfarley\",\n \"display_name\": \"Sean Farley\",\n \"type\": \"user\",\n \"uuid\": \"{a295f8a8-5876-4d43-89b5-3ad8c6c3c51d}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/seanfarley\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/seanfarley/avatar/32/\"\n }\n }\n }\n },\n \"parents\": [\n {\n \"hash\": \"9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\",\n \"type\": \"commit\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/seanfarley/hg/commit/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/seanfarley/hg/commits/9a98d0e5b07fc60887f9d3d34d9ac7d536f470d2\"\n }\n }\n }\n ],\n \"date\": \"2016-05-01T04:21:17+00:00\",\n \"message\": \"debian: alphabetize build deps\",\n \"type\": \"commit\"\n }\n}\n```", + "summary": "Get a tag", + "responses": { + "200": { + "description": "The tag object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/tag" + } + } + } + }, + "403": { + "description": "If the repository is private and the authenticated user does not have\naccess to it.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "The specified repository or tag does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "name", + "in": "path", + "description": "The name of the tag.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/src": { + "get": { + "tags": ["Source", "Repositories"], + "description": "This endpoint redirects the client to the directory listing of the\nroot directory on the main branch.\n\nThis is equivalent to directly hitting\n[/2.0/repositories/{username}/{repo_slug}/src/{commit}/{path}](src/%7Bcommit%7D/%7Bpath%7D)\nwithout having to know the name or SHA1 of the repo's main branch.\n\nTo create new commits, [POST to this endpoint](#post)", + "summary": "Get the root directory of the main branch", + "responses": { + "200": { + "description": "If the path matches a file, then the raw contents of the file are\nreturned (unless the `format=meta` query parameter was provided,\nin which case a json document containing the file's meta data is\nreturned). If the path matches a directory, then a paginated\nlist of file and directory entries is returned (if the\n`format=meta` query parameter was provided, then the json document\ncontaining the directory's meta data is returned).\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_treeentries" + } + } + } + }, + "404": { + "description": "If the path or commit in the URL does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "format", + "in": "query", + "description": "Instead of returning the file's contents, return the (json) meta data for it.", + "required": false, + "schema": { + "type": "string", + "enum": ["meta"] + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "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\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": { + "description": "\n" + }, + "403": { + "description": "If the authenticated user does not have write or admin access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the repository does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "message", + "in": "query", + "description": "The commit message. When omitted, Bitbucket uses a canned string.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "author", + "in": "query", + "description": "\nThe raw string to be used as the new commit's author.\nThis string follows the format\n`Erik van Zijst `.\n\nWhen omitted, Bitbucket uses the authenticated user's\nfull/display name and primary email address. Commits cannot\nbe created anonymously.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "parents", + "in": "query", + "description": "\nA comma-separated list of SHA1s of the commits that should\nbe the parents of the newly created commit.\n\nWhen omitted, the new commit will inherit from and become\na child of the main branch's tip/HEAD commit.\n\nWhen more than one SHA1 is provided, the first SHA1\nidentifies the commit from which the content will be\ninherited.\".", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "files", + "in": "query", + "description": "\nOptional field that declares the files that the request is\nmanipulating. When adding a new file to a repo, or when\noverwriting an existing file, the client can just upload\nthe full contents of the file in a normal form field and\nthe use of this `files` meta data field is redundant.\nHowever, when the `files` field contains a file path that\ndoes not have a corresponding, identically-named form\nfield, then Bitbucket interprets that as the client wanting\nto replace the named file with the null set and the file is\ndeleted instead.\n\nPaths in the repo that are referenced in neither files nor\nan individual file field, remain unchanged and carry over\nfrom the parent to the new commit.\n\nThis API does not support renaming as an explicit feature.\nTo rename a file, simply delete it and recreate it under\nthe new name in the same commit.\n", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "branch", + "in": "query", + "description": "\nThe name of the branch that the new commit should be\ncreated on. When omitted, the commit will be created on top\nof the main branch and will become the main branch's new\nhead.\n\nWhen a branch name is provided that already exists in the\nrepo, then the commit will be created on top of that\nbranch. In this case, *if* a parent SHA1 was also provided,\nthen it is asserted that the parent is the branch's\ntip/HEAD at the time the request is made. When this is not\nthe case, a 409 is returned.\n\nWhen a new branch name is specified (that does not already\nexist in the repo), and no parent SHA1s are provided, then\nthe new commit will inherit from the current main branch's\ntip/HEAD commit, but not advance the main branch. The new\ncommit will be the new branch. When the request *also*\nspecifies a parent SHA1, then the new commit and branch\nare created directly on top of the parent commit,\nregardless of the state of the main branch.\n\nWhen a branch name is not specified, but a parent SHA1 is\nprovided, then Bitbucket asserts that it represents the\nmain branch's current HEAD/tip, or a 409 is returned.\n\nWhen a branch name is not specified and the repo is empty,\nthe new commit will become the repo's root commit and will\nbe on the main branch.\n\nWhen a branch name is specified and the repo is empty, the\nnew commit will become the repo's root commit and also\ndefine the repo's main branch going forward.\n\nThis API cannot be used to create additional root commits\nin non-empty repos.\n\nThe branch field cannot be repeated.\n\nAs a side effect, this API can be used to create a new\nbranch without modifying any files, by specifying a new\nbranch name in this field, together with `parents`, but\nomitting the `files` fields, while not sending any files.\nThis will create a new commit and branch with the same\ncontents as the first parent. The diff of this commit\nagainst its first parent will be empty.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["write:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/src/{commit}/{path}": { + "get": { + "tags": ["Source", "Repositories"], + "description": "This endpoints is used to retrieve the contents of a single file,\nor the contents of a directory at a specified revision.\n\n#### Raw file contents\n\nWhen `path` points to a file, this endpoint returns the raw contents.\nThe response's Content-Type is derived from the filename\nextension (not from the contents). The file contents are not processed\nand no character encoding/recoding is performed and as a result no\ncharacter encoding is included as part of the Content-Type.\n\nThe `Content-Disposition` header will be \"attachment\" to prevent\nbrowsers from running executable files.\n\nIf the file is managed by LFS, then a 301 redirect pointing to\nAtlassian's media services platform is returned.\n\nThe response includes an ETag that is based on the contents of the file\nand its attributes. This means that an empty `__init__.py` always\nreturns the same ETag, regardless on the directory it lives in, or the\ncommit it is on.\n\n#### File meta data\n\nWhen the request for a file path includes the query parameter\n`?format=meta`, instead of returning the file's raw contents, Bitbucket\ninstead returns the JSON object describing the file's properties:\n\n```javascript\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests/__init__.py?format=meta\n{\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta\"\n }\n },\n \"path\": \"tests/__init__.py\",\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"eefd5ef5d3df01aed629f650959d6706d54cd335\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n }\n }\n },\n \"attributes\": [],\n \"type\": \"commit_file\",\n \"size\": 0\n}\n```\n\nFile objects contain an `attributes` element that contains a list of\npossible modifiers. Currently defined values are:\n\n* `link` -- indicates that the entry is a symbolic link. The contents\n of the file represent the path the link points to.\n* `executable` -- indicates that the file has the executable bit set.\n* `subrepository` -- indicates that the entry points to a submodule or\n subrepo. The contents of the file is the SHA1 of the repository\n pointed to.\n* `binary` -- indicates whether Bitbucket thinks the file is binary.\n\nThis endpoint can provide an alternative to how a HEAD request can be\nused to check for the existence of a file, or a file's size without\nincurring the overhead of receiving its full contents.\n\n\n#### Directory listings\n\nWhen `path` points to a directory instead of a file, the response is a\npaginated list of directory and file objects in the same order as the\nunderlying SCM system would return them.\n\nFor example:\n\n```javascript\n$ curl https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef/tests\n{\n \"pagelen\": 10,\n \"values\": [\n {\n \"path\": \"tests/test_project\",\n \"type\": \"commit_directory\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta\"\n }\n },\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"eefd5ef5d3df01aed629f650959d6706d54cd335\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n }\n }\n }\n },\n {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/__init__.py?format=meta\"\n }\n },\n \"path\": \"tests/__init__.py\",\n \"commit\": {\n \"type\": \"commit\",\n \"hash\": \"eefd5ef5d3df01aed629f650959d6706d54cd335\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/commit/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/atlassian/bbql/commits/eefd5ef5d3df01aed629f650959d6706d54cd335\"\n }\n }\n },\n \"attributes\": [],\n \"type\": \"commit_file\",\n \"size\": 0\n }\n ],\n \"page\": 1,\n \"size\": 2\n}\n```\n\nWhen listing the contents of the repo's root directory, the use of a\ntrailing slash at the end of the URL is required.\n\nThe response by default is not recursive, meaning that only the direct contents of\na path are returned. The response does not recurse down into\nsubdirectories. In order to \"walk\" the entire directory tree, the\nclient can either parse each response and follow the `self` links of each\n`commit_directory` object, or can specify a `max_depth` to recurse to.\n\nThe max_depth parameter will do a breadth-first search to return the contents of the subdirectories\nup to the depth specified. Breadth-first search was chosen as it leads to the least amount of\nfile system operations for git. If the `max_depth` parameter is specified to be too\nlarge, the call will time out and return a 555.\n\nEach returned object is either a `commit_file`, or a `commit_directory`,\nboth of which contain a `path` element. This path is the absolute path\nfrom the root of the repository. Each object also contains a `commit`\nobject which embeds the commit the file is on. Note that this is merely\nthe commit that was used in the URL. It is *not* the commit that last\nmodified the file.\n\nDirectory objects have 2 representations. Their `self` link returns the\npaginated contents of the directory. The `meta` link on the other hand\nreturns the actual `directory` object itself, e.g.:\n\n```javascript\n{\n \"path\": \"tests/test_project\",\n \"type\": \"commit_directory\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/\"\n },\n \"meta\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/atlassian/bbql/src/eefd5ef5d3df01aed629f650959d6706d54cd335/tests/test_project/?format=meta\"\n }\n },\n \"commit\": { ... }\n}\n```\n\n#### Querying, filtering and sorting\n\nLike most API endpoints, this API supports the Bitbucket\nquerying/filtering syntax and so you could filter a directory listing\nto only include entries that match certain criteria. For instance, to\nlist all binary files over 1kb use the expression:\n\n`size > 1024 and attributes = \"binary\"`\n\nwhich after urlencoding yields the query string:\n\n`?q=size%3E1024+and+attributes%3D%22binary%22`\n\nTo change the ordering of the response, use the `?sort` parameter:\n\n`.../src/eefd5ef/?sort=-size`\n\nSee [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more\ndetails.", + "summary": "Get file or directory contents", + "responses": { + "200": { + "description": "If the path matches a file, then the raw contents of the file are\nreturned. If the `format=meta` query parameter is provided,\na json document containing the file's meta data is\nreturned. If the `format=rendered` query parameter is provided,\nthe contents of the file in HTML-formated rendered markup is returned.\nIf the path matches a directory, then a paginated\nlist of file and directory entries is returned (if the\n`format=meta` query parameter was provided, then the json document\ncontaining the directory's meta data is returned.)\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_treeentries" + } + } + } + }, + "404": { + "description": "If the path or commit in the URL does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "555": { + "description": "If the call times out, possibly because the specified recursion depth is too large.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "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. 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", + "enum": ["meta", "rendered"] + } + }, + { + "name": "q", + "in": "query", + "description": "Optional filter expression as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "Optional sorting parameter as per [filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "max_depth", + "in": "query", + "description": "If provided, returns the contents of the repository and its subdirectories recursively until the specified max_depth of nested directories. When omitted, this defaults to 1.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "commit", + "in": "path", + "description": "The commit's SHA1.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "path", + "description": "Path to the file.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/versions": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns the versions that have been defined in the issue tracker.\n\nThis resource is only available on repositories that have the issue\ntracker enabled.", + "summary": "List defined versions for issues", + "responses": { + "200": { + "description": "The versions that have been defined in the issue tracker.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_versions" + } + } + } + }, + "404": { + "description": "The specified repository does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/versions/{version_id}": { + "get": { + "tags": ["Issue tracker"], + "description": "Returns the specified issue tracker version object.", + "summary": "Get a defined version for issues", + "responses": { + "200": { + "description": "The specified version object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/version" + } + } + } + }, + "404": { + "description": "The specified repository or version does not exist or does not have the issue tracker enabled.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["issue"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "version_id", + "in": "path", + "description": "The version's id", + "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}/watchers": { + "get": { + "tags": ["Repositories"], + "description": "Returns a paginated list of all the watchers on the specified\nrepository.", + "summary": "List repositories watchers", + "responses": { + "200": { + "description": "A paginated list of all the watchers on the specified repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_accounts" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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" + } + } + ] + }, + "/snippets": { + "get": { + "tags": ["Snippets"], + "description": "Returns all snippets. Like pull requests, repositories and workspaces, the\nfull set of snippets is defined by what the current user has access to.\n\nThis includes all snippets owned by any of the workspaces the user is a member of,\nor snippets by other users that the current user is either watching or has collaborated\non (for instance by commenting on it).\n\nTo limit the set of returned snippets, apply the\n`?role=[owner|contributor|member]` query parameter where the roles are\ndefined as follows:\n\n* `owner`: all snippets owned by the current user\n* `contributor`: all snippets owned by, or watched by the current user\n* `member`: created in a workspaces or watched by the current user\n\nWhen no role is specified, all public snippets are returned, as well as all\nprivately owned snippets watched or commented on.\n\nThe returned response is a normal paginated JSON list. This endpoint\nonly supports `application/json` responses and no\n`multipart/form-data` or `multipart/related`. As a result, it is not\npossible to include the file contents.", + "summary": "List snippets", + "responses": { + "200": { + "description": "A paginated list of snippets.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_snippets" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "role", + "in": "query", + "description": "Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).", + "required": false, + "schema": { + "type": "string", + "enum": ["owner", "contributor", "member"] + } + } + ], + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Snippets"], + "description": "Creates a new snippet under the authenticated user's account.\n\nSnippets can contain multiple files. Both text and binary files are\nsupported.\n\nThe simplest way to create a new snippet from a local file:\n\n $ curl -u username:password -X POST https://api.bitbucket.org/2.0/snippets -F file=@image.png\n\nCreating snippets through curl has a few limitations and so let's look\nat a more complicated scenario.\n\nSnippets are created with a multipart POST. Both `multipart/form-data`\nand `multipart/related` are supported. Both allow the creation of\nsnippets with both meta data (title, etc), as well as multiple text\nand binary files.\n\nThe main difference is that `multipart/related` can use rich encoding\nfor the meta data (currently JSON).\n\n\nmultipart/related (RFC-2387)\n----------------------------\n\nThis is the most advanced and efficient way to create a paste.\n\n POST /2.0/snippets/evzijst HTTP/1.1\n Content-Length: 1188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My snippet\",\n \"is_private\": true,\n \"scm\": \"git\",\n \"files\": {\n \"foo.txt\": {},\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nThe request contains multiple parts and is structured as follows.\n\nThe first part is the JSON document that describes the snippet's\nproperties or meta data. It either has to be the first part, or the\nrequest's `Content-Type` header must contain the `start` parameter to\npoint to it.\n\nThe remaining parts are the files of which there can be zero or more.\nEach file part should contain the `Content-ID` MIME header through\nwhich the JSON meta data's `files` element addresses it. The value\nshould be the name of the file.\n\n`Content-Disposition` is an optional MIME header. The header's\noptional `filename` parameter can be used to specify the file name\nthat Bitbucket should use when writing the file to disk. When present,\n`filename` takes precedence over the value of `Content-ID`.\n\nWhen the JSON body omits the `files` element, the remaining parts are\nnot ignored. Instead, each file is added to the new snippet as if its\nname was explicitly linked (the use of the `files` elements is\nmandatory for some operations like deleting or renaming files).\n\n\nmultipart/form-data\n-------------------\n\nThe use of JSON for the snippet's meta data is optional. Meta data can\nalso be supplied as regular form fields in a more conventional\n`multipart/form-data` request:\n\n $ curl -X POST -u credentials https://api.bitbucket.org/2.0/snippets -F title=\"My snippet\" -F file=@foo.txt -F file=@image.png\n\n POST /2.0/snippets HTTP/1.1\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"image.png\"\n Content-Type: application/octet-stream\n\n ?PNG\n\n IHDR?1??I.....\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My snippet\n ------------------------------63a4b224c59f--\n\nHere the meta data properties are included as flat, top-level form\nfields. The file attachments use the `file` field name. To attach\nmultiple files, simply repeat the field.\n\nThe advantage of `multipart/form-data` over `multipart/related` is\nthat it can be easier to build clients.\n\nEssentially all properties are optional, `title` and `files` included.\n\n\nSharing and Visibility\n----------------------\n\nSnippets can be either public (visible to anyone on Bitbucket, as well\nas anonymous users), or private (visible only to members of the workspace).\nThis is controlled through the snippet's `is_private` element:\n\n* **is_private=false** -- everyone, including anonymous users can view\n the snippet\n* **is_private=true** -- only workspace members can view the snippet\n\nTo create the snippet under a workspace, just append the workspace ID\nto the URL. See [`/2.0/snippets/{workspace}`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-workspace-post).", + "summary": "Create a snippet", + "responses": { + "201": { + "description": "The newly created snippet object.", + "headers": { + "Location": { + "description": "The URL of the newly created snippet.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/snippet" + }, + "security": [ + { + "oauth2": ["snippet:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/snippets/{workspace}": { + "get": { + "tags": ["Snippets"], + "description": "Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-get), except that the result is further filtered\nby the snippet owner and only those that are owned by `{workspace}` are\nreturned.", + "summary": "List snippets in a workspace", + "responses": { + "200": { + "description": "A paginated list of snippets.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_snippets" + } + } + } + }, + "404": { + "description": "If the user does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "role", + "in": "query", + "description": "Filter down the result based on the authenticated user's role (`owner`, `contributor`, or `member`).", + "required": false, + "schema": { + "type": "string", + "enum": ["owner", "contributor", "member"] + } + } + ], + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Snippets"], + "description": "Identical to [`/snippets`](/cloud/bitbucket/rest/api-group-snippets/#api-snippets-post), except that the new snippet will be\ncreated under the workspace specified in the path parameter\n`{workspace}`.", + "summary": "Create a snippet for a workspace", + "responses": { + "201": { + "description": "The newly created snippet object.", + "headers": { + "Location": { + "description": "The URL of the newly created snippet.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have permission to create snippets in the specified workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/snippet" + }, + "security": [ + { + "oauth2": ["snippet:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}": { + "delete": { + "tags": ["Snippets"], + "description": "Deletes a snippet and returns an empty response.", + "summary": "Delete a snippet", + "responses": { + "204": { + "description": "If the snippet was deleted successfully." + }, + "401": { + "description": "If the snippet is private and the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If authenticated user does not have permission to delete the private snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Snippets"], + "description": "Retrieves a single snippet.\n\nSnippets support multiple content types:\n\n* application/json\n* multipart/related\n* multipart/form-data\n\n\napplication/json\n----------------\n\nThe default content type of the response is `application/json`.\nSince JSON is always `utf-8`, it cannot reliably contain file contents\nfor files that are not text. Therefore, JSON snippet documents only\ncontain the filename and links to the file contents.\n\nThis means that in order to retrieve all parts of a snippet, N+1\nrequests need to be made (where N is the number of files in the\nsnippet).\n\n\nmultipart/related\n-----------------\n\nTo retrieve an entire snippet in a single response, use the\n`Accept: multipart/related` HTTP request header.\n\n $ curl -H \"Accept: multipart/related\" https://api.bitbucket.org/2.0/snippets/evzijst/1\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 2214\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj\"\n },\n \"comments\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/comments\"\n },\n \"watchers\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/watchers\"\n },\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/commits\"\n }\n },\n \"id\": kypj,\n \"title\": \"My snippet\",\n \"created_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"updated_on\": \"2014-12-29T22:22:04.790331+00:00\",\n \"is_private\": false,\n \"files\": {\n \"foo.txt\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/foo.txt\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#file-foo.txt\"\n }\n }\n },\n \"image.png\": {\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/evzijst/kypj/files/367ab19/image.png\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/snippets/evzijst/kypj#file-image.png\"\n }\n }\n }\n ],\n \"owner\": {\n \"username\": \"evzijst\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\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-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n },\n \"creator\": {\n \"username\": \"evzijst\",\n \"nickname\": \"evzijst\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{d301aafa-d676-4ee0-88be-962be7417567}\",\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-staging-assetroot.s3.amazonaws.com/c/photos/2013/Jul/31/erik-avatar-725122544-0_avatar.png\"\n }\n }\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n foo\n\n --===============1438169132528273974==\n Content-Type: image/png\n MIME-Version: 1.0\n Content-Transfer-Encoding: base64\n Content-ID: \"image.png\"\n Content-Disposition: attachment; filename=\"image.png\"\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n --===============1438169132528273974==--\n\nmultipart/form-data\n-------------------\n\nAs with creating new snippets, `multipart/form-data` can be used as an\nalternative to `multipart/related`. However, the inherently flat\nstructure of form-data means that only basic, root-level properties\ncan be returned, while nested elements like `links` are omitted:\n\n $ curl -H \"Accept: multipart/form-data\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj\n\nResponse:\n\n HTTP/1.1 200 OK\n Content-Length: 951\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n Content-Type: text/plain; charset=\"utf-8\"\n\n My snippet\n ------------------------------63a4b224c59f--\n Content-Disposition: attachment; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: attachment; name=\"file\"; filename=\"image.png\"\n Content-Transfer-Encoding: base64\n Content-Type: application/octet-stream\n\n iVBORw0KGgoAAAANSUhEUgAAABQAAAAoCAYAAAD+MdrbAAABD0lEQVR4Ae3VMUoDQRTG8ccUaW2m\n TKONFxArJYJamCvkCnZTaa+VnQdJSBFl2SMsLFrEWNjZBZs0JgiL/+KrhhVmJRbCLPx4O+/DT2TB\n cbblJxf+UWFVVRNsEGAtgvJxnLm2H+A5RQ93uIl+3632PZyl/skjfOn9Gvdwmlcw5aPUwimG+NT5\n EnNN036IaZePUuIcK533NVfal7/5yjWeot2z9ta1cAczHEf7I+3J0ws9Cgx0fsOFpmlfwKcWPuBQ\n 73Oc4FHzBaZ8llq4q1mr5B2mOUCt815qYR8eB1hG2VJ7j35q4RofaH7IG+Xrf/PfJhfmwtfFYoIN\n AqxFUD6OMxcvkO+UfKfkOyXfKdsv/AYCHMLVkHAFWgAAAABJRU5ErkJggg==\n ------------------------------5957323a6b76--", + "summary": "Get a snippet", + "responses": { + "200": { + "description": "The snippet object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + } + } + }, + "401": { + "description": "If the snippet is private and the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If authenticated user does not have access to the private snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "410": { + "description": "If the snippet marked as spam.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Snippets"], + "description": "Used to update a snippet. Use this to add and delete files and to\nchange a snippet's title.\n\nTo update a snippet, one can either PUT a full snapshot, or only the\nparts that need to be changed.\n\nThe contract for PUT on this API is that properties missing from the\nrequest remain untouched so that snippets can be efficiently\nmanipulated with differential payloads.\n\nTo delete a property (e.g. the title, or a file), include its name in\nthe request, but omit its value (use `null`).\n\nAs in Git, explicit renaming of files is not supported. Instead, to\nrename a file, delete it and add it again under another name. This can\nbe done atomically in a single request. Rename detection is left to\nthe SCM.\n\nPUT supports three different content types for both request and\nresponse bodies:\n\n* `application/json`\n* `multipart/related`\n* `multipart/form-data`\n\nThe content type used for the request body can be different than that\nused for the response. Content types are specified using standard HTTP\nheaders.\n\nUse the `Content-Type` and `Accept` headers to select the desired\nrequest and response format.\n\n\napplication/json\n----------------\n\nAs with creation and retrieval, the content type determines what\nproperties can be manipulated. `application/json` does not support\nfile contents and is therefore limited to a snippet's meta data.\n\nTo update the title, without changing any of its files:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": \"Updated title\"}'\n\n\nTo delete the title:\n\n $ curl -X POST -H \"Content-Type: application/json\" https://api.bitbucket.org/2.0/snippets/evzijst/kypj -d '{\"title\": null}'\n\nNot all parts of a snippet can be manipulated. The owner and creator\nfor instance are immutable.\n\n\nmultipart/related\n-----------------\n\n`multipart/related` can be used to manipulate all of a snippet's\nproperties. The body is identical to a POST. properties omitted from\nthe request are left unchanged. Since the `start` part contains JSON,\nthe mechanism for manipulating the snippet's meta data is identical\nto `application/json` requests.\n\nTo update one of a snippet's file contents, while also changing its\ntitle:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 288\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"title\": \"My updated snippet\",\n \"files\": {\n \"foo.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"foo.txt\"\n Content-Disposition: attachment; filename=\"foo.txt\"\n\n Updated file contents.\n\n --===============1438169132528273974==--\n\nHere only the parts that are changed are included in the body. The\nother files remain untouched.\n\nNote the use of the `files` list in the JSON part. This list contains\nthe files that are being manipulated. This list should have\ncorresponding multiparts in the request that contain the new contents\nof these files.\n\nIf a filename in the `files` list does not have a corresponding part,\nit will be deleted from the snippet, as shown below:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 188\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"image.png\": {}\n }\n }\n\n --===============1438169132528273974==--\n\nTo simulate a rename, delete a file and add the same file under\nanother name:\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 212\n Content-Type: multipart/related; start=\"snippet\"; boundary=\"===============1438169132528273974==\"\n MIME-Version: 1.0\n\n --===============1438169132528273974==\n Content-Type: application/json; charset=\"utf-8\"\n MIME-Version: 1.0\n Content-ID: snippet\n\n {\n \"files\": {\n \"foo.txt\": {},\n \"bar.txt\": {}\n }\n }\n\n --===============1438169132528273974==\n Content-Type: text/plain; charset=\"us-ascii\"\n MIME-Version: 1.0\n Content-Transfer-Encoding: 7bit\n Content-ID: \"bar.txt\"\n Content-Disposition: attachment; filename=\"bar.txt\"\n\n foo\n\n --===============1438169132528273974==--\n\n\nmultipart/form-data\n-----------------\n\nAgain, one can also use `multipart/form-data` to manipulate file\ncontents and meta data atomically.\n\n $ curl -X PUT http://localhost:12345/2.0/snippets/evzijst/kypj -F title=\"My updated snippet\" -F file=@foo.txt\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 351\n Content-Type: multipart/form-data; boundary=----------------------------63a4b224c59f\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"file\"; filename=\"foo.txt\"\n Content-Type: text/plain\n\n foo\n\n ------------------------------63a4b224c59f\n Content-Disposition: form-data; name=\"title\"\n\n My updated snippet\n ------------------------------63a4b224c59f\n\nTo delete a file, omit its contents while including its name in the\n`files` field:\n\n $ curl -X PUT https://api.bitbucket.org/2.0/snippets/evzijst/kypj -F files=image.png\n\n PUT /2.0/snippets/evzijst/kypj HTTP/1.1\n Content-Length: 149\n Content-Type: multipart/form-data; boundary=----------------------------ef8871065a86\n\n ------------------------------ef8871065a86\n Content-Disposition: form-data; name=\"files\"\n\n image.png\n ------------------------------ef8871065a86--\n\nThe explicit use of the `files` element in `multipart/related` and\n`multipart/form-data` is only required when deleting files.\nThe default mode of operation is for file parts to be processed,\nregardless of whether or not they are listed in `files`, as a\nconvenience to the client.", + "summary": "Update a snippet", + "responses": { + "200": { + "description": "The updated snippet object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + } + } + }, + "401": { + "description": "If the snippet is private and the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If authenticated user does not have permission to update the private snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/comments": { + "get": { + "tags": ["Snippets"], + "description": "Used to retrieve a paginated list of all comments for a specific\nsnippet.\n\nThis resource works identical to commit and pull request comments.\n\nThe default sorting is oldest to newest and can be overridden with\nthe `sort` query parameter.", + "summary": "List comments on a snippet", + "responses": { + "200": { + "description": "A paginated list of snippet comments, ordered by creation date.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_snippet_comments" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Snippets"], + "description": "Creates a new comment.\n\nThe only required field in the body is `content.raw`.\n\nTo create a threaded reply to an existing comment, include `parent.id`.", + "summary": "Create a comment on a snippet", + "responses": { + "201": { + "description": "The newly created comment.", + "headers": { + "Location": { + "description": "The URL of the new comment", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet_comment" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet_comment" + } + } + }, + "description": "The contents of the new comment.", + "required": true + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/comments/{comment_id}": { + "delete": { + "tags": ["Snippets"], + "description": "Deletes a snippet comment.\n\nComments can only be removed by the comment author, snippet creator, or workspace admin.", + "summary": "Delete a comment on a snippet", + "responses": { + "204": { + "description": "Indicates the comment was deleted successfully." + }, + "403": { + "description": "If the authenticated user is not the author of the comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the comment or the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Snippets"], + "description": "Returns the specific snippet comment.", + "summary": "Get a comment on a snippet", + "responses": { + "200": { + "description": "The specified comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet_comment" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the comment or snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Snippets"], + "description": "Updates a comment.\n\nThe only required field in the body is `content.raw`.\n\nComments can only be updated by their author.", + "summary": "Update a comment on a snippet", + "responses": { + "200": { + "description": "The updated comment object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet_comment" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the comment or snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet_comment" + } + } + }, + "description": "The contents to update the comment to.", + "required": true + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "comment_id", + "in": "path", + "description": "The id of the comment.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/commits": { + "get": { + "tags": ["Snippets"], + "description": "Returns the changes (commits) made on this snippet.", + "summary": "List snippet changes", + "responses": { + "200": { + "description": "The paginated list of snippet commits.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_snippet_commit" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/commits/{revision}": { + "get": { + "tags": ["Snippets"], + "description": "Returns the changes made on this snippet in this commit.", + "summary": "Get a previous snippet change", + "responses": { + "200": { + "description": "The specified snippet commit.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet_commit" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the commit or the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "revision", + "in": "path", + "description": "The commit's SHA1.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/files/{path}": { + "get": { + "tags": ["Snippets"], + "description": "Convenience resource for getting to a snippet's raw files without the\nneed for first having to retrieve the snippet itself and having to pull\nout the versioned file links.", + "summary": "Get a snippet's raw file at HEAD", + "responses": { + "302": { + "description": "A redirect to the most recent revision of the specified file.", + "headers": { + "Location": { + "description": "The URL of the most recent file revision.", + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "path", + "description": "Path to the file.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/watch": { + "delete": { + "tags": ["Snippets"], + "description": "Used to stop watching a specific snippet. Returns 204 (No Content)\nto indicate success.", + "summary": "Stop watching a snippet", + "responses": { + "204": { + "description": "Indicates the user stopped watching the snippet successfully." + }, + "401": { + "description": "If the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Snippets"], + "description": "Used to check if the current user is watching a specific snippet.\n\nReturns 204 (No Content) if the user is watching the snippet and 404 if\nnot.\n\nHitting this endpoint anonymously always returns a 404.", + "summary": "Check if the current user is watching a snippet", + "responses": { + "204": { + "description": "If the authenticated user is watching the snippet." + }, + "404": { + "description": "If the snippet does not exist, or if the authenticated user is not watching the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Snippets"], + "description": "Used to start watching a specific snippet. Returns 204 (No Content).", + "summary": "Watch a snippet", + "responses": { + "204": { + "description": "Indicates the authenticated user is now watching the snippet." + }, + "401": { + "description": "If the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/watchers": { + "get": { + "tags": ["Snippets"], + "description": "Returns a paginated list of all users watching a specific snippet.", + "summary": "List users watching a snippet", + "responses": { + "200": { + "description": "The paginated list of users watching this snippet", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_accounts" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "deprecated": true + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/{node_id}": { + "delete": { + "tags": ["Snippets"], + "description": "Deletes the snippet.\n\nNote that this only works for versioned URLs that point to the latest\ncommit of the snippet. Pointing to an older commit results in a 405\nstatus code.\n\nTo delete a snippet, regardless of whether or not concurrent changes\nare being made to it, use `DELETE /snippets/{encoded_id}` instead.", + "summary": "Delete a previous revision of a snippet", + "responses": { + "204": { + "description": "If the snippet was deleted successfully." + }, + "401": { + "description": "If the snippet is private and the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If authenticated user does not have permission to delete the private snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "405": { + "description": "If `{node_id}` is not the latest revision.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Snippets"], + "description": "Identical to `GET /snippets/encoded_id`, except that this endpoint\ncan be used to retrieve the contents of the snippet as it was at an\nolder revision, while `/snippets/encoded_id` always returns the\nsnippet's current revision.\n\nNote that only the snippet's file contents are versioned, not its\nmeta data properties like the title.\n\nOther than that, the two endpoints are identical in behavior.", + "summary": "Get a previous revision of a snippet", + "responses": { + "200": { + "description": "The snippet object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + } + } + }, + "401": { + "description": "If the snippet is private and the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If authenticated user does not have access to the private snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet, or the revision does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Snippets"], + "description": "Identical to `UPDATE /snippets/encoded_id`, except that this endpoint\ntakes an explicit commit revision. Only the snippet's \"HEAD\"/\"tip\"\n(most recent) version can be updated and requests on all other,\nolder revisions fail by returning a 405 status.\n\nUsage of this endpoint over the unrestricted `/snippets/encoded_id`\ncould be desired if the caller wants to be sure no concurrent\nmodifications have taken place between the moment of the UPDATE\nrequest and the original GET.\n\nThis can be considered a so-called \"Compare And Swap\", or CAS\noperation.\n\nOther than that, the two endpoints are identical in behavior.", + "summary": "Update a previous revision of a snippet", + "responses": { + "200": { + "description": "The updated snippet object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + } + } + }, + "401": { + "description": "If the snippet is private and the request was not authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If authenticated user does not have permission to update the private snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet or the revision does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "405": { + "description": "If `{node_id}` is not the latest revision.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/related": { + "schema": { + "$ref": "#/components/schemas/error" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "node_id", + "in": "path", + "description": "A commit revision (SHA1).", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/{node_id}/files/{path}": { + "get": { + "tags": ["Snippets"], + "description": "Retrieves the raw contents of a specific file in the snippet. The\n`Content-Disposition` header will be \"attachment\" to avoid issues with\nmalevolent executable files.\n\nThe file's mime type is derived from its filename and returned in the\n`Content-Type` header.\n\nNote that for text files, no character encoding is included as part of\nthe content type.", + "summary": "Get a snippet's raw file", + "responses": { + "200": { + "description": "Returns the contents of the specified file.", + "headers": { + "Content-Type": { + "description": "The mime type as derived from the filename", + "schema": { + "type": "string" + } + }, + "Content-Disposition": { + "description": "attachment", + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the file or snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "node_id", + "in": "path", + "description": "A commit revision (SHA1).", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "path", + "description": "Path to the file.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/{revision}/diff": { + "get": { + "tags": ["Snippets"], + "description": "Returns the diff of the specified commit against its first parent.\n\nNote that this resource is different in functionality from the `patch`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the diff is\nunspecified as Git does not track this, making it hard for\nBitbucket to reliably determine this.", + "summary": "Get snippet changes between versions", + "responses": { + "200": { + "description": "The raw diff contents." + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "path", + "in": "query", + "description": "When used, only one the diff of the specified file will be returned.", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "revision", + "in": "path", + "description": "A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`.", + "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" + } + } + ] + }, + "/snippets/{workspace}/{encoded_id}/{revision}/patch": { + "get": { + "tags": ["Snippets"], + "description": "Returns the patch of the specified commit against its first\nparent.\n\nNote that this resource is different in functionality from the `diff`\nresource.\n\nThe differences between a diff and a patch are:\n\n* patches have a commit header with the username, message, etc\n* diffs support the optional `path=foo/bar.py` query param to filter the\n diff to just that one file diff (not supported for patches)\n* for a merge, the diff will show the diff between the merge commit and\n its first parent (identical to how PRs work), while patch returns a\n response containing separate patches for each commit on the second\n parent's ancestry, up to the oldest common ancestor (identical to\n its reachability).\n\nNote that the character encoding of the contents of the patch is\nunspecified as Git does not track this, making it hard for\nBitbucket to reliably determine this.", + "summary": "Get snippet patch between versions", + "responses": { + "200": { + "description": "The raw patch contents." + }, + "403": { + "description": "If the authenticated user does not have access to the snippet.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the snippet does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["snippet"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "encoded_id", + "in": "path", + "description": "The snippet id.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "revision", + "in": "path", + "description": "A revspec expression. This can simply be a commit SHA1, a ref name, or a compare expression like `staging..production`.", + "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" + } + } + ] + }, + "/teams/{username}/pipelines_config/variables": { + "get": { + "tags": ["Pipelines"], + "summary": "List variables for an account", + "deprecated": true, + "description": "Find account level variables.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "getPipelineVariablesForTeam", + "parameters": [ + { + "name": "username", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The found account level variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_variables" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Create a variable for a user", + "description": "Create an account level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "createPipelineVariableForTeam", + "parameters": [ + { + "name": "username", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable2" + }, + "responses": { + "201": { + "description": "The created variable.", + "headers": { + "Location": { + "description": "The URL of the newly created pipeline variable.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "A variable with the provided key already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/teams/{username}/pipelines_config/variables/{variable_uuid}": { + "get": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Get a variable for a team", + "description": "Retrieve a team level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "getPipelineVariableForTeam", + "parameters": [ + { + "name": "username", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to retrieve.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The variable.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account or variable with the given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Update a variable for a team", + "description": "Update a team level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "updatePipelineVariableForTeam", + "parameters": [ + { + "name": "username", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable" + }, + "responses": { + "200": { + "description": "The variable was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account or the variable was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Delete a variable for a team", + "description": "Delete a team level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "deletePipelineVariableForTeam", + "parameters": [ + { + "name": "username", + "description": "The account.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The variable was deleted" + }, + "404": { + "description": "The account or the variable with the provided UUID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "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\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": [ + { + "name": "username", + "in": "path", + "description": "The account to search in; either the username or the UUID in curly braces", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "search_query", + "in": "query", + "description": "The search query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Which page of the search results to retrieve", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pagelen", + "in": "query", + "description": "How many search results to retrieve per page", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "Successful search", + "content": { + "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" + } + } + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "If the search request was invalid due to one of the\nfollowing reasons:\n\n* the specified type of target account doesn''t match the actual\naccount type;\n\n* malformed pagination properties;\n\n* missing or malformed search query, in the latter case an error\nkey will be returned in `error.data.key` property.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "Search is not enabled for the requested team, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "429": { + "description": "Too many requests, try again later", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/user": { + "get": { + "tags": ["Users"], + "description": "Returns the currently logged in user.", + "summary": "Get current user", + "responses": { + "200": { + "description": "The current user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + } + }, + "401": { + "description": "When the request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/user/emails": { + "get": { + "tags": ["Users"], + "description": "Returns all the authenticated user's email addresses. Both\nconfirmed and unconfirmed.", + "summary": "List email addresses for current user", + "responses": { + "default": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["email"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/user/emails/{email}": { + "get": { + "tags": ["Users"], + "description": "Returns details about a specific one of the authenticated user's\nemail addresses.\n\nDetails describe whether the address has been confirmed by the user and\nwhether it is the user's primary address or not.", + "summary": "Get an email address for current user", + "responses": { + "default": { + "description": "Unexpected error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["email"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "email", + "in": "path", + "description": "Email address of the user.", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "/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\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": { + "description": "Repository permissions for the repositories a caller has explicit access to.", + "content": { + "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 + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "\nName of a response property sort the result by as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["account", "repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/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\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": { + "description": "All of the workspace memberships for the authenticated user.", + "content": { + "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" + } + } + ] + } + } + } + } + } + }, + "401": { + "description": "The request wasn't authenticated.", + "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": "\nName of a response property to sort results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results)\nfor details.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["account"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/users/{selected_user}": { + "get": { + "tags": ["Users"], + "description": "Gets the public information associated with a user account.\n\nIf the user's profile is private, `location`, `website` and\n`created_on` elements are omitted.\n\nNote that the user object returned by this operation is changing significantly, due to privacy changes.\nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-bitbucket-user-objects) for details.", + "summary": "Get a user", + "responses": { + "200": { + "description": "The user object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/account" + } + } + } + }, + "404": { + "description": "If no user exists for the specified UUID, or if the specified account is a team account, not a personal account.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "selected_user", + "in": "path", + "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" + } + } + ] + }, + "/users/{selected_user}/pipelines_config/variables": { + "get": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "List variables for a user", + "description": "Find user level variables.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "getPipelineVariablesForUser", + "parameters": [ + { + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The found user level variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_variables" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Create a variable for a user", + "description": "Create a user level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "createPipelineVariableForUser", + "parameters": [ + { + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable2" + }, + "responses": { + "201": { + "description": "The created variable.", + "headers": { + "Location": { + "description": "The URL of the newly created pipeline variable.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "A variable with the provided key already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/users/{selected_user}/pipelines_config/variables/{variable_uuid}": { + "get": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Get a variable for a user", + "description": "Retrieve a user level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "getPipelineVariableForUser", + "parameters": [ + { + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to retrieve.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The variable.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account or variable with the given UUID was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Update a variable for a user", + "description": "Update a user level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "updatePipelineVariableForUser", + "parameters": [ + { + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable" + }, + "responses": { + "200": { + "description": "The variable was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The account or the variable was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Pipelines"], + "deprecated": true, + "summary": "Delete a variable for a user", + "description": "Delete an account level variable.\nThis endpoint has been deprecated, and you should use the new workspaces endpoint. For more information, see [the announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-teams-deprecation/).", + "operationId": "deletePipelineVariableForUser", + "parameters": [ + { + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The variable was deleted" + }, + "404": { + "description": "The account or the variable with the provided UUID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/users/{selected_user}/properties/{app_key}/{property_name}": { + "put": { + "responses": { + "204": { + "description": "An empty response." + } + }, + "operationId": "updateUserHostedPropertyValue", + "summary": "Update a user application property", + "description": "Update an [application property](/cloud/bitbucket/application-properties/) value stored against a user.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/application_property" + }, + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "responses": { + "204": { + "description": "An empty response." + } + }, + "operationId": "deleteUserHostedPropertyValue", + "summary": "Delete a user application property", + "description": "Delete an [application property](/cloud/bitbucket/application-properties/) value stored against a user.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "tags": ["properties"], + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "responses": { + "200": { + "description": "The value of the property.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/application_property" + } + } + } + } + }, + "operationId": "retrieveUserHostedPropertyValue", + "summary": "Get a user application property", + "description": "Retrieve an [application property](/cloud/bitbucket/application-properties/) value stored against a user.", + "parameters": [ + { + "required": true, + "in": "path", + "name": "selected_user", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "app_key", + "description": "The key of the Connect app.", + "schema": { + "type": "string" + } + }, + { + "required": true, + "in": "path", + "name": "property_name", + "description": "The name of the property.", + "schema": { + "type": "string" + } + } + ], + "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\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": [ + { + "name": "selected_user", + "in": "path", + "description": "Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "search_query", + "in": "query", + "description": "The search query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Which page of the search results to retrieve", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pagelen", + "in": "query", + "description": "How many search results to retrieve per page", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "Successful search", + "content": { + "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" + } + } + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "If the search request was invalid due to one of the\nfollowing reasons:\n\n* the specified type of target account doesn''t match the actual\naccount type;\n\n* malformed pagination properties;\n\n* missing or malformed search query, in the latter case an error\nkey will be returned in `error.data.key` property.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "Search is not enabled for the requested user, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "429": { + "description": "Too many requests, try again later", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "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.", + "summary": "List SSH keys", + "responses": { + "200": { + "description": "A list of the SSH keys associated with the account.", + "content": { + "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}" + } + ] + } + } + } + } + } + }, + "403": { + "description": "If the specified user's keys are not accessible to the current user" + }, + "404": { + "description": "If the specified user does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Ssh"], + "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": { + "description": "The newly created SSH key.", + "content": { + "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}" + } + } + } + } + } + }, + "400": { + "description": "If the submitted key or related value is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the current user does not have permission to add a key for the specified user" + }, + "404": { + "description": "If the specified user does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ssh_account_key" + } + } + }, + "description": "The new SSH key object. Note that the username property has been deprecated due to [privacy changes](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#removal-of-usernames-from-user-referencing-apis)." + }, + "security": [ + { + "oauth2": ["account:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "selected_user", + "in": "path", + "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" + } + } + ] + }, + "/users/{selected_user}/ssh-keys/{key_id}": { + "delete": { + "tags": ["Ssh"], + "description": "Deletes a specific SSH public key from a user's account.", + "summary": "Delete a SSH key", + "responses": { + "204": { + "description": "The key has been deleted" + }, + "400": { + "description": "If the submitted key or related value is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the current user does not have permission to add a key for the specified user" + }, + "404": { + "description": "If the specified user does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Ssh"], + "description": "Returns a specific SSH public key belonging to a user.", + "summary": "Get a SSH key", + "responses": { + "200": { + "description": "The specific SSH key matching the user and UUID", + "content": { + "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}" + } + } + } + } + } + }, + "403": { + "description": "If the specified user or key is not accessible to the current user" + }, + "404": { + "description": "If the specified user or key does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "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```\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": { + "description": "The newly updated SSH key.", + "content": { + "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}" + } + } + } + } + } + }, + "400": { + "description": "If the submitted key or related value is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the current user does not have permission to add a key for the specified user" + }, + "404": { + "description": "If the specified user does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ssh_account_key" + } + } + }, + "description": "The updated SSH key object" + }, + "security": [ + { + "oauth2": ["account:write"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The SSH key's UUID value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "selected_user", + "in": "path", + "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" + } + } + ] + }, + "/workspaces": { + "get": { + "tags": ["Workspaces"], + "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": { + "description": "The list of workspaces accessible by the authenticated user.", + "content": { + "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" + } + ] + } + } + } + } + } + }, + "401": { + "description": "The request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "role", + "in": "query", + "description": "\n Filters the workspaces based on the authenticated user's role on each workspace.\n\n * **member**: returns a list of all the workspaces which the caller is a member of\n at least one workspace group or repository\n * **collaborator**: returns a list of workspaces which the caller has write access\n to at least one repository in the workspace\n * **owner**: returns a list of workspaces which the caller has administrator access\n ", + "required": false, + "schema": { + "type": "string", + "enum": ["owner", "collaborator", "member"] + } + }, + { + "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": "\nName of a response property to sort results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results)\nfor details.\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["account"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [] + }, + "/workspaces/{workspace}": { + "get": { + "tags": ["Workspaces"], + "description": "Returns the requested workspace.", + "summary": "Get a workspace", + "responses": { + "200": { + "description": "The workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/workspace" + } + } + } + }, + "404": { + "description": "If no workspace exists for the specified name or UUID.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "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}/hooks": { + "get": { + "tags": ["Workspaces", "Webhooks"], + "description": "Returns a paginated list of webhooks installed on this workspace.", + "summary": "List webhooks for a workspace", + "responses": { + "200": { + "description": "The paginated list of installed webhooks.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_webhook_subscriptions" + } + } + } + }, + "403": { + "description": "If the authenticated user is not an owner on the specified workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "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 \"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": { + "description": "If the webhook was registered successfully.", + "headers": { + "Location": { + "description": "The URL of new newly created webhook.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_subscription" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have permission to install webhooks on the specified workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "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}/hooks/{uid}": { + "delete": { + "tags": ["Workspaces", "Webhooks"], + "description": "Deletes the specified webhook subscription from the given workspace.", + "summary": "Delete a webhook for a workspace", + "responses": { + "204": { + "description": "When the webhook was deleted successfully" + }, + "403": { + "description": "If the authenticated user does not have permission to delete the webhook.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the webhook or workspace does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Workspaces", "Webhooks"], + "description": "Returns the webhook with the specified id installed on the given\nworkspace.", + "summary": "Get a webhook for a workspace", + "responses": { + "200": { + "description": "The webhook subscription object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_subscription" + } + } + } + }, + "404": { + "description": "If the webhook or workspace does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "put": { + "tags": ["Workspaces", "Webhooks"], + "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": { + "description": "The webhook subscription object.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/webhook_subscription" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have permission to update the webhook.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the webhook or workspace does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["webhook"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "uid", + "in": "path", + "description": "Installed webhook's ID", + "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}/members": { + "get": { + "tags": ["Workspaces"], + "description": "Returns all members of the requested workspace.\n\nThis endpoint additionally supports [filtering](/cloud/bitbucket/rest/intro/#filtering) by\nemail address, if called by a workspace administrator, integration or workspace access\ntoken. This is done by adding the following query string parameter:\n\n* `q=user.email IN (\"user1@org.com\",\"user2@org.com\")`\n\nWhen filtering by email, you can query up to 90 addresses at a time.\nNote that the query parameter values need to be URL escaped, so the final query string\nshould be:\n\n* `q=user.email%20IN%20(%22user1@org.com%22,%22user2@org.com%22)`\n\nEmail addresses that you filter by (and only these email addresses) can be included in the\nresponse using the `fields` query parameter:\n\n* `&fields=+values.user.email` - add the `email` field to the default `user` response object\n* `&fields=values.user.email,values.user.account_id` - only return user email addresses and\naccount IDs\n\nOnce again, all query parameter values must be URL escaped.", + "summary": "List users in a workspace", + "responses": { + "200": { + "description": "The list of users that are part of a workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_workspace_memberships" + } + } + } + }, + "400": { + "description": "When more than 90 emails were provided when querying by email.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "The request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:workspace:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "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}/members/{member}": { + "get": { + "tags": ["Workspaces"], + "description": "Returns the workspace membership, which includes\na `User` object for the member and a `Workspace` object\nfor the requested workspace.", + "summary": "Get user membership for a workspace", + "responses": { + "200": { + "description": "The user that is part of a workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/workspace_membership" + } + } + } + }, + "401": { + "description": "The request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "A workspace cannot be found, or a user cannot be found, or the user is not a a member of the workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["account"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:workspace:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "member", + "in": "path", + "description": "Member's UUID or Atlassian ID.", + "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}/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\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": { + "description": "The list of users that are part of a workspace, along with their permission.", + "content": { + "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 + } + } + } + } + } + }, + "401": { + "description": "The request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["account"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:workspace:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "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}/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\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": { + "description": "List of workspace's repository permissions.", + "content": { + "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 + } + } + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "\nName of a response property sort the result by as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["account"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "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}/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\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": { + "description": "The repository permission for all users in this repository.", + "content": { + "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 + } + } + } + } + } + }, + "403": { + "description": "The requesting user isn't an admin of the repository.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "q", + "in": "query", + "description": "\nQuery string to narrow down the response as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "description": "\nName of a response property sort the result by as per\n[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).\n", + "required": false, + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket", "read:user:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "repo_slug", + "in": "path", + "description": "This can either be the repository slug or the UUID of the repository,\nsurrounded by curly-braces, for example: `{repository UUID}`.\n", + "required": true, + "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}/pipelines-config/identity/oidc/.well-known/openid-configuration": { + "get": { + "tags": ["Pipelines"], + "summary": "Get OpenID configuration for OIDC in Pipelines", + "description": "This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/", + "operationId": "getOIDCConfiguration", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The OpenID configuration" + }, + "404": { + "description": "The workspace was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/workspaces/{workspace}/pipelines-config/identity/oidc/keys.json": { + "get": { + "tags": ["Pipelines"], + "summary": "Get keys for OIDC in Pipelines", + "description": "This is part of OpenID Connect for Pipelines, see https://support.atlassian.com/bitbucket-cloud/docs/integrate-pipelines-with-resource-servers-using-oidc/", + "operationId": "getOIDCKeys", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The keys in JSON web key format" + }, + "404": { + "description": "The workspace was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": [] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/workspaces/{workspace}/pipelines-config/variables": { + "get": { + "tags": ["Pipelines"], + "summary": "List variables for a workspace", + "description": "Find workspace level variables.", + "operationId": "getPipelineVariablesForWorkspace", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The found workspace level variables.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pipeline_variables" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Pipelines"], + "summary": "Create a variable for a workspace", + "description": "Create a workspace level variable.", + "operationId": "createPipelineVariableForWorkspace", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable2" + }, + "responses": { + "201": { + "description": "The created variable.", + "headers": { + "Location": { + "description": "The URL of the newly created pipeline variable.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The workspace does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "409": { + "description": "A variable with the provided key already exists.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/workspaces/{workspace}/pipelines-config/variables/{variable_uuid}": { + "get": { + "tags": ["Pipelines"], + "summary": "Get variable for a workspace", + "description": "Retrieve a workspace level variable.", + "operationId": "getPipelineVariableForWorkspace", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to retrieve.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The variable.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The workspace or variable with the 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": [] + } + ] + }, + "put": { + "tags": ["Pipelines"], + "summary": "Update variable for a workspace", + "description": "Update a workspace level variable.", + "operationId": "updatePipelineVariableForWorkspace", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/pipeline_variable" + }, + "responses": { + "200": { + "description": "The variable was updated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + } + }, + "404": { + "description": "The workspace or the variable was not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "delete": { + "tags": ["Pipelines"], + "summary": "Delete a variable for a workspace", + "description": "Delete a workspace level variable.", + "operationId": "deletePipelineVariableForWorkspace", + "parameters": [ + { + "name": "workspace", + "description": "This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "variable_uuid", + "description": "The UUID of the variable to delete.", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The variable was deleted" + }, + "404": { + "description": "The workspace or the variable with the provided UUID does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:pipeline:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["pipeline:variable"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + }, + "/workspaces/{workspace}/projects": { + "get": { + "tags": ["Workspaces"], + "description": "Returns the list of projects in this workspace.", + "summary": "List projects in a workspace", + "responses": { + "200": { + "description": "The list of projects in this workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_projects" + } + } + } + }, + "404": { + "description": "A workspace doesn't exist at this location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project"] + }, + { + "basic": [] + }, + { + "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/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": { + "description": "A new project has been created.", + "headers": { + "Location": { + "description": "The location of the newly created project", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project" + } + } + } + }, + "403": { + "description": "The user requesting to create a project does not have the necessary permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "A workspace doesn't exist at this location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/project" + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } + ] + }, + "parameters": [ + { + "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}": { + "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/workspaces/bbworkspace1/projects/PROJ\n```", + "summary": "Delete a project for a workspace", + "responses": { + "204": { + "description": "Successful deletion." + }, + "403": { + "description": "The requesting user isn't authorized to delete the project or the project isn't empty.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "A project isn't hosted at this location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } + ] + }, + "get": { + "tags": ["Projects", "Workspaces"], + "description": "Returns the requested project.", + "summary": "Get a project for a workspace", + "responses": { + "200": { + "description": "The project that is part of a workspace.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project" + } + } + } + }, + "401": { + "description": "The request wasn't authenticated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "The requesting user isn't authorized to access the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "A project isn't hosted at this location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:project:bitbucket"] + } + ] + }, + "put": { + "tags": ["Projects"], + "description": "Since this endpoint can be used to both update and to create a\nproject, the request body depends on the intent.\n\n#### Creation\n\nSee the POST documentation for the project collection for an\nexample of the request body.\n\nNote: The `key` should not be specified in the body of request\n(since it is already present in the URL). The `name` is required,\neverything else is optional.\n\n#### Update\n\nSee the POST documentation for the project collection for an\nexample of the request body.\n\nNote: The key is not required in the body (since it is already in\nthe URL). The key may be specified in the body, if the intent is\nto change the key itself. In such a scenario, the location of the\nproject is changed and is returned in the `Location` header of the\nresponse.", + "summary": "Update a project for a workspace", + "responses": { + "200": { + "description": "The existing project is has been updated.", + "headers": { + "Location": { + "description": "The location of the project. This header is only provided\nwhen the project key is updated.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project" + } + } + } + }, + "201": { + "description": "A new project has been created.", + "headers": { + "Location": { + "description": "The location of the newly created project", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project" + } + } + } + }, + "403": { + "description": "The requesting user isn't authorized to update or create the project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "A workspace doesn't exist at the location. Note that the project's absence from this location doesn't raise a 404, since a PUT at a non-existent location can be used to create a new project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "$ref": "#/components/requestBodies/project" + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual `key` assigned\nto 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}/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.", + "summary": "Get the branching model for a project", + "responses": { + "200": { + "description": "The branching model object", + "content": { + "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" + } + } + } + } + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have read access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the project does not exist", + "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:repository:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual `key` assigned\nto 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}/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.", + "summary": "Get the branching model config for a project", + "responses": { + "200": { + "description": "The branching model configuration", + "content": { + "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" + } + } + } + } + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "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.", + "summary": "Update the branching model config for a project", + "responses": { + "200": { + "description": "The updated branching model configuration", + "content": { + "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 + } + ] + } + } + } + } + } + }, + "400": { + "description": "If the request contains an invalid branching model configuration", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "401": { + "description": "If the request was not authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual `key` assigned\nto 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}/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.", + "summary": "List the default reviewers in a project", + "responses": { + "200": { + "description": "The list of project default reviewers", + "content": { + "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 + } + } + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the workspace or project does not exist at this location", + "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:pullrequest:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual `key` assigned\nto 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}/default-reviewers/{selected_user}": { + "delete": { + "tags": ["Projects"], + "description": "Removes a default reviewer from the project.\n\nExample:\n```\n$ curl https://api.bitbucket.org/2.0/.../default-reviewers/%7Bf0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6%7D\n\nHTTP/1.1 204\n```", + "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" + }, + "400": { + "description": "If the specified user is not a default reviewer for the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified user, project, or workspace does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } + ] + }, + "get": { + "tags": ["Projects"], + "description": "Returns the specified default reviewer.", + "summary": "Get a default reviewer", + "responses": { + "200": { + "description": "The specified user that is a default reviewer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/user" + }, + "examples": { + "response": { + "value": { + "display_name": "Davis Lee", + "type": "user", + "uuid": "{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}" + } + } + } + } + } + }, + "400": { + "description": "If the specified user is not a default reviewer for the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified user, project, or workspace does not exist", + "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: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.", + "summary": "Add the specific user as a default reviewer for the project", + "responses": { + "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" + } + } + } + } + } + }, + "400": { + "description": "If the specified user cannot be added as a default reviewer for the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the authenticated user does not have admin access to the project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified user, project, or workspace does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ], + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["admin:project:bitbucket"] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This can either be the actual `key` assigned\nto the project or the `UUID` (surrounded by curly-braces (`{}`)).\n", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "selected_user", + "in": "path", + "description": "This can either be the username or the UUID of the default reviewer,\nsurrounded by curly-braces, for example: `{account 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" + } + } + ] + }, + "/workspaces/{workspace}/projects/{project_key}/deploy-keys": { + "get": { + "tags": ["Deployments"], + "description": "Returns all deploy keys belonging to a project.", + "summary": "List project deploy keys", + "responses": { + "200": { + "description": "Deploy keys matching the project", + "content": { + "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 + } + } + } + } + } + }, + "403": { + "description": "If the specified workspace or project is not accessible to the current user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace or project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project", "project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "post": { + "tags": ["Deployments"], + "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": { + "description": "The project deploy key that was created", + "content": { + "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 + } + } + } + } + } + }, + "400": { + "description": "Invalid deploy key inputs", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "403": { + "description": "If the specified workspace or project is not accessible to the current user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace or project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project", "project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual `key` assigned\nto 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}/deploy-keys/{key_id}": { + "delete": { + "tags": ["Deployments"], + "description": "This deletes a deploy key from a project.", + "summary": "Delete a deploy key from a project", + "responses": { + "204": { + "description": "The project deploy key has been deleted" + }, + "403": { + "description": "If the current user does not have permission to delete a key for the specified project", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace, project, or project deploy key does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project", "project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "get": { + "tags": ["Deployments"], + "description": "Returns the deploy key belonging to a specific key ID.", + "summary": "Get a project deploy key", + "responses": { + "200": { + "description": "Project deploy key matching the key ID", + "content": { + "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 + } + ] + } + } + } + } + } + }, + "403": { + "description": "If the specified workspace or project is not accessible to the current user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "If the specified workspace or project does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "security": [ + { + "oauth2": ["project", "project:admin"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "key_id", + "in": "path", + "description": "The key ID matching the project deploy key.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "project_key", + "in": "path", + "description": "The project in question. This is the actual `key` assigned\nto 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": { + "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}/pullrequests/{selected_user}": { + "get": { + "tags": ["Workspaces", "Pullrequests"], + "description": "Returns all workspace pull requests authored by the specified user.\n\nBy default only open pull requests are returned. This can be controlled\nusing the `state` query parameter. To retrieve pull requests that are\nin one of multiple states, repeat the `state` parameter for each\nindividual state.\n\nThis endpoint also supports filtering and sorting of the results. See\n[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.", + "summary": "List workspace pull requests for a user", + "responses": { + "200": { + "description": "All pull requests authored by the specified user.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/paginated_pullrequests" + } + } + } + }, + "404": { + "description": "If the specified user does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "parameters": [ + { + "name": "state", + "in": "query", + "description": "Only return pull requests that are in this state. This parameter can be repeated.", + "schema": { + "type": "string", + "enum": ["OPEN", "MERGED", "DECLINED", "SUPERSEDED"] + } + } + ], + "security": [ + { + "oauth2": ["pullrequest"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + }, + "parameters": [ + { + "name": "selected_user", + "in": "path", + "description": "This can either be the username of the pull request author, the author's UUID\nsurrounded by curly-braces, for example: `{account UUID}`, or the author's Atlassian ID.\n", + "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\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": [ + { + "name": "workspace", + "in": "path", + "description": "The workspace to search in; either the slug or the UUID in curly braces", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "search_query", + "in": "query", + "description": "The search query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Which page of the search results to retrieve", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 1 + } + }, + { + "name": "pagelen", + "in": "query", + "description": "How many search results to retrieve per page", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "Successful search", + "content": { + "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" + } + } + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "If the search request was invalid due to one of the\nfollowing reasons:\n\n* the specified type of target account doesn''t match the actual\naccount type;\n\n* malformed pagination properties;\n\n* missing or malformed search query, in the latter case an error\nkey will be returned in `error.data.key` property.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "404": { + "description": "Search is not enabled for the requested workspace, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + }, + "429": { + "description": "Too many requests, try again later", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "x-atlassian-oauth2-scopes": [ + { + "state": "Current", + "scheme": "oauth2", + "scopes": ["read:repository:bitbucket"] + } + ], + "security": [ + { + "oauth2": ["repository"] + }, + { + "basic": [] + }, + { + "api_key": [] + } + ] + } + } + }, + "tags": [ + { + "name": "Addon", + "description": "The addon resource is intended to use used by Bitbucket Cloud Connect\nApps, and only supports JWT authentication.\n" + }, + { + "name": "Branch restrictions", + "description": "Repository owners and administrators can set branch management\nrules on a repository that control what can be pushed by whom.\nThrough these rules, you can enforce a project or team\nworkflow. For example, owners or administrators can:\n\n* Limit push powers\n* Prevent branch deletion\n* Prevent history re-writes (Git only)\n" + }, + { + "name": "Branching model", + "description": "The branching model resource is used to modify the branching model\nfor a repository.\n\nYou can use the branching model to define a branch based workflow\nfor your repositories. When you map your workflow to branch types,\nyou can ensure that branches are named consistently by configuring\nwhich branch types to make available.\n" + }, + { + "name": "Commit statuses", + "description": "Commit statuses provide a way to tag commits with meta data,\nlike automated build results.\n" + }, + { + "name": "Commits", + "description": "These are the repository's commits. They are paginated and returned in\nreverse chronological order, similar to the output of git log.\n" + }, + { + "name": "Deployments", + "description": "Teams are deploying code faster than ever, thanks to continuous\ndelivery practices and tools like Bitbucket Pipelines. Bitbucket\nDeployments gives teams visibility into their deployment\nenvironments and helps teams to track how far changes have\nprogressed in their deployment pipeline.\n" + }, + { + "name": "Downloads", + "description": "Access the list of download links associated with the repository." + }, + { + "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. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.\n" + }, + { + "name": "Pipelines", + "description": "Bitbucket Pipelines brings continuous delivery to Bitbucket\nCloud, empowering teams with full branching to deployment\nvisibility and faster feedback loops.\n" + }, + { + "name": "Projects", + "description": "Bitbucket Cloud projects make it easier for teams to focus on\na goal, product, or process by organizing their repositories.\n" + }, + { + "name": "Pullrequests", + "description": "Pull requests are a feature that makes it easier for developers\nto collaborate using Bitbucket. They provide a user-friendly web\ninterface for discussing proposed changes before integrating them\ninto the official project.\n" + }, + { + "name": "Refs", + "description": "The refs resource allows you access branches and tags in a repository.\nBy default, results will be in the order the underlying source control\nsystem returns them and identical to the ordering one sees when running\n\"$ git show-ref\". Note that this follows simple lexical ordering of the\n ref names.\n" + }, + { + "name": "Reports", + "description": "Code insights provides reports, annotations, and metrics to help you\nand your team improve code quality in pull requests throughout the code\nreview process. Some of the available code insights are static analysis\nreports, security scan results, artifact links, unit tests, and build\nstatus.\n" + }, + { + "name": "Repositories", + "description": "A Git repository is a virtual storage of your project. It\nallows you to save versions of your code, which you can access\nwhen needed. The repo resource allows you to access public repos,\nor repos that belong to a specific workspace.\n" + }, + { + "name": "Snippets", + "description": "Snippets allow you share code segments or files with yourself, members of\nyour workspace, or the world.\n\nLike pull requests, repositories and workspaces, the full set of snippets\nis defined by what the current user has access to. This includes all\nsnippets owned by any of the workspaces the user is a member of, or\nsnippets by other users that the current user is either watching or has\n collaborated on (for instance by commenting on it).\n" + }, + { + "name": "Source", + "description": "Browse the source code in the repository and\n create new commits by uploading." + }, + { + "name": "Ssh", + "description": "The SSH resource allows you to manage SSH keys.\n" + }, + { + "name": "Teams", + "description": "The teams resource has been deprecated, and the workspaces\nendpoint should be used instead.\n\nThe teams resource returns all the teams that the authenticated\nuser is associated with.\n" + }, + { + "name": "Users", + "description": "The users resource allows you to access public information\nassociated with a user account. Most resources in the users\nendpoint have been deprecated in favor of workspaces.\n" + }, + { + "name": "Webhooks", + "description": "Webhooks provide a way to configure Bitbucket Cloud to make requests to\nyour server (or another external service) whenever certain events occur in\nBitbucket Cloud.\n\nA webhook consists of:\n\n* A subject -- The resource that generates the events. Currently, this resource\nis the repository, user account, or team where you create the webhook.\n* One or more event -- The default event is a repository push, but you can\nselect multiple events that can trigger the webhook.\n* A URL -- The endpoint where you want Bitbucket to send the event payloads\nwhen a matching event happens.\n\nThere are two parts to getting a webhook to work: creating the webhook and\ntriggering the webhook. After you create a webhook for an event, every time\nthat event occurs, Bitbucket sends a payload request that describes the event\nto the specified URL. Thus, you can think of webhooks as a kind of\nnotification system.\n\nUse webhooks to integrate applications with Bitbucket Cloud. The following\nuse cases provides examples of when you would want to use webhooks:\n\n* Every time a user pushes commits in a repository, you may want to notify\nyour CI server to start a build.\n* Every time a user pushes commits or creates a pull request, you may want to\ndisplay a notification in your application.\n" + }, + { + "name": "Wiki", + "description": "The wiki is a simple place to keep documents. Some people use it\nas their project home page. The wiki is a Git repository, so you\ncan clone it and edit it like any other source files.\n" + }, + { + "name": "Workspaces", + "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": "33b035ea9108", + "x-atlassian-narrative": { + "documents": [ + { + "anchor": "authentication", + "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* [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", + "title": "Filter and sort API objects", + "description": "Query the 2.0 API for specific objects", + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTk0LjE5MTkgMTQ3LjYwOTIiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjY2ZkNGRiOwogICAgICB9CgogICAgICAuY2xzLTMsIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzg3NzdkOTsKICAgICAgfQoKICAgICAgLmNscy00IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC5jbHMtNSB7CiAgICAgICAgZmlsbDogIzAwNjVmZjsKICAgICAgfQoKICAgICAgLmNscy02IHsKICAgICAgICBmaWxsOiAjY2NlMGZmOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIGZpbGw6IHVybCgjbGluZWFyLWdyYWRpZW50KTsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB4MT0iNDE2LjMwODIiIHkxPSI3NS4wNDc5IiB4Mj0iNTg0Ljg1NTYiIHkyPSI3NS4wNDc5IiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKC00NDMuOTQ2NyAxMjMuMDY4Nikgcm90YXRlKC0xMy43OTc2KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNmZmYiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIwLjY5MDgiIHN0b3AtY29sb3I9IiNmZmYiIHN0b3Atb3BhY2l0eT0iMC4xIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogIDwvZGVmcz4KICA8dGl0bGU+TWFnbmlmeWluZyBHbGFzczwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTMxLjExMjUsOTQuOTMwN2wtOS44ODc4LTUuOTg4OC04LjMyOTIsMTMuNzUxOSw5Ljg4NzgsNS45ODg4YTE1LjYwMywxNS42MDMsMCwwLDEsNS44OCw2LjM4MzVoMGExNS42MDMsMTUuNjAzLDAsMCwwLDUuODgsNi4zODM1bDQwLjExNDMsMjQuMjk2NGExMi44NjY0LDEyLjg2NjQsMCwwLDAsMTcuNjcwOS00LjM0aDBhMTIuODY2NCwxMi44NjY0LDAsMCwwLTQuMzQtMTcuNjcwOUwxNDcuODc0OSw5OS40MzkyYTE1LjYwMywxNS42MDMsMCwwLDAtOC4zODEyLTIuMjU0MmgwQTE1LjYwMywxNS42MDMsMCwwLDEsMTMxLjExMjUsOTQuOTMwN1oiLz4KICAgICAgICA8cGF0aCBpZD0iX1BhdGhfIiBkYXRhLW5hbWU9IiZsdDtQYXRoJmd0OyIgY2xhc3M9ImNscy0zIiBkPSJNMTMxLjExMjUsOTQuOTMwN2wtMy4wMTE4LTEuODI0MkE4LjAzODgsOC4wMzg4LDAsMCwwLDExNy4wNiw5NS44MTc4aDBhOC4wMzg4LDguMDM4OCwwLDAsMCwyLjcxMTMsMTEuMDQwNWwzLjAxMTgsMS44MjQyYTE1LjYwMywxNS42MDMsMCwwLDEsNS44OCw2LjM4MzVoMGExNS42MDMsMTUuNjAzLDAsMCwwLDUuODgsNi4zODM1bDQwLjExNDMsMjQuMjk2NGExMi44NjY0LDEyLjg2NjQsMCwwLDAsMTcuNjcwOS00LjM0aDBhMTIuODY2NCwxMi44NjY0LDAsMCwwLTQuMzQtMTcuNjcwOUwxNDcuODc0OSw5OS40MzkyYTE1LjYwMywxNS42MDMsMCwwLDAtOC4zODEyLTIuMjU0M2gwQTE1LjYwMywxNS42MDMsMCwwLDEsMTMxLjExMjUsOTQuOTMwN1oiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik0xMzkuMTQzNyw5Ny4xNzkyYTE1LjU5NzMsMTUuNTk3MywwLDAsMS04LjAzMTItMi4yNDg1bC0zLjAxMTgtMS44MjQyQTguMDM4OCw4LjAzODgsMCwwLDAsMTE3LjA2LDk1LjgxNzhoMGE4LjAzODgsOC4wMzg4LDAsMCwwLDIuNzExMywxMS4wNDA1bDMuMDExOCwxLjgyNDJhMTUuNTk3LDE1LjU5NywwLDAsMSw1LjcwNjksNi4wNjQ4LDY3Ljg0ODEsNjcuODQ4MSwwLDAsMCwxMC42NTM2LTE3LjU2ODFaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy01IiBkPSJNODMuMjUzNywxMzIuNTU2QTY3LjIzNDgsNjcuMjM0OCwwLDAsMSw5LjcxLDMyLjQyOTUsNjYuNzk3NCw2Ni43OTc0LDAsMCwxLDUxLjE4MzcsMS45NjY2bC4wMDA3LDBBNjYuNzk2Miw2Ni43OTYyLDAsMCwxLDEwMi4wNTEsOS43NTI1aDBBNjcuMjM0Niw2Ny4yMzQ2LDAsMCwxLDgzLjI1MzcsMTMyLjU1NloiLz4KICAgICAgICA8cGF0aCBpZD0iX1BhdGhfMiIgZGF0YS1uYW1lPSImbHQ7UGF0aCZndDsiIGNsYXNzPSJjbHMtNiIgZD0iTTIzLjQzOSw0MC43NDgyQTUxLjE5MDgsNTEuMTkwOCwwLDAsMCwxMTEuMDEsOTMuNzg4OSw1MS4xOTA4LDUxLjE5MDgsMCwwLDAsMjMuNDM5LDQwLjc0ODJaIi8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy03IiBkPSJNNzkuNDMzLDExNi45ODJBNTEuMjE2Miw1MS4yMTYyLDAsMCwwLDExOC40MjQxLDY3LjAzN2E0OS4xMzkxLDQ5LjEzOTEsMCwwLDEtNS4wODY3LDIuMjc4OWMtMTUuNzAyOSw1Ljk2MDktMjkuNjg5NSwyLjExLTM2LjQ5ODcuMTMwOC0yMC40MzA3LTUuOTM5LTI0Ljc5LTE3LjM3ODUtMzkuMDQxNC0yNC41ODIzYTQ4LjMwOTIsNDguMzA5MiwwLDAsMC0xNC4wOTM5LTQuNTNjLS4wODYyLjEzOTUtLjE3OTMuMjczLS4yNjQ0LjQxMzVBNTEuMTkwNyw1MS4xOTA3LDAsMCwwLDc5LjQzMywxMTYuOTgyWiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'", + "body": "\nYou can query the 2.0 API for specific objects using a simple language which resembles SQL.\n\nNote that filtering and querying by username has been deprecated, due to privacy changes. \nSee the [announcement](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/#changes-to-querying) \nfor details.\n\n---\n\n* [Supported endpoints](#supported-endpoints)\n* [Operators](#operators)\n* [Data types](#data-types)\n* [Querying](#querying)\n* [Sorting query results](#sorting-query-results)\n\n----\n\n### Supported endpoints\n\nMost 2.0 API resources that return paginated collections of objects support a single, shared, generic querying language that is used to filter down a result set.\n\nThis includes, but is in no way limited to:\n\n /2.0/repositories/{username}\n /2.0/repositories/{username}/{slug}/refs\n /2.0/repositories/{username}/{slug}/refs/branches\n /2.0/repositories/{username}/{slug}/refs/tags\n /2.0/repositories/{username}/{slug}/forks\n /2.0/repositories/{username}/{slug}/src\n /2.0/repositories/{username}/{slug}/issues\n /2.0/repositories/{username}/{slug}/pullrequests\n\nFiltering and sorting supports several distinct operators and data types as well as basic features, like logical operators (AND, OR).\nAs examples, the following queries could be used on the issue tracker endpoint (`/2.0/repositories/{workspace}/{slug}/issues/`):\n\n\t(state = \"open\" OR state = \"new\") AND assignee = null\n\treporter.nickname != \"evzijst\" AND priority >= \"major\"\n\t(title ~ \"unicode\" OR content.raw ~ \"unicode\") AND created_on > 2015-10-04T14:00:00-07:00\n\nFilter queries can be added to the URL using the q= query parameter. To sort the response, add sort=. Note that the entire query string is put in the q parameter and hence needs to be URL-encoded as shown in the following example:\n\n\t/2.0/repositories/foo/bar/issues?q=state=\"new\"&sort=-updated_on\n\n\n### Operators\n\nFiltering and sorting supports the following operators:\n\n| Operator | Definition | Example |\n|----------|--------------------------------|---------------------------------------|\n| \"=\" | test for equality | `nickname = \"evzijst\"` |\n| \"!=\" | not equal | `is_private != true` |\n| \"~\" | case-insensitive text contains | `description ~ \"beef\"` |\n| \"!~\" | case-insensitive not contains | `description !~ \"fubar\"` |\n| \">\" | greater than | `priority > \"major\"` |\n| \">=\" | greater than or equal | `priority <= \"trivial\"` |\n| \"<\" | less than | `id < 1234` |\n| \"<=\" | less than or equal | `updated_on <= 2015-03-04` |\n| \"IN\" | value present in list | `state IN (\"OPEN\", \"MERGED\")` |\n| \"NOT IN\" | value not present in list | `state NOT IN (\"DECLINED\", \"MERGED\")` |\n\n### Data types\n\nFiltering and sorting supports the following data types:\n\n| Type | Description | Example |\n|--------------|-----------------------------------------|-----------------|\n| **String** | any text inside double quotes | `\"foo\"` |\n| **Number** | arbitrary precision integers and floats | `1`, `-10.302` |\n| **Null** | to test for the absence of a value | `null` |\n| **boolean** | the unquoted strings true or false | `true`, `false` |\n| **datetime** | an unquoted [ISO-8601][iso-8601] date time string with the timezone offset, milliseconds and entire time component being optional | `2015-03-04T14:08:59.123+02:00`, `2015-03-04T14:08:59` Date time strings are assumed to be in UTC, unless an explicit timezone offset is provided |\n| **list** | a comma separated list of values enclosed in parentheses | `(\"a\", \"b\")`, `(1, 2)` |\n\n[iso-8601]: https://en.wikipedia.org/wiki/ISO_8601\n\n### Querying\n\nObjects can be filtered based on their properties. In principle, every element in an object's JSON document schema can be used as a filter criterion.\n\nNote that while the array of objects in a paginated response is wrapped in an\nenvelope with a `values` element, this prefix should not be included in the\nquery fields (so use `/2.0/repositories/foo/bar/issues?q=state=\"new\"`, not\n`/2.0/repositories/foo/bar/issues?q=values.state=\"new\"`).\n\n\n### Examples\n\nFields that contain embedded instances of other object types (e.g. owner is an embedded user object, while parent is an embedded repository) can be traversed recursively. For instance:\n\n\tparent.owner.nickname = \"bitbucket\"\n\nTo find pull requests which merge into master, come from a fork of the repo rather than a branch inside the repo, and on which I am a reviewer:\n\n```\nsource.repository.full_name != \"main/repo\" AND state = \"OPEN\" AND reviewers.nickname = \"evzijst\" AND destination.branch.name = \"master\"\n```\n```\n/2.0/repositories/main/repo/pullrequests?q=source.repository.full_name+%21%3D+%22main%2Frepo%22+AND+state+%3D+%22OPEN%22+AND+reviewers.nickname+%3D+%22evzijst%22+AND+destination.branch.name+%3D+%22master%22\n```\n\nTo find new or on-hold issues related to the UI, created or updated in the last day (SF local time), that have not yet been assigned to anyone:\n\n```\nstate IN (\"new\", \"on hold\") AND assignee = null AND component = \"UI\" and updated_on > 2015-11-11T00:00:00-07:00\n```\n```\n/2.0/repositories/main/repo/issues?q=state%20IN%20%28%22new%22%2C%20%22on%20hold%22%29%20AND%20assignee%20%3D%20null%20AND%20component%20%3D%20%22UI%22%20and%20updated%5Fon%20%3E%202015%2D11%2D11T00%3A00%3A00%2D07%3A00\n```\n\nTo find all tags with the string \"2015\" in the name:\n\n```\nname ~ \"2015\"\n```\n```\n/2.0/repositories/{username}/{slug}/refs/tags?q=name+%7E+%222015%22\n```\nOr all my branches:\n\n```\nname ~ \"erik/\"\n```\n```\n/2.0/repositories/{username}/{slug}/refs/?q=name+%7E+%22erik%2F%22\n```\n### Sorting query results\n\nYou can sort result sets using the ?sort= query parameter, available on the same resources that support filtering:\n\n* In principle, every field that can be queried can also be used as a key for sorting.\n* By default the sort order is ascending. To reverse the order, prefix the field name with a hyphen (e.g. ?sort=-updated_on).\n* Only one field can be sorted on. Compound fields (e.g. sort on state first, followed by updated_on) are not supported.\n\n\n" + }, + { + "anchor": "pagination", + "title": "Pagination", + "description": "Learn more about pagination", + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM4LjgyIDE1MS42Ij48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2IyZDRmZjt9LmNscy0ye2ZpbGw6IzRjOWFmZjt9LmNscy0ze2ZpbGw6IzAwNTJjYzt9LmNscy00e29wYWNpdHk6MC42O30uY2xzLTV7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudCk7fS5jbHMtNntmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTIpO30uY2xzLTd7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudC0zKTt9LmNscy04e2ZpbGw6dXJsKCNsaW5lYXItZ3JhZGllbnQtNCk7fS5jbHMtOXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTUpO30uY2xzLTEwLC5jbHMtMTEsLmNscy0xMntmaWxsOm5vbmU7fS5jbHMtMTB7c3Ryb2tlOiMzMzg0ZmY7fS5jbHMtMTAsLmNscy0xMSwuY2xzLTEyLC5jbHMtMTN7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOjJweDt9LmNscy0xMXtzdHJva2U6I2ZmYWIwMDt9LmNscy0xMntzdHJva2U6I2ZhZmJmYzt9LmNscy0xM3tmaWxsOiNmZmFiMDA7c3Ryb2tlOiMyNjg0ZmY7fTwvc3R5bGU+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHkxPSI2NS4xNyIgeDI9Ijg2LjM4IiB5Mj0iNjUuMTciIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM0YzlhZmYiLz48c3RvcCBvZmZzZXQ9IjAuMDgiIHN0b3AtY29sb3I9IiM0YzlhZmYiIHN0b3Atb3BhY2l0eT0iMC45NCIvPjxzdG9wIG9mZnNldD0iMC4yNCIgc3RvcC1jb2xvcj0iIzRjOWFmZiIgc3RvcC1vcGFjaXR5PSIwLjc4Ii8+PHN0b3Agb2Zmc2V0PSIwLjQ1IiBzdG9wLWNvbG9yPSIjNGM5YWZmIiBzdG9wLW9wYWNpdHk9IjAuNTMiLz48c3RvcCBvZmZzZXQ9IjAuNTUiIHN0b3AtY29sb3I9IiM0YzlhZmYiIHN0b3Atb3BhY2l0eT0iMC40Ii8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudC0yIiB4MT0iMTUyLjQ0IiB5MT0iNjUuMTciIHgyPSIyMzguODIiIHkyPSI2NS4xNyIgeGxpbms6aHJlZj0iI2xpbmVhci1ncmFkaWVudCIvPjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50LTMiIHgxPSIxOC44NSIgeTE9IjExOC43OCIgeDI9IjEyNi4wOCIgeTI9IjExLjU2IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwLjA2IiBzdG9wLWNvbG9yPSIjMDA2NWZmIi8+PHN0b3Agb2Zmc2V0PSIwLjE5IiBzdG9wLWNvbG9yPSIjMDA2NWZmIiBzdG9wLW9wYWNpdHk9IjAuOTQiLz48c3RvcCBvZmZzZXQ9IjAuNDYiIHN0b3AtY29sb3I9IiMwMDY1ZmYiIHN0b3Atb3BhY2l0eT0iMC43OCIvPjxzdG9wIG9mZnNldD0iMC44MiIgc3RvcC1jb2xvcj0iIzAwNjVmZiIgc3RvcC1vcGFjaXR5PSIwLjUzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDA2NWZmIiBzdG9wLW9wYWNpdHk9IjAuNCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtNCIgeDE9IjExMi43NSIgeTE9IjExOC43OCIgeDI9IjIxOS45NyIgeTI9IjExLjU2IiB4bGluazpocmVmPSIjbGluZWFyLWdyYWRpZW50LTMiLz48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudC01IiB4MT0iNTAuOTciIHkxPSIxMzMuNjEiIHgyPSIxODcuODYiIHkyPSItMy4yOCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMC42NiIgc3RvcC1jb2xvcj0iIzI1Mzg1OCIvPjxzdG9wIG9mZnNldD0iMC44OCIgc3RvcC1jb2xvcj0iIzI1Mzg1OCIgc3RvcC1vcGFjaXR5PSIwLjgzIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMjUzODU4IiBzdG9wLW9wYWNpdHk9IjAuNyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjx0aXRsZT5WaWV3IFZlcnNpb25zPC90aXRsZT48ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj48ZyBpZD0iU29mdHdhcmUiPjxjaXJjbGUgY2xhc3M9ImNscy0xIiBjeD0iOTQuNTMiIGN5PSIxNDcuOTMiIHI9IjMuNjciLz48Y2lyY2xlIGNsYXNzPSJjbHMtMiIgY3g9IjEwNi45NCIgY3k9IjE0Ny45MyIgcj0iMy42NyIvPjxjaXJjbGUgY2xhc3M9ImNscy0zIiBjeD0iMTE5LjM0IiBjeT0iMTQ3LjkzIiByPSIzLjY3Ii8+PGNpcmNsZSBjbGFzcz0iY2xzLTIiIGN4PSIxMzEuNzUiIGN5PSIxNDcuOTMiIHI9IjMuNjciLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE0NC4xNiIgY3k9IjE0Ny45MyIgcj0iMy42NyIvPjxnIGNsYXNzPSJjbHMtNCI+PHJlY3QgaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTUiIHk9IjI1LjkyIiB3aWR0aD0iODYuMzgiIGhlaWdodD0iNzguNDkiLz48L2c+PGcgY2xhc3M9ImNscy00Ij48cmVjdCBpZD0iX1JlY3RhbmdsZV8yIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIHg9IjE1Mi40NCIgeT0iMjUuOTIiIHdpZHRoPSI4Ni4zOCIgaGVpZ2h0PSI3OC40OSIvPjwvZz48cmVjdCBpZD0iX1JlY3RhbmdsZV8zIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTciIHg9IjE2LjI4IiB5PSIxNC4xMiIgd2lkdGg9IjExMi4zNiIgaGVpZ2h0PSIxMDIuMDkiLz48cmVjdCBpZD0iX1JlY3RhbmdsZV80IiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTgiIHg9IjExMC4xOCIgeT0iMTQuMTIiIHdpZHRoPSIxMTIuMzYiIGhlaWdodD0iMTAyLjA5Ii8+PHJlY3QgaWQ9Il9SZWN0YW5nbGVfNSIgZGF0YS1uYW1lPSImbHQ7UmVjdGFuZ2xlJmd0OyIgY2xhc3M9ImNscy05IiB4PSI0Ny42OSIgd2lkdGg9IjE0My40NSIgaGVpZ2h0PSIxMzAuMzQiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNzkuMTYiIHkxPSIxNi4xOCIgeDI9IjExNy4yNCIgeTI9IjE2LjE4Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iMTYuMTgiIHgyPSI3Mi42IiB5Mj0iMTYuMTgiLz48bGluZSBjbGFzcz0iY2xzLTExIiB4MT0iNzkuMTYiIHkxPSIyNi45NSIgeDI9IjExNy4yNCIgeTI9IjI2Ljk1Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iMjYuOTUiIHgyPSI3Mi42IiB5Mj0iMjYuOTUiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNzkuMTYiIHkxPSIzNy43MiIgeDI9IjE1MC43IiB5Mj0iMzcuNzIiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSIzNy43MiIgeDI9IjcyLjYiIHkyPSIzNy43MiIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSIxNTAuNyIgeTE9IjQ4LjQ5IiB4Mj0iMTc1LjU5IiB5Mj0iNDguNDkiLz48bGluZSBjbGFzcz0iY2xzLTEyIiB4MT0iMTEwLjMyIiB5MT0iNDguNDkiIHgyPSIxNDMuMDUiIHkyPSI0OC40OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSI3OS4xNiIgeTE9IjQ4LjQ5IiB4Mj0iMTAxLjM3IiB5Mj0iNDguNDkiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSI0OC40OSIgeDI9IjcyLjYiIHkyPSI0OC40OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI3OS4xNiIgeTE9IjU5LjI2IiB4Mj0iMTUwLjciIHkyPSI1OS4yNiIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjU5LjI2IiB4Mj0iNzIuNiIgeTI9IjU5LjI2Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9Ijc5LjE2IiB5MT0iNzAuMDMiIHgyPSIxNzUuNTkiIHkyPSI3MC4wMyIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjcwLjAzIiB4Mj0iNzIuNiIgeTI9IjcwLjAzIi8+PGxpbmUgY2xhc3M9ImNscy0xMSIgeDE9Ijc5LjE2IiB5MT0iODAuNzkiIHgyPSIxMTcuMjQiIHkyPSI4MC43OSIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjgwLjc5IiB4Mj0iNzIuNiIgeTI9IjgwLjc5Ii8+PGxpbmUgY2xhc3M9ImNscy0xMyIgeDE9Ijc5LjE2IiB5MT0iOTEuNTYiIHgyPSIxNDkuMDYiIHkyPSI5MS41NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjkxLjU2IiB4Mj0iNzIuNiIgeTI9IjkxLjU2Ii8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjYyLjkzIiB5MT0iODAuNzkiIHgyPSI3Mi42IiB5Mj0iODAuNzkiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSI5MS41NiIgeDI9IjcyLjYiIHkyPSI5MS41NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTEiIHgxPSI3OS4xNiIgeTE9IjEwMi4zMyIgeDI9IjExNy4yNCIgeTI9IjEwMi4zMyIvPjxsaW5lIGNsYXNzPSJjbHMtMTAiIHgxPSI2Mi45MyIgeTE9IjEwMi4zMyIgeDI9IjcyLjYiIHkyPSIxMDIuMzMiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iMTI1Ljk4IiB5MT0iMTEzLjEiIHgyPSIxNDkuMDYiIHkyPSIxMTMuMSIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSI3OS4xNiIgeTE9IjExMy4xIiB4Mj0iMTE3LjI0IiB5Mj0iMTEzLjEiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iNjIuOTMiIHkxPSIxMTMuMSIgeDI9IjcyLjYiIHkyPSIxMTMuMSIvPjwvZz48L2c+PC9zdmc+'", + "body": "\nEndpoints that return collections of objects should always apply pagination.\nPaginated collections are always wrapped in the following wrapper object:\n\n```json\n{\n \"size\": 5421,\n \"page\": 2,\n \"pagelen\": 10,\n \"next\": \"https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=3\",\n \"previous\": \"https://api.bitbucket.org/2.0/repositories/pypy/pypy/commits?page=1\",\n \"values\": [\n ...\n ]\n}\n```\n\nPagination is often page-bound, with a query parameter page indicating which\npage is to be returned.\n\nHowever, clients are not expected to construct URLs themselves by manipulating\nthe page number query parameter. Instead, the response contains a link to the\nnext page. This link should be treated as an opaque location that is not to be\nconstructed by clients or even assumed to be predictable. The only contract\naround the next link is that it will return the next chunk of results.\n\nLack of a next link in the response indicates the end of the collection.\n\nThe paginated response contains the following fields:\n\n| Field | Value |\n|------------|----------|\n| `size` | Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. |\n| `page` | Page number of the current results. This is an optional element that is not provided in all responses. |\n| `pagelen` | Current number of objects on the existing page. Globally, the minimum length is 10 and the maximum is 100. Some APIs may specify a different default. |\n| `next` | Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. |\n| `previous` | Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. |\n| `values` | The list of objects. This contains at most `pagelen` objects. |\n\nThe link to the next page is included such that you don't have to hardcode or construct any links. Only values and next are guaranteed (except the last page, which lacks next). This is because the previous and size values can be expensive for some data sets.\n\nIt is important to realize that Bitbucket support both list-based pagination and iterator-based pagination. List-based pagination assumes that the collection is a discrete, immutable, consistently ordered, finite array of objects with a fixed size. Clients navigate a list-based collection by requesting offset-based chunks. In Bitbucket Cloud, list-based responses include the optional size, page, and previous element. The the next and previous links typically resemble something like /foo/bar?page=4.\n\nHowever, not all result sets can be treated as immutable and finite – much like how programming languages tend to distinguish between lists and arrays on one hand and iterators or stream on the other. Where an list-based pagination offers random access into any point in a collection, iterator-based pagination can only navigate forward one element at a time. In Bitbucket such iterator-based pagination contains the next link and pagelen elements, but not necessarily anything else. In these cases, the next link's value often contains an unpredictable hash instead of an explicit page number. The commits resource uses iterator-based pagination.\n" + }, + { + "anchor": "partial-response", + "title": "Partial responses", + "description": "Tweak which fields are returned", + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTYyLjQ0ODcgMjEwLjExMTUiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTYsIC5jbHMtOCB7CiAgICAgICAgZmlsbDogbm9uZTsKICAgICAgfQoKICAgICAgLmNscy0yLCAuY2xzLTggewogICAgICAgIHN0cm9rZTogIzAwNjVmZjsKICAgICAgICBzdHJva2Utd2lkdGg6IDJweDsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBzdHJva2UtbGluZWpvaW46IHJvdW5kOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICNlN2U4ZWM7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogI2ZmZTM4MDsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjZmZmMGIyOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIHN0cm9rZTogI2ZmOTkxZjsKICAgICAgICBzdHJva2Utd2lkdGg6IDEuODE1NnB4OwogICAgICB9CgogICAgICAuY2xzLTYsIC5jbHMtOCB7CiAgICAgICAgc3Ryb2tlLW1pdGVybGltaXQ6IDEwOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIG1peC1ibGVuZC1tb2RlOiBtdWx0aXBseTsKICAgICAgICBmaWxsOiB1cmwoI2xpbmVhci1ncmFkaWVudCk7CiAgICAgIH0KCiAgICAgIC5jbHMtOSB7CiAgICAgICAgZmlsbDogI2Y0ZjVmNzsKICAgICAgfQogICAgPC9zdHlsZT4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB4MT0iMTEzLjM4MTgiIHkxPSI0OS40MyIgeDI9IjE1My43ODkzIiB5Mj0iOS4wMjI1IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2ZhZmJmYyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjAuMjc4NiIgc3RvcC1jb2xvcj0iI2VmZjFmMyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjAuNzY4OCIgc3RvcC1jb2xvcj0iI2QxZDZkZCIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNjMWM3ZDAiLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgogIDx0aXRsZT5Eb2N1bWVudCBUYWJsZTwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0yIiB4MT0iMTcuNDcxIiB5MT0iMTcxLjc1NzMiIHgyPSI3OS4yOTgiIHkyPSIxNzEuNzU3MyIvPgogICAgICAgIDxwb2x5Z29uIGlkPSJfUGF0aF8iIGRhdGEtbmFtZT0iJmx0O1BhdGgmZ3Q7IiBjbGFzcz0iY2xzLTMiIHBvaW50cz0iMTYyLjQ0NSAzOC43MTEgMTYyLjQ0NSAyMTAuMTExIDAgMjEwLjExMSAwIDAgMTIzLjcwNCAwIDE2Mi40MTUgMzguNzExIDE2Mi40NDUgMzguNzExIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy00IiB4PSIxOC45MTE3IiB5PSI3OC4xNTQyIiB3aWR0aD0iNDcuODQ4NSIgaGVpZ2h0PSI3OS42NTM3Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy01IiB4PSIxOC45MTE3IiB5PSI1MS42MDMiIHdpZHRoPSIxMjMuNDUyOSIgaGVpZ2h0PSIyNi41NTEyIi8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy02IiB4PSIxOC45MTE3IiB5PSI1MS42MDMiIHdpZHRoPSIxMjMuNDUyOSIgaGVpZ2h0PSIxMDYuMjA0OSIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNiIgeDE9IjY2Ljc2MDEiIHkxPSI1MS42MDMiIHgyPSI2Ni43NjAxIiB5Mj0iMTU3LjgwNzkiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTYiIHgxPSI5MS4zMjg0IiB5MT0iNTEuNjAzIiB4Mj0iOTEuMzI4NCIgeTI9IjE1Ny44MDc5Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTE1Ljg5NjciIHkxPSI1MS42MDMiIHgyPSIxMTUuODk2NyIgeTI9IjE1Ny44MDc5Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTguOTExNyIgeTE9Ijc4LjE1NDIiIHgyPSIxNDIuMzY0NiIgeTI9Ijc4LjE1NDIiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTYiIHgxPSIxOC45MTE3IiB5MT0iMTA0LjcwNTUiIHgyPSIxNDIuMzY0NiIgeTI9IjEwNC43MDU1Ii8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTguOTExNyIgeTE9IjEzMS4yNTY3IiB4Mj0iMTQyLjM2NDYiIHkyPSIxMzEuMjU2NyIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSIxNjIuNDQ1IDM4LjcxMSAxNjIuNDE1IDM4LjcxMSAxMjMuODcyIDAuMTY5IDEyMy44NzIgNTkuOTIxIDE2Mi40NDUgMzkuMTM3IDE2Mi40NDUgMzguNzExIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy04IiB4MT0iMTguMzk3MyIgeTE9IjE4MS4zNDQiIHgyPSI3OS4xMTM1IiB5Mj0iMTgxLjM0NCIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIxOTAuOTMwNiIgeDI9IjUxLjMwNDkiIHkyPSIxOTAuOTMwNiIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIxNzEuNzU3MyIgeDI9Ijc5LjExMzUiIHkyPSIxNzEuNzU3MyIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtOCIgeDE9IjE4LjM5NzMiIHkxPSIzNi4xNzA1IiB4Mj0iNzkuMTEzNSIgeTI9IjM2LjE3MDUiLz4KICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTgiIHgxPSIxOC4zOTczIiB5MT0iMjYuNTgzOCIgeDI9Ijc5LjExMzUiIHkyPSIyNi41ODM4Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy05IiBwb2ludHM9IjE2Mi40NDkgMzguNzQyIDEyMy43MDcgMzguNzQyIDEyMy43MDcgMCAxNjIuNDQ5IDM4Ljc0MiIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'", + "body": "\nBy default, each endpoint returns the full representation of a resource and in\nsome cases that can be a lot of data. For example, retrieving a list of pull\nrequests can amount to quite a large document.\n\nFor better performance, you can ask the server to only return the fields you\nreally need and to omit unwanted data. To request a partial response and to\nadd or remove specific fields from a response, use the `fields` query\nparameter.\n\n\n### Example\n\nMost API resources embed a substantial list of links pointing to related\nresources. This saves the client from constructing its own URLs, but is\nsomewhat wasteful when the client doesn't need them.\n\nTo significantly reduce the size of the response, use `?fields=-links`:\n\n```json\n$ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links\n{\n \"nickname\": \"evzijst\",\n \"account_status\": \"active\",\n \"website\": \"\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{a288a0ab-e13b-43f0-a689-c4ef0a249875}\",\n \"created_on\": \"2010-07-07T05:16:36+00:00\",\n \"location\": null,\n \"type\": \"user\"\n}\n```\n\n### Fields parameter syntax\n\nThe `fields` parameter supports 3 modes of operation:\n\n1. Removal of select fields (e.g. `-links`)\n2. Pulling in additional fields not normally returned by an endpoint, while\n still getting all the default fields (e.g. `+reviewers`)\n3. Omitting all fields, except those specified (e.g. `owner.display_name`)\n\nThe fields parameter can contain a list of multiple comma-separated field names\n(e.g. `fields=owner.display_name,uuid,links.self.href`). The parameter itself is\nnot repeated.\n\nAs discussed at [Condensed Versus Full Objects](serialization#representations),\nmost objects that are embedded inside other objects (like how `owner` is an\nembedded `user` object in `repository`) appear in \"condensed\" form that omits\nmany fields. The `fields` parameter allows us to pull in additional fields in\nsuch cases.\n\nFor example, the embedded repository object in a pull request does not normally\ncontain its `owner`. To add that in we can use:\n`+values.destination.repository.owner`.\n\n\n### Wildcards\n\nThe asterisk can be used to match all fields on a particular level. For\nexample, removing all entries from the `links` element can be done like this:\n\n```json\n$ curl https://api.bitbucket.org/2.0/users/evzijst?fields=-links.*\n{\n \"nickname\": \"evzijst\",\n \"account_status\": \"active\",\n \"website\": \"\",\n \"display_name\": \"Erik van Zijst\",\n \"uuid\": \"{a288a0ab-e13b-43f0-a689-c4ef0a249875}\",\n \"links\": {},\n \"created_on\": \"2010-07-07T05:16:36+00:00\",\n \"location\": null,\n \"type\": \"user\"\n}\n```\n\nWildcards can be used in combination with exclusion and inclusion. For\ninstance, `-*,+foo,+bar` will remove all elements from the root level and then\nadd in `foo` and `bar`.\n\n\n### URL encoding\n\nBe aware that when using the `+foo.bar` syntax in the query string, that the\n\"+\" must be URL encoded as \"%2B\" and so the URL will be:\n\n```\nhttps://api.bitbucket.org/2.0/repositories/evzijst/interruptingcow?fields=%2Bowner.created_on\n```\n\nWithout URL escaping, \"+\" is interpreted as an encoded space which will not\nmatch any fields.\n\n\n### Field discovery\n\nWhile a resource's `self` URL, as well its \"collection\" URL typically return\nthe full object with all its fields, there are some exceptions for fields that\nare overly verbose or costly to generate.\n\nFor instance, a pull request contains the embedded lists of reviewers and\nparticipants. These fields are included from the `self` URL, but not from the\n`/pullrequests` collections resource, as it would impact performance too much.\n\nTo discover any additional fields that might not be included by default,\n`fields=*` can be used.\n\n\n### More examples\n\nIf we want to get a list of all reviewer nicknames on pull requests I created,\nwe could combine a [filter](filtering) with a partial response. This will omit\nall other data from the response:\n\n```\n/2.0/repositories/bitbucket/bitbucket/pullrequests?fields=values.id,values.reviewers.nickname,values.state&q=author.uuid%3D%22%7Bd301aafa-d676-4ee0-88be-962be7417567%7D%22\n{\n \"values\": [\n {\n \"reviewers\": [\n {\n \"nickname\": \"abhin\"\n },\n {\n \"nickname\": \"dtao\"\n },\n {\n \"nickname\": \"csomme\"\n }\n ],\n \"state\": \"OPEN\",\n \"id\": 11355\n },\n {\n \"reviewers\": [\n {\n \"nickname\": \"csomme\"\n },\n {\n \"nickname\": \"abhin\"\n },\n {\n \"nickname\": \"dstevens\"\n }\n ],\n \"state\": \"MERGED\",\n \"id\": 11347\n },\n {\n \"reviewers\": [\n {\n \"nickname\": \"csomme\"\n },\n {\n \"nickname\": \"jmooring\"\n },\n {\n \"nickname\": \"zdavis\"\n },\n {\n \"nickname\": \"flexbox\"\n }\n ],\n \"state\": \"OPEN\",\n \"id\": 11344\n }\n ]\n}\n```\n" + }, + { + "anchor": "serialization", + "title": "Schemas and Serialization", + "description": "Learn more about object representations", + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMjAuNzYyNCAyMDUuNTg2Ij4KICA8ZGVmcz4KICAgIDxzdHlsZT4KICAgICAgLmNscy0xIHsKICAgICAgICBpc29sYXRpb246IGlzb2xhdGU7CiAgICAgIH0KCiAgICAgIC5jbHMtMiwgLmNscy02IHsKICAgICAgICBtaXgtYmxlbmQtbW9kZTogbXVsdGlwbHk7CiAgICAgIH0KCiAgICAgIC5jbHMtMTMsIC5jbHMtMywgLmNscy00LCAuY2xzLTYgewogICAgICAgIGZpbGw6IG5vbmU7CiAgICAgICAgc3Ryb2tlOiAjYzFjN2QwOwogICAgICAgIHN0cm9rZS1saW5lY2FwOiByb3VuZDsKICAgICAgICBzdHJva2UtbWl0ZXJsaW1pdDogMTA7CiAgICAgICAgc3Ryb2tlLXdpZHRoOiAycHg7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgc3Ryb2tlLWRhc2hhcnJheTogMy43ODE2IDUuMjk0MzsKICAgICAgfQoKICAgICAgLmNscy01IHsKICAgICAgICBmaWxsOiAjMDA2NWZmOwogICAgICB9CgogICAgICAuY2xzLTYgewogICAgICAgIHN0cm9rZS1kYXNoYXJyYXk6IDMuOTIxOSA1LjQ5MDc7CiAgICAgIH0KCiAgICAgIC5jbHMtNyB7CiAgICAgICAgZmlsbDogIzAwNTJjYzsKICAgICAgfQoKICAgICAgLmNscy04IHsKICAgICAgICBmaWxsOiAjNGM5YWZmOwogICAgICB9CgogICAgICAuY2xzLTkgewogICAgICAgIGZpbGw6ICMwMDQ5YjA7CiAgICAgIH0KCiAgICAgIC5jbHMtMTAgewogICAgICAgIGZpbGw6ICM1N2Q5YTM7CiAgICAgIH0KCiAgICAgIC5jbHMtMTEgewogICAgICAgIGZpbGw6ICM3OWYyYzA7CiAgICAgIH0KCiAgICAgIC5jbHMtMTIgewogICAgICAgIGZpbGw6ICMzNmIzN2U7CiAgICAgIH0KCiAgICAgIC5jbHMtMTMgewogICAgICAgIHN0cm9rZS1kYXNoYXJyYXk6IDMuODY4MSA1LjQxNTQ7CiAgICAgIH0KCiAgICAgIC5jbHMtMTQgewogICAgICAgIGZpbGw6ICM0MjUyNmU7CiAgICAgIH0KCiAgICAgIC5jbHMtMTUgewogICAgICAgIGZpbGw6ICMzNDQ1NjM7CiAgICAgIH0KCiAgICAgIC5jbHMtMTYgewogICAgICAgIGZpbGw6ICM1MDVmNzk7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDx0aXRsZT5JbnRlZ3JhdGlvbnM8L3RpdGxlPgogIDxnIGNsYXNzPSJjbHMtMSI+CiAgICA8ZyBpZD0iTGF5ZXJfMiIgZGF0YS1uYW1lPSJMYXllciAyIj4KICAgICAgPGcgaWQ9Ik9iamVjdHMiPgogICAgICAgIDxnIGNsYXNzPSJjbHMtMiI+CiAgICAgICAgICA8Zz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iNzUuMjExNCIgeTE9IjE4Ny44NTczIiB4Mj0iNzcuMDI0OCIgeTI9IjE4Ny4xMTA5Ii8+CiAgICAgICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNCIgeDE9IjgxLjkyMDUiIHkxPSIxODUuMDk1NiIgeDI9IjEzOC4yMjEyIiB5Mj0iMTYxLjkyMDMiLz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMTQwLjY2OSIgeTE9IjE2MC45MTI2IiB4Mj0iMTQyLjQ4MjQiIHkyPSIxNjAuMTY2MiIvPgogICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTUiIHBvaW50cz0iMTk0LjUyNiAyNi41NTIgMTc2LjkwMSAzOC4yNDEgMTU5LjI3IDI2LjU1MiAxNzYuOTAxIDE0Ljg3IDE5NC41MjYgMjYuNTUyIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMTgzLjcxMzUiIHkxPSI0My4yMTg4IiB4Mj0iMTgzLjcxMzUiIHkyPSI5Ny44ODMyIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy03IiBwb2ludHM9IjE3Ni45MDEgMzguMjQxIDE3Ni45MDEgNTguMTY2IDE1OS4yNyA0Ni40NzcgMTU5LjI3IDI2LjU1MiAxNzYuOTAxIDM4LjI0MSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtOCIgcG9pbnRzPSIxOTQuNTI2IDI2LjU1MiAxOTQuNTI2IDQ2LjQ3NyAxNzYuOTAxIDU4LjE2NiAxNzYuOTAxIDM4LjI0MSAxOTQuNTI2IDI2LjU1MiIvPgogICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtNiIgeDE9IjQ3Ljk0ODgiIHkxPSI0Mi4yMTg4IiB4Mj0iMTU5LjExNzIiIHkyPSI0Mi4yMTg4Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy01IiBwb2ludHM9IjIyMC43NjIgOTkuNzUyIDE2Ny44MTcgMTM0Ljg2NCAxMTQuODU0IDk5Ljc1MiAxNjcuODE3IDY0LjY1NyAyMjAuNzYyIDk5Ljc1MiIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtOSIgcG9pbnRzPSIxNjcuODE3IDEzNC44NjQgMTY3LjgxNyAxOTQuNzE4IDExNC44NTQgMTU5LjYwNiAxMTQuODU0IDk5Ljc1MiAxNjcuODE3IDEzNC44NjQiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTgiIHBvaW50cz0iMjIwLjc2MiA5OS43NTIgMjIwLjc2MiAxNTkuNjA2IDE2Ny44MTcgMTk0LjcxOCAxNjcuODE3IDEzNC44NjQgMjIwLjc2MiA5OS43NTIiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTEwIiBwb2ludHM9IjExMC41NDEgMjEuNjA0IDc3Ljk0OSA0My4yMTkgNDUuMzQ1IDIxLjYwNCA3Ny45NDkgMCAxMTAuNTQxIDIxLjYwNCIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTEiIHBvaW50cz0iMTEwLjU0MSAyMS42MDQgMTEwLjU0MSA1OC40NDkgNzcuOTQ5IDgwLjA2NCA3Ny45NDkgNDMuMjE5IDExMC41NDEgMjEuNjA0Ii8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy01IiBwb2ludHM9IjE0MS4xOSAxNDguMDczIDE2Ny44MTMgMTMwLjQxNyAxOTQuNDQ0IDE0OC4wNzMgMTY3LjgxMyAxNjUuNzE5IDE0MS4xOSAxNDguMDczIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy05IiBwb2ludHM9IjE2Ny44MTMgMTMwLjQxNyAxNjcuODEzIDEwMC4zMjEgMTk0LjQ0NCAxMTcuOTc2IDE5NC40NDQgMTQ4LjA3MyAxNjcuODEzIDEzMC40MTciLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTgiIHBvaW50cz0iMTQxLjE5IDE0OC4wNzMgMTQxLjE5IDExNy45NzYgMTY3LjgxMyAxMDAuMzIxIDE2Ny44MTMgMTMwLjQxNyAxNDEuMTkgMTQ4LjA3MyIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTIiIHBvaW50cz0iNDUuMzQ1IDIxLjYwNCA0NS4zNDUgNDQuOTg0IDU3LjIzMSA1Mi44NjQgNTcuMjMxIDY2LjI5NiA3Ny45NDkgODAuMDY0IDc3Ljk0OSA0My4yMTkgNDUuMzQ1IDIxLjYwNCIvPgogICAgICAgIDxnIGNsYXNzPSJjbHMtMiI+CiAgICAgICAgICA8Zz4KICAgICAgICAgICAgPGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjQuNjQzOCIgeTE9Ijg2Ljk1NDQiIHgyPSIyNi4wMTU3IiB5Mj0iODUuNTUzMSIvPgogICAgICAgICAgICA8bGluZSBjbGFzcz0iY2xzLTEzIiB4MT0iMjkuODA0IiB5MT0iODEuNjgzNCIgeDI9IjYwLjM4MTEiIHkyPSI1MC40NDkyIi8+CiAgICAgICAgICAgIDxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjYyLjI3NTIiIHkxPSI0OC41MTQzIiB4Mj0iNjMuNjQ3IiB5Mj0iNDcuMTEzIi8+CiAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNSIgcG9pbnRzPSIzNS4yNTUgODkuNjQ1IDE3LjczNiAxMDEuNDkyIDAgODkuOTYyIDE3LjUyNSA3OC4xMjEgMzUuMjU1IDg5LjY0NSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSIxNy43MzYgMTAxLjQ5MiAxNy45MTUgMTIxLjQxNiAwLjE3OSAxMDkuODg3IDAgODkuOTYyIDE3LjczNiAxMDEuNDkyIi8+CiAgICAgICAgPGxpbmUgY2xhc3M9ImNscy02IiB4MT0iMjAuNTg0OSIgeTE9IjEwNS41MzA1IiB4Mj0iNjUuODc0OSIgeTI9IjE3MS4zNjgxIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy04IiBwb2ludHM9IjM1LjI1NSA4OS42NDUgMzUuNDM0IDEwOS41NjkgMTcuOTE1IDEyMS40MTYgMTcuNzM2IDEwMS40OTIgMzUuMjU1IDg5LjY0NSIvPgogICAgICAgIDxwb2x5Z29uIGNsYXNzPSJjbHMtMTQiIHBvaW50cz0iOTIuMzk0IDE3My44MTUgNzQuODc1IDE4NS42NjIgNTcuMTM5IDE3NC4xMzIgNzQuNjY0IDE2Mi4yOTEgOTIuMzk0IDE3My44MTUiLz4KICAgICAgICA8cG9seWdvbiBjbGFzcz0iY2xzLTE1IiBwb2ludHM9Ijc0Ljg3NSAxODUuNjYyIDc1LjA1NCAyMDUuNTg2IDU3LjMxOSAxOTQuMDU3IDU3LjEzOSAxNzQuMTMyIDc0Ljg3NSAxODUuNjYyIi8+CiAgICAgICAgPHBvbHlnb24gY2xhc3M9ImNscy0xNiIgcG9pbnRzPSI5Mi4zOTQgMTczLjgxNSA5Mi41NzQgMTkzLjczOSA3NS4wNTQgMjA1LjU4NiA3NC44NzUgMTg1LjY2MiA5Mi4zOTQgMTczLjgxNSIvPgogICAgICA8L2c+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K'", + "body": "\n----\n\n* [Open API Specification](#open-api-specification)\n* [JSON Schema](#json-schema)\n* [Condensed Versus Full Objects](#condensed-versus-full-objects)\n\n____\n\n\n### Open API Specification\n\nBitbucket uses the [Open API Specification](https://openapis.org) (OAI,\nformerly known as Swagger) to describe its APIs. Our OAI specification schema\nis hosted at [https://api.bitbucket.org/swagger.json](https://api.bitbucket.org/swagger.json)\nand serves as the canonical definition and comprehensive declaration of all\navailable endpoints.\n\nThe OAI specification makes writing client applications easier by:\nauto-generating boilerplate code (like data object classes) and dealing with\nauthentication and error handling.\n\nYou can find a comprehensive set of open tools for the OAI specification at:\n[https://github.com/swagger-api](https://github.com/swagger-api).\n\n\n### JSON Schema\n\nBitbucket uses JSON Schema to describe the layout of every type of object\nconsumed or produced by the API. These schemas are collected under the\n`#definitions` element of our swagger.json file.\n\nWhen an endpoint expects an object as part of a POST or PUT, it also expects\nthe object to validate against the JSON schemas. The same applies to objects\nreturned by an endpoint.\n\n\n### Condensed Versus Full Objects\n\nMost objects in Bitbucket come both in \"full\" and \"partial\" representation.\nThe full representation is when all elements are included. This is the layout\nreturned by a resource's `self` location (e.g. `/2.0/repositories/foo/bar`),\nas well as resource collection endpoints (e.g. `/2.0/repositories`).\n\nHowever, Bitbucket objects often embed other objects. For example, a `repository`\nobject embeds a `user` object for its owner. Likewise, a `pullrequest` object\nembeds its `repository` object.\n\nThese related objects are embedded, or inlined, to reduce the \"chatter\" when\nclients make frequent followup API calls to collect information on common,\nrelated information.\n\nEmbedded related objects are typically limited in their fields to avoid such\nobject graphs from becoming too deep and noisy. They often exclude their own\nnested objects in an attempt to strike a balance between performance and\nutility.\n\nAn object's embedded or condensed representation tends to be standardized,\nmeaning the fields included is the same set, regardless of where the object\nwas embedded.\n" + }, + { + "anchor": "uri-uuid", + "title": "URI, UUID, and structures", + "description": "URL's, UUID's, errors, and timestamps", + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTc5LjI2IDE3Ny42NSI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50KTt9LmNscy0ye2ZpbGw6IzA5MWU0Mjt9LmNscy0xMCwuY2xzLTExLC5jbHMtMywuY2xzLTQsLmNscy05e2ZpbGw6bm9uZTt9LmNscy0ze3N0cm9rZTojOTljMWZmO30uY2xzLTMsLmNscy00e3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6MDt9LmNscy0xMiwuY2xzLTQsLmNscy05e3N0cm9rZTojZTVlOGVjO30uY2xzLTV7ZmlsbDojMzQ0NTYzO30uY2xzLTZ7ZmlsbDojZmY4YjAwO30uY2xzLTd7ZmlsbDojZmZjNDAwO30uY2xzLTh7ZmlsbDojMDA2NWZmO30uY2xzLTEwLC5jbHMtMTEsLmNscy0xMiwuY2xzLTEzLC5jbHMtOXtzdHJva2UtbWl0ZXJsaW1pdDoxMDtzdHJva2Utd2lkdGg6MnB4O30uY2xzLTEwe3N0cm9rZTojZmZhYjAwO30uY2xzLTExLC5jbHMtMTN7c3Ryb2tlOiMwMDY1ZmY7fS5jbHMtMTJ7ZmlsbDojOTljMWZmO30uY2xzLTEze2ZpbGw6I2U1ZThlYzt9PC9zdHlsZT48bGluZWFyR3JhZGllbnQgaWQ9ImxpbmVhci1ncmFkaWVudCIgeDE9IjAuNCIgeTE9IjE3OC4wNSIgeDI9IjE3OC44NSIgeTI9Ii0wLjQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMwOTFlNDIiLz48c3RvcCBvZmZzZXQ9IjAuMDciIHN0b3AtY29sb3I9IiMwZDIyNDUiLz48c3RvcCBvZmZzZXQ9IjAuNDkiIHN0b3AtY29sb3I9IiMxZjMyNTMiLz48c3RvcCBvZmZzZXQ9IjAuNzkiIHN0b3AtY29sb3I9IiMyNTM4NTgiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48dGl0bGU+Q29kZTwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiIGRhdGEtbmFtZT0iTGF5ZXIgMiI+PGcgaWQ9IlNvZnR3YXJlIj48cmVjdCBpZD0iX1JlY3RhbmdsZV8iIGRhdGEtbmFtZT0iJmx0O1JlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtMSIgd2lkdGg9IjE3OS4yNiIgaGVpZ2h0PSIxNzcuNjUiLz48cGF0aCBjbGFzcz0iY2xzLTIiIGQ9Ik0xNzkuMjYsMjYuNjRIMFY3MS43NUExNjYuNDEsMTY2LjQxLDAsMCwwLDYzLjI0LDU5LjUxYTE4OC40MSwxODguNDEsMCwwLDAsMTcuMzktOC4zNmMxOC40NC05LjQzLDQ4LjM3LTE3LjksOTguNjItMTNabS0xNTkuNDQsMzRoMFptMC0xNC4wOGgwWiIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjE5LjgxIiB5MT0iNDYuNTgiIHgyPSIyNS4wNyIgeTI9IjQ2LjU4Ii8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSI2MC42NiIgeDI9IjE5LjgxIiB5Mj0iNjAuNjYiLz48bGluZSBjbGFzcz0iY2xzLTMiIHgxPSIxOS44MSIgeTE9Ijc0Ljc0IiB4Mj0iMjUuMDciIHkyPSI3NC43NCIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iODguODIiIHgyPSIxOS44MSIgeTI9Ijg4LjgyIi8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSIxMDIuODkiIHgyPSIxOS44MSIgeTI9IjEwMi44OSIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iMTE2Ljk3IiB4Mj0iMTkuODEiIHkyPSIxMTYuOTciLz48bGluZSBjbGFzcz0iY2xzLTMiIHgxPSIyNS4wNyIgeTE9IjEzMS4wNSIgeDI9IjE5LjgxIiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy0zIiB4MT0iMjUuMDciIHkxPSIxNDUuMTMiIHgyPSIxOS44MSIgeTI9IjE0NS4xMyIvPjxsaW5lIGNsYXNzPSJjbHMtMyIgeDE9IjI1LjA3IiB5MT0iMTU5LjIxIiB4Mj0iMTkuODEiIHkyPSIxNTkuMjEiLz48bGluZSBjbGFzcz0iY2xzLTQiIHgxPSI1NS44OSIgeTE9IjEzMS4wNSIgeDI9IjkzLjk5IiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy00IiB4MT0iNTUuODkiIHkxPSIxNDUuMTMiIHgyPSIxMzkuNjciIHkyPSIxNDUuMTMiLz48cmVjdCBjbGFzcz0iY2xzLTUiIHdpZHRoPSIxNzkuMjYiIGhlaWdodD0iMjYuNjQiLz48Y2lyY2xlIGNsYXNzPSJjbHMtNiIgY3g9IjEzLjUiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxjaXJjbGUgY2xhc3M9ImNscy03IiBjeD0iMzAuMTgiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxjaXJjbGUgY2xhc3M9ImNscy04IiBjeD0iNDYuODYiIGN5PSIxMi4wOCIgcj0iNS4xMSIvPjxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTc1LjQxLDg4LjgyIi8+PHBhdGggY2xhc3M9ImNscy05IiBkPSJNMzIuODksODguODIiLz48bGluZSBjbGFzcz0iY2xzLTEwIiB4MT0iMzIuODkiIHkxPSI3NC43NCIgeDI9Ijc1LjQxIiB5Mj0iNzQuNzQiLz48bGluZSBjbGFzcz0iY2xzLTExIiB4MT0iMzIuODkiIHkxPSI2MC42NiIgeDI9Ijc1LjQxIiB5Mj0iNjAuNjYiLz48bGluZSBjbGFzcz0iY2xzLTkiIHgxPSIzMi44OSIgeTE9IjQ2LjU4IiB4Mj0iNTUuODkiIHkyPSI0Ni41OCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjQ2LjU4IiB4Mj0iMjUuMDciIHkyPSI0Ni41OCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjYwLjY2IiB4Mj0iMjUuMDciIHkyPSI2MC42NiIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9Ijc0Ljc0IiB4Mj0iMjUuMDciIHkyPSI3NC43NCIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9Ijg4LjgyIiB4Mj0iMjUuMDciIHkyPSI4OC44MiIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjEwMi44OSIgeDI9IjI1LjA3IiB5Mj0iMTAyLjg5Ii8+PGxpbmUgY2xhc3M9ImNscy0xMiIgeDE9IjE5LjgxIiB5MT0iMTE2Ljk3IiB4Mj0iMjUuMDciIHkyPSIxMTYuOTciLz48bGluZSBjbGFzcz0iY2xzLTEyIiB4MT0iMTkuODEiIHkxPSIxMzEuMDUiIHgyPSIyNS4wNyIgeTI9IjEzMS4wNSIvPjxsaW5lIGNsYXNzPSJjbHMtMTIiIHgxPSIxOS44MSIgeTE9IjE0NS4xMyIgeDI9IjI1LjA3IiB5Mj0iMTQ1LjEzIi8+PGxpbmUgY2xhc3M9ImNscy0xMiIgeDE9IjE5LjgxIiB5MT0iMTU5LjIxIiB4Mj0iMjUuMDciIHkyPSIxNTkuMjEiLz48bGluZSBpZD0iX0xpbmVfIiBkYXRhLW5hbWU9IiZsdDtMaW5lJmd0OyIgY2xhc3M9ImNscy0xMCIgeDE9Ijg0LjI0IiB5MT0iMTE2Ljk3IiB4Mj0iMTU2LjY1IiB5Mj0iMTE2Ljk3Ii8+PHBhdGggY2xhc3M9ImNscy05IiBkPSJNMzIuODksMTE3aDBaIi8+PGxpbmUgY2xhc3M9ImNscy0xMCIgeDE9IjEwMiIgeTE9IjEzMS4wNSIgeDI9IjE2My42MiIgeTI9IjEzMS4wNSIvPjxsaW5lIGNsYXNzPSJjbHMtMTMiIHgxPSI1NS44OSIgeTE9IjEzMS4wNSIgeDI9IjkzLjk5IiB5Mj0iMTMxLjA1Ii8+PGxpbmUgY2xhc3M9ImNscy0xMyIgeDE9IjU1Ljg5IiB5MT0iMTQ1LjEzIiB4Mj0iMTM5LjY3IiB5Mj0iMTQ1LjEzIi8+PGxpbmUgY2xhc3M9ImNscy05IiB4MT0iNzguOSIgeTE9IjE1OS4yMSIgeDI9IjExMy41MSIgeTI9IjE1OS4yMSIvPjxsaW5lIGNsYXNzPSJjbHMtOSIgeDE9IjU5LjYxIiB5MT0iODguODIiIHgyPSI5OS4zMyIgeTI9Ijg4LjgyIi8+PGxpbmUgY2xhc3M9ImNscy05IiB4MT0iNTkuNjEiIHkxPSIxMDIuODkiIHgyPSI5OS4zMyIgeTI9IjEwMi44OSIvPjxjaXJjbGUgY2xhc3M9ImNscy02IiBjeD0iMTMuNSIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTciIGN4PSIzMC4xOCIgY3k9IjEyLjA4IiByPSI1LjExIi8+PGNpcmNsZSBjbGFzcz0iY2xzLTgiIGN4PSI0Ni44NiIgY3k9IjEyLjA4IiByPSI1LjExIi8+PC9nPjwvZz48L3N2Zz4='", + "body": "\nYou should be familiar with REST architecture before writing an integration. Read this overview page to gain a good understanding of Bitbucket's REST implementation.\n\n----\n\n* [URI structure](#uri-structure)\n* [HTTP methods](#http-methods)\n* [UUID](#universally-unique-identifier)\n * [User object and UUID](#user-object-and-uuid)\n * [Repository object and UUID](#repository-object-and-uuid)\n * [Team object and UUID](#team-object-and-uuid)\n* [Standard error responses](#standardized-error-responses)\n* [Standard ISO-8601 timestamps](#standard-iso-8601-timestamps)\n\n----\n\n\n### URI structure\n\nAll Bitbucket Cloud requests start with the `https://api.bitbucket.org/2.0` prefix (for the 2.0 API) and `https://api.bitbucket.org/1.0` prefix (1.0 API).\n\nThe next segment of the URI path depends on the endpoint of the request. For example, using the curl command and the repositories endpoint you can list all the issues on Bitbucket's tutorial repository:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/tutorials/tutorials.bitbucket.org\n```\nGiven a specific endpoint, you can then drill down to a particular aspect or resource of that endpoint. The issues resource on a repository is an example:\n\n```\ncurl https://api.bitbucket.org/1.0/repositories/tutorials/tutorials.bitbucket.org/issues\n```\n\n#### HTTP methods\n\nA given endpoint or resource has a series of actions (or methods) associated with it. The Bitbucket service supports these standard HTTP methods:\n\n| Call | Description |\n|------|-------------|\n| GET | Retrieves information. |\n| PUT | Updates existing information. |\n| POST | Creates new information. |\n| DELETE | Removes existing information. |\n\nFor example, you can call use the POST action on the issues resource and create an issue on the issue tracker.\n\n**Specifying content length**\n\nYou can get a `411 Length Required` response. If this happens, the API requires a Content-Length header but the client is not sending it. You should add the header yourself, for example using the curl client:\n\n```\ncurl -r PUT --header \"Content-Length: 0\" -u user:app_password https://api.bitbucket.org/1.0/emails/rap@atlassian.com\n```\n\n### Universally Unique Identifier\n\nUUID's provide a single point of recognition for users, teams, and repositories. The UUID is distinct from the username, team name, and repository name fields and remains the same even when those fields change. For example when a user changes their username or moves a repository you will need to modify calls which use those identifiers but not if you are pointing to the UUID.\n\n#### UUID examples and structure\n\nUUID's work with both the 1.0 and 2.0 APIs for the user, team, and repository objects. The following examples the following characters are replacements for curly brackets: `%7B` replaces `{` and `%7D` replaces `}`. You will see this structure in the following example sections.\n\n#### User object and UUID\n\nWhen you make a call using either the username or the UUID for that user the response is the same.\n\n**Call with username**:\n\n```\ncurl https://api.bitbucket.org/2.0/users/tutorials\n```\n\n***Call with UUID for the user**:\n\n```\ncurl https://api.bitbucket.org/2.0/users/%7Bc788b2da-b7a2-404c-9e26-d3f077557007%7D\n```\n\n**Response**\n```JSON\n{\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"website\": \"https://tutorials.bitbucket.org/\",\n \"display_name\": \"tutorials account\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n }\n },\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"location\": \"Santa Monica, CA\",\n \"type\": \"user\"\n}\n```\n\n#### Repository object and UUID\n\nOnce you have the UUID for a repository you no longer need a username or team name to make the API call so long as you use an empty field. This helps you resolve repositories no matter if the username or team name changes.\n\n**Call with team name (1team) and repository name (moxie)**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/1team/moxie\n```\n**Call with UUID and empty field**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/%7B%7D/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D\n```\n\n**Call with UUID and teamname**:\n\n```\ncurl https://api.bitbucket.org/2.0/repositories/1team/%7B21fa9bf8-b5b2-4891-97ed-d590bad0f871%7D\n```\n\n**Response**\n\n```JSON\n{\n \"created_on\": \"2013-11-08T01:11:03.222520+00:00\",\n \"description\": \"\",\n \"fork_policy\": \"allow_forks\",\n \"full_name\": \"1team/moxie\",\n \"has_issues\": false,\n \"has_wiki\": false,\n \"is_private\": false,\n \"language\": \"\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/1team/moxie/avatar/32/\"\n },\n \"branches\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/branches\"\n },\n \"clone\": [\n {\n \"href\": \"https://bitbucket.org/1team/moxie.git\",\n \"name\": \"https\"\n },\n {\n \"href\": \"ssh://git@bitbucket.org/1team/moxie.git\",\n \"name\": \"ssh\"\n }\n ],\n \"commits\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/commits\"\n },\n \"downloads\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/downloads\"\n },\n \"forks\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/forks\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/1team/moxie\"\n },\n \"pullrequests\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/pullrequests\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie\"\n },\n \"tags\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/refs/tags\"\n },\n \"watchers\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/1team/moxie/watchers\"\n }\n },\n \"name\": \"moxie\",\n \"owner\": {\n \"display_name\": \"the team\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/1team/avatar/32/\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/1team/\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/teams/1team\"\n }\n },\n \"type\": \"team\",\n \"username\": \"1team\",\n \"uuid\": \"{aa559944-83c9-4963-a9a8-69ac8d9cf5d2}\"\n },\n \"project\": {\n \"key\": \"PROJ\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/user/1team/projects/PROJ/avatar/32\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/account/user/1team/projects/PROJ\"\n }\n },\n \"name\": \"Untitled project\",\n \"type\": \"project\",\n \"uuid\": \"{ab52aaeb-16ad-4fb0-bb1d-47e4f00367ff}\"\n },\n \"scm\": \"git\",\n \"size\": 33348,\n \"type\": \"repository\",\n \"updated_on\": \"2013-11-08T01:11:03.263237+00:00\",\n \"uuid\": \"{21fa9bf8-b5b2-4891-97ed-d590bad0f871}\",\n \"website\": \"\"\n}\n```\n\n#### Team object and UUID\n\nThis example shows a call for a list of team members using both the team name and with the UUID for the team object. As the call is unauthenticated in the following example the response object will only show members with public profiles. The response is the same in either case.\n\n**Call with teamname**\n\n```\ncurl https://api.bitbucket.org/2.0/teams/1team/members\n```\n**Call with UUID for team object**\n\n```\ncurl https://api.bitbucket.org/2.0/teams/%7Baa559944-83c9-4963-a9a8-69ac8d9cf5d2%7D/members\n```\n\n**Response**\n\n```JSON\n{\n \"page\": 1,\n \"pagelen\": 50,\n \"size\": 2,\n \"values\": [\n {\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"display_name\": \"tutorials account\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/tutorials/avatar/32/\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials/\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/tutorials\"\n }\n },\n \"location\": null,\n \"type\": \"user\",\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"website\": \"https://tutorials.bitbucket.org/\"\n },\n {\n \"created_on\": \"2013-12-10T14:44:13+00:00\",\n \"display_name\": \"Dan Stevens [Atlassian]\",\n \"links\": {\n \"avatar\": {\n \"href\": \"https://bitbucket.org/account/dans9190/avatar/32/\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/followers\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/following\"\n },\n \"hooks\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190/hooks\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/dans9190/\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/dans9190\"\n },\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/dans9190\"\n },\n \"snippets\": {\n \"href\": \"https://api.bitbucket.org/2.0/snippets/dans9190\"\n }\n },\n \"location\": null,\n \"type\": \"user\",\n \"username\": \"dans9190\",\n \"nickname\": \"dans9190\",\n \"account_status\": \"active\",\n \"uuid\": \"{1cd06601-cd0e-4fce-be03-e9ac226978b7}\",\n \"website\": \"\"\n }\n ]\n}\n```\n\n### Standardized error responses\n\nThe 2.0 API standardizes the error response layout. The 2.0 API serves a JSON\nobject along with the appropriate HTTP status code. The JSON object provides a\ndetailed problem description.\n\n```json\n{\n \"type\": \"error\",\n \"error\": {\n \"message\": \"Bad request\",\n \"fields\": {\n \"src\": [\n \"This field is required.\"\n ]\n },\n \"detail\": \"You must specify a valid source branch when creating a pull request.\",\n \"id\": \"d23a1cc5178f7637f3d9bf2d13824258\",\n \"data\": {\n \"extra\": \"Optional, endpoint-specific data to further augment the error.\"\n }\n }\n}\n```\n\nThis object contains an error element which contains the following nested\nelements:\n\n| Element | Description |\n|---------|-------------|\n| message | A short description of the problem. This element is always present. Its value may be localized. |\n| fields | This optional element is used in response to POST or PUT operations in which clients have provided invalid input. It contains a list of one or more client-provided fields that failed validation. The values may be localized. |\n| detail | An optional detailed explanation of the failure. Its value may be localized.\n| id | An optional unique error identifier that identifies the error in Bitbucket's logging system. If you feel you hit a bug in an API and this field is provided, please mention it if you decide to contact support as it will greatly help us narrow down the problem. |\n\n### Standard ISO-8601 timestamps\n\nAll 2.0 APIs use standardized ISO-8601 timestamps. In most cases, our APIs return UTC timestamps and for these, the timezone offset part will be 00:00. In rare cases where the original localized timestamp has significance, the timezone offset may identify the event's original timezone.\n" + }, + { + "anchor": "cors-hypermedia", + "title": "Cors and hypermedia", + "description": "Learn about resources and linking", + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjM2LjYgMjE4LjQzIj48ZGVmcz48c3R5bGU+LmNscy0xe2lzb2xhdGlvbjppc29sYXRlO30uY2xzLTIsLmNscy0zLC5jbHMtNHtmaWxsOm5vbmU7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOjExcHg7fS5jbHMtMntzdHJva2U6dXJsKCNsaW5lYXItZ3JhZGllbnQpO30uY2xzLTN7c3Ryb2tlOnVybCgjTmV3X0dyYWRpZW50X1N3YXRjaF8xNCk7fS5jbHMtNHtzdHJva2U6dXJsKCNOZXdfR3JhZGllbnRfU3dhdGNoXzEpO30uY2xzLTV7ZmlsbDojNDI1MjZlO30uY2xzLTZ7ZmlsbDojZmY1NjMwO30uY2xzLTEwLC5jbHMtNywuY2xzLTh7bWl4LWJsZW5kLW1vZGU6bXVsdGlwbHk7fS5jbHMtN3tmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTIpO30uY2xzLTh7ZmlsbDp1cmwoI2xpbmVhci1ncmFkaWVudC0zKTt9LmNscy05e2ZpbGw6IzAwNjVmZjt9LmNscy0xMHtmaWxsOnVybCgjbGluZWFyLWdyYWRpZW50LTQpO308L3N0eWxlPjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50IiB5MT0iMTY3Ljg3IiB4Mj0iMTkxLjU2IiB5Mj0iMTY3Ljg3IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjNTA1Zjc5Ii8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMzQ0NTYzIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9Ik5ld19HcmFkaWVudF9Td2F0Y2hfMTQiIHgxPSIxMTIuODMiIHkxPSIxMzEuNzIiIHgyPSIyMzYuNiIgeTI9IjEzMS43MiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzAwNTJjYyIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzI2ODRmZiIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJOZXdfR3JhZGllbnRfU3dhdGNoXzEiIHgxPSI0NS4wNiIgeTE9Ijg2LjY5IiB4Mj0iMTY4Ljg4IiB5Mj0iODYuNjkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiNkZTM1MGIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZjc0NTIiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyLWdyYWRpZW50LTIiIHgxPSIzNDQ3LjkzIiB5MT0iLTkxOC43OSIgeDI9IjM0NTEuNCIgeTI9Ii0xMDMyLjc2IiBncmFkaWVudFRyYW5zZm9ybT0idHJhbnNsYXRlKC01NzIuMzggMzcwNC4yOSkgcm90YXRlKC02NC4zNCkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAuMzEiIHN0b3AtY29sb3I9IiNjMWM3ZDAiIHN0b3Atb3BhY2l0eT0iMCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI2MxYzdkMCIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtMyIgeDE9IjM1MDYuNiIgeTE9Ii03OTYuNjYiIHgyPSIzNTEwLjA3IiB5Mj0iLTkxMC42MyIgeGxpbms6aHJlZj0iI2xpbmVhci1ncmFkaWVudC0yIi8+PGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQtNCIgeDE9IjM1ODEuNjgiIHkxPSItOTA2LjgyIiB4Mj0iMzU4NS4xNiIgeTI9Ii0xMDIwLjc5IiB4bGluazpocmVmPSIjbGluZWFyLWdyYWRpZW50LTIiLz48L2RlZnM+PHRpdGxlPldlYmhvb2tzPC90aXRsZT48ZyBjbGFzcz0iY2xzLTEiPjxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPjxnIGlkPSJTb2Z0d2FyZSI+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNMTg2LjA2LDE2Ny44N0gxMTcuNzJBMjcuNTgsMjcuNTgsMCwwLDAsOTIuMjQsMTg1YTQ1LjA2LDQ1LjA2LDAsMSwxLTQxLjY4LTYyLjE5Ii8+PHBhdGggY2xhc3M9ImNscy0zIiBkPSJNMTE4LjMzLDUwLjUybDM0LjE1LDU5LjE4YTI3LjU5LDI3LjU5LDAsMCwwLDI3LjU4LDEzLjUxLDQ1LjA2LDQ1LjA2LDAsMSwxLTMzLDY3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy00IiBkPSJNNTAuNTYsMTY3Ljg3bDM0LjE4LTU5LjE2YTI3LjU5LDI3LjU5LDAsMCwwLTIuMDktMzAuNjQsNDUuMDYsNDUuMDYsMCwxLDEsNzQuNy01Ii8+PHBhdGggY2xhc3M9ImNscy01IiBkPSJNMTg2LjA2LDE5OS42NmEzMS43OSwzMS43OSwwLDEsMSwzMS43OS0zMS43OUEzMS44MiwzMS44MiwwLDAsMSwxODYuMDYsMTk5LjY2WiIvPjxnIGlkPSJfR3JvdXBfIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPjxwYXRoIGNsYXNzPSJjbHMtNiIgZD0iTTQ5LjU2LDE5OS42NGEzMS43OSwzMS43OSwwLDEsMSwzMi43Ny0zMC43N0EzMS44MiwzMS44MiwwLDAsMSw0OS41NiwxOTkuNjRaIi8+PC9nPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0iTTU0LjEyLDE4MC4zNmE1OC45LDU4LjksMCwwLDAtMS41OS0xMS4yN3MtMi4zNS05LjQ0LTcuMzMtMTYuODNhNDMuODksNDMuODksMCwwLDAtMTEuNzMtMTEuMTcsMzEuNzcsMzEuNzcsMCwwLDAsMjkuMjgsNTYuMTNDNTguMjksMTkyLjQ0LDU0LjY4LDE4Ni45LDU0LjEyLDE4MC4zNloiLz48cGF0aCBjbGFzcz0iY2xzLTgiIGQ9Ik0xODkuNjIsMTgwLjM2QTU4LjksNTguOSwwLDAsMCwxODgsMTY5LjA4cy0yLjM1LTkuNDQtNy4zMy0xNi44M0E0My44OSw0My44OSwwLDAsMCwxNjksMTQxLjA4YTMxLjc3LDMxLjc3LDAsMCwwLDI5LjI4LDU2LjEzQzE5My43OSwxOTIuNDQsMTkwLjE4LDE4Ni45LDE4OS42MiwxODAuMzZaIi8+PGcgaWQ9Il9Hcm91cF8yIiBkYXRhLW5hbWU9IiZsdDtHcm91cCZndDsiPjxwYXRoIGNsYXNzPSJjbHMtOSIgZD0iTTg5LjksMzMuNzhhMzIuNDYsMzIuNDYsMCwxLDEsMTEuODgsNDQuMzRBMzIuNDksMzIuNDksMCwwLDEsODkuOSwzMy43OFoiLz48L2c+PHBhdGggY2xhc3M9ImNscy0xMCIgZD0iTTEyMi4yMyw2Ni4xM2E1OC45LDU4LjksMCwwLDAtMS41OS0xMS4yN3MtMi4zNS05LjQ0LTcuMzMtMTYuODNjLTMuMzctNS05LjA2LTkuNzktMTUuNDMtMTMuNDhBMzIuNDQsMzIuNDQsMCwwLDAsMTI4Ljc3LDgwLjZDMTI1LjMxLDc2LjM5LDEyMi43LDcxLjYxLDEyMi4yMyw2Ni4xM1oiLz48L2c+PC9nPjwvZz48L3N2Zz4='", + "body": "\nThis section describes [Cross-origin resource sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) (CORS), what content types we support in requests and responses, and hyperlinking resources in each json responses.\n\n\n----\n\n* [CORS](#cors)\n* [Supported content types](#supported-content-types)\n* [Resource links](#resource-links)\n\n----\n\n### Cors\n\nThe Bitbucket API supports Cross-origin resource sharing to allow requests for restricted resources across domains. For more information you can refer to:\n\n* [Wikipedia article on CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)\n* [W3C CORS recommendation](https://www.w3.org/TR/cors/)\n\nSending a general request from the api to bitbucket.com:\n\n`curl -i https://api.bitbucket.org -H \"origin: http://bitbucket.com\"`\n\nGives this result:\n\n HTTP/1.1 302 FOUND\n Server: nginx/1.6.2\n Vary: Cookie\n Cache-Control: max-age=900\n Content-Type: text/html; charset=utf-8\n Strict-Transport-Security: max-age=31536000\n Date: Tue, 21 Jun 2016 17:54:37 GMT\n Location: http://confluence.atlassian.com/x/IYBGDQ\n X-Served-By: app-110\n X-Static-Version: 2c820eb0d2b3\n ETag: \"d41d8cd98f00b204e9800998ecf8427e\"\n X-Content-Type-Options: nosniff\n X-Render-Time: 0.00379920005798\n Connection: Keep-Alive\n X-Version: 2c820eb0d2b3\n X-Frame-Options: SAMEORIGIN\n X-Request-Count: 383\n X-Cache-Info: cached\n Content-Length: 0\n\nSending the same request with the CORS check -X OPTIONS in the call:\n\n`curl -i https://api.bitbucket.org -H \"origin: http://bitbucket.com\" -X OPTIONS`\n\nGives this result:\n\n HTTP/1.1 302 FOUND\n Server: nginx/1.6.2\n Vary: Cookie\n Cache-Control: max-age=900\n Content-Type: text/html; charset=utf-8\n Access-Control-Expose-Headers: Accept-Ranges, Content-Encoding, Content-Length, Content-Type, ETag, Last-Modified\n Strict-Transport-Security: max-age=31536000\n Date: Tue, 21 Jun 2016 18:04:30 GMT\n Access-Control-Max-Age: 86400\n Location: http://confluence.atlassian.com/x/IYBGDQ\n X-Served-By: app-111\n Access-Control-Allow-Origin: *\n X-Static-Version: 2c820eb0d2b3\n ETag: \"d41d8cd98f00b204e9800998ecf8427e\"\n X-Content-Type-Options: nosniff\n X-Render-Time: 0.00371098518372\n Connection: keep-alive\n X-Version: 2c820eb0d2b3\n X-Frame-Options: SAMEORIGIN\n X-Request-Count: 357\n Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS\n Access-Control-Allow-Headers: Accept, Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, Range, X-CsrftokenX-Requested-With\n X-Cache-Info: not cacheable; request wasn't a GET or HEAD\n Content-Length: 0\n\n\n\n### Supported content types\n\nThe default and primary content type for 2.0 APIs is JSON. This applies both to responses from the server and to the request bodies provided by the client.\n\nUnless documented otherwise, whenever creating a new (POST) or modifying an existing (PUT) object, your client must provide the object's normal representation. Not every object element can be mutated. For example, a repository's created_on date is an auto-generated, immutable field. Your client can omit immutable fields from a request body.\n\nIn some cases, a resource might also accept regular application/x-www-url-form-encoded POST and PUT bodies. Such bodies can be more convenient in scripts and command line usage. Requests bodies can contain contain nested elements or they can be flat (without nested elements). Clients can send flat request bodies as either as application/json or as application/x-www-url-form-encoded. Nested objects always require JSON.\n\n### Resource links\n\nEvery 2.0 object contains a links element that points to related resources or alternate representations. Use links to quickly discover and traverse to related objects. Links serve a \"self-documenting\" function for each endpoint. For example, the following request for a specific user:\n\n\n`$ curl https://api.bitbucket.org/2.0/users/tutorials`\n\n```json\n{\n \"username\": \"tutorials\",\n \"nickname\": \"tutorials\",\n \"account_status\": \"active\",\n \"website\": \"https://tutorials.bitbucket.org/\",\n \"display_name\": \"tutorials account\",\n \"uuid\": \"{c788b2da-b7a2-404c-9e26-d3f077557007}\",\n \"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials\"\n },\n \"repositories\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/tutorials\"\n },\n \"html\": {\n \"href\": \"https://bitbucket.org/tutorials\"\n },\n \"followers\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/followers\"\n },\n \"avatar\": {\n \"href\": \"https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Nov/25/tutorials-avatar-1563784409-6_avatar.png\"\n },\n \"following\": {\n \"href\": \"https://api.bitbucket.org/2.0/users/tutorials/following\"\n }\n },\n \"created_on\": \"2011-12-20T16:34:07.132459+00:00\",\n \"location\": \"Santa Monica, CA\",\n \"type\": \"user\"\n}\n```\nLinks can be actual REST API resources or they can be informational. In this example, informative resources include the user's avatar and the HTML URL for the user's Bitbucket account. Your client should avoid hardcoding an API's URL and instead use the URLs returned in API responses.\n\nA link's key is its `rel` (relationship) attribute and it contains a mandatory href element. For example, the following link:\n\n```json\n\"self\": {\n \"href\": \"https://api.bitbucket.org/api/2.0/users/tutorials\"\n}\n```\n\nThe rel for this link is self and the href is https://api.bitbucket.org/api/2.0/users/tutorials. A single rel key can contain an list (array) of href objects. Your client should anticipate that any rel key can contain one or more href objects.\n\nFinally, links can also contain optional elements. Two common optional elements are the name element and the title element. They are often used to disambiguate links that share the same rel key. In the example below, the repository object that contains a clone link with two href objects. Each object contains the optional name element to clarify its use.\n\n```json\n\"links\": {\n \"self\": {\n \"href\": \"https://api.bitbucket.org/2.0/repositories/evzijst/bitbucket\"\n },\n \"clone\": [\n {\n \"href\": \"https://api.bitbucket.org/evzijst/bitbucket.git\",\n \"name\": \"https\"\n },\n {\n \"href\": \"ssh://git@bitbucket.org/erik/bitbucket.git\",\n \"name\": \"ssh\"\n }\n ],\n ...\n}\n```\nLinks can support [URI Templates](https://tools.ietf.org/html/rfc6570); Those that do contain a `\"templated\": \"true\"` element.\n" + }, + { + "anchor": "bb-connect", + "title": "Integrating with Bitbucket Cloud", + "description": "Build Bitbucket integration with Forge or Atlassian Connect", + "icon": "data:image/svg+xml;base64,b'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMjU3LjMxNjMgMTYyLjU5OTQiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuY2xzLTEgewogICAgICAgIGlzb2xhdGlvbjogaXNvbGF0ZTsKICAgICAgfQoKICAgICAgLmNscy0yIHsKICAgICAgICBmaWxsOiAjMzQ0NTYzOwogICAgICB9CgogICAgICAuY2xzLTMgewogICAgICAgIGZpbGw6ICMxZGI5ZDQ7CiAgICAgIH0KCiAgICAgIC5jbHMtNCB7CiAgICAgICAgZmlsbDogIzAwNTdkODsKICAgICAgfQoKICAgICAgLmNscy01LCAuY2xzLTcsIC5jbHMtOSB7CiAgICAgICAgbWl4LWJsZW5kLW1vZGU6IG11bHRpcGx5OwogICAgICB9CgogICAgICAuY2xzLTUgewogICAgICAgIGZpbGw6IHVybCgjTjc1KTsKICAgICAgfQoKICAgICAgLmNscy02IHsKICAgICAgICBmaWxsOiAjMDA2NWZmOwogICAgICB9CgogICAgICAuY2xzLTcgewogICAgICAgIGZpbGw6IHVybCgjTjc1LTIpOwogICAgICB9CgogICAgICAuY2xzLTggewogICAgICAgIGZpbGw6IHVybCgjbGluZWFyLWdyYWRpZW50KTsKICAgICAgfQoKICAgICAgLmNscy05IHsKICAgICAgICBmaWxsOiB1cmwoI043NS0zKTsKICAgICAgfQoKICAgICAgLmNscy0xMCB7CiAgICAgICAgZmlsbDogdXJsKCNUMjAwLVQ3NSk7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9Ik43NSIgeDE9Ii0yMTg5LjU1NiIgeTE9IjI4MDguMjI4NCIgeDI9Ii0yMDkxLjE1NTEiIHkyPSIyODA4LjIyODQiIGdyYWRpZW50VHJhbnNmb3JtPSJtYXRyaXgoMC4xNjgxLCAwLjk4NTgsIDAuOTg1OCwgLTAuMTY4MSwgLTIzNzMuNzM2LCAyNzIyLjEyNzgpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2U1ZThlYyIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNlNWU4ZWMiIHN0b3Atb3BhY2l0eT0iMC4xIi8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJONzUtMiIgZGF0YS1uYW1lPSJONzUiIHgxPSItMjE2OC41OTQ3IiB5MT0iMjkzNS4wNTU2IiB4Mj0iLTIwNzAuMTkzNyIgeTI9IjI5MzUuMDU1NiIgeGxpbms6aHJlZj0iI043NSIvPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJsaW5lYXItZ3JhZGllbnQiIHgxPSIxOTAuMzU0NyIgeTE9IjE1OS45NjciIHgyPSIyNTkuOTQ4NyIgeTI9IjkwLjM3MyIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiMzNDQ1NjMiLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjNWU2Yzg0Ii8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJONzUtMyIgZGF0YS1uYW1lPSJONzUiIHgxPSItMjI1Ny4zOTc3IiB5MT0iMjg4NC4yMjYzIiB4Mj0iLTIxNTguOTk2NyIgeTI9IjI4ODQuMjI2MyIgeGxpbms6aHJlZj0iI043NSIvPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJUMjAwLVQ3NSIgeDE9IjEyNi4wMjU3IiB5MT0iODUuMTA4IiB4Mj0iMTk1LjYxOTciIHkyPSIxNS41MTQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjM2RjN2RjIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzljZTNlZSIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+CiAgPHRpdGxlPkFkZCBPbiBCbG9ja3MgMjwvdGl0bGU+CiAgPGcgY2xhc3M9ImNscy0xIj4KICAgIDxnIGlkPSJMYXllcl8yIiBkYXRhLW5hbWU9IkxheWVyIDIiPgogICAgICA8ZyBpZD0iT2JqZWN0cyI+CiAgICAgICAgPHJlY3QgaWQ9Il9SZWN0YW5nbGVfIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTIiIHg9IjEyOC42NTgxIiB5PSI4Ny43NDA1IiB3aWR0aD0iNjQuMzI5MSIgaGVpZ2h0PSI3NC44NTkiLz4KICAgICAgICA8cmVjdCBpZD0iX1JlY3RhbmdsZV8yIiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTMiIHg9IjY0LjMyOTEiIHk9IjEyLjg4MTUiIHdpZHRoPSI2NC4zMjkxIiBoZWlnaHQ9Ijc0Ljg1OSIvPgogICAgICAgIDxyZWN0IGlkPSJfUmVjdGFuZ2xlXzMiIGRhdGEtbmFtZT0iJmx0O1JlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtNCIgeT0iODcuNzQwNSIgd2lkdGg9IjY0LjMyOTEiIGhlaWdodD0iNzQuODU5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9ImNscy01IiBkPSJNNjQuMzI5MSw4Ny43NEg1OC42NTIzYTYyLjc4NzcsNjIuNzg3NywwLDAsMC0yNC41Njg0LDIwLjc2MjFjLTguMjYwNywxMi4xOTYtNC4zNDM3LDE4LjI0MTUtMTEuNjYzNywzMS42Mzk1QzE2LjUxLDE1MC45Niw4LjA1MSwxNTcuODIsMCwxNjIuNTU2di4wNDM1aDY0LjMyOVoiLz4KICAgICAgICA8cmVjdCBpZD0iX1JlY3RhbmdsZV80IiBkYXRhLW5hbWU9IiZsdDtSZWN0YW5nbGUmZ3Q7IiBjbGFzcz0iY2xzLTYiIHg9IjY0LjMyOTEiIHk9Ijg3Ljc0MDUiIHdpZHRoPSI2NC4zMjkxIiBoZWlnaHQ9Ijc0Ljg1OSIvPgogICAgICAgIDxwYXRoIGNsYXNzPSJjbHMtNyIgZD0iTTE5Mi45ODcyLDg3Ljc0SDE4My4zNDNhNjIuNzg3Nyw2Mi43ODc3LDAsMCwwLTI0LjU2ODQsMjAuNzYyMWMtOC4yNjA3LDEyLjE5Ni00LjM0MzgsMTguMjQxNS0xMS42NjM3LDMxLjYzOTVhNTYuNzI0Niw1Ni43MjQ2LDAsMCwxLTE4LjQ1MjcsMTkuOTF2Mi41NDc0aDY0LjMyOVoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTgiIHg9IjE5Mi45ODcyIiB5PSI4Ny43NDA1IiB3aWR0aD0iNjQuMzI5MSIgaGVpZ2h0PSI3NC44NTkiLz4KICAgICAgICA8cGF0aCBjbGFzcz0iY2xzLTkiIGQ9Ik0xMjguNjU4MiwxMi44ODE1SDExNi41OUE2MS45NjQ2LDYxLjk2NDYsMCwwLDAsMTAxLjMyMzMsMjguMjE1QzkzLjA2MjUsNDAuNDEwOSw5Ni45Nzk0LDQ2LjQ1NjUsODkuNjYsNTkuODU0NCw4My4wMzE2LDcxLjk4NTcsNzMuMTk3LDc5LjE1MTQsNjQuMzI5MSw4My45MTA4djMuODNoNjQuMzI5MVoiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTEwIiB4PSIxMjguNjU4MSIgeT0iMTIuODgxNSIgd2lkdGg9IjY0LjMyOTEiIGhlaWdodD0iNzQuODU5Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy00IiB4PSIxMC4xNjA1IiB5PSI3NC44NTkiIHdpZHRoPSIyNC43NTM2IiBoZWlnaHQ9IjEyLjg4MTUiLz4KICAgICAgICA8cmVjdCBjbGFzcz0iY2xzLTQiIHg9IjUxLjk1MjMiIHk9Ijc0Ljg1OSIgd2lkdGg9IjI0Ljc1MzYiIGhlaWdodD0iMTIuODgxNSIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iOTMuNzQ0MSIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxMzguODE4NiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIxODAuNjEwNCIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0yIiB4PSIyMjIuNDAyMiIgeT0iNzQuODU5IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSI3NC40ODk1IiB3aWR0aD0iMjQuNzUzNiIgaGVpZ2h0PSIxMi44ODE1Ii8+CiAgICAgICAgPHJlY3QgY2xhc3M9ImNscy0zIiB4PSIxMTYuMjgxNCIgd2lkdGg9IjI0Ljc1MzYiIGhlaWdodD0iMTIuODgxNSIvPgogICAgICAgIDxyZWN0IGNsYXNzPSJjbHMtMyIgeD0iMTU4LjA3MzIiIHdpZHRoPSIyNC43NTM2IiBoZWlnaHQ9IjEyLjg4MTUiLz4KICAgICAgPC9nPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg=='", + "body": "\nYou can use [Forge](https://developer.atlassian.com/cloud/bitbucket/getting-started-with-forge/) \nor [Atlassian Connect](https://developer.atlassian.com/cloud/bitbucket/getting-started-with-connect/) \nto build apps which can connect with the Bitbucket UI and your own application set. An app could\nbe an integration with another existing service, new features for the Atlassian\napplication, or even a new product that runs within the Atlassian application.\n\nFor complete information see:\n[integrating with Bitbucket Cloud](https://developer.atlassian.com/cloud/bitbucket/)\n" + } + ] + }, + "servers": [ + { + "url": "https://api.bitbucket.org/2.0" + } + ], + "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": { + "schema": { + "$ref": "#/components/schemas/application_property" + } + } + }, + "description": "The application property to create or update.", + "required": true + }, + "pipeline_variable": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + }, + "description": "The updated variable.", + "required": true + }, + "snippet": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/snippet" + } + } + }, + "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": { + "schema": { + "$ref": "#/components/schemas/pipeline_variable" + } + } + }, + "description": "The variable to create." + }, + "project": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/project" + } + } + }, + "required": true + } + }, + "securitySchemes": { + "basic": { + "type": "http", + "description": "Basic HTTP Authentication as per [RFC-2617](https://tools.ietf.org/html/rfc2617) (Digest not supported). Note that Basic Auth is available only with username and app password as credentials.", + "scheme": "basic" + }, + "oauth2": { + "type": "oauth2", + "description": "OAuth 2 as per [RFC-6749](https://tools.ietf.org/html/rfc6749).", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://bitbucket.org/site/oauth2/authorize", + "tokenUrl": "https://bitbucket.org/site/oauth2/access_token", + "scopes": { + "repository": "Read your repositories", + "repository:write": "Read and modify your repositories", + "repository:admin": "Administer your repositories", + "repository:delete": "Delete your repositories", + "project": "Read your workspace's project settings and read repositories contained within your workspace's projects", + "project:admin": "Read and modify settings for projects in your workspace", + "email": "Read your account's primary email address", + "account": "Read your account information", + "account:write": "Read and modify your account information", + "team": "Read your team membership information", + "team:write": "Read and modify your team membership information", + "pipeline": "Access your repositories' build pipelines", + "pipeline:write": "Access and rerun your repositories' build pipelines", + "pipeline:variable": "Access your repositories' build pipelines and configure their variables", + "runner": "Access your workspaces/repositories' runners", + "runner:write": "Access and edit your workspaces/repositories' runners", + "pullrequest": "Read your repositories and their pull requests", + "pullrequest:write": "Read and modify your repositories and their pull requests", + "webhook": "Read and modify your repositories' webhooks", + "issue": "Read your repositories' issues", + "issue:write": "Read and modify your repositories' issues", + "snippet": "Read your snippets", + "snippet:write": "Read and modify your snippets", + "wiki": "Read and modify your repositories' wikis" + } + } + } + }, + "api_key": { + "name": "Authorization", + "type": "apiKey", + "description": "API Keys can be used as Basic HTTP Authentication credentials and provide a substitute for the account's actual username and password. API Keys are only available to team accounts and there is only 1 key per account. API Keys do not support scopes and have therefore access to all contents of the account.", + "in": "header" + } + }, + "schemas": { + "deployment_environment": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Deployment Environment", + "description": "A Bitbucket Deployment Environment.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the environment." + }, + "name": { + "type": "string", + "description": "The name of the environment." + } + } + } + ], + "x-bb-default-fields": ["uuid"], + "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments/{uuid}", + "x-bb-batch-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/environments_batch", + "x-bb-batch-max-size": 100 + }, + "paginated_environments": { + "type": "object", + "title": "Paginated Deployment Environments", + "description": "A paged list of environments", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/deployment_environment" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "deployment_release": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Deployment Release", + "description": "A Bitbucket Deployment Release.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the release." + }, + "name": { + "type": "string", + "description": "The name of the release." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Link to the pipeline that produced the release." + }, + "commit": { + "$ref": "#/components/schemas/commit" + }, + "created_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the release was created." + } + } + } + ] + }, + "deployment": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Deployment", + "description": "A Bitbucket Deployment.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the deployment." + }, + "state": { + "$ref": "#/components/schemas/deployment_state" + }, + "environment": { + "$ref": "#/components/schemas/deployment_environment" + }, + "release": { + "$ref": "#/components/schemas/deployment_release" + } + } + } + ] + }, + "deployment_state": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Deployment State", + "description": "The representation of the progress state of a deployment.", + "properties": {} + } + ] + }, + "deployment_state_undeployed": { + "allOf": [ + { + "$ref": "#/components/schemas/deployment_state" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Deployment UNDEPLOYED deployment state.", + "properties": { + "name": { + "enum": ["UNDEPLOYED"], + "type": "string", + "description": "The name of deployment state (UNDEPLOYED)." + }, + "trigger_url": { + "type": "string", + "format": "uri", + "description": "Link to trigger the deployment." + } + } + } + ] + }, + "deployment_state_in_progress": { + "allOf": [ + { + "$ref": "#/components/schemas/deployment_state" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Deployment IN_PROGRESS deployment state.", + "properties": { + "name": { + "enum": ["IN_PROGRESS"], + "type": "string", + "description": "The name of deployment state (IN_PROGRESS)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Link to the deployment result." + }, + "deployer": { + "$ref": "#/components/schemas/account" + }, + "start_date": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the deployment was started." + } + } + } + ] + }, + "deployment_state_completed": { + "allOf": [ + { + "$ref": "#/components/schemas/deployment_state" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Deployment COMPLETED deployment state.", + "properties": { + "name": { + "enum": ["COMPLETED"], + "type": "string", + "description": "The name of deployment state (COMPLETED)." + }, + "url": { + "type": "string", + "format": "uri", + "description": "Link to the deployment result." + }, + "deployer": { + "$ref": "#/components/schemas/account" + }, + "status": { + "$ref": "#/components/schemas/deployment_state_completed_status" + }, + "start_date": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the deployment was started." + }, + "completion_date": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the deployment completed." + } + } + } + ] + }, + "deployment_state_completed_status": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Completed Deployment", + "description": "The status of a completed deployment.", + "properties": {} + } + ] + }, + "deployment_state_completed_status_successful": { + "allOf": [ + { + "$ref": "#/components/schemas/deployment_state_completed_status" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A SUCCESSFUL completed deployment status.", + "properties": { + "name": { + "enum": ["SUCCESSFUL"], + "type": "string", + "description": "The name of the completed deployment status (SUCCESSFUL)." + } + } + } + ] + }, + "deployment_state_completed_status_failed": { + "allOf": [ + { + "$ref": "#/components/schemas/deployment_state_completed_status" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A FAILED completed deployment status.", + "properties": { + "name": { + "enum": ["FAILED"], + "type": "string", + "description": "The name of the completed deployment status (FAILED)." + } + } + } + ] + }, + "deployment_state_completed_status_stopped": { + "allOf": [ + { + "$ref": "#/components/schemas/deployment_state_completed_status" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A STOPPED completed deployment status.", + "properties": { + "name": { + "enum": ["STOPPED"], + "type": "string", + "description": "The name of the completed deployment status (STOPPED)." + } + } + } + ] + }, + "paginated_deployments": { + "type": "object", + "title": "Paginated Deployments", + "description": "A paged list of deployments", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/deployment" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "deployment_variable": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Deployment Variable", + "description": "A Pipelines deployment variable.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the variable." + }, + "key": { + "type": "string", + "description": "The unique name of the variable." + }, + "value": { + "type": "string", + "description": "The value of the variable. If the variable is secured, this will be empty." + }, + "secured": { + "type": "boolean", + "description": "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API." + } + } + } + ] + }, + "paginated_deployment_variable": { + "type": "object", + "title": "Paginated Deployment Variables", + "description": "A paged list of deployment variables.", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/deployment_variable" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "application_property": { + "additionalProperties": true, + "type": "object", + "title": "Application Property", + "description": "An application property. It is a caller defined JSON object that Bitbucket will store and return. \nThe `_attributes` field at its top level can be used to control who is allowed to read and update the property. \nThe keys of the JSON object must match an allowed pattern. For details, \nsee [Application properties](/cloud/bitbucket/application-properties/).\n", + "properties": { + "_attributes": { + "type": "array", + "items": { + "type": "string", + "enum": ["public", "read_only"] + } + } + } + }, + "paginated_pullrequests": { + "type": "object", + "title": "Paginated Pull Requests", + "description": "A paginated list of pullrequests.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pullrequest" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "search_code_search_result": { + "type": "object", + "properties": { + "type": { + "type": "string", + "readOnly": true + }, + "content_match_count": { + "type": "integer", + "format": "int64", + "readOnly": true + }, + "content_matches": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/search_content_match" + } + }, + "path_matches": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/search_segment" + } + }, + "file": { + "$ref": "#/components/schemas/commit_file" + } + } + }, + "search_content_match": { + "type": "object", + "properties": { + "lines": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/search_line" + } + } + } + }, + "search_line": { + "type": "object", + "properties": { + "line": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "segments": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/search_segment" + } + } + } + }, + "search_result_page": { + "type": "object", + "properties": { + "size": { + "type": "integer", + "format": "int64", + "readOnly": true + }, + "page": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "pagelen": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "query_substituted": { + "type": "boolean", + "readOnly": true + }, + "next": { + "type": "string", + "format": "uri", + "readOnly": true + }, + "previous": { + "type": "string", + "format": "uri", + "readOnly": true + }, + "values": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/search_code_search_result" + } + } + } + }, + "search_segment": { + "type": "object", + "properties": { + "text": { + "type": "string", + "readOnly": true + }, + "match": { + "type": "boolean", + "readOnly": true + } + } + }, + "pipelines_config": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipelines Configuration", + "description": "The Pipelines configuration for a repository.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether Pipelines is enabled for the repository." + }, + "repository": { + "$ref": "#/components/schemas/repository" + } + } + } + ] + }, + "pipeline": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline", + "description": "A Bitbucket Pipeline. This represents an actual pipeline result.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the pipeline." + }, + "build_number": { + "type": "integer", + "description": "The build number of the pipeline." + }, + "creator": { + "$ref": "#/components/schemas/account" + }, + "repository": { + "$ref": "#/components/schemas/repository" + }, + "target": { + "$ref": "#/components/schemas/pipeline_target" + }, + "trigger": { + "$ref": "#/components/schemas/pipeline_trigger" + }, + "state": { + "$ref": "#/components/schemas/pipeline_state" + }, + "variables": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_variable" + }, + "description": "The variables for the pipeline." + }, + "created_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the pipeline was created." + }, + "completed_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the Pipeline was completed. This is not set if the pipeline is still in progress." + }, + "build_seconds_used": { + "type": "integer", + "description": "The number of build seconds used by this pipeline." + }, + "configuration_sources": { + "type": "array", + "description": "An ordered list of sources of the pipeline configuration", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_configuration_source" + } + }, + "links": { + "$ref": "#/components/schemas/pipelines_pipeline_links" + } + } + } + ] + }, + "pipelines_links_section_href": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Links href", + "description": "A links section href", + "properties": { + "href": { + "type": "string", + "format": "uri", + "description": "A link" + } + } + } + ] + }, + "pipelines_pipeline_links": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Links", + "description": "Links section for a Pipeline.", + "properties": { + "self": { + "$ref": "#/components/schemas/pipelines_links_section_href" + }, + "steps": { + "$ref": "#/components/schemas/pipelines_links_section_href" + } + } + } + ] + }, + "pipeline_cache": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Cache", + "description": "A representation of metadata for a pipeline cache for given repository.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the pipeline cache." + }, + "pipeline_uuid": { + "type": "string", + "description": "The UUID of the pipeline that created the cache." + }, + "step_uuid": { + "type": "string", + "description": "The uuid of the step that created the cache." + }, + "name": { + "type": "string", + "description": "The name of the cache." + }, + "key_hash": { + "type": "string", + "description": "The key hash of the cache version." + }, + "path": { + "type": "string", + "description": "The path where the cache contents were retrieved from." + }, + "file_size_bytes": { + "type": "integer", + "description": "The size of the file containing the archive of the cache." + }, + "created_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the cache was created." + } + } + } + ] + }, + "paginated_pipeline_caches": { + "type": "object", + "title": "Paginated Pipeline Cache", + "description": "A paged list of pipeline caches", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_cache" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "pipeline_cache_content_uri": { + "type": "object", + "title": "Pipeline Cache Content URI", + "description": "A representation of the location of pipeline cache content.", + "properties": { + "uri": { + "type": "string", + "format": "uri", + "description": "The uri for pipeline cache content." + } + } + }, + "pipeline_target": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Target", + "description": "A representation of the target that a pipeline executes on.", + "properties": {} + } + ] + }, + "pipeline_ref_target": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_target" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Ref Target", + "description": "A Bitbucket Pipelines reference target.", + "properties": { + "ref_type": { + "enum": ["branch", "tag", "named_branch", "bookmark"], + "type": "string", + "description": "The type of reference (branch/tag)." + }, + "ref_name": { + "type": "string", + "description": "The name of the reference." + }, + "commit": { + "$ref": "#/components/schemas/commit" + }, + "selector": { + "$ref": "#/components/schemas/pipeline_selector" + } + } + } + ] + }, + "pipeline_commit_target": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_target" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Commit Target", + "description": "A Bitbucket Pipelines commit target.", + "properties": { + "commit": { + "$ref": "#/components/schemas/commit" + }, + "selector": { + "$ref": "#/components/schemas/pipeline_selector" + } + } + } + ] + }, + "pipeline_selector": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Selector", + "description": "A representation of the selector that was used to identify the pipeline in the YML file.", + "properties": { + "type": { + "enum": ["branches", "tags", "bookmarks", "default", "custom"], + "type": "string", + "description": "The type of selector." + }, + "pattern": { + "type": "string", + "description": "The name of the matching pipeline definition." + } + } + } + ] + }, + "pipeline_trigger": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Trigger", + "description": "A representation of the trigger used for a pipeline.", + "properties": {} + } + ] + }, + "pipeline_trigger_push": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_trigger" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Push Trigger", + "description": "A Bitbucket Pipelines PUSH trigger.", + "properties": {} + } + ] + }, + "pipeline_trigger_manual": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_trigger" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Manual Trigger", + "description": "A Bitbucket Pipelines MANUAL trigger.", + "properties": {} + } + ] + }, + "pipeline_state": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline State", + "description": "The representation of the progress state of a pipeline.", + "properties": {} + } + ] + }, + "pipeline_state_pending": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Pending State", + "description": "A Bitbucket Pipelines PENDING pipeline state.", + "properties": { + "name": { + "enum": ["PENDING"], + "type": "string", + "description": "The name of pipeline state (PENDING)." + } + } + } + ] + }, + "pipeline_state_in_progress": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline In-Progress State", + "description": "A Bitbucket Pipelines IN_PROGRESS pipeline state.", + "properties": { + "name": { + "enum": ["IN_PROGRESS"], + "type": "string", + "description": "The name of pipeline state (IN_PROGRESS)." + }, + "stage": { + "$ref": "#/components/schemas/pipeline_state_in_progress_stage" + } + } + } + ] + }, + "pipeline_state_in_progress_stage": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline In-Progress Stage", + "description": "A result of an in progress pipeline state.", + "properties": {} + } + ] + }, + "pipeline_state_in_progress_running": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state_in_progress_stage" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines RUNNING stage of a pipeline that is in progress.", + "properties": { + "name": { + "enum": ["RUNNING"], + "type": "string", + "description": "The name of the stage (RUNNING)" + } + } + } + ] + }, + "pipeline_state_in_progress_paused": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state_in_progress_stage" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines PAUSED stage of a pipeline that is in progress.", + "properties": { + "name": { + "enum": ["PAUSED"], + "type": "string", + "description": "The name of the stage (PAUSED)" + } + } + } + ] + }, + "pipeline_state_completed": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Completed State", + "description": "A Bitbucket Pipelines COMPLETED pipeline state.", + "properties": { + "name": { + "enum": ["COMPLETED"], + "type": "string", + "description": "The name of pipeline state (COMPLETED)." + }, + "result": { + "$ref": "#/components/schemas/pipeline_state_completed_result" + } + } + } + ] + }, + "pipeline_state_completed_result": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Completed Result", + "description": "A result of a completed pipeline state.", + "properties": {} + } + ] + }, + "pipeline_state_completed_error": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Completed Error", + "description": "A Bitbucket Pipelines ERROR pipeline result.", + "properties": { + "name": { + "enum": ["ERROR"], + "type": "string", + "description": "The name of the result (ERROR)" + }, + "error": { + "$ref": "#/components/schemas/pipeline_error" + } + } + } + ] + }, + "pipeline_state_completed_failed": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines FAILED pipeline result.", + "properties": { + "name": { + "enum": ["FAILED"], + "type": "string", + "description": "The name of the failed result (FAILED)." + } + } + } + ] + }, + "pipeline_state_completed_stopped": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines STOPPED pipeline result.", + "properties": { + "name": { + "enum": ["STOPPED"], + "type": "string", + "description": "The name of the stopped result (STOPPED)." + } + } + } + ] + }, + "pipeline_state_completed_expired": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines EXPIRED pipeline result.", + "properties": { + "name": { + "enum": ["EXPIRED"], + "type": "string", + "description": "The name of the stopped result (EXPIRED)." + } + } + } + ] + }, + "pipeline_state_completed_successful": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines SUCCESSFUL pipeline result.", + "properties": { + "name": { + "enum": ["SUCCESSFUL"], + "type": "string", + "description": "The name of the successful result (SUCCESSFUL)." + } + } + } + ] + }, + "pipeline_error": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Error", + "description": "An error causing a pipeline failure.", + "properties": { + "key": { + "type": "string", + "description": "The error key." + }, + "message": { + "type": "string", + "description": "The error message." + } + } + } + ] + }, + "pipeline_ssh_public_key": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline SSH Public Key", + "description": "A Pipelines known host public key.", + "properties": { + "key_type": { + "type": "string", + "description": "The type of the public key." + }, + "key": { + "type": "string", + "description": "The base64 encoded public key." + }, + "md5_fingerprint": { + "type": "string", + "description": "The MD5 fingerprint of the public key." + }, + "sha256_fingerprint": { + "type": "string", + "description": "The SHA-256 fingerprint of the public key." + } + } + } + ] + }, + "pipeline_known_host": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Known Host", + "description": "A Pipelines known host.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the known host." + }, + "hostname": { + "type": "string", + "description": "The hostname of the known host." + }, + "public_key": { + "$ref": "#/components/schemas/pipeline_ssh_public_key" + } + } + } + ] + }, + "pipeline_ssh_key_pair": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline SSH Key Pair", + "description": "A Pipelines SSH key pair.", + "properties": { + "private_key": { + "type": "string", + "description": "The SSH private key. This value will be empty when retrieving the SSH key pair." + }, + "public_key": { + "type": "string", + "description": "The SSH public key." + } + } + } + ] + }, + "pipeline_schedule": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Schedule", + "description": "A Pipelines schedule.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the schedule." + }, + "enabled": { + "type": "boolean", + "description": "Whether the schedule is enabled." + }, + "target": { + "$ref": "#/components/schemas/pipeline_ref_target" + }, + "cron_pattern": { + "type": "string", + "description": "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day." + }, + "created_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the schedule was created." + }, + "updated_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the schedule was updated." + } + } + } + ] + }, + "pipeline_schedule_post_request_body": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Request body for Pipeline Schedule POST request", + "properties": { + "target": { + "type": "object", + "description": "The target on which the schedule will be executed.", + "properties": { + "selector": { + "$ref": "#/components/schemas/pipeline_selector" + }, + "ref_name": { + "type": "string", + "description": "The name of the reference." + }, + "ref_type": { + "type": "string", + "description": "The type of reference (branch only).", + "enum": ["branch"] + } + }, + "required": ["selector", "ref_name", "ref_type"] + }, + "enabled": { + "type": "boolean", + "description": "Whether the schedule is enabled." + }, + "cron_pattern": { + "type": "string", + "description": "The cron expression with second precision (7 fields) that the schedule applies. For example, for expression: 0 0 12 * * ? *, will execute at 12pm UTC every day." + } + }, + "required": ["target", "cron_pattern"] + } + ] + }, + "pipeline_schedule_put_request_body": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Request body for Pipeline Schedule PUT request", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the schedule is enabled." + } + } + } + ] + }, + "paginated_pipeline_schedules": { + "type": "object", + "title": "Paginated Pipeline Schedule", + "description": "A paged list of schedules", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_schedule" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "pipeline_schedule_execution": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Schedule Execution", + "description": "A Pipelines schedule execution.", + "properties": {} + } + ] + }, + "pipeline_schedule_execution_executed": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_schedule_execution" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Pipelines executed schedule execution.", + "properties": { + "pipeline": { + "$ref": "#/components/schemas/pipeline" + } + } + } + ] + }, + "pipeline_schedule_execution_errored": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_schedule_execution" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Pipelines schedule execution that failed to be executed.", + "properties": { + "error": { + "$ref": "#/components/schemas/pipeline_error" + } + } + } + ] + }, + "paginated_pipeline_schedule_executions": { + "type": "object", + "title": "Paginated Pipeline Schedule Executions", + "description": "A paged list of the executions of a schedule.", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_schedule_execution" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "pipeline_build_number": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Build Number", + "description": "A Pipelines build number.", + "properties": { + "next": { + "type": "integer", + "description": "The next number that will be used as build number." + } + } + } + ] + }, + "pipeline_variable": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Variable", + "description": "A Pipelines variable.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the variable." + }, + "key": { + "type": "string", + "description": "The unique name of the variable." + }, + "value": { + "type": "string", + "description": "The value of the variable. If the variable is secured, this will be empty." + }, + "secured": { + "type": "boolean", + "description": "If true, this variable will be treated as secured. The value will never be exposed in the logs or the REST API." + } + } + } + ] + }, + "pipeline_step": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Step", + "description": "A step of a Bitbucket pipeline. This represents the actual result of the step execution.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID identifying the step." + }, + "started_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the step execution was started. This is not set when the step hasn't executed yet." + }, + "completed_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the step execution was completed. This is not set if the step is still in progress." + }, + "state": { + "$ref": "#/components/schemas/pipeline_step_state" + }, + "image": { + "$ref": "#/components/schemas/pipeline_image" + }, + "setup_commands": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pipeline_command" + }, + "description": "The list of commands that are executed as part of the setup phase of the build. These commands are executed outside the build container." + }, + "script_commands": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pipeline_command" + }, + "description": "The list of build commands. These commands are executed in the build container." + } + } + } + ], + "x-bb-default-fields": ["uuid"], + "x-bb-url": "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/{pipeline.uuid}/steps/{uuid}", + "x-bb-batch-url": "/rest/1.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/pipelines/steps_batch", + "x-bb-batch-max-size": 100 + }, + "pipeline_step_state": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Step State", + "description": "The representation of the progress state of a pipeline step.", + "properties": {} + } + ] + }, + "pipeline_step_state_pending": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines PENDING pipeline step state.", + "properties": { + "name": { + "enum": ["PENDING"], + "type": "string", + "description": "The name of pipeline step state (PENDING)." + } + } + } + ] + }, + "pipeline_step_state_ready": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines READY pipeline step state.", + "properties": { + "name": { + "enum": ["READY"], + "type": "string", + "description": "The name of pipeline step state (READY)." + } + } + } + ] + }, + "pipeline_step_state_in_progress": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines IN_PROGRESS pipeline step state.", + "properties": { + "name": { + "enum": ["IN_PROGRESS"], + "type": "string", + "description": "The name of pipeline step state (IN_PROGRESS)." + } + } + } + ] + }, + "pipeline_step_state_completed": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines COMPLETED pipeline step state.", + "properties": { + "name": { + "enum": ["COMPLETED"], + "type": "string", + "description": "The name of pipeline step state (COMPLETED)." + }, + "result": { + "$ref": "#/components/schemas/pipeline_step_state_completed_result" + } + } + } + ] + }, + "pipeline_step_state_completed_result": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Completed Step Result", + "description": "A result of a completed pipeline step state.", + "properties": {} + } + ] + }, + "pipeline_step_state_completed_error": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines ERROR pipeline step result.", + "properties": { + "name": { + "enum": ["ERROR"], + "type": "string", + "description": "The name of the result (ERROR)" + }, + "error": { + "$ref": "#/components/schemas/pipeline_step_error" + } + } + } + ] + }, + "pipeline_step_state_completed_failed": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines FAILED pipeline step result.", + "properties": { + "name": { + "enum": ["FAILED"], + "type": "string", + "description": "The name of the result (FAILED)" + } + } + } + ] + }, + "pipeline_step_state_completed_stopped": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines STOPPED pipeline step result.", + "properties": { + "name": { + "enum": ["STOPPED"], + "type": "string", + "description": "The name of the result (STOPPED)" + } + } + } + ] + }, + "pipeline_step_state_completed_not_run": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines NOT_RUN pipeline step result.", + "properties": { + "name": { + "enum": ["NOT_RUN"], + "type": "string", + "description": "The name of the result (NOT_RUN)" + } + } + } + ] + }, + "pipeline_step_state_completed_expired": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines EXPIRED pipeline step result.", + "properties": { + "name": { + "enum": ["EXPIRED"], + "type": "string", + "description": "The name of the result (EXPIRED)" + } + } + } + ] + }, + "pipeline_step_state_completed_successful": { + "allOf": [ + { + "$ref": "#/components/schemas/pipeline_step_state_completed_result" + }, + { + "additionalProperties": true, + "type": "object", + "description": "A Bitbucket Pipelines SUCCESSFUL pipeline step result.", + "properties": { + "name": { + "enum": ["SUCCESSFUL"], + "type": "string", + "description": "The name of the result (SUCCESSFUL)" + } + } + } + ] + }, + "pipeline_step_error": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Pipeline Step Error", + "description": "An error causing a step failure.", + "properties": { + "key": { + "type": "string", + "description": "The error key." + }, + "message": { + "type": "string", + "description": "The error message." + } + } + } + ] + }, + "pipeline_image": { + "type": "object", + "title": "Pipeline Image", + "description": "The definition of a Docker image that can be used for a Bitbucket Pipelines step execution context.", + "properties": { + "name": { + "type": "string", + "description": "The name of the image. If the image is hosted on DockerHub the short name can be used, otherwise the fully qualified name is required here." + }, + "username": { + "type": "string", + "description": "The username needed to authenticate with the Docker registry. Only required when using a private Docker image." + }, + "password": { + "type": "string", + "description": "The password needed to authenticate with the Docker registry. Only required when using a private Docker image." + }, + "email": { + "type": "string", + "description": "The email needed to authenticate with the Docker registry. Only required when using a private Docker image." + } + } + }, + "pipeline_command": { + "type": "object", + "title": "Pipeline Command", + "description": "An executable pipeline command.", + "properties": { + "name": { + "type": "string", + "description": "The name of the command." + }, + "command": { + "type": "string", + "description": "The executable command." + } + } + }, + "paginated_pipelines": { + "type": "object", + "title": "Paginated Pipelines", + "description": "A paged list of pipelines", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "paginated_pipeline_known_hosts": { + "type": "object", + "title": "Paginated Pipeline Known Hosts", + "description": "A paged list of known hosts.", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_known_host" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "paginated_pipeline_variables": { + "type": "object", + "title": "Paginated Pipeline Variables", + "description": "A paged list of variables.", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_variable" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "paginated_pipeline_steps": { + "type": "object", + "title": "Paginated Pipeline Steps", + "description": "A paged list of pipeline steps.", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/pipeline_step" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "pipeline_configuration_source": { + "type": "object", + "description": "Information about the source of the pipeline configuration", + "properties": { + "source": { + "type": "string", + "description": "Identifier of the configuration source" + }, + "uri": { + "type": "string", + "format": "uri", + "description": "Link to the configuration source view or its immediate content" + } + }, + "required": ["source", "uri"] + }, + "report": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Commit Report", + "description": "A report for a commit.", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID that can be used to identify the report." + }, + "title": { + "type": "string", + "description": "The title of the report." + }, + "details": { + "type": "string", + "description": "A string to describe the purpose of the report." + }, + "external_id": { + "type": "string", + "description": "ID of the report provided by the report creator. It can be used to identify the report as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the report creator for updating or deleting this specific report. Needs to be unique." + }, + "reporter": { + "type": "string", + "description": "A string to describe the tool or company who created the report." + }, + "link": { + "type": "string", + "format": "uri", + "description": "A URL linking to the results of the report in an external tool." + }, + "remote_link_enabled": { + "type": "boolean", + "description": "If enabled, a remote link is created in Jira for the issue associated with the commit the report belongs to." + }, + "logo_url": { + "type": "string", + "format": "uri", + "description": "A URL to the report logo. If none is provided, the default insights logo will be used." + }, + "report_type": { + "enum": ["SECURITY", "COVERAGE", "TEST", "BUG"], + "type": "string", + "description": "The type of the report." + }, + "result": { + "enum": ["PASSED", "FAILED", "PENDING"], + "type": "string", + "description": "The state of the report. May be set to PENDING and later updated." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/report_data" + }, + "description": "An array of data fields to display information on the report. Maximum 10." + }, + "created_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the report was created." + }, + "updated_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the report was updated." + } + } + } + ], + "x-bb-default-fields": ["uuid", "commitHash"], + "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commitHash}/reports/{uuid}" + }, + "report_data": { + "type": "object", + "title": "Report Data", + "description": "A key-value element that will be displayed along with the report.", + "properties": { + "type": { + "enum": [ + "BOOLEAN", + "DATE", + "DURATION", + "LINK", + "NUMBER", + "PERCENTAGE", + "TEXT" + ], + "type": "string", + "description": "The type of data contained in the value field. If not provided, then the value will be detected as a boolean, number or string." + }, + "title": { + "type": "string", + "description": "A string describing what this data field represents." + }, + "value": { + "type": "object", + "description": "The value of the data element." + } + } + }, + "report_annotation": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "additionalProperties": true, + "type": "object", + "title": "Report Annotation", + "description": "A report for a commit.", + "properties": { + "external_id": { + "type": "string", + "description": "ID of the annotation provided by the annotation creator. It can be used to identify the annotation as an alternative to it's generated uuid. It is not used by Bitbucket, but only by the annotation creator for updating or deleting this specific annotation. Needs to be unique." + }, + "uuid": { + "type": "string", + "description": "The UUID that can be used to identify the annotation." + }, + "annotation_type": { + "enum": ["VULNERABILITY", "CODE_SMELL", "BUG"], + "type": "string", + "description": "The type of the report." + }, + "path": { + "type": "string", + "description": "The path of the file on which this annotation should be placed. This is the path of the file relative to the git repository. If no path is provided, then it will appear in the overview modal on all pull requests where the tip of the branch is the given commit, regardless of which files were modified." + }, + "line": { + "type": "integer", + "description": "The line number that the annotation should belong to. If no line number is provided, then it will default to 0 and in a pull request it will appear at the top of the file specified by the path field.", + "minimum": 1 + }, + "summary": { + "type": "string", + "description": "The message to display to users." + }, + "details": { + "type": "string", + "description": "The details to show to users when clicking on the annotation." + }, + "result": { + "enum": ["PASSED", "FAILED", "SKIPPED", "IGNORED"], + "type": "string", + "description": "The state of the report. May be set to PENDING and later updated." + }, + "severity": { + "enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW"], + "type": "string", + "description": "The severity of the annotation." + }, + "link": { + "type": "string", + "format": "uri", + "description": "A URL linking to the annotation in an external tool." + }, + "created_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the report was created." + }, + "updated_on": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the report was updated." + } + } + } + ], + "x-bb-default-fields": ["uuid"], + "x-bb-url": "/rest/2.0/accounts/{target_user.uuid}/repositories/{repository.uuid}/commits/{commit.hash}/reports/{reportUuid}/annotations/{uuid}" + }, + "paginated_reports": { + "type": "object", + "title": "Paginated Reports", + "description": "A paginated list of reports.", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/report" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "paginated_annotations": { + "type": "object", + "title": "Paginated Annotations", + "description": "A paginated list of annotations.", + "properties": { + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses." + }, + "values": { + "type": "array", + "minItems": 0, + "items": { + "$ref": "#/components/schemas/report_annotation" + }, + "description": "The values of the current page." + }, + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute." + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values." + }, + "next": { + "type": "string", + "format": "uri", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs." + }, + "previous": { + "type": "string", + "format": "uri", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs." + } + } + }, + "object": { + "type": "object", + "description": "Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.", + "properties": { + "type": { + "type": "string" + } + }, + "required": ["type"], + "additionalProperties": true, + "discriminator": { + "propertyName": "type" + } + }, + "issue_job_status": { + "type": "object", + "title": "Issue Job Status", + "description": "The status of an import or export job", + "properties": { + "type": { + "type": "string" + }, + "status": { + "type": "string", + "description": "The status of the import/export job", + "enum": ["ACCEPTED", "STARTED", "RUNNING", "FAILURE"] + }, + "phase": { + "type": "string", + "description": "The phase of the import/export job" + }, + "total": { + "type": "integer", + "description": "The total number of issues being imported/exported" + }, + "count": { + "type": "integer", + "description": "The total number of issues already imported/exported" + }, + "pct": { + "type": "number", + "description": "The percentage of issues already imported/exported", + "minimum": 0, + "maximum": 100 + } + }, + "additionalProperties": false + }, + "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 + }, + "pullrequest_task_create": { + "type": "object", + "title": "Pull Request Task Create", + "description": "A pullrequest task create", + "properties": { + "content": { + "type": "object", + "title": "Task Raw Content", + "description": "task raw content", + "properties": { + "raw": { + "type": "string", + "description": "The task contents" + } + }, + "required": ["raw"], + "additionalProperties": false + }, + "comment": { + "$ref": "#/components/schemas/comment" + }, + "pending": { + "type": "boolean" + } + }, + "required": ["content"], + "additionalProperties": false + }, + "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 + }, + "task": { + "type": "object", + "title": "Task", + "description": "A task object.", + "properties": { + "id": { + "type": "integer" + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "updated_on": { + "type": "string", + "format": "date-time" + }, + "state": { + "type": "string", + "enum": ["RESOLVED", "UNRESOLVED"] + }, + "content": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + } + }, + "additionalProperties": false + }, + "creator": { + "$ref": "#/components/schemas/account" + }, + "pending": { + "type": "boolean" + }, + "resolved_on": { + "type": "string", + "description": "The ISO8601 timestamp for when the task was resolved.", + "format": "date-time" + }, + "resolved_by": { + "$ref": "#/components/schemas/account" + } + }, + "required": ["created_on", "updated_on", "state", "content", "creator"], + "additionalProperties": false + }, + "subject_types": { + "type": "object", + "title": "Subject Types", + "description": "The mapping of resource/subject types pointing to their individual event types.", + "properties": { + "repository": { + "type": "object", + "properties": { + "events": { + "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 + }, + "workspace": { + "type": "object", + "properties": { + "events": { + "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 + }, + "error": { + "type": "object", + "title": "Error", + "description": "Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.", + "properties": { + "type": { + "type": "string" + }, + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "data": { + "type": "object", + "description": "Optional structured data that is endpoint-specific.", + "properties": {}, + "additionalProperties": true + } + }, + "required": ["message"], + "additionalProperties": false + } + }, + "required": ["type"], + "additionalProperties": true + }, + "link": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "account_links": { + "type": "object", + "title": "Account Links", + "description": "Links related to an Account.", + "properties": { + "avatar": { + "$ref": "#/components/schemas/link" + } + }, + "additionalProperties": true + }, + "account": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Account", + "description": "An account object.", + "properties": { + "links": { + "$ref": "#/components/schemas/account_links" + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "display_name": { + "type": "string" + }, + "uuid": { + "type": "string" + } + }, + "additionalProperties": true + } + ] + }, + "paginated_accounts": { + "type": "object", + "title": "Paginated Accounts", + "description": "A paginated list of accounts.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/account" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_repositories": { + "type": "object", + "title": "Paginated Repositories", + "description": "A paginated list of repositories.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/repository" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "repository_inheritance_state": { + "type": "object", + "title": "Repository Inheritance State", + "description": "A json object representing the repository's inheritance state values", + "properties": { + "type": { + "type": "string" + }, + "override_settings": { + "type": "object" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "repository": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Repository", + "description": "A Bitbucket repository.", + "properties": { + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "avatar": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "pullrequests": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "commits": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "forks": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "watchers": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "downloads": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "clone": { + "type": "array", + "items": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "hooks": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "uuid": { + "type": "string", + "description": "The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user." + }, + "full_name": { + "type": "string", + "description": "The concatenation of the repository owner's username and the slugified name, e.g. \"evzijst/interruptingcow\". This is the same string used in Bitbucket URLs." + }, + "is_private": { + "type": "boolean" + }, + "parent": { + "$ref": "#/components/schemas/repository" + }, + "scm": { + "type": "string", + "enum": ["git"] + }, + "owner": { + "$ref": "#/components/schemas/account" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "updated_on": { + "type": "string", + "format": "date-time" + }, + "size": { + "type": "integer" + }, + "language": { + "type": "string" + }, + "has_issues": { + "type": "boolean", + "description": "\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", + "description": "\nThe wiki for this repository is enabled. Wiki\nfeatures are not supported for repositories in workspaces\nadministered through admin.atlassian.com.\n" + }, + "fork_policy": { + "type": "string", + "description": "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n be made public later)\n* **no_forks**: deny all forking\n", + "enum": ["allow_forks", "no_public_forks", "no_forks"] + }, + "project": { + "$ref": "#/components/schemas/project" + }, + "mainbranch": { + "$ref": "#/components/schemas/branch" + } + }, + "additionalProperties": true + } + ] + }, + "project_branching_model": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Project Branching Model", + "description": "A project's branching model", + "properties": { + "branch_types": { + "type": "array", + "description": "The active branch types.", + "items": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of branch.", + "enum": ["feature", "bugfix", "release", "hotfix"] + }, + "prefix": { + "type": "string", + "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`." + } + }, + "required": ["kind", "prefix"], + "additionalProperties": false + }, + "minItems": 0, + "maxItems": 4, + "uniqueItems": true + }, + "development": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + }, + "production": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the target branch. If inherited by a repository, it will default to the main branch if the specified branch does not exist." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + } + }, + "additionalProperties": true + } + ] + }, + "branching_model": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Branching Model", + "description": "A repository's branching model", + "properties": { + "branch_types": { + "type": "array", + "description": "The active branch types.", + "items": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of branch.", + "enum": ["feature", "bugfix", "release", "hotfix"] + }, + "prefix": { + "type": "string", + "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`." + } + }, + "required": ["kind", "prefix"], + "additionalProperties": false + }, + "minItems": 0, + "maxItems": 4, + "uniqueItems": true + }, + "development": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/components/schemas/branch" + }, + "name": { + "type": "string", + "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + }, + "production": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/components/schemas/branch" + }, + "name": { + "type": "string", + "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + } + }, + "additionalProperties": true + } + ] + }, + "branching_model_settings": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Branching Model Settings", + "description": "A repository's branching model settings", + "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 + }, + "branch_types": { + "type": "array", + "items": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the branch type is enabled or not. A disabled branch type may contain an invalid `prefix`." + }, + "kind": { + "type": "string", + "description": "The kind of the branch type.", + "enum": ["feature", "bugfix", "release", "hotfix"] + }, + "prefix": { + "type": "string", + "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The `prefix` of an enabled branch type must be a valid branch prefix.Additionally, it cannot be blank, empty or `null`. The `prefix` for a disabled branch type can be empty or invalid." + } + }, + "required": ["kind"], + "additionalProperties": false + }, + "minItems": 0, + "maxItems": 4, + "uniqueItems": true + }, + "development": { + "type": "object", + "properties": { + "is_valid": { + "type": "boolean", + "description": "Indicates if the configured branch is valid, that is, if the configured branch actually exists currently. Is always `true` when `use_mainbranch` is `true` (even if the main branch does not exist). This field is read-only. This field is ignored when updating/creating settings." + }, + "name": { + "type": "string", + "description": "The configured branch. It must be `null` when `use_mainbranch` is `true`. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set). In this case `is_valid` will be `false`. The branch must exist when updating/setting the `name` or an error will occur." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). When `true` the `name` must be `null` or not provided. When `false` the `name` must contain a non-empty branch name." + } + }, + "additionalProperties": false + }, + "production": { + "type": "object", + "properties": { + "is_valid": { + "type": "boolean", + "description": "Indicates if the configured branch is valid, that is, if the configured branch actually exists currently. Is always `true` when `use_mainbranch` is `true` (even if the main branch does not exist). This field is read-only. This field is ignored when updating/creating settings." + }, + "name": { + "type": "string", + "description": "The configured branch. It must be `null` when `use_mainbranch` is `true`. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set). In this case `is_valid` will be `false`. The branch must exist when updating/setting the `name` or an error will occur." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`). When `true` the `name` must be `null` or not provided. When `false` the `name` must contain a non-empty branch name." + }, + "enabled": { + "type": "boolean", + "description": "Indicates if branch is enabled or not." + } + }, + "additionalProperties": false + } + }, + "additionalProperties": true + } + ] + }, + "effective_repo_branching_model": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Effective Repository Branching Model", + "description": "A repository's effective branching model", + "properties": { + "branch_types": { + "type": "array", + "description": "The active branch types.", + "items": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of branch.", + "enum": ["feature", "bugfix", "release", "hotfix"] + }, + "prefix": { + "type": "string", + "description": "The prefix for this branch type. A branch with this prefix will be classified as per `kind`. The prefix must be a valid prefix for a branch and must always exist. It cannot be blank, empty or `null`." + } + }, + "required": ["kind", "prefix"], + "additionalProperties": false + }, + "minItems": 0, + "maxItems": 4, + "uniqueItems": true + }, + "development": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/components/schemas/branch" + }, + "name": { + "type": "string", + "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + }, + "production": { + "type": "object", + "properties": { + "branch": { + "$ref": "#/components/schemas/branch" + }, + "name": { + "type": "string", + "description": "Name of the target branch. Will be listed here even when the target branch does not exist. Will be `null` if targeting the main branch and the repository is empty." + }, + "use_mainbranch": { + "type": "boolean", + "description": "Indicates if the setting points at an explicit branch (`false`) or tracks the main branch (`true`)." + } + }, + "required": ["name", "use_mainbranch"], + "additionalProperties": false + } + }, + "additionalProperties": true + } + ] + }, + "paginated_branchrestrictions": { + "type": "object", + "title": "Paginated Branch Restrictions", + "description": "A paginated list of branch restriction rules.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/branchrestriction" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "comment": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "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`).", + "properties": { + "id": { + "type": "integer" + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "updated_on": { + "type": "string", + "format": "date-time" + }, + "content": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + } + }, + "additionalProperties": false + }, + "user": { + "$ref": "#/components/schemas/account" + }, + "deleted": { + "type": "boolean" + }, + "parent": { + "$ref": "#/components/schemas/comment" + }, + "inline": { + "type": "object", + "properties": { + "from": { + "type": "integer", + "description": "The comment's anchor line in the old version of the file.", + "minimum": 1 + }, + "to": { + "type": "integer", + "description": "The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed.", + "minimum": 1 + }, + "path": { + "type": "string", + "description": "The path of the file this comment is anchored to." + } + }, + "required": ["path"], + "additionalProperties": false + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "code": { + "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": true + } + ] + }, + "commitstatus": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Commit Status", + "description": "A commit status object.", + "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 + }, + "commit": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "uuid": { + "type": "string", + "description": "The commit status' id." + }, + "key": { + "type": "string", + "description": "An identifier for the status that's unique to\n its type (current \"build\" is the only supported type) and the vendor,\n e.g. BB-DEPLOY" + }, + "refname": { + "type": "string", + "description": "\nThe name of the ref that pointed to this commit at the time the status\nobject was created. Note that this the ref may since have moved off of\nthe commit. This optional field can be useful for build systems whose\nbuild triggers and configuration are branch-dependent (e.g. a Pipeline\nbuild).\nIt is legitimate for this field to not be set, or even apply (e.g. a\nstatic linting job)." + }, + "url": { + "type": "string", + "description": "A URL linking back to the vendor or build system, for providing more information about whatever process produced this status. Accepts context variables `repository` and `commit` that Bitbucket will evaluate at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name} which Bitbucket will turn into https://foo.com/builds/foo/bar at render time." + }, + "state": { + "type": "string", + "description": "Provides some indication of the status of this commit", + "enum": ["FAILED", "INPROGRESS", "STOPPED", "SUCCESSFUL"] + }, + "name": { + "type": "string", + "description": "An identifier for the build itself, e.g. BB-DEPLOY-1" + }, + "description": { + "type": "string", + "description": "A description of the build (e.g. \"Unit tests in Bamboo\")" + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "updated_on": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": true + } + ] + }, + "paginated_commitstatuses": { + "type": "object", + "title": "Paginated Commit Statuses", + "description": "A paginated list of commit status objects.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/commitstatus" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "export_options": { + "type": "object", + "title": "Export Options", + "description": "Options for issue export.", + "properties": { + "type": { + "type": "string" + }, + "project_key": { + "type": "string" + }, + "project_name": { + "type": "string" + }, + "send_email": { + "type": "boolean" + }, + "include_attachments": { + "type": "boolean" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "issue_change": { + "type": "object", + "title": "Issue Change", + "description": "An issue change.", + "properties": { + "type": { + "type": "string" + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "issue": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "name": { + "type": "string" + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "user": { + "$ref": "#/components/schemas/account" + }, + "issue": { + "$ref": "#/components/schemas/issue" + }, + "changes": { + "type": "object", + "properties": { + "assignee": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + }, + "additionalProperties": false + }, + "state": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + }, + "additionalProperties": false + }, + "title": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + }, + "additionalProperties": false + }, + "kind": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + }, + "additionalProperties": false + }, + "milestone": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + }, + "additionalProperties": false + }, + "component": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + }, + "additionalProperties": false + }, + "priority": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + }, + "additionalProperties": false + }, + "version": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + }, + "additionalProperties": false + }, + "content": { + "type": "object", + "properties": { + "old": { + "type": "string" + }, + "new": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "message": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + } + }, + "additionalProperties": false + } + }, + "required": ["type"], + "additionalProperties": true + }, + "issue": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Issue", + "description": "An issue.", + "properties": { + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "comments": { + "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 + }, + "attachments": { + "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 + }, + "watch": { + "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 + }, + "vote": { + "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 + }, + "id": { + "type": "integer" + }, + "repository": { + "$ref": "#/components/schemas/repository" + }, + "title": { + "type": "string" + }, + "reporter": { + "$ref": "#/components/schemas/account" + }, + "assignee": { + "$ref": "#/components/schemas/account" + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "updated_on": { + "type": "string", + "format": "date-time" + }, + "edited_on": { + "type": "string", + "format": "date-time" + }, + "state": { + "type": "string", + "enum": [ + "submitted", + "new", + "open", + "resolved", + "on hold", + "invalid", + "duplicate", + "wontfix", + "closed" + ] + }, + "kind": { + "type": "string", + "enum": ["bug", "enhancement", "proposal", "task"] + }, + "priority": { + "type": "string", + "enum": ["trivial", "minor", "major", "critical", "blocker"] + }, + "milestone": { + "$ref": "#/components/schemas/milestone" + }, + "version": { + "$ref": "#/components/schemas/version" + }, + "component": { + "$ref": "#/components/schemas/component" + }, + "votes": { + "type": "integer" + }, + "content": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + } + }, + "additionalProperties": false + } + }, + "additionalProperties": true + } + ] + }, + "paginated_components": { + "type": "object", + "title": "Paginated Components", + "description": "A paginated list of issue tracker components.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/component" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "issue_attachment": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Issue Attachment", + "description": "An issue file attachment's meta data. Note this does not contain the file's actual contents.", + "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 + }, + "name": { + "type": "string" + } + }, + "additionalProperties": true + } + ] + }, + "paginated_issue_attachments": { + "type": "object", + "title": "Paginated Issue Attachment", + "description": "A paginated list of issue attachments.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/issue_attachment" + }, + "minItems": 0 + } + }, + "additionalProperties": false + }, + "paginated_log_entries": { + "type": "object", + "title": "Paginated Log Entries", + "description": "A paginated list of issue changes.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/issue_change" + }, + "minItems": 0 + } + }, + "additionalProperties": false + }, + "paginated_issue_comments": { + "type": "object", + "title": "Paginated Issue Comments", + "description": "A paginated list of issue comments.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/issue_comment" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_issues": { + "type": "object", + "title": "Paginated Issues", + "description": "A paginated list of issues.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/issue" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_milestones": { + "type": "object", + "title": "Paginated Milestones", + "description": "A paginated list of issue tracker milestones.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/milestone" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_versions": { + "type": "object", + "title": "Paginated Versions", + "description": "A paginated list of issue tracker versions.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/version" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "group": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Group", + "description": "A group object", + "properties": { + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "owner": { + "$ref": "#/components/schemas/account" + }, + "workspace": { + "$ref": "#/components/schemas/workspace" + }, + "name": { + "type": "string" + }, + "slug": { + "type": "string", + "description": "The \"sluggified\" version of the group's name. This contains only ASCII\ncharacters and can therefore be slightly different than the name" + }, + "full_slug": { + "type": "string", + "description": "The concatenation of the workspace's slug and the group's slug,\nseparated with a colon (e.g. `acme:developers`)\n" + } + }, + "additionalProperties": true + } + ] + }, + "project_group_permission": { + "type": "object", + "title": "Project Group Permission", + "description": "A group's permission for a given project.", + "properties": { + "type": { + "type": "string" + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "permission": { + "type": "string", + "enum": ["read", "write", "create-repo", "admin", "none"] + }, + "group": { + "$ref": "#/components/schemas/group" + }, + "project": { + "$ref": "#/components/schemas/project" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "repository_group_permission": { + "type": "object", + "title": "Repository Group Permission", + "description": "A group's permission for a given repository.", + "properties": { + "type": { + "type": "string" + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "permission": { + "type": "string", + "enum": ["read", "write", "admin", "none"] + }, + "group": { + "$ref": "#/components/schemas/group" + }, + "repository": { + "$ref": "#/components/schemas/repository" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "paginated_project_group_permissions": { + "type": "object", + "title": "Paginated Project Group Permissions", + "description": "A paginated list of project group permissions.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/project_group_permission" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_project_user_permissions": { + "type": "object", + "title": "Paginated Project User Permissions", + "description": "A paginated list of project user permissions.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/project_user_permission" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_repository_group_permissions": { + "type": "object", + "title": "Paginated Repository Group Permissions", + "description": "A paginated list of repository group permissions.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/repository_group_permission" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_repository_permissions": { + "type": "object", + "title": "Paginated Repository Permissions", + "description": "A paginated list of repository permissions.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/repository_permission" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_repository_user_permissions": { + "type": "object", + "title": "Paginated Repository User Permissions", + "description": "A paginated list of repository user permissions.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/repository_user_permission" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "repository_permission": { + "type": "object", + "title": "Repository Permission", + "description": "A user's permission for a given repository.", + "properties": { + "type": { + "type": "string" + }, + "permission": { + "type": "string", + "enum": ["read", "write", "admin", "none"] + }, + "user": { + "$ref": "#/components/schemas/user" + }, + "repository": { + "$ref": "#/components/schemas/repository" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "project_user_permission": { + "type": "object", + "title": "Project User Permission", + "description": "A user's direct permission for a given project.", + "properties": { + "type": { + "type": "string" + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "permission": { + "type": "string", + "enum": ["read", "write", "create-repo", "admin", "none"] + }, + "user": { + "$ref": "#/components/schemas/user" + }, + "project": { + "$ref": "#/components/schemas/project" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "paginated_projects": { + "type": "object", + "title": "Paginated Projects", + "description": "A paginated list of projects", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/project" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "team_links": { + "allOf": [ + { + "$ref": "#/components/schemas/account_links" + }, + { + "type": "object", + "title": "Team Links", + "description": "Links related to a Team.", + "properties": { + "self": { + "$ref": "#/components/schemas/link" + }, + "html": { + "$ref": "#/components/schemas/link" + }, + "members": { + "$ref": "#/components/schemas/link" + }, + "projects": { + "$ref": "#/components/schemas/link" + }, + "repositories": { + "$ref": "#/components/schemas/link" + } + }, + "additionalProperties": true + } + ] + }, + "team": { + "allOf": [ + { + "$ref": "#/components/schemas/account" + }, + { + "type": "object", + "title": "Team", + "description": "A team object.", + "properties": { + "links": { + "$ref": "#/components/schemas/team_links" + } + }, + "additionalProperties": true + } + ] + }, + "project": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Project", + "description": "A Bitbucket project.\n Projects are used by teams to organize repositories.", + "properties": { + "links": { + "type": "object", + "properties": { + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "avatar": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "uuid": { + "type": "string", + "description": "The project's immutable id." + }, + "key": { + "type": "string", + "description": "The project's key." + }, + "owner": { + "$ref": "#/components/schemas/team" + }, + "name": { + "type": "string", + "description": "The name of the project." + }, + "description": { + "type": "string" + }, + "is_private": { + "type": "boolean", + "description": "\nIndicates whether the project is publicly accessible, or whether it is\nprivate to the team and consequently only visible to team members.\nNote that private projects cannot contain public repositories." + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "updated_on": { + "type": "string", + "format": "date-time" + }, + "has_publicly_visible_repos": { + "type": "boolean", + "description": "\nIndicates whether the project contains publicly visible repositories.\nNote that private projects cannot contain public repositories." + } + }, + "additionalProperties": true + } + ] + }, + "comment_resolution": { + "type": "object", + "title": "Comment Resolution", + "description": "The resolution object for a Comment.", + "properties": { + "type": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/account" + }, + "created_on": { + "type": "string", + "description": "The ISO8601 timestamp the resolution was created.", + "format": "date-time" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "default_reviewer_and_type": { + "type": "object", + "title": "Default Reviewer and Type", + "description": "Object containing a user that is a default reviewer and the type of reviewer", + "properties": { + "type": { + "type": "string" + }, + "reviewer_type": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/user" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "paginated_default_reviewer_and_type": { + "type": "object", + "title": "Paginated Default Reviewer and Type", + "description": "A paginated list of default reviewers with reviewer type.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/default_reviewer_and_type" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_pullrequest_comments": { + "type": "object", + "title": "Paginated Pull Request Comments", + "description": "A paginated list of pullrequest comments.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pullrequest_comment" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_tasks": { + "type": "object", + "title": "Paginated Tasks", + "description": "A paginated list of tasks.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pullrequest_comment_task" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "participant": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Participant", + "description": "Object describing a user's role on resources like commits or pull requests.", + "properties": { + "user": { + "$ref": "#/components/schemas/account" + }, + "role": { + "type": "string", + "enum": ["PARTICIPANT", "REVIEWER"] + }, + "approved": { + "type": "boolean" + }, + "state": { + "type": "string", + "enum": ["approved", "changes_requested", null] + }, + "participated_on": { + "type": "string", + "description": "The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented.", + "format": "date-time" + } + }, + "additionalProperties": true + } + ] + }, + "pullrequest_merge_parameters": { + "type": "object", + "title": "Pull Request Merge Parameters", + "description": "The metadata that describes a pull request merge.", + "properties": { + "type": { + "type": "string" + }, + "message": { + "type": "string", + "description": "The commit message that will be used on the resulting commit. Note that the size of the message is limited to 128 KiB." + }, + "close_source_branch": { + "type": "boolean", + "description": "Whether the source branch should be deleted. If this is not provided, we fallback to the value used when the pull request was created, which defaults to False" + }, + "merge_strategy": { + "type": "string", + "description": "The merge strategy that will be used to merge the pull request.", + "enum": ["merge_commit", "squash", "fast_forward"], + "default": "merge_commit" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "pullrequest_endpoint": { + "type": "object", + "title": "Pull Request Endpoint", + "properties": { + "repository": { + "$ref": "#/components/schemas/repository" + }, + "branch": { + "type": "object", + "title": "Pull Request Branch", + "properties": { + "name": { + "type": "string" + }, + "merge_strategies": { + "type": "array", + "description": "Available merge strategies, when this endpoint is the destination of the pull request.", + "items": { + "type": "string", + "enum": ["merge_commit", "squash", "fast_forward"] + } + }, + "default_merge_strategy": { + "type": "string", + "description": "The default merge strategy, when this endpoint is the destination of the pull request." + } + }, + "additionalProperties": false + }, + "commit": { + "type": "object", + "title": "Pull Request Commit", + "properties": { + "hash": { + "type": "string", + "pattern": "[0-9a-f]{7,}?" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "pullrequest": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Pull Request", + "description": "A pull request object.", + "properties": { + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "commits": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "approve": { + "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 + }, + "diff": { + "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 + }, + "diffstat": { + "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 + }, + "comments": { + "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 + }, + "activity": { + "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 + }, + "merge": { + "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 + }, + "decline": { + "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 + }, + "id": { + "type": "integer", + "description": "The pull request's unique ID. Note that pull request IDs are only unique within their associated repository." + }, + "title": { + "type": "string", + "description": "Title of the pull request." + }, + "rendered": { + "type": "object", + "title": "Rendered Pull Request Markup", + "description": "User provided pull request text, interpreted in a markup language and rendered in HTML", + "properties": { + "title": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + } + }, + "additionalProperties": false + }, + "description": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + } + }, + "additionalProperties": false + }, + "reason": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "summary": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + } + }, + "additionalProperties": false + }, + "state": { + "type": "string", + "description": "The pull request's current status.", + "enum": ["OPEN", "MERGED", "DECLINED", "SUPERSEDED"] + }, + "author": { + "$ref": "#/components/schemas/account" + }, + "source": { + "$ref": "#/components/schemas/pullrequest_endpoint" + }, + "destination": { + "$ref": "#/components/schemas/pullrequest_endpoint" + }, + "merge_commit": { + "type": "object", + "title": "Pull Request Commit", + "properties": { + "hash": { + "type": "string", + "pattern": "[0-9a-f]{7,}?" + } + }, + "additionalProperties": false + }, + "comment_count": { + "type": "integer", + "description": "The number of comments for a specific pull request.", + "minimum": 0 + }, + "task_count": { + "type": "integer", + "description": "The number of open tasks for a specific pull request.", + "minimum": 0 + }, + "close_source_branch": { + "type": "boolean", + "description": "A boolean flag indicating if merging the pull request closes the source branch." + }, + "closed_by": { + "$ref": "#/components/schemas/account" + }, + "reason": { + "type": "string", + "description": "Explains why a pull request was declined. This field is only applicable to pull requests in rejected state." + }, + "created_on": { + "type": "string", + "description": "The ISO8601 timestamp the request was created.", + "format": "date-time" + }, + "updated_on": { + "type": "string", + "description": "The ISO8601 timestamp the request was last updated.", + "format": "date-time" + }, + "reviewers": { + "type": "array", + "description": "The list of users that were added as reviewers on this pull request when it was created. For performance reasons, the API only includes this list on a pull request's `self` URL.", + "items": { + "$ref": "#/components/schemas/account" + } + }, + "participants": { + "type": "array", + "description": " The list of users that are collaborating on this pull request.\n Collaborators are user that:\n\n * are added to the pull request as a reviewer (part of the reviewers\n list)\n * are not explicit reviewers, but have commented on the pull request\n * are not explicit reviewers, but have approved the pull request\n\n Each user is wrapped in an object that indicates the user's role and\n whether they have approved the pull request. For performance reasons,\n the API only returns this list when an API requests a pull request by\n id.\n ", + "items": { + "$ref": "#/components/schemas/participant" + } + } + }, + "additionalProperties": true + } + ] + }, + "pullrequest_task": { + "allOf": [ + { + "$ref": "#/components/schemas/task" + }, + { + "type": "object", + "title": "Pull Request Task", + "description": "A pull request task.", + "properties": { + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] + }, + "author": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Author", + "description": "The author of a change in a repository", + "properties": { + "raw": { + "type": "string", + "description": "The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket." + }, + "user": { + "$ref": "#/components/schemas/account" + } + }, + "additionalProperties": true + } + ] + }, + "base_commit": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Base Commit", + "description": "The common base type for both repository and snippet commits.", + "properties": { + "hash": { + "type": "string", + "pattern": "[0-9a-f]{7,}?" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "author": { + "$ref": "#/components/schemas/author" + }, + "message": { + "type": "string" + }, + "summary": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "The text as it was typed by a user." + }, + "markup": { + "type": "string", + "description": "The type of markup language the raw content is to be interpreted in.", + "enum": ["markdown", "creole", "plaintext"] + }, + "html": { + "type": "string", + "description": "The user's content rendered as HTML." + } + }, + "additionalProperties": false + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/base_commit" + }, + "minItems": 0 + } + }, + "additionalProperties": true + } + ] + }, + "paginated_changeset": { + "type": "object", + "title": "Page", + "description": "A paginated list of commits.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/base_commit" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_commit_comments": { + "type": "object", + "title": "Paginated Commit Comments", + "description": "A paginated list of commit comments.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/commit_comment" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "commit_file": { + "type": "object", + "title": "Commit File", + "description": "A file object, representing a file at a commit in a repository", + "properties": { + "type": { + "type": "string" + }, + "path": { + "type": "string", + "description": "The path in the repository" + }, + "commit": { + "$ref": "#/components/schemas/commit" + }, + "attributes": { + "type": "string", + "enum": ["link", "executable", "subrepository", "binary", "lfs"] + }, + "escaped_path": { + "type": "string", + "description": "The escaped version of the path as it appears in a diff. If the path does not require escaping this will be the same as path." + } + }, + "required": ["type"], + "additionalProperties": true + }, + "diffstat": { + "type": "object", + "title": "Diff Stat", + "description": "A diffstat object that includes a summary of changes made to a file between two commits.", + "properties": { + "type": { + "type": "string" + }, + "status": { + "type": "string", + "enum": ["added", "removed", "modified", "renamed"] + }, + "lines_added": { + "type": "integer" + }, + "lines_removed": { + "type": "integer" + }, + "old": { + "$ref": "#/components/schemas/commit_file" + }, + "new": { + "$ref": "#/components/schemas/commit_file" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "paginated_diffstats": { + "type": "object", + "title": "Paginated Diff Stat", + "description": "A paginated list of diffstats.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 500 with 5000 being the maximum allowed value.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/diffstat" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_files": { + "type": "object", + "title": "Paginated Files", + "description": "A paginated list of commit_file objects.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/commit_file" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_refs": { + "type": "object", + "title": "Paginated Refs", + "description": "A paginated list of refs.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ref" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "treeentry": { + "type": "object", + "title": "Tree Entry", + "description": "Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`.", + "properties": { + "type": { + "type": "string" + }, + "path": { + "type": "string", + "description": "The path in the repository" + }, + "commit": { + "$ref": "#/components/schemas/commit" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "paginated_treeentries": { + "type": "object", + "title": "Paginated Tree Entry", + "description": "A paginated list of commit_file and/or commit_directory objects.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/treeentry" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "ref": { + "type": "object", + "title": "Ref", + "description": "A ref object, representing a branch or tag in a repository.", + "properties": { + "type": { + "type": "string" + }, + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "commits": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "name": { + "type": "string", + "description": "The name of the ref." + }, + "target": { + "$ref": "#/components/schemas/commit" + } + }, + "required": ["type"], + "additionalProperties": true + }, + "paginated_snippet_commit": { + "type": "object", + "title": "Paginated Snippet Commits", + "description": "A paginated list of snippet commits.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snippet_commit" + }, + "minItems": 0 + } + }, + "additionalProperties": false + }, + "paginated_snippet_comments": { + "type": "object", + "title": "Paginated Snippet Comments", + "description": "A paginated list of snippet comments.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snippet_comment" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_snippets": { + "type": "object", + "title": "Paginated Snippets", + "description": "A paginated list of snippets.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/snippet" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "snippet_comment": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Snippet Comment", + "description": "A comment on a snippet.", + "properties": { + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "snippet": { + "$ref": "#/components/schemas/snippet" + } + }, + "additionalProperties": true + } + ] + }, + "snippet": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Snippet", + "description": "A snippet object.", + "properties": { + "id": { + "type": "integer", + "minimum": 0 + }, + "title": { + "type": "string" + }, + "scm": { + "type": "string", + "description": "The DVCS used to store the snippet.", + "enum": ["git"] + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "updated_on": { + "type": "string", + "format": "date-time" + }, + "owner": { + "$ref": "#/components/schemas/account" + }, + "creator": { + "$ref": "#/components/schemas/account" + }, + "is_private": { + "type": "boolean" + } + }, + "additionalProperties": true + } + ] + }, + "deploy_key": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Deploy Key", + "description": "Represents deploy key for a repository.", + "properties": { + "key": { + "type": "string", + "description": "The deploy key value." + }, + "repository": { + "$ref": "#/components/schemas/repository" + }, + "comment": { + "type": "string", + "description": "The comment parsed from the deploy key (if present)" + }, + "label": { + "type": "string", + "description": "The user-defined label for the deploy key" + }, + "added_on": { + "type": "string", + "format": "date-time" + }, + "last_used": { + "type": "string", + "format": "date-time" + }, + "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 + }, + "owner": { + "$ref": "#/components/schemas/account" + } + }, + "additionalProperties": true + } + ] + }, + "paginated_deploy_keys": { + "type": "object", + "title": "Paginated Deploy Keys", + "description": "A paginated list of deploy keys.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/deploy_key" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_project_deploy_keys": { + "type": "object", + "title": "Paginated Project Deploy Keys", + "description": "A paginated list of project deploy keys.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/project_deploy_key" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_ssh_user_keys": { + "type": "object", + "title": "Paginated SSH User Keys", + "description": "A paginated list of SSH keys.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ssh_account_key" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "project_deploy_key": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Project Deploy Key", + "description": "Represents deploy key for a project.", + "properties": { + "key": { + "type": "string", + "description": "The deploy key value." + }, + "project": { + "$ref": "#/components/schemas/project" + }, + "comment": { + "type": "string", + "description": "The comment parsed from the deploy key (if present)" + }, + "label": { + "type": "string", + "description": "The user-defined label for the deploy key" + }, + "added_on": { + "type": "string", + "format": "date-time" + }, + "last_used": { + "type": "string", + "format": "date-time" + }, + "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 + }, + "created_by": { + "$ref": "#/components/schemas/account" + } + }, + "additionalProperties": true + } + ] + }, + "ssh_key": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "SSH Key", + "description": "Base type for representing SSH public keys.", + "properties": { + "uuid": { + "type": "string", + "description": "The SSH key's immutable ID." + }, + "key": { + "type": "string", + "description": "The SSH public key value in OpenSSH format." + }, + "comment": { + "type": "string", + "description": "The comment parsed from the SSH key (if present)" + }, + "label": { + "type": "string", + "description": "The user-defined label for the SSH key" + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "last_used": { + "type": "string", + "format": "date-time" + }, + "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 + } + }, + "additionalProperties": true + } + ] + }, + "hook_event": { + "type": "object", + "title": "Hook Event", + "description": "An event, associated with a resource or subject type.", + "properties": { + "event": { + "type": "string", + "description": "The event identifier.", + "enum": [ + "issue:comment_created", + "issue:created", + "issue:updated", + "project:updated", + "pullrequest:approved", + "pullrequest:changes_request_created", + "pullrequest:changes_request_removed", + "pullrequest:comment_created", + "pullrequest:comment_deleted", + "pullrequest:comment_reopened", + "pullrequest:comment_resolved", + "pullrequest:comment_updated", + "pullrequest:created", + "pullrequest:fulfilled", + "pullrequest:push", + "pullrequest:rejected", + "pullrequest:unapproved", + "pullrequest:updated", + "repo:commit_comment_created", + "repo:commit_status_created", + "repo:commit_status_updated", + "repo:created", + "repo:deleted", + "repo:fork", + "repo:imported", + "repo:push", + "repo:transfer", + "repo:updated" + ] + }, + "category": { + "type": "string", + "description": "The category this event belongs to." + }, + "label": { + "type": "string", + "description": "Summary of the webhook event type." + }, + "description": { + "type": "string", + "description": "More detailed description of the webhook event type." + } + }, + "additionalProperties": false + }, + "paginated_hook_events": { + "type": "object", + "title": "Paginated Hook Events", + "description": "A paginated list of webhook types available to subscribe on.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/hook_event" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "webhook_subscription": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Webhook Subscription", + "description": "A Webhook subscription.", + "properties": { + "uuid": { + "type": "string", + "description": "The webhook's id" + }, + "url": { + "type": "string", + "description": "The URL events get delivered to.", + "format": "uri" + }, + "description": { + "type": "string", + "description": "A user-defined description of the webhook." + }, + "subject_type": { + "type": "string", + "description": "The type of entity. Set to either `repository` or `workspace` based on where the subscription is defined.", + "enum": ["repository", "workspace"] + }, + "subject": { + "$ref": "#/components/schemas/object" + }, + "active": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "events": { + "type": "array", + "description": "The events this webhook is subscribed to.", + "items": { + "type": "string", + "enum": [ + "issue:comment_created", + "issue:created", + "issue:updated", + "project:updated", + "pullrequest:approved", + "pullrequest:changes_request_created", + "pullrequest:changes_request_removed", + "pullrequest:comment_created", + "pullrequest:comment_deleted", + "pullrequest:comment_reopened", + "pullrequest:comment_resolved", + "pullrequest:comment_updated", + "pullrequest:created", + "pullrequest:fulfilled", + "pullrequest:push", + "pullrequest:rejected", + "pullrequest:unapproved", + "pullrequest:updated", + "repo:commit_comment_created", + "repo:commit_status_created", + "repo:commit_status_updated", + "repo:created", + "repo:deleted", + "repo:fork", + "repo:imported", + "repo:push", + "repo:transfer", + "repo:updated" + ] + }, + "minItems": 1, + "uniqueItems": true + }, + "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." + }, + "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 + } + }, + "additionalProperties": true + } + ] + }, + "paginated_webhook_subscriptions": { + "type": "object", + "title": "Paginated Webhook Subscriptions", + "description": "A paginated list of webhook subscriptions", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/webhook_subscription" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_workspace_memberships": { + "type": "object", + "title": "Paginated Workspace Memberships", + "description": "A paginated list of workspace memberships.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/workspace_membership" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_workspaces": { + "type": "object", + "title": "Paginated Workspaces", + "description": "A paginated list of workspaces.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/workspace" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "workspace_membership": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Workspace Membership", + "description": "A Bitbucket workspace membership.\n Links a user to a workspace.", + "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 + }, + "user": { + "$ref": "#/components/schemas/account" + }, + "workspace": { + "$ref": "#/components/schemas/workspace" + } + }, + "additionalProperties": true + } + ] + }, + "workspace": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Workspace", + "description": "A Bitbucket workspace.\n Workspaces are used to organize repositories.", + "properties": { + "links": { + "type": "object", + "properties": { + "avatar": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "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 + }, + "members": { + "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 + }, + "owners": { + "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 + }, + "projects": { + "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 + }, + "repositories": { + "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 + }, + "snippets": { + "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 + }, + "uuid": { + "type": "string", + "description": "The workspace's immutable id." + }, + "name": { + "type": "string", + "description": "The name of the workspace." + }, + "slug": { + "type": "string", + "description": "The short label that identifies this workspace." + }, + "is_private": { + "type": "boolean", + "description": "Indicates whether the workspace is publicly accessible, or whether it is\nprivate to the members and consequently only visible to members." + }, + "is_privacy_enforced": { + "type": "boolean", + "description": "Indicates whether the workspace enforces private content, or whether it allows public content." + }, + "created_on": { + "type": "string", + "format": "date-time" + }, + "updated_on": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": true + } + ] + }, + "app_user": { + "allOf": [ + { + "$ref": "#/components/schemas/account" + }, + { + "type": "object", + "title": "App User", + "description": "An app user object.", + "properties": { + "account_id": { + "type": "string", + "description": "The user's Atlassian account ID." + }, + "account_status": { + "type": "string", + "description": "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future." + }, + "kind": { + "type": "string", + "description": "The kind of App User." + } + }, + "additionalProperties": true + } + ] + }, + "user_links": { + "allOf": [ + { + "$ref": "#/components/schemas/account_links" + }, + { + "type": "object", + "title": "User Links", + "description": "Links related to a User.", + "properties": { + "self": { + "$ref": "#/components/schemas/link" + }, + "html": { + "$ref": "#/components/schemas/link" + }, + "repositories": { + "$ref": "#/components/schemas/link" + } + }, + "additionalProperties": true + } + ] + }, + "user": { + "allOf": [ + { + "$ref": "#/components/schemas/account" + }, + { + "type": "object", + "title": "User", + "description": "A user object.", + "properties": { + "links": { + "$ref": "#/components/schemas/user_links" + }, + "account_id": { + "type": "string", + "description": "The user's Atlassian account ID." + }, + "account_status": { + "type": "string", + "description": "The status of the account. Currently the only possible value is \"active\", but more values may be added in the future." + }, + "has_2fa_enabled": { + "type": "boolean" + }, + "nickname": { + "type": "string", + "description": "Account name defined by the owner. Should be used instead of the \"username\" field. Note that \"nickname\" cannot be used in place of \"username\" in URLs and queries, as \"nickname\" is not guaranteed to be unique." + }, + "is_staff": { + "type": "boolean" + } + }, + "additionalProperties": true + } + ] + }, + "branchrestriction": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Branch Restriction", + "description": "A branch restriction rule.", + "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 + }, + "id": { + "type": "integer", + "description": "The branch restriction status' id." + }, + "kind": { + "type": "string", + "description": "The type of restriction that is being applied.", + "enum": [ + "push", + "delete", + "force", + "restrict_merges", + "require_tasks_to_be_completed", + "require_approvals_to_merge", + "require_review_group_approvals_to_merge", + "require_default_reviewer_approvals_to_merge", + "require_no_changes_requested", + "require_passing_builds_to_merge", + "require_commits_behind", + "reset_pullrequest_approvals_on_change", + "smart_reset_pullrequest_approvals", + "reset_pullrequest_changes_requested_on_change", + "require_all_dependencies_merged", + "enforce_merge_checks", + "allow_auto_merge_when_builds_pass", + "require_all_comments_resolved" + ] + }, + "branch_match_kind": { + "type": "string", + "description": "Indicates how the restriction is matched against a branch. The default is `glob`.", + "enum": ["branching_model", "glob"] + }, + "branch_type": { + "type": "string", + "description": "Apply the restriction to branches of this type. Active when `branch_match_kind` is `branching_model`. The branch type will be calculated using the branching model configured for the repository.", + "enum": [ + "feature", + "bugfix", + "release", + "hotfix", + "development", + "production" + ] + }, + "pattern": { + "type": "string", + "description": "Apply the restriction to branches that match this pattern. Active when `branch_match_kind` is `glob`. Will be empty when `branch_match_kind` is `branching_model`." + }, + "value": { + "type": "integer", + "description": "Value with kind-specific semantics:\n\n* `require_approvals_to_merge` uses it to require a minimum number of approvals on a PR.\n\n* `require_default_reviewer_approvals_to_merge` uses it to require a minimum number of approvals from default reviewers on a PR.\n\n* `require_passing_builds_to_merge` uses it to require a minimum number of passing builds.\n\n* `require_commits_behind` uses it to require the current branch is up to a maximum number of commits behind it destination." + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/account" + }, + "minItems": 0 + }, + "groups": { + "type": "array", + "items": { + "$ref": "#/components/schemas/group" + }, + "minItems": 0 + } + }, + "required": ["kind", "branch_match_kind", "pattern"], + "additionalProperties": true + } + ] + }, + "component": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Component", + "description": "A component as defined in a repository's issue tracker.", + "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 + }, + "name": { + "type": "string" + }, + "id": { + "type": "integer" + } + }, + "additionalProperties": true + } + ] + }, + "issue_comment": { + "allOf": [ + { + "$ref": "#/components/schemas/comment" + }, + { + "type": "object", + "title": "Issue Comment", + "description": "A issue comment.", + "properties": { + "issue": { + "$ref": "#/components/schemas/issue" + } + }, + "additionalProperties": true + } + ] + }, + "milestone": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Milestone", + "description": "A milestone as defined in a repository's issue tracker.", + "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 + }, + "name": { + "type": "string" + }, + "id": { + "type": "integer" + } + }, + "additionalProperties": true + } + ] + }, + "version": { + "allOf": [ + { + "$ref": "#/components/schemas/object" + }, + { + "type": "object", + "title": "Version", + "description": "A version as defined in a repository's issue tracker.", + "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 + }, + "name": { + "type": "string" + }, + "id": { + "type": "integer" + } + }, + "additionalProperties": true + } + ] + }, + "repository_user_permission": { + "type": "object", + "title": "Repository User Permission", + "description": "A user's direct permission for a given repository.", + "properties": { + "type": { + "type": "string" + }, + "permission": { + "type": "string", + "enum": ["read", "write", "admin", "none"] + }, + "user": { + "$ref": "#/components/schemas/user" + }, + "repository": { + "$ref": "#/components/schemas/repository" + }, + "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 + } + }, + "required": ["type"], + "additionalProperties": true + }, + "pullrequest_comment": { + "allOf": [ + { + "$ref": "#/components/schemas/comment" + }, + { + "type": "object", + "title": "Pull Request Comment", + "description": "A pullrequest comment.", + "properties": { + "pullrequest": { + "$ref": "#/components/schemas/pullrequest" + }, + "resolution": { + "$ref": "#/components/schemas/comment_resolution" + }, + "pending": { + "type": "boolean" + } + }, + "additionalProperties": true + } + ] + }, + "pullrequest_comment_task": { + "allOf": [ + { + "$ref": "#/components/schemas/pullrequest_task" + }, + { + "type": "object", + "title": "Pull Request Comment Task", + "description": "A pullrequest comment task", + "properties": { + "comment": { + "$ref": "#/components/schemas/comment" + } + }, + "additionalProperties": false + } + ] + }, + "branch": { + "allOf": [ + { + "$ref": "#/components/schemas/ref" + }, + { + "type": "object", + "title": "Branch", + "description": "A branch object, representing a branch in a repository.", + "properties": { + "merge_strategies": { + "type": "array", + "description": "Available merge strategies for pull requests targeting this branch.", + "items": { + "type": "string", + "enum": ["merge_commit", "squash", "fast_forward"] + } + }, + "default_merge_strategy": { + "type": "string", + "description": "The default merge strategy for pull requests targeting this branch." + } + }, + "additionalProperties": true + } + ] + }, + "commit_comment": { + "allOf": [ + { + "$ref": "#/components/schemas/comment" + }, + { + "type": "object", + "title": "Commit Comment", + "description": "A commit comment.", + "properties": { + "commit": { + "$ref": "#/components/schemas/commit" + } + }, + "additionalProperties": true + } + ] + }, + "paginated_branches": { + "type": "object", + "title": "Paginated Branches", + "description": "A paginated list of branches.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/branch" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "paginated_tags": { + "type": "object", + "title": "Paginated Tags", + "description": "A paginated list of tags.", + "properties": { + "size": { + "type": "integer", + "description": "Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute.", + "minimum": 0 + }, + "page": { + "type": "integer", + "description": "Page number of the current results. This is an optional element that is not provided in all responses.", + "minimum": 1 + }, + "pagelen": { + "type": "integer", + "description": "Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values.", + "minimum": 1 + }, + "next": { + "type": "string", + "description": "Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "previous": { + "type": "string", + "description": "Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs.", + "format": "uri" + }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/tag" + }, + "minItems": 0, + "uniqueItems": true + } + }, + "additionalProperties": false + }, + "commit": { + "allOf": [ + { + "$ref": "#/components/schemas/base_commit" + }, + { + "type": "object", + "title": "Commit", + "description": "A repository commit object.", + "properties": { + "repository": { + "$ref": "#/components/schemas/repository" + }, + "participants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/participant" + }, + "minItems": 0 + } + }, + "additionalProperties": true + } + ] + }, + "tag": { + "allOf": [ + { + "$ref": "#/components/schemas/ref" + }, + { + "type": "object", + "title": "Tag", + "description": "A tag object, representing a tag in a repository.", + "properties": { + "message": { + "type": "string", + "description": "The message associated with the tag, if available." + }, + "date": { + "type": "string", + "description": "The date that the tag was created, if available", + "format": "date-time" + }, + "tagger": { + "$ref": "#/components/schemas/author" + } + }, + "additionalProperties": true + } + ] + }, + "snippet_commit": { + "allOf": [ + { + "$ref": "#/components/schemas/base_commit" + }, + { + "type": "object", + "title": "Snippet Commit", + "description": "", + "properties": { + "links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "html": { + "type": "object", + "title": "Link", + "description": "A link to a resource related to this object.", + "properties": { + "href": { + "type": "string", + "format": "uri" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "diff": { + "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 + }, + "snippet": { + "$ref": "#/components/schemas/snippet" + } + }, + "additionalProperties": true + } + ] + }, + "ssh_account_key": { + "allOf": [ + { + "$ref": "#/components/schemas/ssh_key" + }, + { + "type": "object", + "title": "SSH Account Key", + "description": "Represents an SSH public key for a user.", + "properties": { + "owner": { + "$ref": "#/components/schemas/account" + } + }, + "additionalProperties": true + } + ] + } + } + } +} diff --git a/src/index.ts b/src/index.ts index e69de29..ce4bf6b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -0,0 +1,3 @@ +export * from "./base64.js" +export * from "./cloud/index.js" +export * from "./server/index.js" diff --git a/src/main.ts b/src/main.ts index 21fff04..3f4c398 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1 +1 @@ -console.log("CLI mode not supported.") +console.log("@coderabbitai/bitbucket") diff --git a/src/server/client.test.ts b/src/server/client.test.ts new file mode 100644 index 0000000..2bb124b --- /dev/null +++ b/src/server/client.test.ts @@ -0,0 +1,7 @@ +import { test } from "vitest" +import { createBitbucketServerClient } from "./client.js" + +test("createBitbucketServerClient", ({ expect }) => { + const client = createBitbucketServerClient() + expect(client).toBeDefined() +}) diff --git a/src/server/client.ts b/src/server/client.ts new file mode 100644 index 0000000..ba4d305 --- /dev/null +++ b/src/server/client.ts @@ -0,0 +1,19 @@ +import type { Client, ClientOptions } from "openapi-fetch" +import createClient from "openapi-fetch" +import type { paths } from "./openapi/index.js" + +/** + * Creates an `openapi-fetch` client using {@link createClient}. + * + * @example + * export const client = createBitbucketServerClient({ + * baseUrl: "https://example.org/rest", + * headers: { + * Accept: "application/json", + * Authorization: `Bearer ${BITBUCKET_SERVER_TOKEN}`, + * }, + * }) + */ +export const createBitbucketServerClient: ( + clientOptions?: ClientOptions, +) => Client = createClient diff --git a/src/server/index.ts b/src/server/index.ts new file mode 100644 index 0000000..959f0af --- /dev/null +++ b/src/server/index.ts @@ -0,0 +1,2 @@ +export * from "./client.js" +export * as server from "./openapi/index.js" diff --git a/src/server/openapi/index.ts b/src/server/openapi/index.ts new file mode 100644 index 0000000..a54af9b --- /dev/null +++ b/src/server/openapi/index.ts @@ -0,0 +1 @@ +export * from "./openapi-typescript.js" diff --git a/src/server/openapi/openapi-typescript.ts b/src/server/openapi/openapi-typescript.ts new file mode 100644 index 0000000..56733ba --- /dev/null +++ b/src/server/openapi/openapi-typescript.ts @@ -0,0 +1,41184 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + readonly "/access-tokens/latest/projects/{projectKey}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get project HTTP tokens + * @description Get all access tokens associated with the given project. + */ + readonly get: operations["getAllAccessTokens"] + /** + * Create project HTTP token + * @description Create an access token for the project according to the given request. + */ + readonly put: operations["createAccessToken"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/access-tokens/latest/projects/{projectKey}/{tokenId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get HTTP token by ID + * @description Get the access token identified by the given ID. + */ + readonly get: operations["getById"] + readonly put?: never + /** + * Update HTTP token + * @description Modify an access token according to the given request. Any fields not specified will not be altered. + */ + readonly post: operations["updateAccessToken"] + /** + * Delete a HTTP token + * @description Delete the access token identified by the given ID. + */ + readonly delete: operations["deleteById"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository HTTP tokens + * @description Get all access tokens associated with the given repository. + */ + readonly get: operations["getAllAccessTokens_1"] + /** + * Create repository HTTP token + * @description Create an access token for the repository according to the given request. + */ + readonly put: operations["createAccessToken_1"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get HTTP token by ID + * @description Get the access token identified by the given ID. + */ + readonly get: operations["getById_1"] + readonly put?: never + /** + * Update HTTP token + * @description Modify an access token according to the given request. Any fields not specified will not be altered. + */ + readonly post: operations["updateAccessToken_1"] + /** + * Delete a HTTP token + * @description Delete the access token identified by the given ID. + */ + readonly delete: operations["deleteById_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/access-tokens/latest/users/{userSlug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get personal HTTP tokens + * @description Get all access tokens associated with the given user. + */ + readonly get: operations["getAllAccessTokens_2"] + /** + * Create personal HTTP token + * @description Create an access token for the user according to the given request. + */ + readonly put: operations["createAccessToken_2"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/access-tokens/latest/users/{userSlug}/{tokenId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get HTTP token by ID + * @description Get the access token identified by the given ID. + */ + readonly get: operations["getById_2"] + readonly put?: never + /** + * Update HTTP token + * @description Modify an access token according to the given request. Any fields not specified will not be altered. + */ + readonly post: operations["updateAccessToken_2"] + /** + * Delete a HTTP token + * @description Delete the access token identified by the given ID. + */ + readonly delete: operations["deleteById_2"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/admin": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get global SSH key settings + * @description Gets the global settings that enforce the maximum expiry of SSH keys and restrictions on SSH key types. + */ + readonly get: operations["getGlobalSettings"] + /** + * Update global SSH key settings + * @description Updates the global settings that enforces the maximum expiry of SSH keys and restrictions on SSH key types. + */ + readonly put: operations["updateGlobalSettings"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/admin/supported-key-types": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get supported SSH key algorithms and lengths + * @description Retrieves a list of all supported SSH key algorithms and lengths. + */ + readonly get: operations["getSupportedKeyTypes"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/banner": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get announcement banner + * @description Gets the announcement banner, if one exists and is available to the user + */ + readonly get: operations["getBanner"] + /** + * Update/Set announcement banner + * @description Sets the announcement banner with the provided JSON. + * Only users authenticated as Admins may call this resource + */ + readonly put: operations["setBanner"] + readonly post?: never + /** + * Delete announcement banner + * @description Deletes a banner, if one is present in the database. + */ + readonly delete: operations["deleteBanner"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/cluster": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get cluster node information + * @description Gets information about the nodes that currently make up the stash cluster. + * + * The authenticated user must have the SYS_ADMIN permission to call this resource. + */ + readonly get: operations["getInformation"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/default-branch": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get the default branch + * @description Retrieves the configured global default branch, which is used when creating new repositories if an explicit default branch is not specified. + * + * The user must be authenticated to call this resource. + */ + readonly get: operations["getDefaultBranch"] + /** + * Update/Set default branch + * @description Configures the global default branch, which is used when creating new repositories if an explicit default branch is not specified. + * + * The authenticated user must have ADMIN permission to call this resource. + */ + readonly put: operations["setDefaultBranch"] + readonly post?: never + /** + * Clear default branch + * @description Clears the global default branch, which is used when creating new repositories if an explicit default branch is not specified, if one has been configured. + * + * The authenticated user must have ADMIN permission to call this resource. + */ + readonly delete: operations["clearDefaultBranch"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/git/mesh/config/control-plane.pem": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get the control plane PEM + * @description Obtain the control plane PEM. + * + * The authenticated user must have **SYS_ADMIN** permission. + */ + readonly get: operations["getControlPlanePublicKey"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/git/mesh/diagnostics/connectivity": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Generate Mesh connectivity report + * @description Generates a connectivity report between the Bitbucket node(s) and the Mesh node(s). + * + * The authenticated user must have **SYS_ADMIN** permission. + */ + readonly get: operations["connectivity"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/git/mesh/nodes": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all registered Mesh nodes + * @description Get all the registered Mesh nodes. + * + * The authenticated user must have **SYS_ADMIN** permission. + */ + readonly get: operations["getAllRegisteredMeshNodes"] + readonly put?: never + /** + * Register new Mesh node + * @description Register a new Mesh node. + * + * The authenticated user must have **SYS_ADMIN** permission. + */ + readonly post: operations["registerNewMeshNode"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/git/mesh/nodes/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get Mesh node + * @description Get the registered Mesh node that matches the supplied ID. + * + * The authenticated user must have **SYS_ADMIN** permission. + */ + readonly get: operations["getRegisteredMeshNodeById"] + /** + * Update Mesh node + * @description Update a Mesh node. + * + * The authenticated user must have **SYS_ADMIN** permission. + */ + readonly put: operations["updateMeshNode"] + readonly post?: never + /** + * Delete Mesh node + * @description Delete a Mesh node + * + * The authenticated user must have **SYS_ADMIN** permission. + */ + readonly delete: operations["delete_2"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/git/mesh/support-zips": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get support zips for all Mesh nodes + * @description Get the support zips for all the Mesh nodes. + * + * The authenticated user must have **SYS_ADMIN** permission. + */ + readonly get: operations["getSupportZips"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/git/mesh/support-zips/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get support zip for node + * @description Get the support zip for the Mesh node that matches the specified ID. + * + * The authenticated user must have **SYS_ADMIN** permission. + */ + readonly get: operations["getSupportZip"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get groups + * @description Retrieve a page of groups. + * + * The authenticated user must have LICENSED_USER permission or higher to call this resource. + */ + readonly get: operations["getGroups_1"] + readonly put?: never + /** + * Create group + * @description Create a new group. + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly post: operations["createGroup"] + /** + * Remove group + * @description Deletes the specified group, removing them from the system. This also removes any permissions that may have been granted to the group. + * + * A user may not delete the last group that is granting them administrative permissions, or a group with greater permissions than themselves. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly delete: operations["deleteGroup"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/groups/add-user": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Add user to group + * @deprecated + * @description Deprecated since 2.10. Use /rest/users/add-groups instead. + * + * Add a user to a group. + * + * In the request entity, the context attribute is the group and the itemName is the user. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly post: operations["addUserToGroup"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/groups/add-users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Add multiple users to group + * @description Add multiple users to a group. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly post: operations["addUsersToGroup"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/groups/more-members": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get group members + * @description Retrieves a list of users that are members of a specified group.

The authenticated user must have the LICENSED_USER permission to call this resource. + */ + readonly get: operations["findUsersInGroup"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/groups/more-non-members": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get members not in group + * @description Retrieves a list of users that are not members of a specified group.

The authenticated user must have the LICENSED_USER permission to call this resource. + */ + readonly get: operations["findUsersNotInGroup"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/groups/remove-user": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Remove user from group + * @deprecated + * @description Deprecated since 2.10. Use /rest/users/remove-groups instead. + * + * Remove a user from a group. + * + * The authenticated user must have the ADMIN permission to call this resource. + * + * In the request entity, the context attribute is the group and the itemName is the user. + */ + readonly post: operations["removeUserFromGroup"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/license": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get license details + * @description Retrieves details about the current license, as well as the current status of the system with regards to the installed license. The status includes the current number of users applied toward the license limit, as well as any status messages about the license (warnings about expiry or user counts exceeding license limits). + * + * The authenticated user must have ADMIN permission. Unauthenticated users, and non-administrators, are not permitted to access license details. + */ + readonly get: operations["get_2"] + readonly put?: never + /** + * Update license + * @description Decodes the provided encoded license and sets it as the active license. If no license was provided, a 400 is returned. If the license cannot be decoded, or cannot be applied, a 409 is returned. Some possible reasons a license may not be applied include: + * + * - It is for a different product + * - It is already expired + * + * + * Otherwise, if the license is updated successfully, details for the new license are returned with a 200 response. + * + * Warning: It is possible to downgrade the license during update, applying a license with a lower number of permitted users. If the number of currently-licensed users exceeds the limits of the new license, pushing will be disabled until the licensed user count is brought into compliance with the new license. + * + * The authenticated user must have SYS_ADMIN permission. ADMIN users may view the current license details, but they may not update the license. + */ + readonly post: operations["updateLicense"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/mail-server": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get mail configuration + * @description Retrieves the current mail configuration. + * + * The authenticated user must have the SYS_ADMIN permission to call this resource. + */ + readonly get: operations["getMailConfig"] + /** + * Update mail configuration + * @description Updates the mail configuration. + * + * The authenticated user must have the SYS_ADMIN permission to call this resource. + */ + readonly put: operations["setMailConfig"] + readonly post?: never + /** + * Delete mail configuration + * @description Deletes the current mail configuration. + * + * The authenticated user must have the SYS_ADMIN permission to call this resource. + */ + readonly delete: operations["deleteMailConfig"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/mail-server/sender-address": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get server mail address + * @description Retrieves the server email address + */ + readonly get: operations["getSenderAddress"] + /** + * Update server mail address + * @description Updates the server email address + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly put: operations["setSenderAddress"] + readonly post?: never + /** + * Update mail configuration + * @description Clears the server email address. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly delete: operations["clearSenderAddress"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/permissions/groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get groups with a global permission + * @description Retrieve a page of groups that have been granted at least one global permission. + * + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly get: operations["getGroupsWithAnyPermission"] + /** + * Update global permission for group + * @description Promote or demote a group's global permission level. Available global permissions are: + * + * + * - LICENSED_USER + * - PROJECT_CREATE + * - ADMIN + * - SYS_ADMIN + * + * See the Bitbucket Data Center documentation for a detailed explanation of what each permission entails. + * + * + * The authenticated user must have: + * + * + * - ADMIN permission or higher; and + * - the permission they are attempting to grant or higher; and + * - greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them) + * + * + * to call this resource. In addition, a user may not demote a group's permission level if their own permission + * level would be reduced as a result. + */ + readonly put: operations["setPermissionForGroups"] + readonly post?: never + /** + * Revoke all global permissions for group + * @description Revoke all global permissions for a group. + * + * + * + * The authenticated user must have: + * + * + * - ADMIN permission or higher; and + * - greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them) + * + * + * to call this resource. In addition, a user may not revoke a group's permissions if their own permission level + * would be reduced as a result. + */ + readonly delete: operations["revokePermissionsForGroup"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/permissions/groups/none": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get groups with no global permission + * @description Retrieve a page of groups that have no granted global permissions. + * + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly get: operations["getGroupsWithoutAnyPermission"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/permissions/users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get users with a global permission + * @description Retrieve a page of users that have been granted at least one global permission. + * + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly get: operations["getUsersWithAnyPermission"] + /** + * Update global permission for user + * @description Promote or demote the global permission level of a user. Available global permissions are: + * + * + * - LICENSED_USER + * - PROJECT_CREATE + * - ADMIN + * - SYS_ADMIN + * + * + * See the Bitbucket Data Center documentation for a detailed explanation of what each permission entails. + * + * + * The authenticated user must have: + * + * + * - ADMIN permission or higher; and + * - the permission they are attempting to grant; and + * - greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them) + * + * + * to call this resource. In addition, a user may not demote their own permission level. + */ + readonly put: operations["setPermissionForUsers"] + readonly post?: never + /** + * Revoke all global permissions for user + * @description Revoke all global permissions for a user. + * + * + * The authenticated user must have: + * + * + * - ADMIN permission or higher; and + * - greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them) + * + * + * to call this resource. In addition, a user may not demote their own permission level. + */ + readonly delete: operations["revokePermissionsForUser"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/permissions/users/none": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get users with no global permission + * @description Retrieve a page of users that have no granted global permissions. + * + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly get: operations["getUsersWithoutAnyPermission"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/pull-requests/{scmId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get merge strategies + * @description Retrieve the merge strategies available for this instance. + * + * The user must be authenticated to call this resource. + */ + readonly get: operations["getMergeConfig"] + readonly put?: never + /** + * Update merge strategies + * @description Update the pull request merge strategies for the context repository. + * + * The authenticated user must have ADMIN permission to call this resource. + * + * Only the strategies provided will be enabled, only one may be set to default + * + * The commit message template will not be updated if not provided, and will be deleted if the `commitMessageTemplate` attribute is empty, i.e: `commitMessageTemplate: {}`. + * + * An explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty `mergeConfig` attribute. i.e: + * ``` + * { + * "mergeConfig": {} + * } + * ``` + * + * Upon completion of this request, the effective configuration will be the default configuration. + */ + readonly post: operations["setMergeConfig"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/rate-limit/history": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get rate limit history + * @description Retrieves the recent rate limit history for the instance. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly get: operations["getHistory"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/rate-limit/settings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get rate limit settings + * @description Retrieves the rate limit settings for the instance. + * + * The user must be authenticated to call this resource. + */ + readonly get: operations["getSettings_2"] + /** + * Set rate limit + * @description Sets the rate limit settings for the instance. + * + * The authenticated user must have ADMIN permission to call this resource. + */ + readonly put: operations["setSettings_2"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/rate-limit/settings/users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get rate limit settings for user + * @description Retrieves the user-specific rate limit settings for the given user. + * + * The authenticated user must have ADMIN permission to call this resource. + */ + readonly get: operations["getAllRateLimitSettings"] + readonly put?: never + /** + * Set rate limit settings for users + * @description Sets the given rate limit settings for the given users. + * + * The authenticated user must have ADMIN permission to call this resource. + */ + readonly post: operations["set_2"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/rate-limit/settings/users/{userSlug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get user specific rate limit settings + * @description Retrieves the user-specific rate limit settings for the given user. + * + * To call this resource, the user must be authenticated and either have ADMIN permission or be the same user as the one whose settings are requested. A user with ADMIN permission cannot get the settings of a user with SYS_ADMIN permission. + */ + readonly get: operations["get_6"] + /** + * Set rate limit settings for user + * @description Sets the given rate limit settings for the given user. + * + * The authenticated user must have ADMIN permission to call this resource. + */ + readonly put: operations["set_3"] + readonly post?: never + /** + * Delete user specific rate limit settings + * @description Deletes the user-specific rate limit settings for the given user. + * + * The authenticated user must have ADMIN permission to call this resource. + */ + readonly delete: operations["delete_8"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/user-directories": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get directories + * @description Retrieve a list of active directories. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly get: operations["getUserDirectories"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get users + * @description Retrieve a page of users. + * + * The authenticated user must have the LICENSED_USER permission to call this resource. + */ + readonly get: operations["getUsers_1"] + /** + * Update user details + * @description Update a user's details. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly put: operations["updateUserDetails"] + /** + * Create user + * @description Creates a new user from the assembled query parameters. + * + * The default group can be used to control initial permissions for new users, such as granting users the ability to login or providing read access to certain projects or repositories. If the user is not added to the default group, they may not be able to login after their account is created until explicit permissions are configured. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly post: operations["createUser"] + /** + * Remove user + * @description Deletes the specified user, removing them from the system. This also removes any permissions that may have been granted to the user. + * + * A user may not delete themselves, and a user with ADMIN permissions may not delete a user with SYS_ADMINpermissions. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly delete: operations["deleteUser"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users/add-group": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Add user to group + * @deprecated + * @description Deprecated since 2.10. Use /rest/users/add-groups instead. + * + * Add a user to a group. This is very similar to groups/add-user, but with the context and itemName attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in the application. + * + * In the request entity, the context attribute is the user and the itemName is the group. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly post: operations["addGroupToUser"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users/add-groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Add user to groups + * @description Add a user to one or more groups. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly post: operations["addUserToGroups"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users/captcha": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + readonly post?: never + /** + * Clear CAPTCHA for user + * @description Clears any CAPTCHA challenge that may constrain the user with the supplied username when they authenticate. Additionally any counter or metric that contributed towards the user being issued the CAPTCHA challenge (for instance too many consecutive failed logins) will also be reset. + * + * The authenticated user must have the ADMIN permission to call this resource, and may not clear the CAPTCHA of a user with greater permissions than themselves. + */ + readonly delete: operations["clearUserCaptchaChallenge"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users/credentials": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Set password for user + * @description Update a user's password. + * + * The authenticated user must have the ADMIN permission to call this resource, and may not update the password of a user with greater permissions than themselves. + */ + readonly put: operations["updateUserPassword"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users/erasure": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Check user removal + * @description Validate if a user can be erased. + * + * A username is only valid for erasure if it exists as the username of a deleted user. This endpoint will return an appropriate error response if the supplied username is invalid for erasure. + * + * This endpoint does not perform the actual user erasure, and will not modify the application in any way. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly get: operations["validateErasable"] + readonly put?: never + /** + * Erase user information + * @description Erases personally identifying user data for a deleted user. + * + * References in the application to the original username will be either removed or updated to a new non-identifying username. Refer to the support guide for details about what data is and isn't erased. + * + * User erasure can only be performed on a deleted user. If the user has not been deleted first then this endpoint will return a bad request and no erasure will be performed. + * + * Erasing user data is irreversible and may lead to a degraded user experience. This method should not be used as part of a standard user deletion and cleanup process. + * + * Plugins can participate in user erasure by defining a <user-erasure-handler> module. If one or more plugin modules fail, an error summary of the failing modules is returned. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly post: operations["eraseUser"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users/more-members": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get groups for user + * @description Retrieves a list of users that are not members of a specified group.

The authenticated user must have the LICENSED_USER permission to call this resource. + */ + readonly get: operations["findGroupsForUser"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users/more-non-members": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find other groups for user + * @description Retrieves a list of groups the specified user is not a member of.

The authenticated user must have the LICENSED_USER permission to call this resource. + */ + readonly get: operations["findOtherGroupsForUser"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users/remove-group": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Remove user from group + * @description Remove a user from a group. This is very similar to groups/remove-user, but with the context and itemName attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in the application. + * + * In the request entity, the context attribute is the user and the itemName is the group. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly post: operations["removeGroupFromUser"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/admin/users/rename": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Rename user + * @description Rename a user. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly post: operations["renameUser"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/application-properties": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get application properties + * @description Retrieve version information and other application properties. + * + * No authentication is required to call this resource. + */ + readonly get: operations["getApplicationProperties"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/build/capabilities": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get build capabilities + * @description Returns the build capabilities of this instance + */ + readonly get: operations["getCapabilities"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/dashboard/pull-request-suggestions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request suggestions + * @description Retrieves a page of suggestions for pull requests that the currently authenticated user may wish to raise. Such suggestions are based on ref changes occurring and so contain the ref change that prompted the suggestion plus the time the change event occurred. Changes will be returned in descending order based on the time the change that prompted the suggestion occurred. + * + * Note that although the response is a page object, the interface does not support paging, however a limit can be applied to the size of the returned page. + */ + readonly get: operations["getPullRequestSuggestions"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/dashboard/pull-requests": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull requests for a user + * @description Retrieve a page of pull requests where a user is involved as either a reviewer, author or a participant. The request may be filtered by pull request state, role or participant status. + */ + readonly get: operations["getPullRequests_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/deployment/capabilities": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get deployment capabilities + * @description Returns the Deployment capabilities of this instance + */ + readonly get: operations["getCapabilities_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get group names + * @description Retrieve a page of group names. + * + * The authenticated user must have LICENSED_USER permission or higher to call this resource. + */ + readonly get: operations["getGroups"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/hook-scripts": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Create a new hook script + * @description Create a new hook script. + * + * This endpoint requires **SYS_ADMIN** permission. + */ + readonly post: operations["createHookScript"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/hook-scripts/{scriptId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a hook script + * @description Retrieves a hook script by ID. + */ + readonly get: operations["getHookScript"] + /** + * Update a hook script + * @description Updates a hook script. + * + * This endpoint requires **SYS_ADMIN** permission. + */ + readonly put: operations["updateHookScript"] + readonly post?: never + /** + * Delete a hook script. + * @description Deletes a registered hook script. + * + * This endpoint requires **SYS_ADMIN** permission. + */ + readonly delete: operations["deleteHookScript"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/hook-scripts/{scriptId}/content": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get hook script content + * @description Retrieves the hook script content. + * + * This endpoint requires **SYS_ADMIN** permission. + */ + readonly get: operations["read"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/hooks/{hookKey}/avatar": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get project avatar + * @description Retrieve the avatar for the project matching the supplied moduleKey. + */ + readonly get: operations["getAvatar"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/inbox/pull-requests": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull requests in inbox + * @description Returns a page of pull requests in the user's inbox. + */ + readonly get: operations["getPullRequests_2"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/inbox/pull-requests/count": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get total number of pull requests in inbox + * @description Returns the total number of pull requests in the user's inbox + */ + readonly get: operations["getPullRequestCount"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/labels": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all labels + * @description Returns a paged response of all the labels in the system. + * + * The user needs to be authenticated to use this resource. + */ + readonly get: operations["getLabels"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/labels/{labelName}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get label + * @description Returns a label. + * + * The user needs to be authenticated to use this resource. + */ + readonly get: operations["getLabel"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/labels/{labelName}/labeled": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get labelables for label + * @description Returns a page of labelables for a given label. + * + * Only labelables that the authenticated user has view access to will be returned. + */ + readonly get: operations["getLabelables"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/logs/logger/{loggerName}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get current log level + * @description Retrieve the current log level for a given logger. + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly get: operations["getLevel"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/logs/logger/{loggerName}/{levelName}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Set log level + * @description Set the current log level for a given logger. + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly put: operations["setLevel"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/logs/rootLogger": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get root log level + * @description Retrieve the current log level for the root logger. + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly get: operations["getRootLevel"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/logs/rootLogger/{levelName}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Set root log level + * @description Set the current log level for the root logger. + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly put: operations["setRootLevel"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/markup/preview": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Preview markdown render + * @description Preview generated HTML for the given markdown content. + * + * Only authenticated users may call this resource. + */ + readonly post: operations["preview"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/exports": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Start export job + * @description Starts a background job that exports the selected repositories. + * + * Only 2 concurrent exports are supported _per cluster node_. If a request ends up on a node that is already running that many export jobs, the request will be rejected and an error returned. + * + * The response includes a description of the job that has been started, and its ID can be used to query these details again, including the current progress, warnings and errors that occurred while processing the job, and to interrupt and cancel the execution of this job. + * + * The request to start an export is similar to the one for previewing an export. Additionally, it accepts an optional parameter, `exportLocation`, which can be used to specify a _relative_ path within `data/migration/export` in the shared home directory. No locations outside of that directory will be accepted for exports. + * + * There are essentially three ways to select repositories for export. Regardless of which you use, a few general rules apply: + * + * - You can supply a list of selectors. The selection will be additive. + * - Repositories that are selected more than once due to overlapping selectors will be de-duplicated and effectively exported only once. + * - For every selected repository, its full fork hierarchy will be considered selected, even if parts of that hierarchy would otherwise not be matched by the provided selectors. For example, when you explicitly select a single repository only, but that repository is a fork, then its origin will be exported (and eventually imported), too. + * + * Now, a single repository can be selected like this: + * + * ``` + * + * + * + * { + * "projectKey": "PRJ", + * "slug": "my-repo" + * } + * + * ``` + * + * Second, all repositories in a specific project can be selected like this: + * + * ``` + * + * + * + * { + * "projectKey": "PRJ", + * "slug": *" + * } + * + * ``` + * + * And third, all projects and repositories in the system would be selected like this: + * + * ``` + * + * + * + * { + * "projectKey": "*", + * "slug": *" + * } + * + * ``` + * + * The authenticated user must have **ADMIN** permission or higher to call this resource. + */ + readonly post: operations["startExport"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/exports/{jobId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get export job details + * @description Gets the details, including the current status and progress, of the export job identified by the given ID. + * + * The authenticated user must have **ADMIN** permission or higher to call this resource. + */ + readonly get: operations["getExportJob"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/exports/{jobId}/cancel": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Cancel export job + * @description Requests the cancellation of an export job. + * + * The request to cancel a job will be processed successfully if the job is actually still running. If it has already finished (successfully or with errors) or if it has already been canceled before, then an error will be returned. + * + * There might be a small delay between accepting the request and actually cancelling the job. In most cases, the delay will be close to instantaneously. In the unlikely case of communication issues across a cluster, it can however take a few seconds to cancel a job. + * + * A client should always actively query the job status to confirm that a job has been successfully canceled. + * + * The authenticated user must have **ADMIN** permission or higher to call this resource. + */ + readonly post: operations["cancelExportJob"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/exports/{jobId}/messages": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get job messages + * @description Gets the messages generated by the job. + * + * Without any filter, all messages will be returned, but the response can optionally be filtered for the following severities. The severity parameter can be repeated to include multiple severities in one response. + * + * - INFO + * - WARN + * - ERROR + * + * The authenticated user must have **ADMIN** permission or higher to call this resource. + */ + readonly get: operations["getExportJobMessages"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/exports/preview": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Preview export + * @description Enumerates the projects and repositories that would be exported for a given export request. + * + * All affected repositories will be enumerated explicitly, and while projects are listed as individual items in responses from this endpoint, their presence does not imply that all their repositories are included. + * + * While this endpoint can be used to verify that all selectors in the request apply as intended, it should be noted that a subsequent, actual export might contain a different set of repositories, as they might have been added or deleted in the meantime. + * + * Note that the overall response from this endpoint can become very large when a lot of repositories end up in the selection. This is why the server is streaming the response while it is being generated (as opposed to creating it in memory and then sending it all at once) and it can be consumed in a streaming way, too. + * + * Also, due to the potential size of the response, projects and repositories are listed with fewer details than in other REST responses. + * + * For a more detailed description of selectors, see the endpoint documentation for starting an export. + * + * The authenticated user must have **ADMIN** permission or higher to call this resource. + */ + readonly post: operations["previewExport"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/imports": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Start import job + * @description Starts a background job that imports the specified archive. + * + * Only 1 import at a time is supported _per cluster_. If another request is made while an import is already running, the request will be rejected and an error returned. + * + * The path in the request must point to a valid archive file. The file must be located within the `data/migration/import` directory in the shared home directory. + * + * The authenticated user must have **ADMIN** permission or higher to call this resource. + */ + readonly post: operations["startImport"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/imports/{jobId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get import job status + * @description Gets the details, including the current status and progress, of the import job identified by the given ID. + * + * The authenticated user must have **ADMIN** permission or higher to call this resource. + */ + readonly get: operations["getImportJob"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/imports/{jobId}/cancel": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Cancel import job + * @description Requests the cancellation of an import job. + * + * The request to cancel a job will be processed successfully if the job is actually still running. If it has already finished (successfully or with errors) or if it has already been canceled before, then an error will be returned. + * + * Note that import jobs are not canceled as instantaneously as export jobs. Rather, once the request has been accepted, there are a number of checkpoints at which the job will actually apply it and stop. This is to keep the system in a reasonably consistent state: + * + * - After the current fork hierarchy has been imported and verified. + * - Before the next repository is imported. + * - Before the next pull request is imported. + * + * A client should always actively query the job status to confirm that a job has been successfully canceled. + * + * The authenticated user must have **ADMIN** permission or higher to call this resource. + */ + readonly post: operations["cancelImportJob"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/imports/{jobId}/messages": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get import job messages + * @description Gets the messages generated by the job. + * + * Without any filter, all messages will be returned, but the response can optionally be filtered for the following severities. The severity parameter can be repeated to include multiple severities in one response. + * + * - INFO + * - WARN + * - ERROR + * + * The authenticated user must have **ADMIN** permission or higher to call this resource. + */ + readonly get: operations["getImportJobMessages"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/mesh": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Start Mesh migration job + * @description Starts a background job that migrates selected projects/repositories to Mesh. + * + * Only 1 job is supported _per cluster_. + * + * The response includes a description of the job that has been started, and its ID can be used to query these details again, including the current progress, and to interrupt and cancel the execution of this job. + * + * The request to start a migration is similar to the one for previewing a migration. + * + * There are essentially three ways to select repositories for migration. Regardless of which you use, a few general rules apply: + * + * - You can supply a list of repository IDs and project IDs. The selection will be additive. All repositories in the system are migrated if both lists are empty. - Repositories that are selected more than once due to overlapping IDs will be de-duplicated and effectively migrated only once. - For every selected repository, its full fork hierarchy will be considered selected, even if parts of that hierarchy would otherwise not be matched by the provided IDs. For example, when you explicitly select a single repository only, but that repository is a fork, then its origin will be migrated too. + * + * Now, a single repository can be selected like this: + * + * ``` + * + * { + * "repositoryIds": [1] + * } + * ``` + * + * Multiple repositories can be selected like this: + * + * + * + * ``` + * + * { + * "repositoryIds": [1, 2] + * } + * ``` + * + * Second, all repositories in a specific project can be selected like this: + * + * + * + * ``` + * + * { + * "projectIds": [1] + * } + * ``` + * + * And third, all projects and repositories in the system would be selected like this: + * + * + * + * ``` + * + * { + * "projectIds": [], + * "repositoryIds": [] + * } + * ``` + * + * The authenticated user must have **SYS_ADMIN** permission to call this resource. + */ + readonly post: operations["startMeshMigration"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/mesh/{jobId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get Mesh migration job details + * @description Gets the details, including the current status and progress, of the job identified by the given ID. + * + * The authenticated user must have **SYS_ADMIN** permission to call this resource. + */ + readonly get: operations["getMeshMigrationJob"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/mesh/{jobId}/cancel": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Cancel Mesh migration job + * @description Requests the cancellation of a migration job. + * + * The request to cancel a job will be processed successfully if the job is actually still running. If it has already finished (successfully or with errors) or if it has already been canceled before, then an error will be returned. + * + * There might be a small delay between accepting the request and actually cancelling the job. In most cases, the delay will be close to instantaneously. In the unlikely case of communication issues across a cluster, it can however take a few seconds to cancel a job. + * + * A client should always actively query the job status to confirm that a job has been successfully canceled. + * + * The authenticated user must have **SYS_ADMIN** permission to call this resource. + */ + readonly post: operations["cancelMeshMigrationJob"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/mesh/{jobId}/messages": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get Mesh migration job messages + * @description Gets the messages generated by the job. + * + * Without any filter, all messages will be returned, but the response can optionally be filtered for the following severities. The severity parameter can be repeated to include multiple severities in one response. + * + * - INFO + * - WARN + * - ERROR + * + * + * The authenticated user must have **SYS_ADMIN** permission to call this resource. + */ + readonly get: operations["getMeshMigrationJobMessages"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/mesh/{jobId}/summary": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get Mesh migration job summary + * @description Gets the summary, including the queue status and progress, of a Mesh migration job. + * + * The authenticated user must have **SYS_ADMIN** permission to call this resource. + */ + readonly get: operations["getMeshMigrationJobSummary"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/mesh/preview": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Preview Mesh migration + * @description Enumerates the projects and repositories that would be migrated for a given request. + * + * All affected repositories will be enumerated explicitly, and while projects are listed as individual items in responses from this endpoint, their presence does not imply that all their repositories are included. + * + * While this endpoint can be used to verify that all selectors in the request apply as intended, it should be noted that a subsequent, actual export might contain a different set of repositories, as they might have been added or deleted in the meantime. + * + * Note that the overall response from this endpoint can become very large when a lot of repositories end up in the selection. This is why the server is streaming the response while it is being generated (as opposed to creating it in memory and then sending it all at once) and it can be consumed in a streaming way, too. + * + * Also, due to the potential size of the response, projects and repositories are listed with fewer details than in other REST responses. + * + * The authenticated user must have **SYS_ADMIN** permission to call this resource. + */ + readonly post: operations["previewMeshMigration"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/mesh/repos": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find repositories by Mesh migration state + * @description Searches for repositories in the system matching the specified criteria and enriches their MeshMigrationQueueState migration state if a migration is currently in progress. + * + * The currently active migration can optionally be specified by passing a migrationId, if known. If this isn't passed, an attempt is made to locate the active migration and its ID is used. + * + * If a migration is currently active, only repositories that are a part of the migration are filtered and returned. Otherwise, all repositories in the systems are filtered and returned. + * + * Filtering by state is ignored when no migration is currently in progress. In such a case, results are not enriched with their MeshMigrationQueueState migration state. + * + * The authenticated user must have **SYS_ADMIN** permission to call this resource. + */ + readonly get: operations["searchMeshMigrationRepos"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/mesh/summaries": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all Mesh migration job summaries + * @description Retrieve a page of Mesh migration job summaries. Jobs are ordered by when they were started, newest first. + * + * The authenticated user must have **SYS_ADMIN** permission to call this resource. + */ + readonly get: operations["getAllMeshMigrationSummaries"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/migration/mesh/summary": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get summary for Mesh migration job + * @description Gets the summary, including the queue status and progress, of the currently active Mesh migration job. + * + * The authenticated user must have **SYS_ADMIN** permission to call this resource. + */ + readonly get: operations["getActiveMeshMigrationSummary"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/profile/recent/repos": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get recently accessed repositories + * @description Retrieve a page of recently accessed repositories for the currently authenticated user. + * + * Repositories are ordered from most recently to least recently accessed.

Only authenticated users may call this resource. + */ + readonly get: operations["getRepositoriesRecentlyAccessed"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get projects + * @description Retrieve a page of projects. + * + * Only projects for which the authenticated user has the PROJECT_VIEW permission will be returned. + */ + readonly get: operations["getProjects"] + readonly put?: never + /** + * Create a new project + * @description Create a new project. + * + * To include a custom avatar for the project, the project definition should contain an additional attribute with the key avatar and the value a data URI containing Base64-encoded image data. The URI should be in the following format:

    data:(content type, e.g. image/png);base64,(data) 
If the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid, project creation will fail. + * + * The authenticated user must have PROJECT_CREATE permission to call this resource. + */ + readonly post: operations["createProject"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a project + * @description Retrieve the project matching the supplied projectKey. + * + * The authenticated user must have PROJECT_VIEW permission for the specified project to call this resource. + */ + readonly get: operations["getProject"] + /** + * Update project + * @description Update the project matching the projectKey supplied in the resource path. + * + * To include a custom avatar for the updated project, the project definition should contain an additional attribute with the key avatar and the value a data URI containing Base64-encoded image data. The URI should be in the following format: + * ``` data:(content type, e.g. image/png);base64,(data)``` + * + * If the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid, project creation will fail. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly put: operations["updateProject"] + readonly post?: never + /** + * Delete project + * @description Delete the project matching the supplied projectKey. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly delete: operations["deleteProject"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/avatar.png": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get avatar for project + * @description Retrieve the avatar for the project matching the supplied projectKey. + * + * The authenticated user must have PROJECT_VIEW permission for the specified project to call this resource. + */ + readonly get: operations["getProjectAvatar"] + readonly put?: never + /** + * Update project avatar + * @description Update the avatar for the project matching the supplied projectKey. + * + * This resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'. + * + * There are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded file size (1MB by default). Several different image formats are supported, but PNG and JPEG are preferred due to the file size limit. + * + * This resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to pass the XSRF check the caller needs to send an X-Atlassian-Token HTTP header with the value no-check. + * + * An example curl request to upload an image name 'avatar.png' would be: ```curl -X POST -u username:password -H "X-Atlassian-Token: no-check" http://example.com/rest/api/1.0/projects/STASH/avatar.png -F avatar=@avatar.png ``` + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly post: operations["uploadAvatar"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/hook-scripts": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get configured hook scripts + * @description Return a page of hook scripts configured for the specified project. + * + * This endpoint requires **PROJECT_ADMIN** permission. + */ + readonly get: operations["getConfigurations"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/hook-scripts/{scriptId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Create/update a hook script + * @description Creates/updates the hook script configuration for the provided hook script and project. + * + * This endpoint requires **PROJECT_ADMIN** permission. + */ + readonly put: operations["setConfiguration"] + readonly post?: never + /** + * Remove a hook script + * @description Removes the hook script from the set of hook scripts configured to run in all repositories under the project. + * + * This endpoint requires **PROJECT_ADMIN** permission. + */ + readonly delete: operations["removeConfiguration"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/permissions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + readonly post?: never + /** + * Revoke project permissions + * @description Revoke all permissions for the specified project for the given groups and users. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. + * + * In addition, a user may not revoke a group's permission if their own permission would be revoked as a result, nor may they revoke their own permission unless they have a global permission that already implies that permission. + */ + readonly delete: operations["revokePermissions"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/permissions/{permission}/all": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Check default project permission + * @description Check whether the specified permission is the default permission (granted to all users) for a project. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. + */ + readonly get: operations["hasAllUserPermission"] + readonly put?: never + /** + * Grant project permission + * @description Grant or revoke a project permission to all users, i.e. set the default permission. + * + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher + * global permission to call this resource. + */ + readonly post: operations["modifyAllUserPermission"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/permissions/groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get groups with permission to project + * @description Retrieve a page of groups that have been granted at least one permission for the specified project. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. + */ + readonly get: operations["getGroupsWithAnyPermission_1"] + /** + * Update group project permission + * @description Promote or demote a group's permission level for the specified project. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. In addition, a user may not demote a group's permission level if theirown permission level would be reduced as a result. + */ + readonly put: operations["setPermissionForGroups_1"] + readonly post?: never + /** + * Revoke group project permission + * @description Revoke all permissions for the specified project for a group. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. + * + * In addition, a user may not revoke a group's permissions if it will reduce their own permission level. + */ + readonly delete: operations["revokePermissionsForGroup_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/permissions/groups/none": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get groups without project permission + * @description Retrieve a page of groups that have no granted permissions for the specified project. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher + */ + readonly get: operations["getGroupsWithoutAnyPermission_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/permissions/search": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search project permissions + * @description Search direct and implied permissions of principals (users and groups). This endpoint returns a superset of the results returned by the /users and /groups endpoints because it allows filtering by global permissions too. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. + */ + readonly get: operations["searchPermissions"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/permissions/users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get users with permission to project + * @description Retrieve a page of users that have been granted at least one permission for the specified project. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. + */ + readonly get: operations["getUsersWithAnyPermission_1"] + /** + * Update user project permission + * @description Promote or demote a user's permission level for the specified project. + * + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a global permission that already implies that permission. + */ + readonly put: operations["setPermissionForUsers_1"] + readonly post?: never + /** + * Revoke user project permission + * @description Revoke all permissions for the specified project for a user. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. + * + * In addition, a user may not revoke their own project permissions if they do not have a higher global permission. + */ + readonly delete: operations["revokePermissionsForUser_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/permissions/users/none": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get users without project permission + * @description Retrieve a page of licensed users that have no granted permissions for the specified project. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. + */ + readonly get: operations["getUsersWithoutPermission"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repositories for project + * @description Retrieve repositories from the project corresponding to the supplied projectKey. + * + * The authenticated user must have PROJECT_READ permission for the specified project to call this resource. + */ + readonly get: operations["getRepositories"] + readonly put?: never + /** + * Create repository + * @description Create a new repository. Requires an existing project in which this repository will be created. The only parameters which will be used are name and scmId. + * + * The authenticated user must have REPO_CREATE permission or higher, for the context project to call this resource. + */ + readonly post: operations["createRepository"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository + * @description Retrieve the repository matching the supplied projectKey and repositorySlug. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getRepository"] + /** + * Update repository + * @description Update the repository matching the repositorySlug supplied in the resource path. + * + * The repository's slug is derived from its name. If the name changes the slug may also change. + * + * This resource can be used to change the repository's default branch by specifying a new default branch in the request. For example: "defaultBranch":"main" + * + * This resource can be used to move the repository to a different project by specifying a new project in the request. For example: "project":{"key":"NEW_KEY"} + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly put: operations["updateRepository"] + /** + * Fork repository + * @description Create a new repository forked from an existing repository. + * + * The JSON body for this POST is not required to contain any properties. Even the name may be omitted. The following properties will be used, if provided: + * + * - "name":"Fork name" - Specifies the forked repository's name + * - Defaults to the name of the origin repository if not specified + * - "defaultBranch":"main" - Specifies the forked repository's default branch + * - Defaults to the origin repository's default branch if not specified + * - "project":{"key":"TARGET_KEY"} - Specifies the forked repository's target project by key + * - Defaults to the current user's personal project if not specified + * + * + * The authenticated user must have REPO_READ permission for the specified repository and PROJECT_ADMIN on the target project to call this resource. Note that users always have PROJECT_ADMIN permission on their personal projects. + */ + readonly post: operations["forkRepository"] + /** + * Delete repository + * @description Schedule the repository matching the supplied projectKey and repositorySlug to be deleted. + * + * The authenticated user must have sufficient permissions specified by the repository delete policy to call this resource. The default permission required is REPO_ADMIN permission. + */ + readonly delete: operations["deleteRepository"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/archive": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Stream archive of repository + * @description Streams an archive of the repository's contents at the requested commit. If no `at=` commit is requested, an archive of the default branch is streamed. + * + * The filename= query parameter may be used to specify the exact filename to include in the "Content-Disposition" header. If an explicit filename is not provided, one will be automatically generated based on what is being archived. Its format depends on the at= value: + * + * - No at= commit: <slug>-<default-branch-name>@<commit>.<format>; e.g. example-master@43c2f8a0fe8.zip + * - at=sha: <slug>-<at>.<format>; e.g. example-09bcbb00100cfbb5310fb6834a1d5ce6cac253e9.tar.gz + * - at=branchOrTag: <slug>-<branchOrTag>@<commit>.<format>; e.g. example-feature@bbb225f16e1.tar + * + * - If the branch or tag is qualified (e.g. refs/heads/master, the short name (master) will be included in the filename + * - If the branch or tag's short name includes slashes (e.g. release/4.6), they will be converted to hyphens in the filename (release-4.5) + * + * + * + * + * Archives may be requested in the following formats by adding the format= query parameter: + * + * - zip: A zip file using standard compression (Default) + * - tar: An uncompressed tarball + * - tar.gz or tgz: A GZip-compressed tarball + * + * + * The contents of the archive may be filtered by using the path= query parameter to specify paths to include. path= may be specified multiple times to include multiple paths. + * + * The prefix= query parameter may be used to define a directory (or multiple directories) where the archive's contents should be placed. If the prefix does not end with /, one will be added automatically. The prefix is always treated as a directory; it is not possible to use it to prepend characters to the entries in the archive. + * + * Archives of public repositories may be streamed by any authenticated or anonymous user. Streaming archives for non-public repositories requires an authenticated user with at least REPO_READ permission. + */ + readonly get: operations["getArchive"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/attachments/{attachmentId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get an attachment + * @description Retrieve the attachment. + * + * The authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment. + * + * Range requests (see IETF RFC7233) are supported. However only a single range issupported. If multiple ranges are passed the ranges will be ignored and the entire content will be returned in the response. + */ + readonly get: operations["getAttachment"] + readonly put?: never + readonly post?: never + /** + * Delete an attachment + * @description Delete an attachment. + * + * The user must be authenticated and have REPO_ADMIN permission for the specified repository. + */ + readonly delete: operations["deleteAttachment"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/attachments/{attachmentId}/metadata": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get attachment metadata + * @description Retrieve the attachment metadata. + * + * The authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment that has the attachment metadata. + */ + readonly get: operations["getAttachmentMetadata"] + /** + * Save attachment metadata + * @description Save attachment metadata. + * + * The authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment that has the attachment metadata. + */ + readonly put: operations["saveAttachmentMetadata"] + readonly post?: never + /** + * Delete attachment metadata + * @description Delete attachment metadata. + * + * The user must be authenticated and have REPO_ADMIN permission for the specified repository. + */ + readonly delete: operations["deleteAttachmentMetadata"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find branches + * @description Retrieve the branches matching the supplied filterText param. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getBranches"] + readonly put?: never + /** + * Create branch + * @description Creates a branch using the information provided in the RestCreateBranchRequest request + * + * The authenticated user must have REPO_WRITE permission for the context repository to call this resource. + */ + readonly post: operations["createBranchForRepository"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/default": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get default branch + * @deprecated + * @description Retrieves the repository's default branch, if it has been created. If the repository is empty, 204 No Content will be returned. For non-empty repositories, if the configured default branch has not yet been created a 404 Not Found will be returned. + * + * This URL is deprecated. Callers should use GET /projects/{key}/repos/{slug}/default-branch instead, which allows retrieving the configured default branch even if the ref has not been created yet. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getDefaultBranch_1"] + /** + * Update default branch + * @deprecated + * @description Update the default branch of a repository. + * + * This URL is deprecated. Callers should use PUT /projects/{key}/repos/{slug}/default-branch instead. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly put: operations["setDefaultBranch_1"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/browse": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get file content at revision + * @description Retrieve a page of content for a file path at a specified revision. + * + * Responses from this endpoint vary widely depending on the query parameters. The example JSON is for a request that does not use size, type, blame or noContent. + * + * 1. size will return a response like {"size":10000} + * 2. type will return a response like {"type":"FILE"}, where possible values are "DIRECTORY", "FILE" and "SUBMODULE" + * 3. blame without noContent will include blame for the lines of content returned on the page + * 4. blame with noContent will omit file contents and only return blame for the requested lines + * 5. noContent without blame is ignored and does nothing + * + * + * The various parameters are "processed" in the above order. That means ?size=true&type=truewill return a size response, not a type one; the type parameter will be ignored. + * + * The blame and noContent query parameters are handled differently from size and type. For blame and noContent, the presence of the parameter implies "true" if no value is specified; size and and type both require an explicit=true or they're treated as "false". + * + * - ?blame is the same as ?blame=true + * - ?blame&noContent is the same as ?blame=true&noContent=true + * - ?size is the same as ?size=false + * - ?type is the same as ?type=false + * + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getContent"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/browse/{path}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get file content + * @description Retrieve a page of content for a file path at a specified revision. + * + * Responses from this endpoint vary widely depending on the query parameters. The example JSON is for a request that does not use size, type, blame or noContent. + * + * 1. size will return a response like {"size":10000} + * 2. type will return a response like {"type":"FILE"}, where possible values are "DIRECTORY", "FILE" and "SUBMODULE" + * 3. blame without noContent will include blame for the lines of content returned on the page + * 4. blame with noContent will omit file contents and only return blame for the requested lines + * 5. noContent without blame is ignored and does nothing + * + * + * The various parameters are "processed" in the above order. That means ?size=true&type=truewill return a size response, not a type one; the type parameter will be ignored. + * + * The blame and noContent query parameters are handled differently from size and type. For blame and noContent, the presence of the parameter implies "true" if no value is specified; size and and type both require an explicit=true or they're treated as "false". + * + * - ?blame is the same as ?blame=true + * - ?blame&noContent is the same as ?blame=true&noContent=true + * - ?size is the same as ?size=false + * - ?type is the same as ?type=false + * + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getContent_1"] + /** + * Edit file + * @description Update the content of path, on the given repository and branch. + * + * This resource accepts PUT multipart form data, containing the file in a form-field named content. + * + * An example curl request to update 'README.md' would be: + * + * ```curl -X PUT -u username:password -F content=@README.md -F 'message=Updated using file-edit REST API' -F branch=master -F sourceCommitId=5636641a50b http://example.com/rest/api/latest/projects/PROJECT_1/repos/repo_1/browse/README.md ``` + * + * - branch: the branch on which the path should be modified or created + * - content: the full content of the file at path + * - message: the message associated with this change, to be used as the commit message. Or null if the default message should be used. + * - sourceCommitId: the commit ID of the file before it was edited, used to identify if content has changed. Or null if this is a new file + * + * + * The file can be updated or created on a new branch. In this case, the sourceBranch parameter should be provided to identify the starting point for the new branch and the branch parameter identifies the branch to create the new commit on. + */ + readonly put: operations["editFile"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/changes": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get changes made in commit + * @description Retrieve a page of changes made in a specified commit. + * + * Note: The implementation will apply a hard cap ({@code page.max.changes}) and it is not possible to request subsequent content when that cap is exceeded. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getChanges_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get commits + * @description Retrieve a page of commits from a given starting commit or "between" two commits. If no explicit commit is specified, the tip of the repository's default branch is assumed. commits may be identified by branch or tag name or by ID. A path may be supplied to restrict the returned commits to only those which affect that path. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getCommits"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get commit by ID + * @description Retrieve a single commit identified by its ID. In general, that ID is a SHA1. From 2.11, ref names like "refs/heads/master" are no longer accepted by this resource. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getCommit"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/builds": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a specific build status + * @description Get a specific build status. + * + * + * The authenticated user must have **REPO_READ** permission for the provided repository.The request can also be made with anonymous 2-legged OAuth.
Since 7.14 + */ + readonly get: operations["get"] + readonly put?: never + /** + * Store a build status + * @description Store a build status. + * + * + * The authenticated user must have **REPO_READ** permission for the repository that this build status is for. The request can also be made with anonymous 2-legged OAuth. + */ + readonly post: operations["add"] + /** + * Delete a specific build status + * @description Delete a specific build status. + * + * The authenticated user must have **REPO_ADMIN** permission for the provided repository. + */ + readonly delete: operations["delete"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/changes": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get changes in commit + * @description Retrieve a page of changes made in a specified commit. + * + * Note: The implementation will apply a hard cap (page.max.changes) and it is not possible to request subsequent content when that cap is exceeded. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getChanges"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search for commit comments + * @description Retrieves the commit discussion comments that match the specified search criteria. + * + * It is possible to retrieve commit discussion comments that are anchored to a range of commits by providing the sinceId that the comments anchored from. + * + * The authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource. + */ + readonly get: operations["getComments"] + readonly put?: never + /** + * Add a new commit comment + * @description Add a new comment. + * + * Comments can be added in a few places by setting different attributes: + * + * General commit comment: + * + * ```{ + * "text": "An insightful general comment on a commit." + * } + * + * + * Reply to a comment: + *
{
+		 *           "text": "A measured reply.",
+		 *           "parent": {
+		 *               "id": 1
+		 *           }
+		 *     }
+		 *     
+ * General file comment: + *
{
+		 *           "text": "An insightful general comment on a file.",
+		 *           "anchor": {
+		 *               "diffType": "COMMIT",
+		 *               "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd",
+		 *               "path": "path/to/file",
+		 *               "srcPath": "path/to/file",
+		 *               "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b"
+		 *           }
+		 *     }
+		 *     
+ * File line comment: + *
{
+		 *           "text": "A pithy comment on a particular line within a file.",
+		 *           "anchor": {
+		 *               "diffType": "COMMIT",
+		 *               "line": 1,
+		 *               "lineType": "CONTEXT",
+		 *               "fileType": "FROM",
+		 *               "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd",
+		 *               "path": "path/to/file",
+		 *               "srcPath": "path/to/file",
+		 *               "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b"
+		 *           }
+		 *     }
+		 *     ```
+		 *
+		 *     Note: general file comments are an experimental feature and may change in the near future!
+		 *
+		 *     For file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on.
+		 *
+		 *     For line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be:- 'ADDED' - for an added line;- 'REMOVED' - for a removed line; or- 'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff.'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are:- 'FROM' - the source file of the diff- 'TO' - the destination file of the diffIf the current user is not a participant the user is added as one and updated to watch the commit.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.
+		 */
+		readonly post: operations["createComment"]
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get a commit comment
+		 * @description Retrieves a commit discussion comment.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.
+		 */
+		readonly get: operations["getComment"]
+		/**
+		 * Update a commit comment
+		 * @description Update a comment, with the following restrictions:
+		 *
+		 *     - only the author of the comment may update the text of the comment
+		 *     - only the author of the comment or repository admins and above may update the other   fields of a comment
+		 *
+		 *
+		 *     Note: the supplied supplied JSON object must contain a version that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.
+		 */
+		readonly put: operations["updateComment"]
+		readonly post?: never
+		/**
+		 * Delete a commit comment
+		 * @description Delete a commit comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users. Comments which have replies may not be deleted, regardless of the user's granted permissions.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.
+		 */
+		readonly delete: operations["deleteComment"]
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/deployments": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get a deployment
+		 * @description Get the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber.
+		 *
+		 *     The user must have REPO_READ.
+		 */
+		readonly get: operations["get_1"]
+		readonly put?: never
+		/**
+		 * Create or update a deployment
+		 * @description Create or update a deployment.
+		 *
+		 *      The authenticated user must have REPO_READ permission for the repository.
+		 */
+		readonly post: operations["createOrUpdateDeployment"]
+		/**
+		 * Delete a deployment
+		 * @description Delete the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber.
+		 *
+		 *     The user must have REPO_ADMIN.
+		 */
+		readonly delete: operations["delete_1"]
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/diff-stats-summary/{path}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get diff stats summary between revisions
+		 * @description Retrieve the diff stats summary for a commit.
+		 *
+		 *     The stats summary include the total number of modified files, added lines, and deleted lines.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the specified repository to call this resource.
+		 */
+		readonly get: operations["getDiffStatsSummary"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/diff/{path}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get diff between revisions
+		 * @description Retrieve the diff between two provided revisions.
+		 *
+		 *     To stream a raw text representation of the diff, this endpoint can be called with the request header 'Accept: text/plain'.
+		 *
+		 *     Note: This resource is currently not paged. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more {@code truncated} flags will be set to true on the "segments", "hunks" and "diffs" properties, as well as the top-level object, in the returned JSON response.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the specified repository to call this resource.
+		 */
+		readonly get: operations["streamDiff"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/merge-base": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get the common ancestor between two commits
+		 * @description Returns the best common ancestor between two commits.
+		 *
+		 *     If more than one best common ancestor exists, only one will be returned. It is unspecified which will be returned.
+		 */
+		readonly get: operations["getMergeBase"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/pull-requests": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get repository pull requests containing commit
+		 * @description Retrieve a page of pull requests in the current repository that contain the given commit.
+		 *
+		 *     The user must be authenticated and have access to the specified repository to call this resource.
+		 */
+		readonly get: operations["getPullRequests"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/watch": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		readonly get?: never
+		readonly put?: never
+		/**
+		 * Watch commit
+		 * @description Add the authenticated user as a watcher for the specified commit.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the repository containing the commit to call this resource.
+		 */
+		readonly post: operations["watch"]
+		/**
+		 * Stop watching commit
+		 * @description Remove the authenticated user as a watcher for the specified commit.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the repository containing the commit to call this resource.
+		 */
+		readonly delete: operations["unwatch"]
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/changes": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Compare commits
+		 * @description Gets the file changes available in the  from commit but not in the  to commit.
+		 *
+		 *
+		 *     If either the  from or  to commit are not specified, they will be replaced by the default branch of their containing repository.
+		 */
+		readonly get: operations["streamChanges"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/commits": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get accessible commits
+		 * @description Gets the commits accessible from the from commit but not in the to commit.
+		 *
+		 *     If either the from or to commit are not specified, they will be replaced by the default branch of their containing repository.
+		 */
+		readonly get: operations["streamCommits"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/diff-stats-summary{path}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Retrieve the diff stats summary between commits
+		 * @description Retrieve the diff stats summary of the changes available in the from commit but not in the  to commit.
+		 *
+		 *     If either the  from or  to commit are not specified, they will be replaced by the default branch of their containing repository.
+		 */
+		readonly get: operations["getDiffStatsSummary_1"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/diff{path}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get diff between commits
+		 * @description Gets a diff of the changes available in the from commit but not in the  to commit.
+		 *
+		 *     If either the  from or  to commit are not specified, they will be replaced by the default branch of their containing repository.
+		 */
+		readonly get: operations["streamDiff_1"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/contributing": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get repository contributing guidelines
+		 * @description Retrieves the contributing guidelines for the repository, if they've been defined.
+		 *
+		 *     This checks the repository for a CONTRIBUTING file, optionally with an md or txt extension, and, if found, streams it. By default, the raw content of the file is streamed. Appending ?markup to the URL will stream an HTML-rendered version instead.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the specified repository to call this resource.
+		 */
+		readonly get: operations["streamContributing"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/default-branch": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get repository default branch
+		 * @description Retrieves the repository's configured default branch.
+		 *
+		 *     Every repository has a configured default branch, but that branch may not actually exist in the repository. For example, a newly-created repository will have a configured default branch even though no branches have been pushed yet.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the specified repository to call this resource.
+		 */
+		readonly get: operations["getDefaultBranch_2"]
+		/**
+		 * Update default branch for repository
+		 * @description Update the default branch of a repository.
+		 *
+		 *     The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.
+		 */
+		readonly put: operations["setDefaultBranch_2"]
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/diff": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get raw diff for path
+		 * @description Stream the raw diff between two provided revisions.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the specified repository to call this resource.
+		 */
+		readonly get: operations["streamRawDiff"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/diff/{path}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get raw diff for path
+		 * @description Stream the raw diff between two provided revisions.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the specified repository to call this resource.
+		 */
+		readonly get: operations["streamRawDiff_1"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/files": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get files in directory
+		 * @description Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the specified repository to call this resource.
+		 */
+		readonly get: operations["streamFiles"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/files/{path}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get files in directory
+		 * @description Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the specified repository to call this resource.
+		 */
+		readonly get: operations["streamFiles_1"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/forks": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get repository forks
+		 * @description Retrieve repositories which have been forked from this one. Unlike #getRelatedRepositories(Repository, PageRequest) related repositories, this only looks at a given repository's direct forks. If those forks have themselves been the origin of more forks, such "grandchildren" repositories will not be retrieved.
+		 *
+		 *     Only repositories to which the authenticated user has REPO_READ permission will be included, even if other repositories have been forked from this one.
+		 */
+		readonly get: operations["getForkedRepositories"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/hook-scripts": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get hook scripts
+		 * @description Return a page of hook scripts configured for the specified repository.
+		 *
+		 *     This endpoint requires **REPO_ADMIN** permission.
+		 */
+		readonly get: operations["getConfigurations_1"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/hook-scripts/{scriptId}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		readonly get?: never
+		/**
+		 * Create/update a hook script
+		 * @description Creates/updates the hook script configuration for the provided hook script and repository.
+		 *
+		 *     This endpoint requires **REPO_ADMIN** permission.
+		 */
+		readonly put: operations["setConfiguration_1"]
+		readonly post?: never
+		/**
+		 * Remove a hook script
+		 * @description Removes the hook script from the set of hook scripts configured to run in the repository.
+		 *
+		 *     This endpoint requires **REPO_ADMIN** permission.
+		 */
+		readonly delete: operations["removeConfiguration_1"]
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/labels": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get repository labels
+		 * @description Get all labels applied to the given repository.
+		 *
+		 *     The authenticated user must have REPO_READ permission for the specified repository.
+		 */
+		readonly get: operations["getAllLabelsForRepository"]
+		readonly put?: never
+		/**
+		 * Add repository label
+		 * @description Applies a label to the repository.
+		 *
+		 *     The authenticated user must have REPO_ADMIN permission for the specified repository.
+		 */
+		readonly post: operations["addLabel"]
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/labels/{labelName}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		readonly get?: never
+		readonly put?: never
+		readonly post?: never
+		/**
+		 * Remove repository label
+		 * @description Remove label that is applied to the given repository.
+		 *
+		 *     The authenticated user must have REPO_ADMIN permission for the specified repository.
+		 */
+		readonly delete: operations["removeLabel"]
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/last-modified": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Stream files
+		 * @description Streams files from the repository's root with the last commit to modify each file. Commit modifications are traversed starting from the at commit or, if not specified, from the tip of the default branch.
+		 *
+		 *     Unless the repository is public, the authenticated user must have REPO_READ access to call this resource.
+		 */
+		readonly get: operations["stream"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/last-modified/{path}": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Stream files with last modified commit in path
+		 * @description Streams files in the requested path with the last commit to modify each file. Commit modifications are traversed starting from the at commit or, if not specified, from the tip of the default branch.
+		 *
+		 *     Unless the repository is public, the authenticated user must have REPO_READ access to call this resource.
+		 */
+		readonly get: operations["stream_1"]
+		readonly put?: never
+		readonly post?: never
+		readonly delete?: never
+		readonly options?: never
+		readonly head?: never
+		readonly patch?: never
+		readonly trace?: never
+	}
+	readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/license": {
+		readonly parameters: {
+			readonly query?: never
+			readonly header?: never
+			readonly path?: never
+			readonly cookie?: never
+		}
+		/**
+		 * Get repository license
+		 * @description Retrieves the license for the repository, if it's been defined.
+		 *
+		 *     This checks the repository for a 
LICENSE
file, optionally with an
md
or
txt
extension, and, if found, streams it. By default, the raw content of the file is streamed. Appending
?markup
to the URL will stream an HTML-rendered version instead. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["streamLicense"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/participants": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search pull request participants + * @description Retrieve a page of participant users for all the pull requests to or from the specified repository. + * + * Optionally clients can specify following filters. + */ + readonly get: operations["search"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/patch": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get patch content at revision + * @description Retrieve the patch content for a repository at a specified revision. + * + * Cache headers are added to the response (only if full commit hashes are used, not in the case of short hashes). + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["streamPatch"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + readonly post?: never + /** + * Revoke all repository permissions for users and groups + * @description Revoke all permissions for the specified repository for the given groups and users. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified repository or a higher global permission to call this resource. + * + * In addition, a user may not revoke a group's permission if their own permission would be revoked as a result, nor may they revoke their own permission unless they have a global permission that already implies that permission. + */ + readonly delete: operations["revokePermissions_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get groups with permission to repository + * @description Retrieve a page of groups that have been granted at least one permission for the specified repository. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. + */ + readonly get: operations["getGroupsWithAnyPermission_2"] + /** + * Update group repository permission + * @description Promote or demote a group's permission level for the specified repository. Available repository permissions are: + * + * - REPO_READ + * - REPO_WRITE + * - REPO_ADMIN + * + * + * See the Bitbucket Data Center documentation for a detailed explanation of what each permission entails. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result. + */ + readonly put: operations["setPermissionForGroup"] + readonly post?: never + /** + * Revoke group repository permission + * @description Revoke all permissions for the specified repository for a group. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. + * + * In addition, a user may not revoke a group's permissions if it will reduce their own permission level. + */ + readonly delete: operations["revokePermissionsForGroup_2"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/groups/none": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get groups without repository permission + * @description Retrieve a page of groups that have no granted permissions for the specified repository. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. + */ + readonly get: operations["getGroupsWithoutAnyPermission_2"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/search": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search repository permissions + * @description Search direct and implied permissions of users and groups. This endpoint returns a superset of the results returned by the /users and /groups endpoints because it allows filtering by project and global permissions too. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project/global permission to call this resource. + */ + readonly get: operations["searchPermissions_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get users with permission to repository + * @description Retrieve a page of users that have been granted at least one permission for the specified repository. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. + */ + readonly get: operations["getUsersWithAnyPermission_2"] + /** + * Update user repository permission + * @description Promote or demote a user's permission level for the specified repository. Available repository permissions are: + * + * - REPO_READ- REPO_WRITE- REPO_ADMINSee the Bitbucket Data Center documentation for a detailed explanation of what each permission entails. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a project or global permission that already implies that permission. + */ + readonly put: operations["setPermissionForUser"] + readonly post?: never + /** + * Revoke user repository permission + * @description Revoke all permissions for the specified repository for a user. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. + * + * In addition, a user may not revoke their own repository permissions if they do not have a higher project or global permission. + */ + readonly delete: operations["revokePermissionsForUser_2"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/users/none": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get users without repository permission + * @description Retrieve a page of licensed users that have no granted permissions for the specified repository. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. + */ + readonly get: operations["getUsersWithoutPermission_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull requests for repository + * @description Retrieve a page of pull requests to or from the specified repository. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. Optionally clients can specify PR participant filters. Each filter has a mandatory username.N parameter, and the optional role.N and approved.N parameters. + * + * - username.N - the "root" of a single participant filter, where "N" is a natural number starting from 1. This allows clients to specify multiple participant filters, by providing consecutive filters as username.1, username.2 etc. Note that the filters numbering has to start with 1 and be continuous for all filters to be processed. The total allowed number of participant filters is 10 and all filters exceeding that limit will be dropped. + * - role.N(optional) the role associated with username.N. This must be one of AUTHOR, REVIEWER, or PARTICIPANT + * - approved.N (optional) the approved status associated with username.N. That is whether username.N has approved the PR. Either true, or false + * + */ + readonly get: operations["getPage"] + readonly put?: never + /** + * Create pull request + * @description Create a new pull request from a source branch or tag to a target branch. The source and target may be in the same repository, or different ones. (Note that different repositories must belong to the same Repository#getHierarchyId() hierarchy.) + * + * The fromRef may be a branch or a tag. The toRef is required to be a branch. Tags are not allowed as targets because tags are intended to be immutable and should not be changed after they are created. + * + * The authenticated user must have REPO_READ permission for the fromRef and toRef repositories to call this resource. + */ + readonly post: operations["create"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request + * @description Retrieve a pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["get_3"] + /** + * Update pull request metadata + * @description Update the title, description, reviewers, destination branch or draft status of an existing pull request. + * + * **Note:** the reviewers list may be updated using this resource. However the author and participants list may not. + * + * The authenticated user must either: + * + * - be the author of the pull request and have the REPO_READ permission for the repository that this pull request targets; or + * - have the REPO_WRITE permission for the repository that this pull request targets + * + * + * to call this resource. + */ + readonly put: operations["update"] + readonly post?: never + /** + * Delete pull request + * @description Deletes a pull request. + * + * To call this resource, users must be authenticated and have permission to view the pull request. Additionally, they must: + * + * - be the pull request author, if the system is configured to allow authors to delete their own pull requests (this is the default) OR + * - have repository administrator permission for the repository the pull request is targeting + * + * + * A body containing the version of the pull request must be provided with this request. + * + * `{ "version": 1 }` + */ + readonly delete: operations["delete_3"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.diff": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Stream raw pull request diff + * @description Streams the raw diff for a pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["streamRawDiff_2"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.patch": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Stream pull request as patch + * @description Streams a patch representing a pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["streamPatch_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/activities": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request activity + * @description Retrieve a page of activity associated with a pull request. + * + * Activity items include comments, approvals, rescopes (i.e. adding and removing of commits), merges and more. + * + * Different types of activity items may be introduced in newer versions of Stash or by user installed plugins, so clients should be flexible enough to handle unexpected entity shapes in the returned page. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["getActivities"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Approve pull request + * @deprecated + * @description Approve a pull request as the current user. Implicitly adds the user as a participant if they are not already. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + * + * Deprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead + */ + readonly post: operations["approve"] + /** + * Unapprove pull request + * @deprecated + * @description Remove approval from a pull request as the current user. This does not remove the user as a participant. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + * + * Deprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead + */ + readonly delete: operations["withdrawApproval"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/auto-merge": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get auto-merge request for pull request + * @description Returns an auto-merge request for the pull request, if requested. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["getAutoMergeRequest"] + readonly put?: never + /** + * Auto-merge pull request + * @description Requests the system to try merging the pull request if auto-merge was requested on it. + * + * The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource. + */ + readonly post: operations["tryAutoMerge"] + /** + * Cancel auto-merge for pull request + * @description Cancels a request to auto-merge the pull request, if the pull request was not merged yet. + * + * The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource. + */ + readonly delete: operations["cancelAutoMerge"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search pull request comments + * @description Gets comments matching the given set of field values for the specified pull request. (Note this does not perform any kind of searching for comments by their text). + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["getComments_1"] + readonly put?: never + /** + * Add new blocker comment + * @description Add a new blocker comment. + * + * Comments can be added in a few places by setting different attributes: + * + * General pull request blocker comment: + * ``` + * + * { + * "text": "A task on a pull request." + * } + * ``` + * + * Blocker reply to a comment: + * + * ``` + * + * { + * "text": "This reply is a task.", + * "parent": { + * "id": 1 + * } + * } + * ``` + * + * General blocker file comment: + * + * ``` + * + * { + * "text": "A blocker comment on a file.", + * "anchor": { + * "diffType": "RANGE", + * "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd", + * "path": "path/to/file", + * "srcPath": "path/to/file", + * "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b" + * } + * } + * ``` + * + * Blocker file line comment: + * + * ``` + * + * { + * "text": "A task on a particular line within a file.", + * "anchor": { + * "diffType": "COMMIT", + * "line": 1, + * "lineType": "CONTEXT", + * "fileType": "FROM", + * "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd", + * "path": "path/to/file", + * "srcPath": "path/to/file", + * "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b" + * } + * } + * ``` + * + * For file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. For backwards compatibility purposes if no diffType is provided and no fromHash/toHash pair is provided the diffType will be resolved to 'EFFECTIVE'. In any other cases the diffType is REQUIRED. + * + * For line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be: + * + * - 'ADDED' - for an added line; + * - 'REMOVED' - for a removed line; or + * - 'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff. + * + * + * 'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are: + * + * - 'FROM' - the source file of the diff + * - 'TO' - the destination file of the diff + * + * + * If the current user is not a participant the user is added as a watcher of the pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly post: operations["createComment_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments/{commentId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request comment + * @description Retrieves a pull request comment. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["getComment_1"] + /** + * Update pull request comment + * @description Update a comment, with the following restrictions: + * + * - only the author of the comment may update the text of the comment + * - only the author of the comment, the author of the pull request or repository admins and above may update the other fields of a comment + * + * + * Convert a comment to a task or vice versa. + * + * Comments can be converted to tasks by setting the 'severity' attribute to 'BLOCKER': + * ``` + * + * { + * "severity": "BLOCKER" + * } + * + * ``` + * + * Tasks can be converted to comments by setting the 'severity' attribute to 'NORMAL': ``` + * + * { + * "severity": "NORMAL" + * } + * + * ``` + * + * Resolve a blocker comment. + * + * Blocker comments can be resolved by setting the 'state' attribute to 'RESOLVED': ``` + * + * { + * "state": "RESOLVED" + * } + * ``` + * + * Note: the supplied JSON object must contain a version that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly put: operations["updateComment_1"] + readonly post?: never + /** + * Delete pull request comment + * @description Delete a pull request comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly delete: operations["deleteComment_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/changes": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Gets pull request changes + * @description Gets changes for the specified PullRequest. + * + * If the changeScope query parameter is set to 'UNREVIEWED', the application will attempt to stream unreviewed changes based on the lastReviewedCommit of the current user, which are the changes between the lastReviewedCommit and the latest commit of the source branch. The current user is considered to not have any unreviewed changes for the pull request when the lastReviewedCommit is either null (everything is unreviewed, so all changes are streamed), equal to the latest commit of the source branch (everything is reviewed), or no longer on the source branch (the source branch has been rebased). In these cases, the application will fall back to streaming all changes (the default), which is the effective diff for the pull request. The type of changes streamed can be determined by the changeScope parameter included in the properties map of the response. + * + * Note: This resource is currently not paged. The server will return at most one page. The server will truncate the number of changes to either the request's page limit or an internal maximum, whichever is smaller. The start parameter of the page request is also ignored. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["streamChanges_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request comments for path + * @description Gets comments for the specified pull request and path. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["getComments_2"] + readonly put?: never + /** + * Add pull request comment + * @description Add a new comment. + * + * Comments can be added in a few places by setting different attributes:

General pull request comment: + *
 {
+		 *        "text": "An insightful general comment on a pull request."
+		 *      }
+		 *      
Reply to a comment:
 {
+		 *        "text": "A measured reply.",
+		 *        "parent": {
+		 *           "id": 1
+		 *         }
+		 *      }
+		 *      
General file comment:
 {
+		 *        "text": "An insightful general comment on a file.",
+		 *        "anchor": {
+		 *           "diffType": "RANGE",
+		 *           "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd",
+		 *           "path": "path/to/file",
+		 *           "srcPath": "path/to/file",
+		 *           "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b"
+		 *        }
+		 *      }
+		 *      
File line comment:
 {
+		 *        "text": "A pithy comment on a particular line within a file.",
+		 *        "anchor": {
+		 *           "diffType": "COMMIT",
+		 *           "line": 1,
+		 *           "lineType": "CONTEXT",
+		 *           "fileType": "FROM",
+		 *           "fromHash": "6df3858eeb9a53a911cd17e66a9174d44ffb02cd",
+		 *           "path": "path/to/file",
+		 *           "srcPath": "path/to/file",
+		 *           "toHash": "04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b"
+		 *         }
+		 *      }
+		 *      
+ * + * Add a new task. + * + * Tasks are just comments with the attribute 'severity' set to 'BLOCKER': + * + * General pull request task:
 {
+		 *        "text": "A task on a pull request.",
+		 *        "severity": "BLOCKER"
+		 *      }
+		 *      
+ * + * Add a pending comment. + * + * Pending comments are just comments with the attribute 'state' set to 'PENDING': + * + * Pending comment:
 {
+		 *        "text": "This is a pending comment",
+		 *        "state": "PENDING"
+		 *      }
+		 *      
+ * + * For file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. For backwards compatibility purposes if no diffType is provided and no fromHash/toHash pair is provided the diffType will be resolved to 'EFFECTIVE'. In any other cases the diffType is REQUIRED. + * + * For line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be: + * + * - 'ADDED' - for an added line; + * - 'REMOVED' - for a removed line; or + * - 'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff. + * 'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are: + * + * - 'FROM' - the source file of the diff + * - 'TO' - the destination file of the diff + * If the current user is not a participant the user is added as a watcher of the pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly post: operations["createComment_2"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a pull request comment + * @description Retrieves a pull request comment. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["getComment_2"] + /** + * Update pull request comment + * @description Update a comment, with the following restrictions: + * + * - only the author of the comment may update the text of the comment + * - only the author of the comment, the author of the pull request or repository admins and above may update the other fields of a comment + * + * + * Convert a comment to a task or vice versa. + * + * Comments can be converted to tasks by setting the 'severity' attribute to 'BLOCKER': + *
 {
+		 *      "severity": "BLOCKER"
+		 *      }
+		 *      
+ * + * Tasks can be converted to comments by setting the 'severity' attribute to 'NORMAL':
 {
+		 *      "severity": "NORMAL"
+		 *      }
+		 *      
+ * + * Resolve a task. + * + * Tasks can be resolved by setting the 'state' attribute to 'RESOLVED':
 {
+		 *      "state": "RESOLVED"
+		 *      }
+		 *      
+ * + * Note: the supplied JSON object must contain a version that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly put: operations["updateComment_2"] + readonly post?: never + /** + * Delete a pull request comment + * @description Delete a pull request comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly delete: operations["deleteComment_2"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/apply-suggestion": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Apply pull request suggestion + * @description Apply a suggestion contained within a comment. + */ + readonly post: operations["applySuggestion"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commit-message-suggestion": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get commit message suggestion + * @description Retrieve a suggested commit message for the given Pull Request. + */ + readonly get: operations["getCommitMessageSuggestion"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commits": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request commits + * @description Retrieve commits for the specified pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["getCommits_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/decline": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Decline pull request + * @description Decline a pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly post: operations["decline"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/diff-stats-summary/{path}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get diff stats summary for pull request + * @description Retrieve the diff stats summary for the given Pull Request. + * + * The stats summary include the total number of modified files, added lines, and deleted lines. + * + * Note: The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["getDiffStatsSummary_2"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/diff/{path}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Stream a diff within a pull request + * @description Streams a diff within a pull request. + * + * If the specified file has been copied, moved or renamed, the srcPath must also be specified to produce the correct diff. + * + * To stream a raw text representation of the diff, this endpoint can be called with the request header 'Accept: text/plain'. + * + * Note: This RESTful endpoint is currently not paged. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["streamDiff_2"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Test if pull request can be merged + * @description Test whether a pull request can be merged. + * + * A pull request may not be merged if: + * + * - there are conflicts that need to be manually resolved before merging; and/or + * - one or more merge checks have vetoed the merge. + * + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["canMerge"] + readonly put?: never + /** + * Merge pull request + * @description Merge the specified pull request immediately or set the pull request to auto-merge when all the merge checks pass by setting autoMerge field in the request body. + * + * The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource. + */ + readonly post: operations["merge"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge-base": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get the common ancestor between the latest commits of the source and target branches of the pull request + * @description Returns the best common ancestor between the latest commits of the source and target branches of the pull request. + * + * If more than one best common ancestor exists, only one will be returned. It is unspecified which will be returned. + */ + readonly get: operations["getMergeBase_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request participants + * @description Retrieves a page of the participants for a given pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["listParticipants"] + readonly put?: never + /** + * Assign pull request participant role + * @description Assigns a participant to an explicit role in pull request. Currently only the REVIEWER role may be assigned. + * + * If the user is not yet a participant in the pull request, they are made one and assigned the supplied role. + * + * If the user is already a participant in the pull request, their previous role is replaced with the supplied role unless they are already assigned the AUTHOR role which cannot be changed and will result in a Bad Request (400) response code. + * + * The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource. + */ + readonly post: operations["assignParticipantRole"] + /** + * Unassign pull request participant + * @deprecated + * @description Unassigns a participant from the REVIEWER role they may have been given in a pull request. + * + * If the participant has no explicit role this method has no effect. + * + * Afterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered. + * + * The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource. + * + * Deprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead. + */ + readonly delete: operations["unassignParticipantRole_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Change pull request status + * @description Change the current user's status for a pull request. Implicitly adds the user as a participant if they are not already. If the current user is the author, this method will fail. + * + * The possible values for {@code status} are UNAPPROVED, NEEDS_WORK (which is referred to as "Requested changes" in the frontend from 8.10 onward), or APPROVED. + * + * If the new {@code status} is NEEDS_WORK or APPROVED then the {@code lastReviewedCommit} for the participant will be updated to the latest commit of the source branch of the pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly put: operations["updateStatus"] + readonly post?: never + /** + * Unassign pull request participant + * @description Unassigns a participant from the REVIEWER role they may have been given in a pull request. + * + * If the participant has no explicit role this method has no effect. + * + * Afterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered. + * + * The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource. + */ + readonly delete: operations["unassignParticipantRole"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/reopen": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Re-open pull request + * @description Re-open a declined pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly post: operations["reopen"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/review": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request comment thread + * @description Get the CommentThread threads which have Comment comments that have a CommentState#PENDING pending state and are part of the pull request review for the authenticated user. + */ + readonly get: operations["getReview"] + /** + * Complete pull request review + * @description Complete a review on a pull request. + */ + readonly put: operations["finishReview"] + readonly post?: never + /** + * Discard pull request review + * @description Discard a pull request review for the authenticated user. + * + * The authenticated user must have REPO_READ permission for the repository to call this resource. + */ + readonly delete: operations["discardReview"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/watch": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Watch pull request + * @description Add the authenticated user as a watcher for the specified pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly post: operations["watch_1"] + /** + * Stop watching pull request + * @description Remove the authenticated user as a watcher for the specified pull request. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly delete: operations["unwatch_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/raw/{path}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get raw content of a file at revision + * @description Retrieve the raw content for a file path at a specified revision. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["streamRaw"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/readme": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository readme + * @description Retrieves the README for the repository, if it's been defined. + * + * This checks the repository for a
README
file, optionally with an
md
or
txt
extension, and, if found, streams it. By default, the raw content of the file is streamed. Appending
?markup
to the URL will stream an HTML-rendered version instead. Note that, when streaming HTML, relative URLs in the README will not work if applied relative to this URL. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["streamReadme"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/recreate": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Retry repository creation + * @description If a create or fork operation fails, calling this method will clean up the broken repository and try again. The repository must be in an INITIALISATION_FAILED state. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly post: operations["retryCreateRepository"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/ref-change-activities": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get ref change activity + * @description Retrieve a page of repository ref change activity. + * + * The authenticated user must have REPO_ADMIN permission to call this resource. + */ + readonly get: operations["getRefChangeActivity"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/ref-change-activities/branches": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get branches with ref change activities for repository + * @description Retrieve a page of branches with ref change activities for a specific repository. + * + * The authenticated user must have REPO_ADMIN permission to call this resource. + */ + readonly get: operations["findBranches"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/related": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get related repository + * @description Retrieve repositories which are related to this one. Related repositories are from the same Repository#getHierarchyId() hierarchy as this repository. + * + * Only repositories to which the authenticated user has REPO_READ permission will be included, even if more repositories are part of this repository's hierarchy. + */ + readonly get: operations["getRelatedRepositories"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find repository secret scanning allowlist rules + * @description Find repository secret scanning allowlist rules by filtering. + * + * Repository **Admin** is required + */ + readonly get: operations["search_2"] + readonly put?: never + /** + * Create repository secret scanning allowlist rule + * @description Create a new repository secret scanning allowlist rule. Repository allowlist rules are used when scanning the given repository. + * + * Repository **Admin** is required + */ + readonly post: operations["createAllowlistRule_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a repository secret scanning allowlist rule + * @description Get a repository secret scanning allowlist rule by ID. + * + * Repository **Admin** is required + */ + readonly get: operations["getAllowlistRule_1"] + /** + * Edit an existing repository secret scanning allowlist rule + * @description Edit a repository secret scanning allowlist rule. + * + * Repository **Admin** is required + */ + readonly put: operations["editAllowlistRule_1"] + readonly post?: never + /** + * Delete a repository secret scanning allowlist rule + * @description Delete a repository secret scanning allowlist rule with the provided ID. + * + * Repository **Admin** is required + */ + readonly delete: operations["deleteAllowlistRule_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get whether a repository is exempt + * @description Check whether a repository is exempt from secret scanning + */ + readonly get: operations["isRepoExempt"] + /** + * Exempt a repo from secret scanning + * @deprecated + * @description Exempt a repository from being scanned for secrets + * + * Deprecated since 8.6. Exemptions are now managed by scope. + * Use POST /rest/api/1.0/secret-scanning/exempt for global scope + * Use POST /rest/api/1.0/projects/{projectKey}/secret-scanning/exempt for the project scope + */ + readonly put: operations["addExemptRepo"] + readonly post?: never + /** + * Delete an exempt repository + * @description Remove a repository from being exempt from secret scanning + */ + readonly delete: operations["deleteExemptRepo"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find repository secret scanning rules + * @description Find repository secret scanning rules by filtering. + * + * Repository **Admin** is required + */ + readonly get: operations["search_3"] + readonly put?: never + /** + * Create repository secret scanning rule + * @description Create a new repository secret scanning rule. Repository rules are used when scanning the given repository. + * + * Repository **Admin** is required + */ + readonly post: operations["createRule_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a repository secret scanning rule + * @description Get a repository secret scanning rule by ID. + * + * Repository **Admin** is required + */ + readonly get: operations["getRule_1"] + /** + * Edit an existing repository secret scanning rule + * @description Edit a repository secret scanning rule. + * + * Repository **Admin** is required + */ + readonly put: operations["editRule_1"] + readonly post?: never + /** + * Delete a repository secret scanning rule + * @description Delete a repository secret scanning rule with the provided ID. + * + * Repository **Admin** is required + */ + readonly delete: operations["deleteRule_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/auto-decline": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get auto decline settings + * @description Retrieves the auto decline settings for the supplied repository. Project settings will be returned if no explicit settings have been set for the repository. In the case that there are no project settings, the default settings will be returned. + * + * The authenticated user must have REPO_READ permission for this repository to call the resource. + */ + readonly get: operations["getAutoDeclineSettings_1"] + /** + * Create auto decline settings + * @description Creates or updates the auto decline settings for the supplied repository. + * + * The authenticated user must have REPO_ADMIN permission for this repository to call the resource + */ + readonly put: operations["setAutoDeclineSettings_1"] + readonly post?: never + /** + * Delete auto decline settings + * @description Delete auto decline settings for the supplied repository. + * + * The authenticated user must have REPO_ADMIN permission for this repository to call the resource. + */ + readonly delete: operations["deleteAutoDeclineSettings_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/auto-merge": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request auto-merge settings + * @description Retrieves the pull request auto-merge settings for the supplied repository. Project settings will be returned if no explicit settings have been set for the repository. In the case that there are no project settings, the default settings will be returned. If the repository's project has restricted its auto-merge settings, then the settings of the project will be returned. + * + * The authenticated user must have REPO_READ permission for this repository to call the resource. + */ + readonly get: operations["get_5"] + /** + * Create or update the pull request auto-merge settings + * @description Creates or updates the pull request auto-merge settings for the supplied repository. + * + * The authenticated user must have REPO_ADMIN permission for this repository to call the resource. + */ + readonly put: operations["set_1"] + readonly post?: never + /** + * Delete pull request auto-merge settings + * @description Deletes pull request auto-merge settings for the supplied repository. + * + * The authenticated user must have REPO_ADMIN permission for this repository to call the resource. + */ + readonly delete: operations["delete_5"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository hooks + * @description Retrieve a page of repository hooks for this repository. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly get: operations["getRepositoryHooks_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks/{hookKey}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository hook + * @description Retrieve a repository hook for this repository. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly get: operations["getRepositoryHook_1"] + readonly put?: never + readonly post?: never + /** + * Delete repository hook + * @description Delete repository hook configuration for the supplied hookKey and repositorySlug + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly delete: operations["deleteRepositoryHook"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks/{hookKey}/enabled": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Enable repository hook + * @description Enable a repository hook for this repository and optionally apply new configuration. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + * + * A JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook. + */ + readonly put: operations["enableHook_1"] + readonly post?: never + /** + * Disable repository hook + * @description Disable a repository hook for this repository. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly delete: operations["disableHook_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks/{hookKey}/settings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository hook settings + * @description Retrieve the settings for a repository hook for this repository. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly get: operations["getSettings_1"] + /** + * Update repository hook settings + * @description Modify the settings for a repository hook for this repository. + * + * The service will reject any settings which are too large, the current limit is 32KB once serialized. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + * + * A JSON document can be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook. + */ + readonly put: operations["setSettings_1"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/pull-requests": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request settings + * @description Retrieve the pull request settings for the context repository. + * + * The authenticated user must have REPO_READ permission for the context repository to call this resource. + * + * This resource will call all RestFragments that are registered with the key bitbucket.repository.settings.pullRequests. If any fragment fails validations by returning a non-empty Map of errors, then no fragments will execute. + * + * The property keys for the settings that are bundled with the application are + * + * - mergeConfig - the merge strategy configuration for pull requests + * - requiredApprovers - (Deprecated, please use com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook instead) the number of approvals required on a pull request for it to be mergeable, or 0 if the merge check is disabled + * - com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook - the merge check configuration for required approvers + * - requiredAllApprovers - whether or not all approvers must approve a pull request for it to be mergeable + * - requiredAllTasksComplete - whether or not all tasks on a pull request need to be completed for it to be mergeable + * - requiredSuccessfulBuilds - (Deprecated, please use com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck instead) the number of successful builds on a pull request for it to be mergeable, or 0 if the merge check is disabled + * - com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck - the merge check configuration for required builds + * + * + * + */ + readonly get: operations["getPullRequestSettings_1"] + readonly put?: never + /** + * Update pull request settings + * @description Update the pull request settings for the context repository. + * + * The authenticated user must have REPO_ADMIN permission for the context repository to call this resource. + * + * This resource will call all RestFragments that are registered with the key bitbucket.repository.settings.pullRequests. If any fragment fails validations by returning a non-empty Map of errors, then no fragments will execute. + * + * Only the settings that should be updated need to be included in the request. + * + * The property keys for the settings that are bundled with the application are + * + * - mergeConfig - the merge strategy configuration for pull requests + * - requiredApprovers - (Deprecated, please use com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook instead) the number of approvals required on a pull request for it to be mergeable, or 0 to disable the merge check + * - com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook - a json map containing the keys 'enabled' (a boolean to enable or disable this merge check) and 'count' (an integer to set the number of required approvals) + * - requiredAllApprovers - whether or not all approvers must approve a pull request for it to be mergeable + * - requiredAllTasksComplete - whether or not all tasks on a pull request need to be completed for it to be mergeable + * - requiredSuccessfulBuilds - (Deprecated, please use com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck instead) the number of successful builds on a pull request for it to be mergeable, or 0 to disable the merge check + * - com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck - a json map containing the keys 'enabled' (a boolean to enable or disable this merge check) and 'count' (an integer to set the number of required builds) + * + * + * Merge strategy configuration deletion: + * + * An explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty "mergeConfig" attribute. i.e: + * + * + * ```{ + * "mergeConfig": { + * } + * } + * ``` + * + * Upon completion of this request, the effective configuration will be: + * + * - The configuration set for this repository's SCM type as set at the project level, if present, otherwise + * - the configuration set for this repository's SCM type as set at the instance level, if present, otherwise + * - the default configuration for this repository's SCM type + * + * + * + */ + readonly post: operations["updatePullRequestSettings_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all reviewer groups + * @description Retrieve a page of reviewer groups of a given scope. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getReviewerGroups_1"] + readonly put?: never + /** + * Create reviewer group + * @description Create a reviewer group. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly post: operations["create_2"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get reviewer group + * @description Retrieve a reviewer group. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getReviewerGroup_1"] + /** + * Update reviewer group attributes + * @description Update the attributes of a reviewer group. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly put: operations["update_2"] + readonly post?: never + /** + * Delete reviewer group + * @description Deletes a reviewer group. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly delete: operations["delete_7"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}/users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get reviewer group users + * @description Retrieve a list of the users of a reviewer group. + * + * This does not return all the users of the group, only the users who are licensed and have REPO_READ permission for the specified repository. + * + * The authenticated user must have REPO_READ permission for the specified repository to call this resource. + */ + readonly get: operations["getUsers"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/tags": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find tag + * @description Retrieve the tags matching the supplied filterText param. + * + * The authenticated user must have REPO_READ permission for the context repository to call this resource. + */ + readonly get: operations["getTags"] + readonly put?: never + /** + * Create tag + * @description Creates a tag using the information provided in the RestCreateTagRequest request + * + * The authenticated user must have REPO_WRITE permission for the context repository to call this resource. + */ + readonly post: operations["createTagForRepository"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/tags/{name}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get tag + * @description Retrieve a tag in the specified repository. + * + * The authenticated user must have REPO_READ permission for the context repository to call this resource. + */ + readonly get: operations["getTag"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/watch": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Watch repository + * @description Add the authenticated user as a watcher for the specified repository. + * + * The authenticated user must have REPO_READ permission for the repository to call this resource. + */ + readonly post: operations["watch_2"] + /** + * Stop watching repository + * @description Remove the authenticated user as a watcher for the specified repository. + * + * The authenticated user must have REPO_READ permission for the repository to call this resource. + */ + readonly delete: operations["unwatch_2"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find webhooks + * @description Find webhooks in this repository. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly get: operations["findWebhooks_1"] + readonly put?: never + /** + * Create webhook + * @description Create a webhook for the repository specified via the URL. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly post: operations["createWebhook_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get webhook + * @description Get a webhook by ID. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly get: operations["getWebhook_1"] + /** + * Update webhook + * @description Update an existing webhook. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly put: operations["updateWebhook_1"] + readonly post?: never + /** + * Delete webhook + * @description Delete a webhook for the repository specified via the URL. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly delete: operations["deleteWebhook_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}/latest": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get last webhook invocation details + * @description Get the latest invocations for a specific webhook. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly get: operations["getLatestInvocation_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}/statistics": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get webhook statistics + * @description Get the statistics for a specific webhook. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly get: operations["getStatistics_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}/statistics/summary": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get webhook statistics summary + * @description Get the statistics summary for a specific webhook. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly get: operations["getStatisticsSummary_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/search": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search webhooks + * @description Search webhooks in this repository and parent project. This endpoint returns a superset of the results returned by the /webhooks endpoint because it allows filtering by project scope too, not just repository webhooks. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly get: operations["searchWebhooks"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/test": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Test webhook + * @description Test connectivity to a specific endpoint. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. + */ + readonly post: operations["testWebhook_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/secret-scanning/allowlist": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find project secret scanning allowlist rules + * @description Find project secret scanning allowlist rules by filtering. + * + * Project **Admin** is required + */ + readonly get: operations["searchAllowlistRule"] + readonly put?: never + /** + * Create project secret scanning allowlist rule + * @description Create a new project level secret scanning allowlist rule. Project allowlist rules are used when scanning all non exempt repositories in the provided project. + * + * Project **Admin** is required + */ + readonly post: operations["createAllowlistRule"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/secret-scanning/allowlist/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a project secret scanning allowlist rule + * @description Get a project secret scanning allowlist rule by ID. + * + * Project **Admin** is required + */ + readonly get: operations["getAllowlistRule"] + /** + * Edit an existing project secret scanning allowlist rule + * @description Edit a project secret scanning allowlist rule. + * + * Project **Admin** is required + */ + readonly put: operations["editAllowlistRule"] + readonly post?: never + /** + * Delete a project secret scanning allowlist rule + * @description Delete a project secret scanning allowlist rule with the provided ID. + * + * Project **Admin** is required + */ + readonly delete: operations["deleteAllowlistRule"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/secret-scanning/exempt": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find repos exempt from secret scanning for a project + * @description Find repositories exempt from secret scanning in a project + */ + readonly get: operations["findExemptReposByProject"] + readonly put?: never + /** + * Bulk exempt repos from secret scanning + * @description Bulk exempt a list of repositories from being scanned for secrets. User must be have **PROJECT ADMIN** permissions. + */ + readonly post: operations["bulkAddExemptRepositories_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/secret-scanning/rules": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find project secret scanning rules + * @description Find project secret scanning rules by filtering. + * + * Project **Admin** is required + */ + readonly get: operations["search_1"] + readonly put?: never + /** + * Create project secret scanning rule + * @description Create a new project level secret scanning rule. Project rules are used when scanning all non exempt repositories in the provided project. + * + * Project **Admin** is required + */ + readonly post: operations["createRule"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/secret-scanning/rules/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a project secret scanning rule + * @description Get a project secret scanning rule by ID. + * + * Project **Admin** is required + */ + readonly get: operations["getRule"] + /** + * Edit an existing project secret scanning rule + * @description Edit a project secret scanning rule. + * + * Project **Admin** is required + */ + readonly put: operations["editRule"] + readonly post?: never + /** + * Delete a project secret scanning rule + * @description Delete a project secret scanning rule with the provided ID. + * + * Project **Admin** is required + */ + readonly delete: operations["deleteRule"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings-restriction": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get enforcing project setting + * @description Get a specified project settings restriction for the given namespace, feature key and component key. + * Note that not providing the component key will **not** return restrictions for the namespace and feature key with a component key set. + * + * The authenticated user must have **PROJECT_VIEW** permission for the target project to retrieve a settings restriction. + */ + readonly get: operations["get_7"] + readonly put?: never + /** + * Enforce project restriction + * @description Create a new project settings restriction for the given project. + * + * The authenticated user must have **PROJECT_ADMIN** permission for the target project to create a settings restriction. + */ + readonly post: operations["create_3"] + /** + * Stop enforcing project restriction + * @description Delete a specified project settings restriction. + * + * If a restriction does not exist for the specified project, namespace, featureKey, and componentKey, the request will be ignored and a 204 response will be returned. + * + * The authenticated user must have **PROJECT_ADMIN** permission for the target project to delete a settings restriction. + */ + readonly delete: operations["delete_9"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings-restriction/all": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all enforcing project settings + * @description Get all project settings restrictions for the given namespace and feature key, including those with a component key set. + * + * The authenticated user must have **PROJECT_VIEW** permission for the target project to retrieve a settings restrictions. + */ + readonly get: operations["getAll"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings/auto-decline": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get auto decline settings + * @description Retrieves the auto decline settings for the supplied project. Default settings are returned if no explicit settings have been set for the project. + */ + readonly get: operations["getAutoDeclineSettings"] + /** + * Create/Update auto decline settings + * @description Creates or updates the auto decline settings for the supplied project. + * + * The authenticated user must have PROJECT_ADMIN permission for this project to call the resource. + */ + readonly put: operations["setAutoDeclineSettings"] + readonly post?: never + /** + * Delete auto decline settings + * @description Delete auto decline settings for the supplied project. + * + * The authenticated user must have PROJECT_ADMIN permission for this project to call the resource. + */ + readonly delete: operations["deleteAutoDeclineSettings"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings/auto-merge": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get pull request auto-merge settings + * @description Retrieves the pull request auto-merge settings for the supplied project. Default settings will be returned if no explicit settings have been set for the project + * + * The authenticated user must have PROJECT_VIEW permission for this project to call the resource. + */ + readonly get: operations["get_4"] + /** + * Create or update the pull request auto-merge settings + * @description Creates or updates the pull request auto-merge settings for the supplied project, and applies the restriction action specified in the request. + * + * The authenticated user must have PROJECT_ADMIN permission for this project to call the resource. + */ + readonly put: operations["set"] + readonly post?: never + /** + * Delete pull request auto-merge settings + * @description Deletes pull request auto-merge settings for the supplied project. + * + * The authenticated user must have PROJECT_ADMIN permission for this project to call the resource. + */ + readonly delete: operations["delete_4"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings/hooks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository hooks + * @description Retrieve a page of repository hooks for this project. + * + * The authenticated user must have PROJECT_READ permission for the specified project to call this resource. + */ + readonly get: operations["getRepositoryHooks"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings/hooks/{hookKey}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a repository hook + * @description Retrieve a repository hook for this project. + * + * The authenticated user must have PROJECT_READ permission for the specified project to call this resource. + */ + readonly get: operations["getRepositoryHook"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings/hooks/{hookKey}/enabled": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Enable repository hook + * @description Enable a repository hook for this project and optionally apply new configuration. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + * + * A JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook. + */ + readonly put: operations["enableHook"] + readonly post?: never + /** + * Disable repository hook + * @description Disable a repository hook for this project. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly delete: operations["disableHook"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings/hooks/{hookKey}/settings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository hook settings + * @description Retrieve the settings for a repository hook for this project. + * + * The authenticated user must have PROJECT_READ permission for the specified project to call this resource. + */ + readonly get: operations["getSettings"] + /** + * Update repository hook settings + * @description Modify the settings for a repository hook for this project. + * + * The service will reject any settings which are too large, the current limit is 32KB once serialized. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + * + * A JSON document can be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook. + */ + readonly put: operations["setSettings"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings/pull-requests/{scmId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get merge strategy + * @description Retrieve the merge strategy configuration for this project and SCM. + * + * The authenticated user must have PROJECT_READ permission for the context repository to call this resource. + */ + readonly get: operations["getPullRequestSettings"] + readonly put?: never + /** + * Update merge strategy + * @description Update the pull request merge strategy configuration for this project and SCM. + * + * The authenticated user must have PROJECT_ADMIN permission for the context repository to call this resource. + * + * Only the strategies provided will be enabled, the default must be set and included in the set of strategies. + * + * An explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty "mergeConfig" attribute. i.e: + *
{
+		 *         "mergeConfig": {}
+		 *     }
+		 *     
+ * + * Upon completion of this request, the effective configuration will be the configuration explicitly set for the SCM, or if no such explicit configuration is set then the default configuration will be used. + */ + readonly post: operations["updatePullRequestSettings"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings/reviewer-groups": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all reviewer groups + * @description Retrieve a page of reviewer groups of a given scope. + * + * The authenticated user must have PROJECT_READ permission for the specified project to call this resource. + */ + readonly get: operations["getReviewerGroups"] + readonly put?: never + /** + * Create reviewer group + * @description Create a reviewer group. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly post: operations["create_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/settings/reviewer-groups/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get reviewer group + * @description Retrieve a reviewer group. + * + * The authenticated user must have PROJECT_READ permission for the specified project to call this resource. + */ + readonly get: operations["getReviewerGroup"] + /** + * Update reviewer group attributes + * @description Update the attributes of a reviewer group. + * + * The authenticated user must have PROJECT_READ permission for the specified project to call this resource. + */ + readonly put: operations["update_1"] + readonly post?: never + /** + * Delete reviewer group + * @description Deletes a reviewer group. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly delete: operations["delete_6"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/webhooks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find webhooks + * @description Find webhooks in this project. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly get: operations["findWebhooks"] + readonly put?: never + /** + * Create webhook + * @description Create a webhook for the project specified via the URL. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly post: operations["createWebhook"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/webhooks/{webhookId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get webhook + * @description Get a webhook by ID. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly get: operations["getWebhook"] + /** + * Update webhook + * @description Update an existing webhook. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly put: operations["updateWebhook"] + readonly post?: never + /** + * Delete webhook + * @description Delete a webhook for the project specified via the URL. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly delete: operations["deleteWebhook"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/webhooks/{webhookId}/latest": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get last webhook invocation details + * @description Get the latest invocations for a specific webhook. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly get: operations["getLatestInvocation"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/webhooks/{webhookId}/statistics": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get webhook statistics + * @description Get the statistics for a specific webhook. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly get: operations["getStatistics"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/webhooks/{webhookId}/statistics/summary": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get webhook statistics summary + * @description Get the statistics summary for a specific webhook. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly get: operations["getStatisticsSummary"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/projects/{projectKey}/webhooks/test": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Test webhook + * @description Test connectivity to a specific endpoint. + * + * The authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. + */ + readonly post: operations["testWebhook"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/repos": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search for repositories + * @description Retrieve a page of repositories based on query parameters that control the search. See the documentation of the parameters for more details. + * + * This resource is anonymously accessible. + * + * Note on permissions. In absence of the permission query parameter the implicit 'read' permission is assumed. Please note that this permission is lower than the REPO_READ permission rather than being equal to it. The implicit 'read' permission for a given repository is assigned to any user that has any of the higher permissions, such as REPO_READ, as well as to anonymous users if the repository is marked as public. The important implication of the above is that an anonymous request to this resource with a permission level REPO_READ is guaranteed to receive an empty list of repositories as a result. For anonymous requests it is therefore recommended to not specify the permission parameter at all. + */ + readonly get: operations["getRepositories_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/secret-scanning/exempt": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find all repos exempt from secret scan + * @description Find all repositories exempt from secret scanning + */ + readonly get: operations["findExemptReposByScope"] + readonly put?: never + /** + * Bulk exempt repos from secret scanning + * @description Bulk exempt a list of repositories from being scanned for secrets. User must be have global **ADMIN** permissions. + */ + readonly post: operations["bulkAddExemptRepositories"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/secret-scanning/rules": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Find global secret scanning rules + * @description Find global secret scanning rules by filtering. + */ + readonly get: operations["search_4"] + readonly put?: never + /** + * Create global secret scanning rule + * @description Create a new global secret scanning rule. Global rules are used when scanning all non exempt repositories. + */ + readonly post: operations["createRule_2"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/secret-scanning/rules/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a global secret scanning rule + * @description Get a global secret scanning rule by ID. + */ + readonly get: operations["getRule_2"] + /** + * Edit a global secret scanning rule. + * @description Edit an existing global secret scanning rule + */ + readonly put: operations["editRule_2"] + readonly post?: never + /** + * Delete a global secret scanning rule + * @description Delete a global secret scanning rule with the provided ID + */ + readonly delete: operations["deleteRule_2"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/signing/x509-certificates": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all X.509 certificates + * @description Get all X.509 certificates that have been added to the system. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly get: operations["getAllCertificates"] + readonly put?: never + /** + * Create an X.509 certificate + * @description Create an X.509 certificate. This will add the given X.509 certificate to the system. Existing entries will not be overridden if an X.509 certificate already exists. Once added, an X.509 certificate cannot be updated. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly post: operations["createCertificate"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/signing/x509-certificates/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + readonly post?: never + /** + * Delete an X.509 certificate + * @description Delete an X.509 certificate specified by the given ID. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly delete: operations["deleteCertificate"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/signing/x509-certificates/crl/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update X.509 CRL entries + * @description Update the certificate revocation list (CRL) entries for an issuer X.509 certificate in the system, identified by id. This will add any new revoked X.509 certificates that were issued by the given issuer X.509 certificate. + * + * This endpoint will schedule a request to asynchronously perform the task. Please allow time for the task to complete as it will vary depending on how many CRLs there are to retrieve and process. + * + * Note: CRL updates are scheduled to run every 24 hours. You may wish to trigger a refresh manually using this endpoint, otherwise, entries will be updated daily. + * + * The authenticated user must have the ADMIN permission to call this resource. + */ + readonly put: operations["updateCertificateRevocationListEntries"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/system-signing/configuration": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get system signing configuration + * @description Gets the configuration details for system signing Git objects. + */ + readonly get: operations["getSystemSigningConfiguration"] + readonly put?: never + /** + * Update system signing configuration + * @description Updates the configuration for system signing Git objects. + */ + readonly post: operations["updateSystemSigningConfiguration"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/users": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all users + * @description Retrieve a page of users, optionally run through provided filters. + * + * + * Only authenticated users may call this resource. + * ### Permission Filters + * + * + * The following three sub-sections list parameters supported for permission filters (where [root] is + * the root permission filter name, e.g. permission, permission.1 etc.) depending on the + * permission resource. The system determines which filter to apply (Global, Project or Repository permission) + * based on the `[root]` permission value. E.g. ADMIN is a global permission, + * PROJECT_ADMIN is a project permission and REPO_ADMIN is a repository permission. Note + * that the parameters for a given resource will be looked up in the order as they are listed below, that is e.g. + * for a project resource, if both projectId and projectKey are provided, the system will + * use projectId for the lookup. + *

Global permissions

+ * + * + * The permission value under [root] is the only required and recognized parameter, as global + * permissions do not apply to a specific resource. + * + * + * Example valid filter: permission=ADMIN. + *

Project permissions

+ * + * + * - [root]- specifies the project permission + * - [root].projectId - specifies the project ID to lookup the project by + * - [root].projectKey - specifies the project key to lookup the project by + * + * + * Example valid filter: permission.1=PROJECT_ADMIN&permission.1.projectKey=TEST_PROJECT. + * #### Repository permissions + * + * + * - [root]- specifies the repository permission + * - [root].projectId - specifies the repository ID to lookup the repository by + * - [root].projectKey and [root].repositorySlug- specifies the project key and repository slug to lookup the repository by; both values need to be provided for this look up to be triggered + * + * + * Example valid filter: permission.2=REPO_ADMIN&permission.2.projectKey=TEST_PROJECT&permission.2.repositorySlug=test_repo. + */ + readonly get: operations["getUsers_2"] + /** + * Update user details + * @description Update the currently authenticated user's details. The update will always be applied to the currently authenticated user. + */ + readonly put: operations["updateUserDetails_1"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/users/{userSlug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get user + * @description Retrieve the user matching the supplied userSlug. + */ + readonly get: operations["getUser"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/users/{userSlug}/avatar.png": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Update user avatar + * @description Update the avatar for the user with the supplied slug. + * + * + * This resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'. + * + * + * There are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded + * file size (1MB by default). Several different image formats are supported, but PNG and + * JPEG are preferred due to the file size limit. + * + * + * This resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to + * pass the XSRF check the caller needs to send an X-Atlassian-Token HTTP header with the + * value no-check. + * + * + * An example curl request to upload an image name 'avatar.png' would be: + * ``` + * curl -X POST -u username:password -H "X-Atlassian-Token: no-check" http://example.com/rest/api/latest/users/jdoe/avatar.png -F avatar=@avatar.png + * ``` + * + * + * Users are always allowed to update their own avatar. To update someone else's avatar the authenticated user must + * have global ADMIN permission, or global SYS_ADMIN permission to update a + * SYS_ADMIN user's avatar. + */ + readonly post: operations["uploadAvatar_1"] + /** + * Delete user avatar + * @description Delete the avatar associated to a user. + * + * + * Users are always allowed to delete their own avatar. To delete someone else's avatar the authenticated user must + * have global ADMIN permission, or global SYS_ADMIN permission to update a + * SYS_ADMIN user's avatar. + */ + readonly delete: operations["deleteAvatar"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/users/{userSlug}/settings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get user settings + * @description Retrieve a map of user setting key values for a specific user identified by the user slug. + */ + readonly get: operations["getUserSettings"] + readonly put?: never + /** + * Update user settings + * @description Update the entries of a map of user setting key/values for a specific user identified by the user slug. + */ + readonly post: operations["updateSettings"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/api/latest/users/credentials": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Set password + * @description Update the currently authenticated user's password. + */ + readonly put: operations["updateUserPassword_1"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/audit/latest/notification-settings/retention-config-review": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + readonly post?: never + /** + * Dismiss retention config notification + * @description Dismisses the retention config review notification displayed by the audit plugin for the user that's currently logged in. + */ + readonly delete: operations["dismissRetentionConfigReviewNotification"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/branch-permissions/latest/projects/{projectKey}/repos/{repositorySlug}/restrictions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search for ref restrictions + * @description Search for restrictions using the supplied parameters. + * + * The authenticated user must have REPO_ADMIN permission or higher to call this resource. Only authenticated users may call this resource. + */ + readonly get: operations["getRestrictions_1"] + readonly put?: never + /** + * Create multiple ref restrictions + * @description Allows creating multiple restrictions at once. + */ + readonly post: operations["createRestrictions_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/branch-permissions/latest/projects/{projectKey}/repos/{repositorySlug}/restrictions/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a ref restriction + * @description Returns a restriction as specified by a restriction id. + * + * The authenticated user must have REPO_ADMIN permission or higher to call this resource. Only authenticated users may call this resource. + */ + readonly get: operations["getRestriction_1"] + readonly put?: never + readonly post?: never + /** + * Delete a ref restriction + * @description Deletes a restriction as specified by a restriction id. + * + * The authenticated user must have REPO_ADMIN permission or higher to call this resource. Only authenticated users may call this resource. + */ + readonly delete: operations["deleteRestriction_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/branch-permissions/latest/projects/{projectKey}/restrictions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Search for ref restrictions + * @description Search for restrictions using the supplied parameters. + * + * The authenticated user must have PROJECT_ADMIN permission or higher to call this resource. Only authenticated users may call this resource. + */ + readonly get: operations["getRestrictions"] + readonly put?: never + /** + * Create multiple ref restrictions + * @description Allows creating multiple restrictions at once. + */ + readonly post: operations["createRestrictions"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/branch-permissions/latest/projects/{projectKey}/restrictions/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a ref restriction + * @description Returns a restriction as specified by a restriction id. + * + * The authenticated user must have PROJECT_ADMIN permission or higher to call this resource. Only authenticated users may call this resource. + */ + readonly get: operations["getRestriction"] + readonly put?: never + readonly post?: never + /** + * Delete a ref restriction + * @description Deletes a restriction as specified by a restriction id. + * + * The authenticated user must have PROJECT_ADMIN permission or higher to call this resource. Only authenticated users may call this resource. + */ + readonly delete: operations["deleteRestriction"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Create branch + * @description Creates a branch in the specified repository. + * + * + * The authenticated user must have an effective REPO_WRITE permission to call this resource. If + * branch permissions are set up in the repository, the authenticated user must also have access to the branch name + * that is to be created. + */ + readonly post: operations["createBranch"] + /** + * Delete branch + * @description Deletes a branch in the specified repository. + * + * + * If the branch does not exist, this operation will not raise an error. In other words after calling this resource + * and receiving a 204 response the branch provided in the request is guaranteed to not exist in the specified + * repository any more, regardless of its existence beforehand. + * + * + * The optional 'endPoint' parameter of the request may contain a commit ID that the provided ref name is + * expected to point to. Should the ref point to a different commit ID, a 400 response will be returned with + * appropriate error details. + * + * + * The authenticated user must have an effective REPO_WRITE permission to call this resource. If + * branch permissions are set up in the repository, the authenticated user must also have access to the branch name + * that is to be deleted. + */ + readonly delete: operations["deleteBranch"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches/info/{commitId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get branch + * @description Gets the branch information associated with a single commit from a given repository. + */ + readonly get: operations["findByCommit"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/build-status/latest/commits/{commitId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get build statuses for commit + * @deprecated + * @description Gets build statuses associated with a commit. + * + * Deprecated in 7.14, please use the repository based builds resource instead. + */ + readonly get: operations["getBuildStatus"] + readonly put?: never + /** + * Create build status for commit + * @deprecated + * @description Associates a build status with a commit.The state, the key and the url fields are mandatory. The name anddescription fields are optional.All fields (mandatory or optional) are limited to 255 characters, except for the url,which is limited to 450 characters.Supported values for the state are SUCCESSFUL, FAILEDand INPROGRESS.The authenticated user must have LICENSED permission or higher to call this resource. + * + * Deprecated in 7.14, please use the repository based builds resource instead. + */ + readonly post: operations["addBuildStatus"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/build-status/latest/commits/stats": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Get build status statistics for multiple commits + * @description Produces a list of the build statistics for multiple commits. Commits without any builds associated with them will not be returned.
For example if the commit e00cf62997a027bbf785614a93e2e55bb331d268 does not have any build statuses associated with it, it will not be present in the response. + */ + readonly post: operations["getMultipleBuildStatusStats"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/build-status/latest/commits/stats/{commitId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get build status statistics for commit + * @description Gets statistics regarding the builds associated with a commit + */ + readonly get: operations["getBuildStatusStats"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/reactions/{emoticon}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * React to a comment + * @description Add an emoticon reaction to a comment + */ + readonly put: operations["react"] + readonly post?: never + /** + * Remove a reaction from comment + * @description Remove an emoticon reaction from a comment + */ + readonly delete: operations["unReact"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/reactions/{emoticon}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * React to a PR comment + * @description Add an emoticon reaction to a pull request comment + */ + readonly put: operations["react_1"] + readonly post?: never + /** + * Remove a reaction from a PR comment + * @description Remove an emoticon reaction from a pull request comment + */ + readonly delete: operations["unReact_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-reviewers/latest/projects/{projectKey}/condition": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Create default reviewer + * @description Create a default reviewer pull request condition for the given project. + */ + readonly post: operations["createPullRequestCondition"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-reviewers/latest/projects/{projectKey}/condition/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update the default reviewer + * @description Update the default reviewer pull request condition for the given ID. + */ + readonly put: operations["updatePullRequestCondition"] + readonly post?: never + /** + * Remove default reviewer + * @description Delete the default reviewer pull request condition associated with the given ID. + */ + readonly delete: operations["deletePullRequestCondition"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-reviewers/latest/projects/{projectKey}/conditions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get default reviewers + * @description Return a page of default reviewer pull request conditions that have been configured for this project. + */ + readonly get: operations["getPullRequestConditions"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/condition": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Create default reviewers condition + * @description Create a default reviewer pull request condition for the given repository. + */ + readonly post: operations["createPullRequestCondition_1"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update a default reviewer condition + * @description Update the default reviewer pull request condition for the given ID. + */ + readonly put: operations["updatePullRequestCondition_1"] + readonly post?: never + /** + * Delete a default reviewer condition + * @description Delete the default reviewer pull request condition associated with the given ID. + */ + readonly delete: operations["deletePullRequestCondition_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/conditions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get configured default reviewers + * @description Return a page of default reviewer pull request conditions that have been configured for this repository. + */ + readonly get: operations["getPullRequestConditions_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/reviewers": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get required reviewers for PR creation + * @description Return a set of users who are required reviewers for pull requests created from the given source repository and ref to the given target ref in this repository. + */ + readonly get: operations["getReviewers"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-tasks/latest/projects/{projectKey}/repos/{repositorySlug}/tasks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a page of default tasks + * @description Retrieves the default tasks for the supplied repository. + * + * The authenticated user must have **REPO_VIEW** permission for this repository to call the resource. + */ + readonly get: operations["getDefaultTasks_1"] + readonly put?: never + /** + * Add a default task + * @description Creates a default task for the supplied repository. + * + * The authenticated user must have **REPO_ADMIN** permission for this repository to call the resource. + */ + readonly post: operations["addDefaultTask_1"] + /** + * Deletes all default tasks for the repository + * @description Delete all the default tasks for the supplied repository + * + * The authenticated user must have **REPO_ADMIN** permission for this repository to call the resource. + */ + readonly delete: operations["deleteAllDefaultTasks_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-tasks/latest/projects/{projectKey}/repos/{repositorySlug}/tasks/{taskId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update a default task + * @description Updates a default task for the supplied repository. + * + * The authenticated user must have **REPO_ADMIN** permission for this repository to call the resource. + */ + readonly put: operations["updateDefaultTask_1"] + readonly post?: never + /** + * Delete a specific default task + * @description Delete a specific default task for a repository. + * + * The authenticated user must have **REPO_ADMIN** permission for this repository to call the resource. + */ + readonly delete: operations["deleteDefaultTask_1"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-tasks/latest/projects/{projectKey}/tasks": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a page of default tasks + * @description Retrieves the default tasks for the supplied project. + * + * The authenticated user must have **PROJECT_VIEW** permission for this project to call the resource. + */ + readonly get: operations["getDefaultTasks"] + readonly put?: never + /** + * Add a default task + * @description Creates a default task for the project. + * + * The authenticated user must have **PROJECT_ADMIN** permission for this project to call the resource. + */ + readonly post: operations["addDefaultTask"] + /** + * Deletes all default tasks for the project + * @description Delete all the default tasks for the supplied project + * + * The authenticated user must have **PROJECT_ADMIN** permission for this project to call the resource. + */ + readonly delete: operations["deleteAllDefaultTasks"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/default-tasks/latest/projects/{projectKey}/tasks/{taskId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update a default task + * @description Updates a default task for the supplied project. + * + * The authenticated user must have **PROJECT_ADMIN** permission for this project to call the resource. + */ + readonly put: operations["updateDefaultTask"] + readonly post?: never + /** + * Delete a specific default task + * @description Delete a specific default task for a project. + * + * The authenticated user must have **PROJECT_ADMIN** permission for this project to call the resource. + */ + readonly delete: operations["deleteDefaultTask"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/git/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Check PR rebase precondition + * @description Checks preconditions to determine whether the pull request can be rebased. + * + * Some of the preconditions are: + * + * - The pull request is between Git repositories + * - The pull request is currently open + * - The pull request's {@link PullRequest#getFromRef "from" ref} is a branch + * - In other words, the qualified ID for the "from" ref must start with refs/heads/ + * - Tags, and other non-standard refs, cannot be rebased + * - The current user has an e-mail address + * - Pull requests cannot be rebased anonymously + * - `git rebase` records the current user as the committer for the rebased commits, which requires a name and e-mail address + * - The current user has write access to the {@link PullRequest#getFromRef "from" ref}'s repository + * - Note that in order to view a pull request a user is only required to have read access to the {@link PullRequest#getToRef toRef}'s repository, so just because a user can see a pull request does not mean they can request a rebase + * + * + * This list is not exhaustive, and the exact set of preconditions applied can be extended by third-party add-ons. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. + */ + readonly get: operations["canRebase"] + readonly put?: never + /** + * Rebase pull request + * @description Rebases the specified pull request, rewriting the incoming commits to start from the tip commit of the pull request's target branch. This operation alters the pull request's source branch and cannot be undone. + * + * The authenticated user must have REPO_READ permission for the repository that this pull request targets and REPO_WRITE permission for the pull request's source repository to call this resource. + */ + readonly post: operations["rebase"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/git/latest/projects/{projectKey}/repos/{repositorySlug}/tags": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Create tag + * @description Creates a tag in the specified repository. + * + * The authenticated user must have an effective REPO_WRITE permission to call this resource. + * + * 'LIGHTWEIGHT' and 'ANNOTATED' are the two type of tags that can be created. The 'startPoint' can either be a ref or a 'commit'. + */ + readonly post: operations["createTag"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/git/latest/projects/{projectKey}/repos/{repositorySlug}/tags/{name}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + readonly post?: never + /** + * Delete tag + * @description Deletes a tag in the specified repository. + * + * The authenticated user must have an effective REPO_WRITE permission to call this resource. + */ + readonly delete: operations["deleteTag"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/gpg/latest/keys": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all GPG keys + * @description Find all the keys for the currently authenticated user. Optionally, users with ADMIN and higher permissions may choose to specify the user parameter to retrieve GPG keys for another user. + * + * Only authenticated users may call this endpoint. + */ + readonly get: operations["getKeysForUser"] + readonly put?: never + /** + * Create a GPG key + * @description Add a GPG key to the authenticated user's account. Optionally, users with ADMIN and higher permissions may choose to specify the user parameter to add a GPG key for another user. + * + * Only authenticated users may call this endpoint. + */ + readonly post: operations["addKey"] + /** + * Delete all GPG keys for user + * @description Delete all GPG keys for a supplied user. + */ + readonly delete: operations["deleteForUser"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/gpg/latest/keys/{fingerprintOrId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + readonly post?: never + /** + * Delete a GPG key + * @description Delete the GPG key with the specified ID or Key Fingerprint. + */ + readonly delete: operations["deleteKey"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/annotations": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get Code Insights annotations for a commit + * @description Get annotations for the given commit ID, filtered by any query parameters given. + */ + readonly get: operations["getAnnotations_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all Code Insights reports for a commit + * @description Retrieve all reports for the given commit. + */ + readonly get: operations["getReports"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a Code Insights report + * @description Retrieve the specified report. + */ + readonly get: operations["getACodeInsightsReport"] + /** + * Create a Code Insights report + * @description Create a new insight report, or replace the existing one if a report already exists for the given repository, commit, and report key. A request to replace an existing report will be rejected if the authenticated user was not the creator of the specified report. + * + * The report key should be a unique string chosen by the reporter and should be unique enough not to potentially clash with report keys from other reporters. We recommend using reverse DNS namespacing or a similar standard to ensure that collision is avoided.

Report parameters

Parameter Description Required? Restrictions Type
title A short string representing the name of the report Yes Max length: 450 characters (but we recommend that it is shorter so that the display is nicer) String
details A string to describe the purpose of the report. This string may contain escaped newlines and if it does it will display the content accordingly. No Max length: 2000 characters String
result Indicates whether the report is in a passed or failed state No One of: PASS, FAIL String
data An array of data fields (described below) to display information on the report No Maximum 6 data fields Array
reporter A string to describe the tool or company who created the report No Max length: 450 characters String
link A URL linking to the results of the report in an external tool. No Must be a valid http or https URL String
logoUrl A URL to the report logo. If none is provided, the default insights logo will be used. No Must be a valid http or https URL String

Data parameters

The data field on the report is an array with at most 6 data fields (JSON maps) containing information that is to be displayed on the report (see the request example).
Parameter Description Type
title A string describing what this data field represents String
type The type of data contained in the value field. If not provided, then the value will be detected as a boolean, number or string. One of: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT String
value A value based on the type provided. Either a raw value (string, number or boolean) or a map. See below.
Type Field Value Field Type Value Field Display
None/Omitted Number, String or Boolean (not an array or object) Plain text
BOOLEAN Boolean The value will be read as a JSON boolean and displayed as 'Yes' or 'No'.
DATE Number The value will be read as a JSON number in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise it will be displayed as an absolute date.
DURATION Number The value will be read as a JSON number in milliseconds and will be displayed in a human readable duration format.
LINK Object: {"linktext": "Link text here", "href": "https://link.to.annotation/in/external/tool"} The value will be read as a JSON object containing the fields "linktext" and "href" and will be displayed as a clickable link on the report.
NUMBER Number The value will be read as a JSON number and large numbers will be displayed in a human readable format (e.g. 14.3k).
PERCENTAGE Number (between 0 and 100) The value will be read as a JSON number between 0 and 100 and will be displayed with a percentage sign.
TEXT String The value will be read as a JSON string and will be displayed as-is
+ */ + readonly put: operations["setACodeInsightsReport"] + readonly post?: never + /** + * Delete a Code Insights report + * @description Delete a report for the given commit. Also deletes any annotations associated with this report. + */ + readonly delete: operations["deleteACodeInsightsReport"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}/annotations": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get Code Insights annotations for a report + * @description Retrieve the specified report's annotations. + */ + readonly get: operations["getAnnotations"] + readonly put?: never + /** + * Add Code Insights annotations + * @description Add annotations to the given report. The request should be a JSON object mapping the string "annotations" to an array of maps containing the annotation data, as described below. See also the example request. + * + * A few things to note:- Annotations are an extension of a report, so a report must first exist in order to post annotations. Annotations are posted separately from the report, and can be posted in bulk using this endpoint. + * - Only the annotations that are on lines changed in the unified diff will be displayed. This means it is likely not all annotations posted will be displayed on the pull request It also means that if the user is viewing a side-by-side diff, commit diff or iterative review diff they will not be able to view the annotations. + * - A report cannot have more than 1000 annotations by default, however this property is congurable at an instance level. If the request would result in more than the maximum number of annotations being stored then the entire request is rejected and no new annotations are stored. + * - There is no de-duplication of annotations on Bitbucket so be sure that reruns of builds will first delete the report and annotations before creating them. + * + * # Annotation parameters + * + * |Parameter|Description|Required?|Restrictions|Type| + * |--- |--- |--- |--- |--- | + * |path|The path of the file on which this annotation should be placed. This is the path of the filerelative to the git repository. If no path is provided, then it will appear in the overview modalon all pull requests where the tip of the branch is the given commit, regardless of which files weremodified.|No||String| + * |line|The line number that the annotation should belong to. If no line number is provided, then it willdefault to 0 and in a pull request it will appear at the top of the file specified by the path field.|No|Non-negative integer|Integer| + * |message|The message to display to users|Yes|The maximum length accepted is 2000 characters, however the user interface may truncate this valuefor display purposes. We recommend that the message is short and succinct, with further detailsavailable to the user if needed on the page linked to by the the annotation link.|String| + * |severity|The severity of the annotation|Yes|One of: LOW, MEDIUM, HIGH|String| + * |link|An http or https URL representing the location of the annotation in the external tool|No||String| + * |type|The type of annotation posted|No|One of: VULNERABILITY, CODE_SMELL, BUG|String| + * |externalId|If the caller requires a link to get or modify this annotation, then an ID must be provided. It isnot used or required by Bitbucket, but only by the annotation creator for updating or deleting thisspecific annotation.|No|A string value shorter than 450 characters|String| + */ + readonly post: operations["addAnnotations"] + /** + * Delete Code Insights annotations + * @description Delete annotations for a given report that match the given external IDs, or all annotations if no external IDs are provided. + */ + readonly delete: operations["deleteAnnotations"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}/annotations/{externalId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Create or replace a Code Insights annotation + * @description Create an annotation with the given external ID, or replace it if it already exists. A request to replace an existing annotation will be rejected if the authenticated user was not the creator of the specified report. + */ + readonly put: operations["setAnnotation"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/jira/latest/comments/{commentId}/issues": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Create Jira Issue + * @description Create a Jira issue and associate it with a comment on a pull request. + * + * This resource can only be used with comments on a pull request. Attempting to call this resource with a different type of comment (for example, a comment on a commit) will result in an error. + * + * The authenticated user must have REPO_READ permission for the repository containing the comment to call this resource. + * + * The JSON structure for the create issue format is specified by Jira's REST v2 API. + */ + readonly post: operations["createIssue"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/jira/latest/issues/{issueKey}/commits": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get changesets for issue key + * @description Retrieve a page of changesets associated with the given issue key. + */ + readonly get: operations["getCommitsByIssueKey"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/jira/latest/projects/{projectKey}/primary-enhanced-entitylink": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get entity link + * @description Retrieves the enchanced primary entitylink + * + * The authenticated user must have PROJECT_READ permission for the project having the primary enhanced entitylink. + * + * + */ + readonly get: operations["getEnhancedEntityLinkForProject"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/jira/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/issues": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get issues for a pull request + * @description Retrieves Jira issue keys that are associated with the commits in the specified pull request. The number of commits checked for issues is limited to a default of 100. + */ + readonly get: operations["getIssueKeysForPullRequest"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/keys/latest/projects/{projectKey}/repos/{repositorySlug}/ssh": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository SSH keys + * @description Retrieves the access keys for the repository identified in the URL. + */ + readonly get: operations["getForRepository_1"] + readonly put?: never + /** + * Add repository SSH key + * @description Register a new SSH key and grants access to the repository identified in the URL. + */ + readonly post: operations["addForRepository"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/keys/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository SSH key + * @description Retrieves the access key for the SSH key with id keyId on the repository identified in the URL. + */ + readonly get: operations["getForRepository"] + readonly put?: never + readonly post?: never + /** + * Revoke repository SSH key + * @description Remove an existing access key for the repository identified in the URL. If the same SSH key is used as an access key for multiple projects or repositories, only the access to the repository identified in the URL will be revoked. + */ + readonly delete: operations["revokeForRepository"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/keys/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}/permission/{permission}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update repository SSH key permission + * @description Updates the permission granted to the specified SSH key to the repository identified in the URL. + */ + readonly put: operations["updatePermission_1"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/keys/latest/projects/{projectKey}/ssh": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get SSH key + * @description Retrieves the access keys for the project identified in the URL. + */ + readonly get: operations["getSshKeysForProject"] + readonly put?: never + /** + * Add project SSH key + * @description Register a new SSH key and grants access to the project identified in the URL. + */ + readonly post: operations["addForProject"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/keys/latest/projects/{projectKey}/ssh/{keyId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get project SSH key + * @description Retrieves the access key for the SSH key with id keyId on the project identified in the URL. + */ + readonly get: operations["getForProject"] + readonly put?: never + readonly post?: never + /** + * Revoke project SSH key + * @description Remove an existing access key for the project identified in the URL. If the same SSH key is used as an access key for multiple projects or repositories, only the access to the project identified in the URL will be revoked. + */ + readonly delete: operations["revokeForProject"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/keys/latest/projects/{projectKey}/ssh/{keyId}/permission/{permission}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update project SSH key permission + * @description Updates the permission granted to the specified SSH key to the project identified in the URL. + */ + readonly put: operations["updatePermission"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/keys/latest/ssh/{keyId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + readonly post?: never + /** + * Revoke project SSH key + * @description Remove an existing access key for the projects and repositories in the submitted entity. If the same SSH key is used as an access key for multiple projects or repositories not supplied, only the access to the projects or repositories identified will be revoked. + */ + readonly delete: operations["revokeMany"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/keys/latest/ssh/{keyId}/projects": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get project SSH keys + * @description Retrieves all project-related access keys for the SSH key with id keyId. If the current user is not an admin any of the projects the key provides access to, none are returned. + */ + readonly get: operations["getForProjects"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/keys/latest/ssh/{keyId}/repos": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository SSH key + * @description Retrieves all repository-related access keys for the SSH key with id keyId. If the current user is not an admin of any of the projects the key provides access to, none are returned. + */ + readonly get: operations["getForRepositories"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/account/settings/preferred-mirror": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get preferred mirror + * @description Retrieves the current user's preferred mirror server + */ + readonly get: operations["getPreferredMirrorId"] + readonly put?: never + /** + * Set preferred mirror + * @description Sets the mirror specified by a mirror ID as the current user's preferred mirror + */ + readonly post: operations["setPreferredMirrorId"] + /** + * Remove preferred mirror + * @description Removes the current user's preferred mirror + */ + readonly delete: operations["deletePreferredMirrorId"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/analyticsSettings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get analytics settings from upstream + * @description Gets the analytics settings from the mirroring upstream + */ + readonly get: operations["analyticsSettings"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/authenticate": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Authenticate on behalf of a user + * @description Authenticates on behalf of a user. Used by mirrors to check the credentials supplied to them by users. If successful a user and their effective permissions are returned as follows - + * + * * For SSH credentials - all the effective user permissions are returned. + * * For all other credentials - the highest global permission is returned along with highest repository permission if repository ID is also provided in the request. + * + * Currently only username/password, bearer token and SSH credentials are supported. + */ + readonly post: operations["authenticate"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/farmNodes": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get farm nodes + * @description Retrieves the list of farm nodes in this cluster + */ + readonly get: operations["getFarmNodes"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/mirrorRepos/{externalRepositoryId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get clone URLs + * @description Retrieves all available clone urls for the specified repository. + */ + readonly get: operations["getMirroredRepository"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/mirrorServers": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get all mirrors + * @description Returns a list of mirrors + */ + readonly get: operations["listMirrors"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/mirrorServers/{mirrorId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get mirror by ID + * @description Returns the mirror specified by a mirror ID + */ + readonly get: operations["getMirror"] + /** + * Upgrade mirror server + * @description Upgrades the mirror server in question with the provided details.This endpoint can only be called by the mirror instance or system administrators
Since 5.8 + */ + readonly put: operations["upgrade"] + readonly post?: never + /** + * Delete mirror by ID + * @description Removes a mirror, disabling all access and notifications for the mirror server in question + */ + readonly delete: operations["remove"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/mirrorServers/{mirrorId}/events": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Publish RepositoryMirrorEvent + * @description Publishes a RepositoryMirrorEvent on the event queue. + */ + readonly post: operations["publishEvent"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/progress": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get synchronization progress state + * @description Retrieves synchronization progress state.If there's no progress to report, this resource will return
 {"discovering":false,"syncedRepos":0,"totalRepos":0}
If there are repositories in the process of synchronizing, but the precise number hasn't been discovered yet, this resource will return:
 {"discovering":true,"syncedRepos":3,"totalRepos":100}
If there is progress to report and the total number of repositories is known, this resource will return:
  {"discovering":false,"syncedRepos":242,"totalRepos":1071} 
+ */ + readonly get: operations["getSynchronizationProgress"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/projects/{projectId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get project + * @description Returns the requested project using its primary key ID.
Since 6.7 + */ + readonly get: operations["getProjectById"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/projects/{projectId}/repos": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get hashes for repositories in project + * @description Returns a page of repositories for a given project, enriched with a content hash + */ + readonly get: operations["getAllReposForProject"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/repos": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get content hashes for repositories + * @description Returns a page of repositories enriched with a content hash and default branch + */ + readonly get: operations["getAllContentHashes"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/repos/{repoId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get content hash for a repository + * @description Returns a repository enriched with a content hash and default branch + */ + readonly get: operations["getContentHashById"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/repos/{repoId}/mirrors": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get mirrors for repository + * @description Returns a page of mirrors for a repository. This resource will return all mirrors along with authorized links to the mirror's repository REST resource. To determine if a repository is available on the mirror, the returned URL needs to be called. + */ + readonly get: operations["getRepositoryMirrors"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/requests": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get mirroring requests + * @description Retrieves a mirroring request + */ + readonly get: operations["listRequests"] + readonly put?: never + /** + * Create a mirroring request + * @description Creates a new mirroring request + */ + readonly post: operations["register"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/requests/{mirroringRequestId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get a mirroring request + * @description Retrieves a mirroring request + */ + readonly get: operations["getMirroringRequest"] + readonly put?: never + readonly post?: never + /** + * Delete a mirroring request + * @description Deletes a mirroring request + */ + readonly delete: operations["deleteMirroringRequest"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/requests/{mirroringRequestId}/accept": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Accept a mirroring request + * @description Accepts a mirroring request + */ + readonly post: operations["accept"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/requests/{mirroringRequestId}/reject": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Reject a mirroring request + * @description Rejects a mirroring request + */ + readonly post: operations["reject"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/supportInfo/projects/{projectKey}/repos/{repoSlug}/repoSyncStatus": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Gets information about the mirrored repository + * @description Retrieves information about an external repository mirrored by the mirror server. Particularly the local ID & external ID of the repository + */ + readonly get: operations["getRepoSyncStatus_1"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/supportInfo/refChangesQueue": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get items in ref changes queue + * @description Retrieves a list of up to plugin.mirroring.farm.max.ref.change.queue.dump.size items currently in the ref changes queue. The ref changes queue is an internal component of every mirror farm, and is shared between all nodes. When the contents of an upstream repository changes, an item is added to this queue so that the mirror farm nodes know to synchronize. The mirror farm constantly polls and removes items from this queue for processing, so it is empty most of the time. + */ + readonly get: operations["getRefChangesQueue"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/supportInfo/refChangesQueue/count": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get total number of items in ref changes queue + * @description Retrieves the total number of items currently in the ref changes queue + */ + readonly get: operations["getRefChangesQueueCount"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/supportInfo/repoSyncStatus": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get sync status of repositories + * @description Retrieves a page of sync statuses of the repositories on this mirror node + */ + readonly get: operations["getRepoSyncStatus"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/syncSettings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get upstream settings + * @description Retrieves upstream settings + */ + readonly get: operations["getMirrorSettings"] + /** + * Update upstream settings + * @description Sets the settings for the specified upstream + */ + readonly put: operations["setMirrorSettings"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/syncSettings/mode": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get mirror mode + * @description Gets the current mirror mode + */ + readonly get: operations["getMirrorMode"] + /** + * Update mirror mode + * @description Sets the mirror mode for the specified upstream + */ + readonly put: operations["setMirrorMode"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/syncSettings/projects": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get mirrored project IDs + * @description Returns the IDs of the projects that the mirror is configured to mirror + */ + readonly get: operations["getMirroredProjects"] + readonly put?: never + /** + * Add multiple projects to be mirrored + * @description Configures the mirror to mirror the provided projects + */ + readonly post: operations["startMirroringProjects"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/syncSettings/projects/{projectId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Add project to be mirrored + * @description Configures the mirror to mirror the provided project + */ + readonly post: operations["startMirroringProject"] + /** + * Stop mirroring project + * @description Configures the mirror to no longer mirror the provided project + */ + readonly delete: operations["stopMirroringProject"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/upstreamServer": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get upstream server + * @description Retrieves upstream server details. + */ + readonly get: operations["getUpstreamServer"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/zdu/end": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * End ZDU upgrade on mirror farm + * @description Finalizes the ZDU upgrade on the mirror farm denying heterogeneous cluster formation + */ + readonly post: operations["endRollingUpgrade"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/mirroring/latest/zdu/start": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Start ZDU upgrade on mirror farm + * @description Enables upgrading of individual nodes within the cluster, allowing a heterogeneous cluster formation + */ + readonly post: operations["startRollingUpgrade"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/policies/latest/admin/repos/archive": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository archive policy + * @description Retrieves the repository archive policy for the instance. + * + * The user must be authenticated to access this resource. + */ + readonly get: operations["getRepositoryArchivePolicy"] + /** + * Update repository archive policy + * @description Sets the repository archive policy for the instance. + * + * The authenticated user must have SYS_ADMIN permission. + */ + readonly put: operations["setRepositoryArchivePolicy"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/policies/latest/admin/repos/delete": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get repository delete policy + * @description Retrieves the repository delete policy for the instance. + * + * The user must be authenticated to access this resource. + */ + readonly get: operations["getRepositoryDeletePolicy"] + /** + * Update the repository delete policy + * @description Sets the repository delete policy for the instance. + * + * The authenticated user must have SYS_ADMIN permission. + */ + readonly put: operations["setRepositoryDeletePolicy"] + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Create a required builds merge check + * @description Create a required build merge check for the given repository. + * + * The authenticated user must have **REPO_ADMIN** permission for the target repository to register a required build merge check. + * + * The contents of the required build merge check request are: + * + * These fields are **required**: + * + * - **buildParentKeys**: A non-empty list of build parent keys that require green builds for this merge check to pass + * - **refMatcher.id**: The value to match refs against in the target branch + * - **refMatcher.type.id**: The type of ref matcher, one of: "ANY_REF", "BRANCH", "PATTERN", "MODEL_CATEGORY" or "MODEL_BRANCH" + * + * + * These fields are optional: + * + * - **exemptRefMatcher.id** The value to exempt refs in the source branch from this check + * - **exemptRefMatcher.type.id**: The type of exempt ref matcher, one of: "ANY_REF", "BRANCH", "PATTERN", "MODEL_CATEGORY" or "MODEL_BRANCH" + * + * + * + */ + readonly post: operations["createRequiredBuildsMergeCheck"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + /** + * Update a required builds merge check + * @description Update the required builds merge check for the given ID. + * + * The authenticated user must have **REPO_ADMIN** permission for the target repository to update a required build merge check. + * + * The contents of the required build merge check request are: + * + * These fields are **required**: + * + * - **buildParentKeys**: A non-empty list of build parent keys that require green builds for this merge check to pass + * - **refMatcher.id**: The value to match refs against in the target branch + * - **refMatcher.type.id**: The type of ref matcher, one of: "ANY_REF", "BRANCH", "PATTERN", "MODEL_CATEGORY" or "MODEL_BRANCH" + * + * + * These fields are optional: + * + * - **exemptRefMatcher.id** The value to exempt refs in the source branch from this check + * - **exemptRefMatcher.type.id**: The type of exempt ref matcher, one of: "ANY_REF", "BRANCH", "PATTERN", "MODEL_CATEGORY" or "MODEL_BRANCH" + * + * + * + */ + readonly put: operations["updateRequiredBuildsMergeCheck"] + readonly post?: never + /** + * Delete a required builds merge check + * @description Deletes a required build existing merge check, given it's ID. + * + * The authenticated user must have **REPO_ADMIN** permission for the target repository to delete a required build merge check. + */ + readonly delete: operations["deleteRequiredBuildsMergeCheck"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/conditions": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get required builds merge checks + * @description Returns a page of required build merge checks that have been configured for this repository. + * + * The authenticated user must have **REPO_READ** permission for the target repository to request a page of required build merge checks. + */ + readonly get: operations["getPageOfRequiredBuildsMergeChecks"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/ssh/latest/keys": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get SSH keys for user + * @description Retrieve a page of SSH keys. + */ + readonly get: operations["getSshKeys"] + readonly put?: never + /** + * Add SSH key for user + * @description Add a new SSH key to a supplied user. + */ + readonly post: operations["addSshKey"] + /** + * Delete all user SSH key + * @description Delete all SSH keys for a supplied user. + */ + readonly delete: operations["deleteSshKeys"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/ssh/latest/keys/{keyId}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get SSH key for user by keyId + * @description Retrieve an SSH key by keyId + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly get: operations["getSshKey"] + readonly put?: never + readonly post?: never + /** + * Remove SSH key + * @description Delete an SSH key. + * + * The authenticated user must have ADMIN permission or higher to call this resource. + */ + readonly delete: operations["deleteSshKey"] + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/ssh/latest/settings": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get SSH settings + * @description Gets the SSH settings from the upstream. + */ + readonly get: operations["sshSettings"] + readonly put?: never + readonly post?: never + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/sync/latest/projects/{projectKey}/repos/{repositorySlug}": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** + * Get synchronization status + * @description Retrieves the synchronization status for the specified repository. In addition to listing refs which cannot be synchronized, if any, the status also provides the timestamp for the most recent synchronization and indicates whether synchronization is available and enabled. If "?at" is specified in the URL, the synchronization status for the specified ref is returned, rather than the complete repository status. + * + * The authenticated user must have REPO_READ permission for the repository, or it must be public if the request is anonymous. Additionally, after synchronization is enabled for a repository, meaning synchronization was available at that time, permission changes and other actions can cause it to become unavailable. Even when synchronization is enabled, if it is no longer available for the repository it will not be performed. + */ + readonly get: operations["getStatus"] + readonly put?: never + /** + * Disable synchronization + * @description Enables or disables synchronization for the specified repository. When synchronization is enabled, branches within the repository are immediately synchronized and the status is updated with the outcome. That initial synchronization is performed before the REST request returns, allowing it to return the updated status. + * + * The authenticated user must have REPO_ADMIN permission for the specified repository. Anonymous users cannot manage synchronization, even on public repositories. Additionally, synchronization must be available for the specified repository. Synchronization is only available if: + * + * - The repository is a fork, since its origin is used as upstream + * - The owning user still has access to the fork's origin, if the repository is a personalfork + */ + readonly post: operations["setEnabled"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } + readonly "/sync/latest/projects/{projectKey}/repos/{repositorySlug}/synchronize": { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly get?: never + readonly put?: never + /** + * Manual synchronization + * @description Allows developers to apply a manual operation to bring a ref back in sync with upstream when it becomes out of sync due to conflicting changes. The following actions are supported: + * + * - MERGE: Merges in commits from the upstream ref. After applying this action, the synchronized ref will be AHEAD (as it still includes commits that do not exist upstream. + * - This action is only supported for DIVERGED refs + * - If a "commitMessage" is provided in the context, it will be used on the merge commit. Otherwise a default message is used. + * - DISCARD: Throws away local changes in favour of those made upstream. This is a destructive operation where commits in the local repository are lost. + * - No context entries are supported for this action + * - If the upstream ref has been deleted, the local ref is deleted as well + * - Otherwise, the local ref is updated to reference the same commit as upstream, even if the update is not fast-forward (similar to a forced push) + * + * + * The authenticated user must have REPO_WRITE permission for the specified repository. Anonymous users cannot synchronize refs, even on public repositories. Additionally, synchronization must be enabled and available for the specified repository. + */ + readonly post: operations["synchronize"] + readonly delete?: never + readonly options?: never + readonly head?: never + readonly patch?: never + readonly trace?: never + } +} +export type webhooks = Record +export interface components { + schemas: { + readonly AdminPasswordUpdate: { + /** @example jcitizen */ + readonly name?: string + /** @example my-secret-password */ + readonly password?: string + /** @example my-secret-password */ + readonly passwordConfirm?: string + } + readonly ApplicationId: Record + readonly ApplicationUser: { + readonly active?: boolean + readonly displayName?: string + readonly emailAddress?: string + /** Format: int32 */ + readonly id?: number + readonly name?: string + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + readonly Comment: { + readonly anchor?: components["schemas"]["CommentThreadDiffAnchor"] + readonly author?: components["schemas"]["ApplicationUser"] + readonly comments?: readonly components["schemas"]["Comment"][] + /** Format: date-time */ + readonly createdDate?: string + /** Format: int64 */ + readonly id?: number + readonly permittedOperations?: components["schemas"]["CommentOperations"] + readonly properties?: Record + /** Format: date-time */ + readonly resolvedDate?: string + readonly resolver?: components["schemas"]["ApplicationUser"] + /** @enum {string} */ + readonly severity?: "BLOCKER" | "NORMAL" + /** @enum {string} */ + readonly state?: "OPEN" | "PENDING" | "RESOLVED" + readonly text?: string + readonly thread?: components["schemas"]["CommentThread"] + /** Format: date-time */ + readonly updatedDate?: string + /** Format: int32 */ + readonly version?: number + } + readonly Commentable: Record + readonly CommentOperations: { + readonly deletable?: boolean + readonly editable?: boolean + readonly transitionable?: boolean + } + readonly CommentThread: { + readonly anchor?: components["schemas"]["CommentThreadDiffAnchor"] + readonly anchored?: boolean + readonly commentable?: components["schemas"]["Commentable"] + /** Format: date-time */ + readonly createdDate?: string + /** Format: int64 */ + readonly id?: number + readonly resolved?: boolean + /** Format: date-time */ + readonly resolvedDate?: string + readonly resolver?: components["schemas"]["ApplicationUser"] + readonly rootComment?: components["schemas"]["Comment"] + /** Format: date-time */ + readonly updatedDate?: string + } + readonly CommentThreadDiffAnchor: { + /** @enum {string} */ + readonly diffType?: "COMMIT" | "EFFECTIVE" | "RANGE" + readonly fileAnchor?: boolean + /** @enum {string} */ + readonly fileType?: "FROM" | "TO" + readonly fromHash?: string + /** Format: int32 */ + readonly line?: number + readonly lineAnchor?: boolean + /** @enum {string} */ + readonly lineType?: "ADDED" | "CONTEXT" | "REMOVED" + readonly orphaned?: boolean + readonly path?: string + readonly srcPath?: string + readonly toHash?: string + } + readonly Context: { + /** @example Merging in latest from upstream. */ + readonly commitMessage?: string + } + readonly Credentials: + | components["schemas"]["RestBearerTokenCredentials"] + | components["schemas"]["RestSshCredentials"] + | components["schemas"]["RestUsernamePasswordCredentials"] + readonly DiffContentFilter: Record + readonly EnrichedRepository: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly properties?: { + /** @example 457389a0b871fb61012a7351d09aefc0cf1c57c306449d4b5df4d2f381df8433 */ + readonly contentHash?: string + /** @example refs/heads/master */ + readonly defaultBranchId?: string + /** @example 11e5cd17e8d74d84a11f2c8a6bbc6ae0a2b69059e54030f49214c94d980364c1 */ + readonly metadataHash?: string + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + readonly ExampleAvatarMultipartFormData: { + /** + * Format: binary + * @description The avatar file to upload. + */ + readonly avatar?: string + } + readonly ExampleCertificateMultipartFormData: { + /** + * Format: binary + * @description The X.509 certificate file to upload. + */ + readonly certificate?: string + } + readonly ExampleFiles: { + readonly files?: components["schemas"]["ExampleJsonLastModifiedCallback"] + } + readonly ExampleJsonLastModifiedCallback: { + readonly latestCommit?: { + readonly author?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1359075920 + */ + readonly authorTimestamp?: number + readonly committer?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1449075830 + */ + readonly committerTimestamp?: number + /** @example abcdef0 */ + readonly displayId?: string + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly id?: string + /** @example More work on feature 1 */ + readonly message?: string + readonly parents?: readonly components["schemas"]["RestMinimalCommit"][] + } + readonly pomXml?: { + readonly author?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1359075920 + */ + readonly authorTimestamp?: number + readonly committer?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1449075830 + */ + readonly committerTimestamp?: number + /** @example abcdef0 */ + readonly displayId?: string + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly id?: string + /** @example More work on feature 1 */ + readonly message?: string + readonly parents?: readonly components["schemas"]["RestMinimalCommit"][] + } + readonly readmeMd?: { + readonly author?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1359075920 + */ + readonly authorTimestamp?: number + readonly committer?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1449075830 + */ + readonly committerTimestamp?: number + /** @example abcdef0 */ + readonly displayId?: string + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly id?: string + /** @example More work on feature 1 */ + readonly message?: string + readonly parents?: readonly components["schemas"]["RestMinimalCommit"][] + } + } + readonly ExampleMultipartFormData: { + /** @description The branch on which the path should be modified or created. */ + readonly branch?: string + /** @description The full content of the file at path. */ + readonly content?: string + /** @description The message associated with this change, to be used as the commit message. Or null if the default message should be used. */ + readonly message?: string + /** @description The starting point for branch. If provided and different from branch, branch will be created as a new branch, branching off from sourceBranch. */ + readonly sourceBranch?: string + /** @description The commit ID of the file before it was edited, used to identify if content has changed. Or null if this is a new file */ + readonly sourceCommitId?: string + } + readonly ExamplePostMultipartFormData: { + /** @description The hook script contents. */ + readonly content?: string + /** @description A description of the hook script (useful when querying registered hook scripts). */ + readonly description?: string + /** @description The name of the hook script (useful when querying registered hook scripts). */ + readonly name?: string + /** @description The type of hook script; supported values are "PRE" for pre-receive hooks and "POST" for post-receive hooks. */ + readonly type?: string + } + readonly ExamplePreviewMigration: { + readonly repositories?: readonly components["schemas"]["RestRepository"][] + } + readonly ExamplePutMultipartFormData: { + /** @description The hook script contents. */ + readonly content?: string + /** @description A description of the hook script (useful when querying registered hook scripts). */ + readonly description?: string + /** @description The name of the hook script (useful when querying registered hook scripts). */ + readonly name?: string + } + readonly ExampleRequirements: { + /** @example 3 */ + readonly count?: string + /** @example true */ + readonly enabled?: boolean + } + readonly ExampleSettings: { + /** @example true */ + readonly booleanValue?: boolean + /** + * Format: double + * @example 1.1 + */ + readonly doubleValue?: number + /** + * Format: int32 + * @example 1 + */ + readonly integerValue?: number + /** + * Format: int64 + * @example -2147483648 + */ + readonly longValue?: number + /** @example This is an arbitrary string */ + readonly stringValue?: string + } + readonly ExampleSettingsMap: { + /** @example true */ + readonly "boolean key"?: boolean + /** @example 10 */ + readonly "long key"?: number + /** @example string value */ + readonly "string key"?: string + } + readonly ExampleSocketAddress: { + /** @example node.example.com */ + readonly address?: string + /** + * Format: int32 + * @example 8230 + */ + readonly port?: number + } + readonly ExampleStatus: { + /** + * Format: int32 + * @example 2 + */ + readonly currentNumberOfUsers?: number + /** @example */ + readonly serverId?: string + } + readonly FileListResource: unknown + readonly FilePart: { + readonly contentType?: string + readonly formField?: boolean + readonly inputStream?: Record + readonly name?: string + /** Format: int64 */ + readonly size?: number + readonly value?: string + } + readonly Group: { + /** @example group_a */ + readonly name?: string + } + readonly GroupAndUsers: { + /** @example group */ + readonly group?: string + /** @example [ + * "user1", + * "user2" + * ] */ + readonly users: readonly string[] + } + readonly GroupPickerContext: { + /** @example user_a */ + readonly context?: string + /** @example group_a */ + readonly itemName?: string + } + readonly OptionalBodyBeanParam: Record + readonly PageRequestImpl: { + /** Format: int32 */ + readonly limit?: number + /** Format: int32 */ + readonly start?: number + } + readonly Project: { + readonly description?: string + /** Format: int32 */ + readonly id?: number + readonly key?: string + readonly name?: string + readonly public?: boolean + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly PropertyMap: Record + readonly PullRequest: { + readonly author?: components["schemas"]["PullRequestParticipant"] + readonly closed?: boolean + /** Format: date-time */ + readonly closedDate?: string + /** Format: date-time */ + readonly createdDate?: string + readonly crossRepository?: boolean + readonly description?: string + readonly draft?: boolean + readonly fromRef?: components["schemas"]["PullRequestRef"] + /** Format: int64 */ + readonly id?: number + readonly locked?: boolean + readonly open?: boolean + readonly participants?: readonly components["schemas"]["PullRequestParticipant"][] + readonly properties?: Record + readonly reviewers?: readonly components["schemas"]["PullRequestParticipant"][] + /** @enum {string} */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" + readonly title?: string + readonly toRef?: components["schemas"]["PullRequestRef"] + /** Format: date-time */ + readonly updatedDate?: string + /** Format: int32 */ + readonly version?: number + } + readonly PullRequestParticipant: { + readonly approved?: boolean + readonly lastReviewedCommit?: string + readonly pullRequest?: components["schemas"]["PullRequest"] + /** @enum {string} */ + readonly role?: "AUTHOR" | "PARTICIPANT" | "REVIEWER" + /** @enum {string} */ + readonly status?: "APPROVED" | "NEEDS_WORK" | "UNAPPROVED" + readonly user?: components["schemas"]["ApplicationUser"] + } + readonly PullRequestRef: { + readonly displayId?: string + readonly id?: string + readonly latestCommit?: string + readonly repository?: components["schemas"]["Repository"] + readonly type?: components["schemas"]["RefType"] + } + readonly RefType: unknown + readonly Repository: { + readonly archived?: boolean + readonly description?: string + readonly fork?: boolean + readonly forkable?: boolean + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly local?: boolean + readonly name?: string + readonly offline?: boolean + readonly origin?: components["schemas"]["Repository"] + /** Format: int32 */ + readonly partition?: number + readonly project?: components["schemas"]["Project"] + readonly public?: boolean + readonly readOnly?: boolean + readonly remote?: boolean + readonly scmId?: string + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + readonly statusMessage?: string + } + readonly RepositoryHookDetails: { + readonly configFormKey?: string + readonly description?: string + readonly key?: string + readonly name?: string + readonly supportedScopes?: readonly ( + | "GLOBAL" + | "PROJECT" + | "REPOSITORY" + )[] + /** @enum {string} */ + readonly type?: "POST_RECEIVE" | "PRE_PULL_REQUEST_MERGE" | "PRE_RECEIVE" + readonly version?: string + } + readonly RestAccessToken: { + /** Format: date-time */ + readonly createdDate?: string + /** @example 252973515069 */ + readonly id?: string + /** @example My access token */ + readonly name?: string + } + readonly RestAccessTokenRequest: { + /** Format: int32 */ + readonly expiryDays?: number + /** @example My access token */ + readonly name?: string + /** @example [ + * "REPO_ADMIN", + * "PROJECT_READ" + * ] */ + readonly permissions?: readonly string[] + } + readonly RestAggregateRejectCounter: { + /** @example 1630041546433 */ + readonly lastRejectTime?: number + /** + * Format: int64 + * @example 5 + */ + readonly rejectCount?: number + readonly user?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + } + readonly RestAnalyticsSettings: { + readonly canCollectAnalytics?: boolean + /** + * Format: int64 + * @example 1640390400000 + */ + readonly serverTime?: number + /** @example SEN-500 */ + readonly supportEntitlementNumber?: string + } + readonly RestAnnouncementBanner: { + /** @enum {string} */ + readonly audience?: "ALL" | "AUTHENTICATED" + readonly enabled?: boolean + readonly message?: string + } + readonly RestApplicationProperties: { + /** @example 1358897885952000 */ + readonly buildDate?: string + /** @example 20220123103656677 */ + readonly buildNumber?: string + /** @example Example.com Bitbucket */ + readonly displayName?: string + /** @example 2.1.0 */ + readonly version?: string + } + readonly RestApplicationUser: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + readonly RestApplicationUserWithPermissions: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + readonly effectivePermissions?: Record + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + readonly RestApplySuggestionRequest: { + /** @example 0 */ + readonly commentVersion?: { + /** Format: int32 */ + readonly asInt?: number + readonly present?: boolean + } + /** @example A commit message */ + readonly commitMessage?: string + /** @example 1 */ + readonly pullRequestVersion?: { + /** Format: int32 */ + readonly asInt?: number + readonly present?: boolean + } + /** @example 2 */ + readonly suggestionIndex?: { + /** Format: int32 */ + readonly asInt?: number + readonly present?: boolean + } + } + readonly RestAttachmentMetadata: { + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + /** @example {\"A\":\"B\"} */ + readonly metadata?: string + /** @example test.com/test */ + readonly url?: string + } + readonly RestAuthenticationRequest: { + readonly credentials: components["schemas"]["Credentials"] + /** Format: int32 */ + readonly repositoryId?: number + } + readonly RestAutoDeclineSettings: { + /** @example true */ + readonly enabled?: boolean + /** + * Format: int32 + * @example 4 + */ + readonly inactivityWeeks?: number + readonly scope?: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + } + readonly RestAutoDeclineSettingsRequest: { + /** @example true */ + readonly enabled?: boolean + /** + * Format: int32 + * @example 4 + */ + readonly inactivityWeeks?: number + } + readonly RestAutoMergeProcessingResult: { + /** + * @example CANCELLED + * @enum {string} + */ + readonly autoMergeProcessingStatus?: + | "CANCELLED" + | "LOCK_FAILURE" + | "MERGED" + | "STALE" + | "UNKNOWN" + | "VETOED" + readonly pullRequest?: { + readonly closed?: boolean + /** + * Format: int64 + * @example 19990759200 + */ + readonly closedDate?: number + /** + * Format: int64 + * @example 13590759200 + */ + readonly createdDate?: number + /** @example It is a kludge, but put the tuple from the database in the cache. */ + readonly description?: string + readonly descriptionAsHtml?: string + readonly draft?: boolean + readonly fromRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly htmlDescription?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly links?: Record + readonly locked?: boolean + readonly open?: boolean + readonly participants?: readonly components["schemas"]["RestPullRequestParticipant"][] + readonly reviewers?: readonly components["schemas"]["RestPullRequestParticipant"][] + /** @enum {string} */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" + /** @example Talking Nerdy */ + readonly title?: string + readonly toRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** + * Format: int64 + * @example 14490759200 + */ + readonly updatedDate?: number + /** Format: int32 */ + readonly version?: number + } + } + readonly RestAutoMergeProjectSettingsRequest: { + /** @example false */ + readonly enabled?: boolean + /** + * @example CREATE + * @enum {string} + */ + readonly restrictionAction?: "CREATE" | "DELETE" | "NONE" + } + readonly RestAutoMergeRequest: { + /** @example true */ + readonly autoSubject?: boolean + /** + * Format: int64 + * @example 13590759200 + */ + readonly createdDate?: number + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly fromHash?: string + /** @example (Optional) A descriptive message for the merge commit */ + readonly message?: string + /** @example (Optional) squash */ + readonly strategyId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly toRefId?: string + } + readonly RestAutoMergeRestrictedSettings: { + /** @example false */ + readonly enabled?: boolean + /** + * @description The restriction state of this scope's project. + * @enum {string} + */ + readonly restrictionState?: + | "NONE" + | "RESTRICTED_MODIFIABLE" + | "RESTRICTED_UNMODIFIABLE" + /** @description The scope that these settings apply to. */ + readonly scope?: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + } + readonly RestAutoMergeSettingsRequest: { + /** @example false */ + readonly enabled?: boolean + } + readonly RestBearerTokenCredentials: { + /** @example NjU4MjM0NDkxMzM0OuPEm9jk1TZUuhuAw45pdirCqvbD */ + readonly token: string + } + readonly RestBitbucketLicense: { + /** + * Format: int64 + * @example 1331038800000 + */ + readonly creationDate?: number + /** Format: int32 */ + readonly daysBeforeExpiry?: number + /** + * Format: int64 + * @example 1372493732817 + */ + readonly expiryDate?: number + /** + * Format: int64 + * @example 1372493732817 + */ + readonly gracePeriodEndDate?: number + /** @example */ + readonly license?: string + /** + * Format: int64 + * @example 1372493732817 + */ + readonly maintenanceExpiryDate?: number + /** + * Format: int32 + * @example 12 + */ + readonly maximumNumberOfUsers?: number + /** Format: int32 */ + readonly numberOfDaysBeforeExpiry?: number + /** Format: int32 */ + readonly numberOfDaysBeforeGracePeriodExpiry?: number + /** Format: int32 */ + readonly numberOfDaysBeforeMaintenanceExpiry?: number + /** + * Format: int64 + * @example 1331038800000 + */ + readonly purchaseDate?: number + /** @example */ + readonly serverId?: string + readonly status?: { + /** + * Format: int32 + * @example 2 + */ + readonly currentNumberOfUsers?: number + /** @example */ + readonly serverId?: string + } + /** @example */ + readonly supportEntitlementNumber?: string + readonly unlimitedNumberOfUsers?: boolean + } + readonly RestBranch: { + readonly default?: boolean + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @example 8d51122def5632836d1cb1026e879069e10a1e13 */ + readonly latestChangeset?: string + /** @example 8d51122def5632836d1cb1026e879069e10a1e13 */ + readonly latestCommit?: string + readonly type?: components["schemas"]["RefType"] + } + readonly RestBranchCreateRequest: { + /** @description Name of the branch to be created */ + readonly name?: string + /** @description Commit ID from which the branch is created */ + readonly startPoint?: string + } + readonly RestBranchDeleteRequest: { + /** @description Don't actually delete the ref name, just do a dry run */ + readonly dryRun?: boolean + /** @description Commit ID that the provided ref name is expected to point to */ + readonly endPoint?: string + /** @description Name of the ref to be deleted */ + readonly name?: string + } + readonly RestBuildCapabilities: { + readonly buildStatus?: readonly string[] + } + readonly RestBuildStats: { + /** Format: int32 */ + readonly cancelled?: number + /** Format: int32 */ + readonly failed?: number + /** Format: int32 */ + readonly inProgress?: number + /** Format: int32 */ + readonly successful?: number + /** Format: int32 */ + readonly unknown?: number + } + readonly RestBuildStatus: { + /** @example 3 */ + readonly buildNumber?: string + /** + * Format: int64 + * @example 1587533099278 + */ + readonly createdDate?: number + /** @example A description of the build goes here */ + readonly description?: string + /** Format: int64 */ + readonly duration?: number + /** @example TEST-REP3 */ + readonly key?: string + /** @example Database Matrix Tests */ + readonly name?: string + /** @example TEST-REP */ + readonly parent?: string + /** @example refs/heads/master */ + readonly ref?: string + /** @enum {string} */ + readonly state?: + | "CANCELLED" + | "FAILED" + | "INPROGRESS" + | "SUCCESSFUL" + | "UNKNOWN" + readonly testResults?: { + /** + * Format: int32 + * @example 1 + */ + readonly failed?: number + /** + * Format: int32 + * @example 5 + */ + readonly skipped?: number + /** + * Format: int32 + * @example 134 + */ + readonly successful?: number + } + /** + * Format: int64 + * @example 1587533699278 + */ + readonly updatedDate?: number + /** @example https://bamboo.example.com/browse/TEST-REP3 */ + readonly url?: string + } + readonly RestBuildStatusSetRequest: { + /** @example 3 */ + readonly buildNumber?: string + /** @example Unit test build */ + readonly description?: string + /** + * Format: int64 + * @example 1500000 + */ + readonly duration?: number + /** @example TEST-REP123 */ + readonly key: string + /** + * Format: int64 + * @example 1359075920 + */ + readonly lastUpdated?: number + /** @example Database Matrix Tests */ + readonly name?: string + /** @example TEST-REP */ + readonly parent?: string + /** @example refs/heads/master */ + readonly ref?: string + /** @enum {string} */ + readonly state: + | "CANCELLED" + | "FAILED" + | "INPROGRESS" + | "SUCCESSFUL" + | "UNKNOWN" + readonly testResults?: { + /** + * Format: int32 + * @example 1 + */ + readonly failed?: number + /** + * Format: int32 + * @example 5 + */ + readonly skipped?: number + /** + * Format: int32 + * @example 134 + */ + readonly successful?: number + } + /** @example https://bamboo.example.com/browse/TEST-REP1-3 */ + readonly url: string + } + readonly RestBulkAddInsightAnnotationRequest: { + readonly annotations?: readonly components["schemas"]["RestSingleAddInsightAnnotationRequest"][] + } + readonly RestBulkUserRateLimitSettingsUpdateRequest: { + readonly settings?: { + /** + * Format: int32 + * @example 60 + */ + readonly capacity?: number + /** + * Format: int32 + * @example 5 + */ + readonly fillRate?: number + } + readonly usernames?: readonly string[] + readonly whitelisted?: boolean + } + readonly RestChange: { + readonly conflict?: { + readonly ourChange?: { + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @enum {string} */ + readonly type?: + | "ADD" + | "COPY" + | "DELETE" + | "MODIFY" + | "MOVE" + | "UNKNOWN" + } + readonly theirChange?: { + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @enum {string} */ + readonly type?: + | "ADD" + | "COPY" + | "DELETE" + | "MODIFY" + | "MOVE" + | "UNKNOWN" + } + } + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly contentId?: string + readonly executable?: boolean + /** @example bcdef0123abcdef4567abcdef8987abcdef6543a */ + readonly fromContentId?: string + readonly links?: Record + /** @enum {string} */ + readonly nodeType?: "DIRECTORY" | "FILE" | "SUBMODULE" + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** + * Format: int32 + * @example 98 + */ + readonly percentUnchanged?: number + readonly srcExecutable?: boolean + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @enum {string} */ + readonly type?: "ADD" | "COPY" | "DELETE" | "MODIFY" | "MOVE" | "UNKNOWN" + } + readonly RestChangeset: { + readonly changes?: { + readonly isLastPage?: boolean + /** Format: int32 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** Format: int32 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: Record + } + readonly fromCommit?: { + /** @example abcdef0 */ + readonly displayId?: string + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly id?: string + } + readonly links?: Record + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + readonly toCommit?: { + readonly author?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1359075920 + */ + readonly authorTimestamp?: number + readonly committer?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1449075830 + */ + readonly committerTimestamp?: number + /** @example abcdef0 */ + readonly displayId?: string + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly id?: string + /** @example More work on feature 1 */ + readonly message?: string + readonly parents?: readonly components["schemas"]["RestMinimalCommit"][] + } + } + readonly RestClusterInformation: { + readonly localNode?: { + readonly address?: { + /** @example node.example.com */ + readonly address?: string + /** + * Format: int32 + * @example 8230 + */ + readonly port?: number + } + /** @example 7.0.0 */ + readonly buildVersion?: string + /** @example d4fde8b1-2504-4998-a0ba-14fbe98edd4d */ + readonly id?: string + readonly local?: boolean + /** @example foo */ + readonly name?: string + } + readonly nodes?: readonly components["schemas"]["RestClusterNode"][] + readonly running?: boolean + } + readonly RestClusterNode: { + readonly address?: { + /** @example node.example.com */ + readonly address?: string + /** + * Format: int32 + * @example 8230 + */ + readonly port?: number + } + /** @example 7.0.0 */ + readonly buildVersion?: string + /** @example d4fde8b1-2504-4998-a0ba-14fbe98edd4d */ + readonly id?: string + readonly local?: boolean + /** @example foo */ + readonly name?: string + } + readonly RestComment: { + readonly anchor?: { + /** @enum {string} */ + readonly diffType?: "COMMIT" | "EFFECTIVE" | "RANGE" + /** @enum {string} */ + readonly fileType?: "FROM" | "TO" + /** @example 62a0505e8204115b8b9c8a95bfa264a8c0896a93 */ + readonly fromHash?: string + /** + * Format: int32 + * @example 98 + */ + readonly line?: number + readonly lineComment?: boolean + /** @enum {string} */ + readonly lineType?: "ADDED" | "CONTEXT" | "REMOVED" + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly pullRequest?: { + readonly closed?: boolean + /** + * Format: int64 + * @example 19990759200 + */ + readonly closedDate?: number + /** + * Format: int64 + * @example 13590759200 + */ + readonly createdDate?: number + /** @example It is a kludge, but put the tuple from the database in the cache. */ + readonly description?: string + readonly descriptionAsHtml?: string + readonly draft?: boolean + readonly fromRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly htmlDescription?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly links?: Record + readonly locked?: boolean + readonly open?: boolean + readonly participants?: readonly components["schemas"]["RestPullRequestParticipant"][] + readonly reviewers?: readonly components["schemas"]["RestPullRequestParticipant"][] + /** @enum {string} */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" + /** @example Talking Nerdy */ + readonly title?: string + readonly toRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** + * Format: int64 + * @example 14490759200 + */ + readonly updatedDate?: number + /** Format: int32 */ + readonly version?: number + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @example 3cdd5d19178a54d2e51b5098d43b57571241d0ab */ + readonly toHash?: string + } + readonly anchored?: boolean + readonly author?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + readonly comments?: readonly components["schemas"]["RestComment"][] + /** + * Format: int64 + * @example 1359075920 + */ + readonly createdDate?: number + readonly html?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly parent?: { + readonly anchor?: { + /** @enum {string} */ + readonly diffType?: "COMMIT" | "EFFECTIVE" | "RANGE" + /** @enum {string} */ + readonly fileType?: "FROM" | "TO" + /** @example 62a0505e8204115b8b9c8a95bfa264a8c0896a93 */ + readonly fromHash?: string + /** + * Format: int32 + * @example 98 + */ + readonly line?: number + readonly lineComment?: boolean + /** @enum {string} */ + readonly lineType?: "ADDED" | "CONTEXT" | "REMOVED" + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly pullRequest?: { + readonly closed?: boolean + /** + * Format: int64 + * @example 19990759200 + */ + readonly closedDate?: number + /** + * Format: int64 + * @example 13590759200 + */ + readonly createdDate?: number + /** @example It is a kludge, but put the tuple from the database in the cache. */ + readonly description?: string + readonly descriptionAsHtml?: string + readonly draft?: boolean + readonly fromRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly htmlDescription?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly links?: Record + readonly locked?: boolean + readonly open?: boolean + readonly participants?: readonly components["schemas"]["RestPullRequestParticipant"][] + readonly reviewers?: readonly components["schemas"]["RestPullRequestParticipant"][] + /** @enum {string} */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" + /** @example Talking Nerdy */ + readonly title?: string + readonly toRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** + * Format: int64 + * @example 14490759200 + */ + readonly updatedDate?: number + /** Format: int32 */ + readonly version?: number + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @example 3cdd5d19178a54d2e51b5098d43b57571241d0ab */ + readonly toHash?: string + } + readonly anchored?: boolean + readonly author?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + readonly comments?: readonly components["schemas"]["RestComment"][] + /** + * Format: int64 + * @example 1359075920 + */ + readonly createdDate?: number + readonly html?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly pending?: boolean + readonly properties?: Record + readonly reply?: boolean + /** + * Format: int64 + * @example 1239075920 + */ + readonly resolvedDate?: number + readonly resolver?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + /** @example NORMAL */ + readonly severity?: string + /** @example OPEN */ + readonly state?: string + /** @example An insightful comment. */ + readonly text?: string + /** @description Indicates if this comment thread has been marked as resolved or not */ + readonly threadResolved?: boolean + /** + * Format: int64 + * @example 1569075920 + */ + readonly threadResolvedDate?: number + readonly threadResolver?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + /** + * Format: int64 + * @example 1449075920 + */ + readonly updatedDate?: number + /** + * Format: int32 + * @example 1 + */ + readonly version?: number + } + readonly pending?: boolean + readonly properties?: Record + readonly reply?: boolean + /** + * Format: int64 + * @example 1239075920 + */ + readonly resolvedDate?: number + readonly resolver?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + /** @example NORMAL */ + readonly severity?: string + /** @example OPEN */ + readonly state?: string + /** @example An insightful comment. */ + readonly text?: string + /** @description Indicates if this comment thread has been marked as resolved or not */ + readonly threadResolved?: boolean + /** + * Format: int64 + * @example 1569075920 + */ + readonly threadResolvedDate?: number + readonly threadResolver?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + /** + * Format: int64 + * @example 1449075920 + */ + readonly updatedDate?: number + /** + * Format: int32 + * @example 1 + */ + readonly version?: number + } + readonly RestCommentJiraIssue: { + /** + * Format: int64 + * @example 1 + */ + readonly commentId?: number + /** @example TEST-123 */ + readonly issueKey?: string + } + readonly RestCommentThreadDiffAnchor: { + /** @enum {string} */ + readonly diffType?: "COMMIT" | "EFFECTIVE" | "RANGE" + /** @enum {string} */ + readonly fileType?: "FROM" | "TO" + /** @example 62a0505e8204115b8b9c8a95bfa264a8c0896a93 */ + readonly fromHash?: string + /** + * Format: int32 + * @example 98 + */ + readonly line?: number + readonly lineComment?: boolean + /** @enum {string} */ + readonly lineType?: "ADDED" | "CONTEXT" | "REMOVED" + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly pullRequest?: { + readonly closed?: boolean + /** + * Format: int64 + * @example 19990759200 + */ + readonly closedDate?: number + /** + * Format: int64 + * @example 13590759200 + */ + readonly createdDate?: number + /** @example It is a kludge, but put the tuple from the database in the cache. */ + readonly description?: string + readonly descriptionAsHtml?: string + readonly draft?: boolean + readonly fromRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly htmlDescription?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly links?: Record + readonly locked?: boolean + readonly open?: boolean + readonly participants?: readonly components["schemas"]["RestPullRequestParticipant"][] + readonly reviewers?: readonly components["schemas"]["RestPullRequestParticipant"][] + /** @enum {string} */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" + /** @example Talking Nerdy */ + readonly title?: string + readonly toRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** + * Format: int64 + * @example 14490759200 + */ + readonly updatedDate?: number + /** Format: int32 */ + readonly version?: number + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @example 3cdd5d19178a54d2e51b5098d43b57571241d0ab */ + readonly toHash?: string + } + readonly RestCommit: { + readonly author?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1359075920 + */ + readonly authorTimestamp?: number + readonly committer?: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + /** + * Format: int64 + * @example 1449075830 + */ + readonly committerTimestamp?: number + /** @example abcdef0 */ + readonly displayId?: string + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly id?: string + /** @example More work on feature 1 */ + readonly message?: string + readonly parents?: readonly components["schemas"]["RestMinimalCommit"][] + } + readonly RestCommitMessageSuggestion: { + /** @example Merge in PROJECT_1/repo_1 from feature/feature-2 to main */ + readonly body?: string + /** @example Pull request #2: add new feature */ + readonly title?: string + } + readonly RestConflict: { + readonly ourChange?: { + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @enum {string} */ + readonly type?: + | "ADD" + | "COPY" + | "DELETE" + | "MODIFY" + | "MOVE" + | "UNKNOWN" + } + readonly theirChange?: { + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @enum {string} */ + readonly type?: + | "ADD" + | "COPY" + | "DELETE" + | "MODIFY" + | "MOVE" + | "UNKNOWN" + } + } + readonly RestConflictChange: { + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @enum {string} */ + readonly type?: "ADD" | "COPY" | "DELETE" | "MODIFY" | "MOVE" | "UNKNOWN" + } + readonly RestConnectivitySummary: { + /** @example Unable to connect to the node. */ + readonly errorMessage?: string + /** @example true */ + readonly reachable?: boolean + /** + * Format: int64 + * @example 100 + */ + readonly roundTripTime?: number + } + readonly RestCreateBranchRequest: { + /** @example This is my branch or tag */ + readonly message?: string + /** @example my-branch-or-tag */ + readonly name?: string + /** @example 8d351a10fb428c0c1239530256e21cf24f136e73 */ + readonly startPoint?: string + } + readonly RestCreateTagRequest: { + /** @example This is my branch or tag */ + readonly message?: string + /** @example my-branch-or-tag */ + readonly name?: string + /** @example 8d351a10fb428c0c1239530256e21cf24f136e73 */ + readonly startPoint?: string + } + readonly RestDefaultBranch: { + readonly id?: string + } + readonly RestDefaultReviewersRequest: { + /** + * Format: int32 + * @example 1 + */ + readonly requiredApprovals?: number + readonly reviewers?: readonly components["schemas"]["RestApplicationUser"][] + readonly sourceMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + readonly targetMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + } + readonly RestDefaultTask: { + /** @example Default task description */ + readonly description?: string + readonly html?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + } + readonly RestDefaultTaskRequest: { + /** @example Default task description */ + readonly description?: string + readonly sourceMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + readonly targetMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + } + readonly RestDeployment: { + /** + * Format: int64 + * @example 5 + */ + readonly deploymentSequenceNumber?: number + /** @example Production and mirror environments */ + readonly description?: string + /** @example US East Mirror */ + readonly displayName?: string + readonly environment?: { + /** @example US East Mirror */ + readonly displayName: string + /** @example us-east-mirror */ + readonly key: string + /** @example production */ + readonly type?: string + /** @example https://foo-bar.production/us-east */ + readonly url?: string + } + readonly fromCommit?: { + /** @example abcdef0 */ + readonly displayId?: string + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly id?: string + } + /** @example PROD-MIR */ + readonly key?: string + /** + * Format: int64 + * @example 1449075920 + */ + readonly lastUpdated?: number + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly state?: + | "CANCELLED" + | "FAILED" + | "IN_PROGRESS" + | "PENDING" + | "ROLLED_BACK" + | "SUCCESSFUL" + | "UNKNOWN" + readonly toCommit?: { + /** @example abcdef0 */ + readonly displayId?: string + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly id?: string + } + /** @example http://example.ci.org/projects/PROJ/deploy/mirror-deploy/100 */ + readonly url?: string + } + readonly RestDeploymentEnvironment: { + /** @example US East Mirror */ + readonly displayName?: string + /** @example us-east-mirror */ + readonly key?: string + /** @example production */ + readonly type?: string + /** @example https://foo-bar.production/us-east */ + readonly url?: string + } + readonly RestDeploymentSetRequest: { + /** + * Format: int64 + * @example 2 + */ + readonly deploymentSequenceNumber: number + /** @example 2nd deployment of commit 44bca31f4be to US East production */ + readonly description: string + /** @example US East marketing website production */ + readonly displayName: string + readonly environment: components["schemas"]["RestDeploymentEnvironment"] + /** @example marketing-us-prod */ + readonly key: string + /** + * Format: int64 + * @example 1359075920 + */ + readonly lastUpdated?: number + /** + * @example SUCCESSFUL + * @enum {string} + */ + readonly state: + | "CANCELLED" + | "FAILED" + | "IN_PROGRESS" + | "PENDING" + | "ROLLED_BACK" + | "SUCCESSFUL" + | "UNKNOWN" + /** @example https://my-dep-tool/marketing-us-prod/2 */ + readonly url: string + } + readonly RestDetailedGroup: { + readonly deletable?: boolean + /** @example group-a */ + readonly name?: string + } + readonly RestDetailedInvocation: { + /** Format: int32 */ + readonly duration?: number + readonly event?: string + readonly eventScope?: { + readonly id?: string + readonly type?: string + } + /** Format: int32 */ + readonly finish?: number + /** Format: int32 */ + readonly id?: number + readonly request?: Record + readonly result?: Record + /** Format: int32 */ + readonly start?: number + } + readonly RestDetailedUser: { + readonly active?: boolean + readonly avatarUrl?: string + readonly deletable?: boolean + /** @example Bitbucket Internal Directory */ + readonly directoryName?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + /** @example 1368145580548 */ + readonly lastAuthenticationTimestamp?: number + readonly links?: Record + readonly mutableDetails?: boolean + readonly mutableGroups?: boolean + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + readonly RestDiff: { + readonly binary?: boolean + readonly destination?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly hunks?: readonly components["schemas"]["RestDiffHunk"][] + readonly lineComments?: readonly components["schemas"]["RestComment"][] + readonly properties?: Record + readonly source?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly truncated?: boolean + } + readonly RestDiffHunk: { + readonly context?: string + /** Format: int32 */ + readonly destinationLine?: number + /** Format: int32 */ + readonly destinationSpan?: number + readonly segments?: readonly components["schemas"]["RestDiffSegment"][] + /** Format: int32 */ + readonly sourceLine?: number + /** Format: int32 */ + readonly sourceSpan?: number + readonly truncated?: boolean + } + readonly RestDiffLine: { + readonly commentIds?: readonly number[] + /** @enum {string} */ + readonly conflictMarker?: "MARKER" | "OURS" | "THEIRS" + /** Format: int32 */ + readonly destination?: number + readonly line?: string + /** Format: int32 */ + readonly source?: number + readonly truncated?: boolean + } + readonly RestDiffSegment: { + readonly lines?: readonly components["schemas"]["RestDiffLine"][] + readonly truncated?: boolean + /** @enum {string} */ + readonly type?: "ADDED" | "CONTEXT" | "REMOVED" + } + readonly RestDiffStatsSummary: unknown + readonly RestEmoticon: { + readonly shortcut?: string + readonly url?: string + readonly value?: string + } + readonly RestEnhancedEntityLink: { + /** @example a1b54cs4wsd45 */ + readonly applicationLinkId?: string + /** @example example.com/jira */ + readonly displayUrl?: string + /** + * Format: int64 + * @example 10000 + */ + readonly projectId?: number + /** @example MPROJ */ + readonly projectKey?: string + /** @example My Project */ + readonly projectName?: string + } + readonly RestErasedUser: { + /** @example user-123ab */ + readonly newIdentifier?: string + } + readonly RestErrorMessage: { + readonly context?: string + readonly exceptionName?: string + readonly message?: string + } + readonly RestErrors: { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + readonly RestExportRequest: { + /** @example example/sub/directory */ + readonly exportLocation?: string + readonly repositoriesRequest: { + readonly includes: readonly components["schemas"]["RestRepositorySelector"][] + } + } + readonly RestFarmSynchronizationRequest: { + /** + * Format: int32 + * @example 1 + */ + readonly attempt?: number + /** @example 2022-08-18T02:04:46.435Z */ + readonly createdAt?: string + /** @example 1 */ + readonly externalRepoId?: string + /** + * @example INCREMENTAL + * @enum {string} + */ + readonly type?: "incremental" | "snapshot" + } + readonly RestGitTagCreateRequest: { + readonly force?: boolean + /** @example A new release tag */ + readonly message?: string + /** @example release-tag */ + readonly name?: string + /** @example refs/heads/master */ + readonly startPoint?: string + /** @enum {string} */ + readonly type?: "ANNOTATED" | "LIGHTWEIGHT" + } + readonly RestGpgKey: { + /** @example bitbucket@example.com */ + readonly emailAddress?: string + /** + * Format: int64 + * @example 61550496000000 + */ + readonly expiryDate?: number + /** @example 43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8 */ + readonly fingerprint?: string + /** @example 00000000000004d2 */ + readonly id?: string + /** @example [] */ + readonly subKeys?: readonly components["schemas"]["RestGpgSubKey"][] + /** @example -----BEGIN PGP SIGNATURE----- + * + * iQEzBAABCAAdFiEEM8MrWnoxlp3K1lFY5BMGiWNefn4FAlkqKE4ACgkQ5BMGiWNe + * fn6/kggAyzKhDDqdVb3Rq02hiSqeqKa1JuKRqDmzIpa6Pxa+1CpCnxwaIVrGgIii + * vj0ZNJzL1Bm2xm0JasotJDiZq5pFKi0FfQ0WmskuhsW1VY/f08TltHpHvK2kHVRr + * GEMVDUb0nj0I7Duc8XTipiYoDGS1GvydNR/bu3SsFTcZyapXirQcTCRT6/Sn0/IP + * pUeIwQo1qK4e8gTOhWhfWEiVig39lQhiZFtm5S/vfAY72/Rgp68zMYmwasMSnBgF + * /LLFW6lXAqZIoAP8AnmsMRjCH6mS98+/lxKq2+K71+2YUUIAnNEeO09Lufo3B3Da + * Pbs7BpD28w4lKlzb2EQ0n0C9rrxdPA== + * =VZpm + * -----END PGP SIGNATURE----- + * */ + readonly text?: string + } + readonly RestGpgSubKey: { + /** Format: date-time */ + readonly expiryDate?: string + readonly fingerprint?: string + } + readonly RestHookScript: { + /** Format: date-time */ + readonly createdDate?: string + readonly description?: string + /** Format: int64 */ + readonly id?: number + readonly name?: string + readonly pluginKey?: string + /** @enum {string} */ + readonly type?: "POST" | "PRE" + /** Format: date-time */ + readonly updatedDate?: string + /** Format: int32 */ + readonly version?: number + } + readonly RestHookScriptConfig: { + readonly scope?: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + readonly script?: { + /** Format: date-time */ + readonly createdDate?: string + readonly description?: string + /** Format: int64 */ + readonly id?: number + readonly name?: string + readonly pluginKey?: string + /** @enum {string} */ + readonly type?: "POST" | "PRE" + /** Format: date-time */ + readonly updatedDate?: string + /** Format: int32 */ + readonly version?: number + } + readonly triggerIds?: readonly string[] + } + readonly RestHookScriptTriggers: { + readonly triggerIds?: readonly string[] + } + readonly RestImportRequest: { + /** @example Bitbucket_export_1.tar */ + readonly archivePath?: string + } + readonly RestInsightAnnotation: { + /** @example external.id */ + readonly externalId?: string + /** + * Format: int32 + * @example 5 + */ + readonly line?: number + /** @example http://example.com/my/file/analysis?line=5 */ + readonly link?: string + /** @example This is an annotation message */ + readonly message?: string + /** @example src/some/structure/file.ext */ + readonly path?: string + /** @example report.key */ + readonly reportKey?: string + /** @example HIGH */ + readonly severity?: string + /** @example BUG */ + readonly type?: string + } + readonly RestInsightAnnotationsResponse: { + readonly annotations?: readonly components["schemas"]["RestInsightAnnotation"][] + } + readonly RestInsightReport: { + /** @example 1630041546433 */ + readonly createdDate?: number + readonly data?: readonly components["schemas"]["RestInsightReportData"][] + /** @example This is the details of the report, it can be a longer string describing the report */ + readonly details?: string + /** @example report.key */ + readonly key?: string + /** + * Format: uri + * @example http://integration.example.com + */ + readonly link?: string + /** + * Format: uri + * @example http://integration.example.com/logo + */ + readonly logoUrl?: string + /** @example Reporter/tool that produced this report */ + readonly reporter?: string + /** + * @example PASS + * @enum {string} + */ + readonly result?: "FAIL" | "PASS" + /** @example report.title */ + readonly title?: string + } + readonly RestInsightReportData: { + /** @example data.title */ + readonly title?: string + /** @example NUMBER */ + readonly type?: string + /** @example 9 */ + readonly value?: Record + } + readonly RestInvocationHistory: unknown + readonly RestInvocationRequest: unknown + readonly RestInvocationResult: unknown + readonly RestJiraIssue: { + /** @example JRA-9 */ + readonly key?: string + /** @example https://jira.atlassian.com/browse/JRA-9 */ + readonly url?: string + } + readonly RestJob: { + /** + * Format: int64 + * @example 1497657603000 + */ + readonly endDate?: number + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly initiator?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + /** @example 1bec7499-077a-4b58-b27c-996a9c2187a4 */ + readonly nodeId?: string + readonly progress?: { + /** @example Working on it... */ + readonly message?: string + /** + * Format: int32 + * @example 42 + */ + readonly percentage?: number + } + /** + * Format: int64 + * @example 1497657601000 + */ + readonly startDate?: number + /** @enum {string} */ + readonly state?: + | "ABORTED" + | "CANCELED" + | "CANCELING" + | "COMPLETED" + | "FAILED" + | "FINALISING" + | "INITIALISING" + | "READY" + | "RUNNING" + | "TIMED_OUT" + /** @example com.atlassian.bitbucket.migration.export */ + readonly type?: string + /** + * Format: int64 + * @example 1497657603000 + */ + readonly updatedDate?: number + } + readonly RestJobMessage: { + /** Format: date-time */ + readonly createdDate?: string + /** @example 617 */ + readonly id?: string + /** @enum {string} */ + readonly severity?: "ERROR" | "INFO" | "WARN" + /** @example job */ + readonly subject?: string + /** @example Something of interest happened */ + readonly text?: string + } + readonly RestLabel: { + /** @example labelName */ + readonly name?: string + } + readonly RestLabelable: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + /** @enum {string} */ + readonly labelableType?: "REPOSITORY" + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + readonly RestLogLevel: { + /** @example DEBUG */ + readonly logLevel?: string + } + readonly RestMailConfiguration: { + /** @example smtp.example.com */ + readonly hostname?: string + /** @example password */ + readonly password?: string + /** + * Format: int32 + * @example 465 + */ + readonly port?: number + /** @enum {string} */ + readonly protocol?: "SMTP" | "SMTPS" + readonly requireStartTls?: boolean + /** @example stash-no-reply@company.com */ + readonly senderAddress?: string + /** @example user */ + readonly username?: string + readonly useStartTls?: boolean + } + readonly RestMarkup: { + /** @example

Hello World!

*/ + readonly html?: string + } + readonly RestMeshConnectivityReport: { + readonly reports?: readonly components["schemas"]["RestNodeConnectivityReport"][] + } + readonly RestMeshMigrationQueueStateCounts: unknown + readonly RestMeshMigrationRequest: { + readonly all?: boolean + readonly maxBytesPerSecond?: { + /** Format: int64 */ + readonly asLong?: number + readonly present?: boolean + } + readonly projectIds?: readonly number[] + readonly repositoryIds?: readonly number[] + } + readonly RestMeshMigrationSummary: { + /** + * Format: int64 + * @example 1331038800000 + */ + readonly endTime?: number + /** Format: int64 */ + readonly jobId?: number + /** Format: int64 */ + readonly maxBandwidth?: number + /** + * Format: int32 + * @example 53 + */ + readonly progress?: number + readonly queue?: Record + /** + * Format: int64 + * @example 1331038800000 + */ + readonly startTime?: number + /** @example RUNNING */ + readonly state?: string + } + readonly RestMeshNode: { + /** @example 1 */ + readonly id?: string + /** @example 1630041546433 */ + readonly lastSeenDate?: number + /** @example My node */ + readonly name?: string + /** @example false */ + readonly offline?: boolean + /** @example 1 */ + readonly rpcId?: string + /** @example http://127.0.0.1:7999 */ + readonly rpcUrl?: string + /** + * @example AVAILABLE + * @enum {string} + */ + readonly state?: + | "AVAILABLE" + | "DELETING" + | "DISABLED" + | "DRAINING" + | "OFFLINE" + } + readonly RestMigrationRepository: { + /** @enum {string} */ + readonly migrationState?: + | "CANCELED" + | "FAILED" + | "MIGRATED" + | "QUEUED" + | "SKIPPED" + | "STAGED" + | "STAGING" + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + } + readonly RestMinimalCommit: { + /** @example abcdef0 */ + readonly displayId?: string + /** @example abcdef0123abcdef4567abcdef8987abcdef6543 */ + readonly id?: string + } + readonly RestMinimalRef: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly RestMirroredRepository: { + readonly available?: boolean + readonly cloneUrls?: readonly components["schemas"]["RestNamedLink"][] + /** Format: date-time */ + readonly lastUpdated?: string + /** @example Saigon Mirror */ + readonly mirrorName?: string + readonly pushUrls?: readonly components["schemas"]["RestNamedLink"][] + /** @example 1 */ + readonly repositoryId?: string + /** @enum {string} */ + readonly status?: + | "AVAILABLE" + | "ERROR_AVAILABLE" + | "ERROR_INITIALIZING" + | "INITIALIZING" + | "NOT_MIRRORED" + } + readonly RestMirroredRepositoryDescriptor: { + readonly links?: Record + readonly mirrorServer?: { + /** @example http://vietnam.example.com */ + readonly baseUrl?: string + readonly enabled?: boolean + /** @example B0F5-CS21-45C2-CCK3 */ + readonly id?: string + /** Format: date-time */ + readonly lastSeenDate: string + /** @enum {string} */ + readonly mirrorType?: "FARM" | "SINGLE" + /** @example Mirror */ + readonly name?: string + /** @example 8.0.0 */ + readonly productVersion?: string + } + } + readonly RestMirrorHashes: { + /** @example 677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a */ + readonly content?: string + /** @example 677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a */ + readonly metadata?: string + } + readonly RestMirroringRequest: { + /** Format: int32 */ + readonly id?: number + /** @example https://bitbucket-eu.example.com:7990/bitbucket */ + readonly mirrorBaseUrl?: string + /** @example 4f0eb5fc-67fc-48f8-b4a7-87981f026c6a */ + readonly mirrorId?: string + /** @example Bitbucket Mirror */ + readonly mirrorName?: string + /** @enum {string} */ + readonly mirrorType?: "FARM" | "SINGLE" + /** @example 8.0.0 */ + readonly productVersion?: string + /** @enum {string} */ + readonly state?: "ACCEPTED" | "PENDING" | "REJECTED" + } + readonly RestMirrorRepositorySynchronizationStatus: { + /** @example 1 */ + readonly externalRepoId?: string + /** + * Format: int32 + * @example 1 + */ + readonly failedSyncCount?: number + readonly hashes?: { + /** @example 677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a */ + readonly content?: string + /** @example 677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a */ + readonly metadata?: string + } + /** Format: date-time */ + readonly initialSyncDate?: string + /** Format: date-time */ + readonly lastSyncDate?: string + /** + * Format: int32 + * @example 1 + */ + readonly localProjectId?: number + /** + * Format: int32 + * @example 1 + */ + readonly localRepoId?: number + /** @example 148728f5-df0f-3f3e-af11-5ca16be3725f */ + readonly upstreamId?: string + } + readonly RestMirrorServer: { + /** @example http://vietnam.example.com */ + readonly baseUrl?: string + readonly enabled?: boolean + /** @example B0F5-CS21-45C2-CCK3 */ + readonly id?: string + /** Format: date-time */ + readonly lastSeenDate?: string + /** @enum {string} */ + readonly mirrorType?: "FARM" | "SINGLE" + /** @example Mirror */ + readonly name?: string + /** @example 8.0.0 */ + readonly productVersion?: string + } + readonly RestMirrorUpgradeRequest: { + /** @example https://bitbucket-eu.example.com:7990/bitbucket */ + readonly baseUrl?: string + /** @example 8.0.0 */ + readonly productVersion?: string + } + readonly RestMultipleBuildStats: unknown + readonly RestNamedLink: { + /** @example https://bitbucket.example.com/scm/awesomeproject/awesomerepo.git */ + readonly href?: string + /** @example http */ + readonly name?: string + } + readonly RestNode: { + /** @example 1 */ + readonly id?: string + /** @example My Node */ + readonly name?: string + /** @enum {string} */ + readonly type?: "BITBUCKET" | "MESH" + } + readonly RestNodeConnectivityReport: { + readonly node?: { + /** @example 1 */ + readonly id?: string + /** @example My Node */ + readonly name?: string + /** @enum {string} */ + readonly type?: "BITBUCKET" | "MESH" + } + readonly summaries?: readonly components["schemas"]["RestNodeConnectivitySummary"][] + } + readonly RestNodeConnectivitySummary: { + readonly node?: { + /** @example 1 */ + readonly id?: string + /** @example My Node */ + readonly name?: string + /** @enum {string} */ + readonly type?: "BITBUCKET" | "MESH" + } + readonly summary?: { + /** @example Unable to connect to the node. */ + readonly errorMessage?: string + /** @example true */ + readonly reachable?: boolean + /** + * Format: int64 + * @example 100 + */ + readonly roundTripTime?: number + } + } + readonly RestPageRestChange: { + readonly isLastPage?: boolean + /** Format: int32 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** Format: int32 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: Record + } + readonly RestPath: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly RestPermitted: { + /** @example true */ + readonly permitted?: boolean + } + readonly RestPermittedGroup: { + readonly group?: { + /** @example group_a */ + readonly name?: string + } + /** @example ADMIN */ + readonly permission?: string + } + readonly RestPermittedUser: { + /** @enum {string} */ + readonly permission?: + | "ADMIN" + | "LICENSED_USER" + | "PROJECT_ADMIN" + | "PROJECT_CREATE" + | "PROJECT_READ" + | "PROJECT_VIEW" + | "PROJECT_WRITE" + | "REPO_ADMIN" + | "REPO_CREATE" + | "REPO_READ" + | "REPO_WRITE" + | "SYS_ADMIN" + | "USER_ADMIN" + readonly user?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + } + readonly RestPerson: { + readonly avatarUrl?: string + /** @example charlie@example.com */ + readonly emailAddress?: string + /** @example Charlie */ + readonly name?: string + } + readonly RestProgress: { + /** @example Working on it... */ + readonly message?: string + /** + * Format: int32 + * @example 42 + */ + readonly percentage?: number + } + readonly RestProject: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key?: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly RestProjectSettingsRestriction: { + /** @example my-admin-component */ + readonly componentKey?: string + /** @example my-admin-feature */ + readonly featureKey?: string + /** @example org.featuredeveloper */ + readonly namespace?: string + /** + * @example PROCESSED + * @enum {string} + */ + readonly processedState?: + | "FAILED" + | "IN_PROGRESS" + | "PROCESSED" + | "UNPROCESSED" + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + } + readonly RestProjectSettingsRestrictionRequest: { + /** @example my-admin-component */ + readonly componentKey?: string + /** @example my-admin-feature */ + readonly featureKey: string + /** @example org.featuredeveloper */ + readonly namespace: string + } + readonly RestProperties: { + /** @example 457389a0b871fb61012a7351d09aefc0cf1c57c306449d4b5df4d2f381df8433 */ + readonly contentHash?: string + /** @example refs/heads/master */ + readonly defaultBranchId?: string + /** @example 11e5cd17e8d74d84a11f2c8a6bbc6ae0a2b69059e54030f49214c94d980364c1 */ + readonly metadataHash?: string + } + readonly RestPullRequest: { + readonly closed?: boolean + /** + * Format: int64 + * @example 19990759200 + */ + readonly closedDate?: number + /** + * Format: int64 + * @example 13590759200 + */ + readonly createdDate?: number + /** @example It is a kludge, but put the tuple from the database in the cache. */ + readonly description?: string + readonly descriptionAsHtml?: string + readonly draft?: boolean + readonly fromRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly htmlDescription?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly links?: Record + readonly locked?: boolean + readonly open?: boolean + readonly participants?: readonly components["schemas"]["RestPullRequestParticipant"][] + readonly reviewers?: readonly components["schemas"]["RestPullRequestParticipant"][] + /** @enum {string} */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" + /** @example Talking Nerdy */ + readonly title?: string + readonly toRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** + * Format: int64 + * @example 14490759200 + */ + readonly updatedDate?: number + /** Format: int32 */ + readonly version?: number + } + readonly RestPullRequestActivity: { + /** @enum {string} */ + readonly action?: + | "APPROVED" + | "AUTO_MERGE_CANCELLED" + | "AUTO_MERGE_REQUESTED" + | "COMMENTED" + | "DECLINED" + | "DELETED" + | "MERGED" + | "OPENED" + | "REOPENED" + | "RESCOPED" + | "REVIEW_COMMENTED" + | "REVIEW_DISCARDED" + | "REVIEW_FINISHED" + | "REVIEWED" + | "UNAPPROVED" + | "UPDATED" + /** + * Format: int64 + * @example 19990759200 + */ + readonly createdDate?: number + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly user?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + } + readonly RestPullRequestAssignParticipantRoleRequest: { + /** @enum {string} */ + readonly role?: "AUTHOR" | "PARTICIPANT" | "REVIEWER" + readonly user?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + } + readonly RestPullRequestAssignStatusRequest: { + /** @example 685cac2c4499ff1f308851e35d2b4357844d8927 */ + readonly lastReviewedCommit?: string + /** @enum {string} */ + readonly status?: "APPROVED" | "NEEDS_WORK" | "UNAPPROVED" + } + readonly RestPullRequestCommitMessageTemplate: { + /** @example Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName} */ + readonly body?: string + /** @example Pull request #${id}: ${title} */ + readonly title?: string + } + readonly RestPullRequestCondition: { + /** + * Format: int32 + * @example 1 + */ + readonly id?: number + /** + * Format: int32 + * @example 1 + */ + readonly requiredApprovals?: number + readonly reviewers?: readonly components["schemas"]["RestApplicationUser"][] + readonly scope?: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + readonly sourceRefMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + readonly targetRefMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + } + readonly RestPullRequestDeclineRequest: { + /** @example An optional comment explaining why the pull request is being declined */ + readonly comment?: string + /** Format: int32 */ + readonly version?: number + } + readonly RestPullRequestDeleteRequest: { + /** Format: int32 */ + readonly version?: number + } + readonly RestPullRequestFinishReviewRequest: { + /** @example General comment text */ + readonly commentText?: string + /** @example 685cac2c4499ff1f308851e35d2b4357844d8927 */ + readonly lastReviewedCommit?: string + /** @example approved */ + readonly participantStatus?: string + } + readonly RestPullRequestMergeability: { + readonly conflicted?: boolean + /** @enum {string} */ + readonly outcome?: "CLEAN" | "CONFLICTED" | "UNKNOWN" + readonly vetoes?: readonly components["schemas"]["RestRepositoryHookVeto"][] + } + readonly RestPullRequestMergeConfig: { + readonly commitMessageTemplate?: { + /** @example Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName} */ + readonly body?: string + /** @example Pull request #${id}: ${title} */ + readonly title?: string + } + /** Format: int32 */ + readonly commitSummaries?: number + readonly defaultStrategy?: { + /** @example Always create a merge commit */ + readonly description?: string + readonly enabled?: boolean + /** @example --no-ff */ + readonly flag?: string + /** @example no-ff */ + readonly id?: string + readonly links?: Record + /** @example Merge commit */ + readonly name?: string + } + readonly strategies?: readonly components["schemas"]["RestPullRequestMergeStrategy"][] + /** @example repository */ + readonly type?: string + } + readonly RestPullRequestMergeRequest: { + /** @example false */ + readonly autoMerge?: boolean + /** @example (Optional, 5.7+) true to prepend an auto-generated subject to the message (default), or false to use the message as-is */ + readonly autoSubject?: string + /** @example (Optional) A descriptive message for the merge commit */ + readonly message?: string + /** @example (Optional) squash */ + readonly strategyId?: string + /** Format: int32 */ + readonly version?: number + } + readonly RestPullRequestMergeStrategy: { + /** @example Always create a merge commit */ + readonly description?: string + readonly enabled?: boolean + /** @example --no-ff */ + readonly flag?: string + /** @example no-ff */ + readonly id?: string + readonly links?: Record + /** @example Merge commit */ + readonly name?: string + } + readonly RestPullRequestParticipant: { + readonly approved?: boolean + /** @example 7549846524f8aed2bd1c0249993ae1bf9d3c9998 */ + readonly lastReviewedCommit?: string + /** @enum {string} */ + readonly role?: "AUTHOR" | "PARTICIPANT" | "REVIEWER" + /** @enum {string} */ + readonly status?: "APPROVED" | "NEEDS_WORK" | "UNAPPROVED" + readonly user?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + } + readonly RestPullRequestRebaseability: { + readonly vetoes?: readonly components["schemas"]["RestRepositoryHookVeto"][] + } + readonly RestPullRequestRebaseRequest: { + /** + * Format: int32 + * @example 1 + */ + readonly version?: number + } + readonly RestPullRequestRebaseResult: { + readonly refChange?: { + /** @example 6053a1eaa1c009dd11092d09a72f3c41af1b59ad */ + readonly fromHash?: string + readonly ref?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** @example refs/heads/master */ + readonly refId?: string + /** @example d6edcbf924697ab811a867421dab60d954ccad99 */ + readonly toHash?: string + /** @enum {string} */ + readonly type?: "ADD" | "DELETE" | "UPDATE" + } + } + readonly RestPullRequestRef: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly RestPullRequestReopenRequest: { + /** Format: int32 */ + readonly version?: number + } + readonly RestPullRequestSettings: { + readonly mergeConfig?: { + readonly commitMessageTemplate?: { + /** @example Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName} */ + readonly body?: string + /** @example Pull request #${id}: ${title} */ + readonly title?: string + } + /** Format: int32 */ + readonly commitSummaries?: number + readonly defaultStrategy?: { + /** @example Always create a merge commit */ + readonly description?: string + readonly enabled?: boolean + /** @example --no-ff */ + readonly flag?: string + /** @example no-ff */ + readonly id?: string + readonly links?: Record + /** @example Merge commit */ + readonly name?: string + } + readonly strategies?: readonly components["schemas"]["RestPullRequestMergeStrategy"][] + /** @example repository */ + readonly type?: string + } + } + readonly RestPullRequestSuggestion: { + /** + * Format: int64 + * @example 1359075920 + */ + readonly changeTme?: number + readonly fromRef?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly refChange?: { + /** @example 6053a1eaa1c009dd11092d09a72f3c41af1b59ad */ + readonly fromHash?: string + readonly ref?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** @example refs/heads/master */ + readonly refId?: string + /** @example d6edcbf924697ab811a867421dab60d954ccad99 */ + readonly toHash?: string + /** @enum {string} */ + readonly type?: "ADD" | "DELETE" | "UPDATE" + } + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + readonly toRef?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + } + readonly RestPushRefChange: { + /** @example 6053a1eaa1c009dd11092d09a72f3c41af1b59ad */ + readonly fromHash?: string + readonly ref?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** @example refs/heads/master */ + readonly refId?: string + /** @example d6edcbf924697ab811a867421dab60d954ccad99 */ + readonly toHash?: string + /** @enum {string} */ + readonly type?: "ADD" | "DELETE" | "UPDATE" + /** @enum {string} */ + readonly updatedType?: "FORCED" | "NOT_FORCED" | "UNKNOWN" | "UNRESOLVED" + } + readonly RestRateLimitSettings: { + readonly defaultSettings?: { + /** + * Format: int32 + * @example 60 + */ + readonly capacity?: number + /** + * Format: int32 + * @example 5 + */ + readonly fillRate?: number + } + readonly enabled?: boolean + } + readonly RestRawAccessToken: { + /** Format: date-time */ + readonly createdDate?: string + /** @example 252973515069 */ + readonly id?: string + /** @example My access token */ + readonly name?: string + /** @example MjUyOTczNTE1MDY5On2rDbID2EgYpH8AVOECHv0saruQ */ + readonly token?: string + } + readonly RestRefChange: { + /** @example 6053a1eaa1c009dd11092d09a72f3c41af1b59ad */ + readonly fromHash?: string + readonly ref?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** @example refs/heads/master */ + readonly refId?: string + /** @example d6edcbf924697ab811a867421dab60d954ccad99 */ + readonly toHash?: string + /** @enum {string} */ + readonly type?: "ADD" | "DELETE" | "UPDATE" + } + readonly RestRefMatcher: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + readonly RestRefMatcherType: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + readonly RestRefRestriction: { + readonly accessKeys?: readonly components["schemas"]["RestSshAccessKey"][] + /** @example [ + * "group_a", + * "group_b" + * ] */ + readonly groups?: readonly string[] + /** + * Format: int32 + * @example 1 + */ + readonly id?: number + readonly matcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + readonly scope?: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + /** @example pull-request-only */ + readonly type?: string + readonly users?: readonly components["schemas"]["RestApplicationUser"][] + } + readonly RestRefSyncQueue: { + readonly values?: readonly components["schemas"]["RestFarmSynchronizationRequest"][] + } + readonly RestRefSyncRequest: { + /** + * @example MERGE + * @enum {string} + */ + readonly action?: "DISCARD" | "MERGE" | "REBASE" + readonly context?: components["schemas"]["Context"] + /** @example refs/heads/master */ + readonly refId?: string + } + readonly RestRefSyncStatus: { + readonly aheadRefs?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly state?: "AHEAD" | "DIVERGED" | "ORPHANED" + readonly tag?: boolean + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly available?: boolean + readonly divergedRefs?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly state?: "AHEAD" | "DIVERGED" | "ORPHANED" + readonly tag?: boolean + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly enabled?: boolean + /** @example 1331038800000 */ + readonly lastSync?: number + readonly orphanedRefs?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly state?: "AHEAD" | "DIVERGED" | "ORPHANED" + readonly tag?: boolean + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + } + readonly RestRejectedRef: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly state?: "AHEAD" | "DIVERGED" | "ORPHANED" + readonly tag?: boolean + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly RestRelatedLinks: unknown + readonly RestRepositoriesExportRequest: { + readonly includes: readonly components["schemas"]["RestRepositorySelector"][] + } + readonly RestRepository: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + readonly RestRepositoryHook: { + readonly configured?: boolean + readonly details?: components["schemas"]["RepositoryHookDetails"] + readonly enabled?: boolean + readonly scope?: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + } + readonly RestRepositoryHookVeto: { + /** @example You have insufficient permissions to rebase 'refs/heads/feature-branch'. */ + readonly detailedMessage?: string + /** @example Insufficient branch permissions */ + readonly summaryMessage?: string + } + readonly RestRepositoryMirrorEvent: { + /** + * Format: int32 + * @example 42 + */ + readonly mirrorRepoId?: number + /** @enum {string} */ + readonly type?: "SYNCHRONIZATION_FAILED" | "SYNCHRONIZED" + /** @example 24 */ + readonly upstreamRepoId?: string + } + readonly RestRepositoryPolicy: { + /** + * @description The permission required to delete repositories. Must be one of: "SYS_ADMIN", "ADMIN", "PROJECT_ADMIN", "REPO_ADMIN". + * @example ADMIN + * @enum {string} + */ + readonly permission?: + | "ADMIN" + | "PROJECT_ADMIN" + | "REPO_ADMIN" + | "SYS_ADMIN" + } + readonly RestRepositoryPullRequestSettings: { + readonly mergeConfig?: { + readonly commitMessageTemplate?: { + /** @example Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName} */ + readonly body?: string + /** @example Pull request #${id}: ${title} */ + readonly title?: string + } + /** Format: int32 */ + readonly commitSummaries?: number + readonly defaultStrategy?: { + /** @example Always create a merge commit */ + readonly description?: string + readonly enabled?: boolean + /** @example --no-ff */ + readonly flag?: string + /** @example no-ff */ + readonly id?: string + readonly links?: Record + /** @example Merge commit */ + readonly name?: string + } + readonly strategies?: readonly components["schemas"]["RestPullRequestMergeStrategy"][] + /** @example repository */ + readonly type?: string + } + readonly requiredAllApprovers?: boolean + readonly requiredAllTasksComplete?: boolean + readonly requiredApprovers?: { + /** @example 3 */ + readonly count?: string + /** @example true */ + readonly enabled?: boolean + } + /** Format: int32 */ + readonly requiredApproversDeprecated?: number + readonly requiredSuccessfulBuilds?: { + /** @example 3 */ + readonly count?: string + /** @example true */ + readonly enabled?: boolean + } + /** Format: int32 */ + readonly requiredSuccessfulBuildsDeprecated?: number + } + readonly RestRepositoryRefChangeActivity: { + /** + * Format: int64 + * @example 19990759200 + */ + readonly createdDate?: number + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly refChange?: { + /** @example 6053a1eaa1c009dd11092d09a72f3c41af1b59ad */ + readonly fromHash?: string + readonly ref?: { + /** @example master */ + readonly displayId?: string + /** @example refs/heads/master */ + readonly id?: string + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** @example refs/heads/master */ + readonly refId?: string + /** @example d6edcbf924697ab811a867421dab60d954ccad99 */ + readonly toHash?: string + /** @enum {string} */ + readonly type?: "ADD" | "DELETE" | "UPDATE" + /** @enum {string} */ + readonly updatedType?: + | "FORCED" + | "NOT_FORCED" + | "UNKNOWN" + | "UNRESOLVED" + } + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @example push */ + readonly trigger?: string + readonly user?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + } + readonly RestRepositorySelector: { + /** @example PRJ */ + readonly projectKey?: string + /** @example my-repo */ + readonly slug?: string + } + readonly RestRequiredBuildCondition: { + /** + * @description A non-empty list of build parent keys that require green builds for this merge check to pass + * @example [ + * "build-key-1", + * "build-key-2" + * ] + */ + readonly buildParentKeys?: readonly string[] + readonly exemptRefMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + /** + * Format: int64 + * @example 15 + */ + readonly id?: number + readonly refMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + } + readonly RestRequiredBuildConditionSetRequest: { + /** + * @description A non-empty list of build parent keys that require green builds for this merge check to pass + * @example [ + * "build-key-1", + * "build-key-2" + * ] + */ + readonly buildParentKeys: readonly string[] + readonly exemptRefMatcher?: components["schemas"]["RestRefMatcher"] + readonly refMatcher: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + } + readonly RestRestrictionRequest: { + /** @example [ + * 1, + * 2, + * 3 + * ] */ + readonly accessKeyIds?: readonly number[] + readonly accessKeys?: readonly components["schemas"]["RestSshAccessKey"][] + /** @example [ + * "bitbucket-developers" + * ] */ + readonly groupNames?: readonly string[] + /** @example [ + * "group_a", + * "group_b" + * ] */ + readonly groups?: readonly string[] + /** + * Format: int32 + * @example 1 + */ + readonly id?: number + readonly matcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + readonly scope?: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + /** @example pull-request-only */ + readonly type?: string + readonly users?: readonly components["schemas"]["RestApplicationUser"][] + /** @example [ + * "bman", + * "tstark", + * "hulk" + * ] */ + readonly userSlugs?: readonly string[] + } + readonly RestReviewerGroup: { + readonly avatarUrl?: string + /** @example null */ + readonly description?: string + /** Format: int64 */ + readonly id?: number + /** @example name */ + readonly name?: string + readonly scope?: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + readonly users?: readonly components["schemas"]["ApplicationUser"][] + } + readonly RestRollingUpgradeState: { + /** @example true */ + readonly rollingUpgradeEnabled?: boolean + /** @example 9.0.0 */ + readonly version?: string + } + readonly RestScope: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + readonly RestScopesExample: { + readonly links?: Record + readonly scopes?: readonly Record[] + } + readonly RestSecretScanningAllowlistRule: { + /** + * Format: int64 + * @description The ID of the rule + * @example 7 + */ + readonly id?: number + /** + * @description If present, regular expression for matching a secret on a code line + * @example (BBDC-[a-zA-Z0-9+]{44}) + */ + readonly lineRegex?: string + /** + * @description Human readable name for the rule + * @example Bitbucket DC HTTP access token + */ + readonly name?: string + /** + * @description If present, regular expression matching file names + * @example *.pem + */ + readonly pathRegex?: string + } + readonly RestSecretScanningAllowlistRuleSetRequest: { + /** + * @description Regular expression for matching a secret on a code line + * @example (BBDC-[a-zA-Z0-9+]{44}) + */ + readonly lineRegex?: string + /** + * @description Human readable name for the rule + * @example Bitbucket DC HTTP access token + */ + readonly name?: string + /** + * @description Regular expression matching file names + * @example *.pem + */ + readonly pathRegex?: string + } + readonly RestSecretScanningRule: { + /** + * Format: int64 + * @description The ID of the rule + * @example 7 + */ + readonly id?: number + /** + * @description If present, regular expression for matching a secret on a code line + * @example (BBDC-[a-zA-Z0-9+]{44}) + */ + readonly lineRegex?: string + /** + * @description Human readable name for the rule + * @example Bitbucket DC HTTP access token + */ + readonly name?: string + /** + * @description If present, regular expression matching file names + * @example *.pem + */ + readonly pathRegex?: string + /** @description The scope in which this rule was configured for. */ + readonly scope?: { + /** + * Format: int32 + * @example 2 + */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + } + readonly RestSecretScanningRuleSetRequest: { + /** + * @description Regular expression for matching a secret on a code line + * @example (BBDC-[a-zA-Z0-9+]{44}) + */ + readonly lineRegex?: string + /** + * @description Human readable name for the rule + * @example Bitbucket DC HTTP access token + */ + readonly name?: string + /** + * @description Regular expression matching file names + * @example *.pem + */ + readonly pathRegex?: string + } + readonly RestSetInsightReportRequest: { + readonly coverageProviderKey?: string + /** + * Format: int64 + * @example 1630041546433 + */ + readonly createdDate?: number + readonly data: readonly components["schemas"]["RestInsightReportData"][] + /** @example This is the details of the report, it can be a longer string describing the report. */ + readonly details?: string + /** @example http://insight.example.com */ + readonly link?: string + /** @example http://insight.example.com/logo */ + readonly logoUrl?: string + /** @example Reporter/tool that produced this report */ + readonly reporter?: string + /** @example PASS */ + readonly result?: string + /** @example report.title */ + readonly title: string + } + readonly RestSingleAddInsightAnnotationRequest: { + /** @example message-1 */ + readonly externalId?: string + /** + * Format: int32 + * @example 4 + */ + readonly line?: number + /** @example https://link.to.tool/that/produced/annotation/message-1 */ + readonly link?: string + /** @example This is a bug here because reasons */ + readonly message: string + /** @example path/to/file/in/repo */ + readonly path?: string + /** @example MEDIUM */ + readonly severity: string + /** @example CODE_SMELL */ + readonly type?: string + } + readonly RestSshAccessKey: { + readonly key?: { + readonly algorithmType?: string + /** Format: int32 */ + readonly bitLength?: number + /** Format: date-time */ + readonly createdDate?: string + /** + * Format: int32 + * @example 30 + */ + readonly expiryDays?: number + /** @example Cbg38r+gDCiNHqBk6Y1BKO+EvufFBqhFWIEXh8oq9MI */ + readonly fingerprint?: string + /** + * Format: int32 + * @example 1 + */ + readonly id?: number + /** @example me@127.0.0.1 */ + readonly label?: string + /** @example 1630041546434 */ + readonly lastAuthenticated?: string + /** @example ssh-rsa AAAAB3... me@127.0.0.1 */ + readonly text?: string + } + /** @enum {string} */ + readonly permission?: + | "ADMIN" + | "LICENSED_USER" + | "PROJECT_ADMIN" + | "PROJECT_CREATE" + | "PROJECT_READ" + | "PROJECT_VIEW" + | "PROJECT_WRITE" + | "REPO_ADMIN" + | "REPO_CREATE" + | "REPO_READ" + | "REPO_WRITE" + | "SYS_ADMIN" + | "USER_ADMIN" + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + } + readonly RestSshAccessKeyLocations: { + readonly projects?: components["schemas"]["RestProject"] + readonly repositories?: components["schemas"]["RestRepository"] + } + readonly RestSshCredentials: { + /** + * @description The key algorithm, if passing in a legacy X.509 encoded key. Do not specify for OpenSSH encoded keys + * @example RSA + */ + readonly algorithm?: string + /** + * @description The public key text in the OpenSSH format. The algorithm must be specified in case of the legacy X.509 keys + * @example ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKjFjYCLJjrIY/jCXPbJ9wd3drcGospvPkKFNZ1ZcacA test@test.local + */ + readonly publicKey: string + /** @example git */ + readonly username?: string + } + readonly RestSshKey: { + readonly algorithmType?: string + /** Format: int32 */ + readonly bitLength?: number + /** Format: date-time */ + readonly createdDate?: string + /** + * Format: int32 + * @example 30 + */ + readonly expiryDays?: number + /** @example Cbg38r+gDCiNHqBk6Y1BKO+EvufFBqhFWIEXh8oq9MI */ + readonly fingerprint?: string + /** + * Format: int32 + * @example 1 + */ + readonly id?: number + /** @example me@127.0.0.1 */ + readonly label?: string + /** @example 1630041546434 */ + readonly lastAuthenticated?: string + /** @example ssh-rsa AAAAB3... me@127.0.0.1 */ + readonly text?: string + } + readonly RestSshKeySettings: { + readonly keyTypeRestrictions?: readonly components["schemas"]["RestSshKeyTypeRestriction"][] + readonly maxExpiryDays?: { + /** Format: int32 */ + readonly asInt?: number + readonly present?: boolean + } + } + readonly RestSshKeyTypeRestriction: { + /** @example RSA */ + readonly algorithm?: string + /** @example true */ + readonly allowed?: boolean + /** @example 2048 */ + readonly minKeyLength?: { + /** Format: int32 */ + readonly asInt?: number + readonly present?: boolean + } + } + readonly RestSshSettings: { + readonly accessKeysEnabled?: boolean + /** @example ssh://example.com */ + readonly baseUrl?: string + /** @example true */ + readonly enabled?: boolean + readonly fingerprint?: components["schemas"]["SimpleSshKeyFingerprint"] + /** + * Format: int32 + * @example 7999 + */ + readonly port?: number + } + readonly RestSyncProgress: { + readonly discovering?: boolean + /** Format: int32 */ + readonly syncedRepos?: number + /** Format: int32 */ + readonly totalRepos?: number + } + readonly RestSystemSigningConfiguration: { + /** @example false */ + readonly enabled?: boolean + } + readonly RestTag: { + /** @example master */ + readonly displayId?: string + /** @example 8d51122def5632836d1cb1026e879069e10a1e13 */ + readonly hash?: string + /** @example refs/heads/master */ + readonly id?: string + /** @example 8d51122def5632836d1cb1026e879069e10a1e13 */ + readonly latestChangeset?: string + /** @example 8d51122def5632836d1cb1026e879069e10a1e13 */ + readonly latestCommit?: string + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly RestTestResults: { + /** + * Format: int32 + * @example 1 + */ + readonly failed?: number + /** + * Format: int32 + * @example 5 + */ + readonly skipped?: number + /** + * Format: int32 + * @example 134 + */ + readonly successful?: number + } + readonly RestTokenBucketSettings: { + /** + * Format: int32 + * @example 60 + */ + readonly capacity?: number + /** + * Format: int32 + * @example 5 + */ + readonly fillRate?: number + } + readonly RestUpstreamServer: { + /** @example https://bitbucket.example.com */ + readonly baseUrl?: string + /** @example f76a35c5-4592-425d-bf85-b4d9db68e809 */ + readonly id?: string + /** + * @example INSTALLED + * @enum {string} + */ + readonly state?: + | "INITIALIZING" + | "INSTALLED" + | "PENDING" + | "REMOVED" + | "UNKNOWN" + } + readonly RestUpstreamSettings: { + /** @enum {string} */ + readonly mode?: "ALL_PROJECTS" | "SELECTED_PROJECTS" + readonly projectIds?: readonly string[] + } + readonly RestUserDirectory: { + /** @example true */ + readonly active?: boolean + /** @example This directory has users that are able to access Bitbucket DC */ + readonly description?: string + /** @example Bitbucket Internal Directory */ + readonly name?: string + /** @example Crowd */ + readonly type?: string + } + readonly RestUsernamePasswordCredentials: { + /** @example secr3t */ + readonly password: string + /** @example user1 */ + readonly username: string + } + readonly RestUserRateLimitSettings: { + readonly settings?: { + /** + * Format: int32 + * @example 60 + */ + readonly capacity?: number + /** + * Format: int32 + * @example 5 + */ + readonly fillRate?: number + } + readonly user?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + readonly whitelisted?: boolean + } + readonly RestUserRateLimitSettingsUpdateRequest: { + readonly settings?: { + /** + * Format: int32 + * @example 60 + */ + readonly capacity?: number + /** + * Format: int32 + * @example 5 + */ + readonly fillRate?: number + } + readonly whitelisted?: boolean + } + readonly RestUserReaction: { + readonly comment?: { + readonly anchor?: { + /** @enum {string} */ + readonly diffType?: "COMMIT" | "EFFECTIVE" | "RANGE" + /** @enum {string} */ + readonly fileType?: "FROM" | "TO" + /** @example 62a0505e8204115b8b9c8a95bfa264a8c0896a93 */ + readonly fromHash?: string + /** + * Format: int32 + * @example 98 + */ + readonly line?: number + readonly lineComment?: boolean + /** @enum {string} */ + readonly lineType?: "ADDED" | "CONTEXT" | "REMOVED" + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly pullRequest?: { + readonly closed?: boolean + /** + * Format: int64 + * @example 19990759200 + */ + readonly closedDate?: number + /** + * Format: int64 + * @example 13590759200 + */ + readonly createdDate?: number + /** @example It is a kludge, but put the tuple from the database in the cache. */ + readonly description?: string + readonly descriptionAsHtml?: string + readonly draft?: boolean + readonly fromRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly htmlDescription?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly links?: Record + readonly locked?: boolean + readonly open?: boolean + readonly participants?: readonly components["schemas"]["RestPullRequestParticipant"][] + readonly reviewers?: readonly components["schemas"]["RestPullRequestParticipant"][] + /** @enum {string} */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" + /** @example Talking Nerdy */ + readonly title?: string + readonly toRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** + * Format: int64 + * @example 14490759200 + */ + readonly updatedDate?: number + /** Format: int32 */ + readonly version?: number + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @example 3cdd5d19178a54d2e51b5098d43b57571241d0ab */ + readonly toHash?: string + } + readonly anchored?: boolean + readonly author?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + readonly comments?: readonly components["schemas"]["RestComment"][] + /** + * Format: int64 + * @example 1359075920 + */ + readonly createdDate?: number + readonly html?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly parent?: { + readonly anchor?: { + /** @enum {string} */ + readonly diffType?: "COMMIT" | "EFFECTIVE" | "RANGE" + /** @enum {string} */ + readonly fileType?: "FROM" | "TO" + /** @example 62a0505e8204115b8b9c8a95bfa264a8c0896a93 */ + readonly fromHash?: string + /** + * Format: int32 + * @example 98 + */ + readonly line?: number + readonly lineComment?: boolean + /** @enum {string} */ + readonly lineType?: "ADDED" | "CONTEXT" | "REMOVED" + readonly path?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + readonly pullRequest?: { + readonly closed?: boolean + /** + * Format: int64 + * @example 19990759200 + */ + readonly closedDate?: number + /** + * Format: int64 + * @example 13590759200 + */ + readonly createdDate?: number + /** @example It is a kludge, but put the tuple from the database in the cache. */ + readonly description?: string + readonly descriptionAsHtml?: string + readonly draft?: boolean + readonly fromRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + readonly htmlDescription?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly links?: Record + readonly locked?: boolean + readonly open?: boolean + readonly participants?: readonly components["schemas"]["RestPullRequestParticipant"][] + readonly reviewers?: readonly components["schemas"]["RestPullRequestParticipant"][] + /** @enum {string} */ + readonly state?: "DECLINED" | "MERGED" | "OPEN" + /** @example Talking Nerdy */ + readonly title?: string + readonly toRef?: { + /** @example feature-ABC-1233 */ + readonly displayId?: string + /** @example refs/heads/feature-ABC-123 */ + readonly id?: string + /** @example babecafebabecafebabecafebabecafebabecafe */ + readonly latestCommit?: string + readonly repository?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + readonly origin?: { + readonly archived?: boolean + /** @example main */ + readonly defaultBranch?: string + /** @example My repo description */ + readonly description?: string + readonly forkable?: boolean + /** @example e3c939f9ef4a7fae272e */ + readonly hierarchyId?: string + /** Format: int32 */ + readonly id?: number + readonly links?: Record + /** @example My repo */ + readonly name?: string + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** Format: int32 */ + readonly partition?: number + readonly project?: { + readonly avatar?: string + readonly avatarUrl?: string + /** @example The description for my cool project */ + readonly description?: string + /** Format: int32 */ + readonly id?: number + /** @example PRJ */ + readonly key: string + readonly links?: Record + /** @example My Cool Project */ + readonly name?: string + readonly public?: boolean + /** @example PROJECT */ + readonly scope?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "PERSONAL" + } + readonly public?: boolean + readonly relatedLinks?: Record + /** @example git */ + readonly scmId?: string + /** @example REPOSITORY */ + readonly scope?: string + /** @example my-repo */ + readonly slug?: string + /** @enum {string} */ + readonly state?: + | "AVAILABLE" + | "INITIALISATION_FAILED" + | "INITIALISING" + | "OFFLINE" + /** @example Available */ + readonly statusMessage?: string + } + /** @enum {string} */ + readonly type?: "BRANCH" | "TAG" + } + /** + * Format: int64 + * @example 14490759200 + */ + readonly updatedDate?: number + /** Format: int32 */ + readonly version?: number + } + readonly srcPath?: { + /** @example [ + * "path", + * "to", + * "file.txt" + * ] */ + readonly components?: readonly string[] + /** @example txt */ + readonly extension?: string + /** @example file.txt */ + readonly name?: string + /** @example path/to */ + readonly parent?: string + } + /** @example 3cdd5d19178a54d2e51b5098d43b57571241d0ab */ + readonly toHash?: string + } + readonly anchored?: boolean + readonly author?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + readonly comments?: readonly components["schemas"]["RestComment"][] + /** + * Format: int64 + * @example 1359075920 + */ + readonly createdDate?: number + readonly html?: string + /** + * Format: int64 + * @example 1 + */ + readonly id?: number + readonly pending?: boolean + readonly properties?: Record + readonly reply?: boolean + /** + * Format: int64 + * @example 1239075920 + */ + readonly resolvedDate?: number + readonly resolver?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + /** @example NORMAL */ + readonly severity?: string + /** @example OPEN */ + readonly state?: string + /** @example An insightful comment. */ + readonly text?: string + /** @description Indicates if this comment thread has been marked as resolved or not */ + readonly threadResolved?: boolean + /** + * Format: int64 + * @example 1569075920 + */ + readonly threadResolvedDate?: number + readonly threadResolver?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + /** + * Format: int64 + * @example 1449075920 + */ + readonly updatedDate?: number + /** + * Format: int32 + * @example 1 + */ + readonly version?: number + } + readonly pending?: boolean + readonly properties?: Record + readonly reply?: boolean + /** + * Format: int64 + * @example 1239075920 + */ + readonly resolvedDate?: number + readonly resolver?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + /** @example NORMAL */ + readonly severity?: string + /** @example OPEN */ + readonly state?: string + /** @example An insightful comment. */ + readonly text?: string + /** @description Indicates if this comment thread has been marked as resolved or not */ + readonly threadResolved?: boolean + /** + * Format: int64 + * @example 1569075920 + */ + readonly threadResolvedDate?: number + readonly threadResolver?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + /** + * Format: int64 + * @example 1449075920 + */ + readonly updatedDate?: number + /** + * Format: int32 + * @example 1 + */ + readonly version?: number + } + readonly emoticon?: { + readonly shortcut?: string + readonly url?: string + readonly value?: string + } + readonly user?: { + readonly active?: boolean + readonly avatarUrl?: string + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly emailAddress?: string + /** + * Format: int32 + * @example 101 + */ + readonly id?: number + readonly links?: Record + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen */ + readonly slug?: string + /** @enum {string} */ + readonly type?: "NORMAL" | "SERVICE" + } + } + readonly RestWebhook: { + readonly active?: boolean + readonly configuration?: Record + readonly credentials?: components["schemas"]["RestWebhookCredentials"] + readonly events?: readonly string[] + readonly name?: string + readonly scopeType?: string + readonly sslVerificationRequired?: boolean + readonly statistics?: Record + readonly url?: string + } + readonly RestWebhookCredentials: { + readonly password?: string + readonly username?: string + } + readonly RestWebhookRequestResponse: unknown + readonly RestWebhookScope: { + readonly id?: string + readonly type?: string + } + readonly RestX509Certificate: { + /** + * @description The SHA-256 fingerprint of the X.509 certificate + * @example e5e8d632c0b86f5bd5ef9a0d55c58ba1fd7776f6bb7c35ca23d85d23281ce58f + */ + readonly fingerprint?: string + /** + * Format: int64 + * @description The ID of the X.509 certificate + * @example 7 + */ + readonly id?: number + } + readonly Scope: { + /** Format: int32 */ + readonly resourceId?: number + /** @enum {string} */ + readonly type?: "GLOBAL" | "PROJECT" | "REPOSITORY" + } + readonly SimpleSshKeyFingerprint: { + readonly algorithm?: string + readonly value?: string + } + readonly UserAndGroups: { + /** @example [ + * "group_a", + * "group_b" + * ] */ + readonly groups: readonly string[] + /** @example user */ + readonly user?: string + } + readonly UserPasswordUpdate: { + /** @example my-old-secret-password */ + readonly oldPassword?: string + /** @example my-secret-password */ + readonly password?: string + /** @example my-secret-password */ + readonly passwordConfirm?: string + } + readonly UserPickerContext: { + /** @example group_a */ + readonly context?: string + /** @example user_a */ + readonly itemName?: string + } + readonly UserRename: { + /** @example jcitizen */ + readonly name?: string + /** @example jcitizen-new */ + readonly newName?: string + } + readonly UserUpdate: { + /** @example Jane Citizen */ + readonly displayName?: string + /** @example jane@example.com */ + readonly email?: string + /** @example jcitizen */ + readonly name?: string + } + } + responses: never + parameters: never + requestBodies: never + headers: never + pathItems: never +} +export type SchemaAdminPasswordUpdate = + components["schemas"]["AdminPasswordUpdate"] +export type SchemaApplicationId = components["schemas"]["ApplicationId"] +export type SchemaApplicationUser = components["schemas"]["ApplicationUser"] +export type SchemaComment = components["schemas"]["Comment"] +export type SchemaCommentable = components["schemas"]["Commentable"] +export type SchemaCommentOperations = components["schemas"]["CommentOperations"] +export type SchemaCommentThread = components["schemas"]["CommentThread"] +export type SchemaCommentThreadDiffAnchor = + components["schemas"]["CommentThreadDiffAnchor"] +export type SchemaContext = components["schemas"]["Context"] +export type SchemaCredentials = components["schemas"]["Credentials"] +export type SchemaDiffContentFilter = components["schemas"]["DiffContentFilter"] +export type SchemaEnrichedRepository = + components["schemas"]["EnrichedRepository"] +export type SchemaExampleAvatarMultipartFormData = + components["schemas"]["ExampleAvatarMultipartFormData"] +export type SchemaExampleCertificateMultipartFormData = + components["schemas"]["ExampleCertificateMultipartFormData"] +export type SchemaExampleFiles = components["schemas"]["ExampleFiles"] +export type SchemaExampleJsonLastModifiedCallback = + components["schemas"]["ExampleJsonLastModifiedCallback"] +export type SchemaExampleMultipartFormData = + components["schemas"]["ExampleMultipartFormData"] +export type SchemaExamplePostMultipartFormData = + components["schemas"]["ExamplePostMultipartFormData"] +export type SchemaExamplePreviewMigration = + components["schemas"]["ExamplePreviewMigration"] +export type SchemaExamplePutMultipartFormData = + components["schemas"]["ExamplePutMultipartFormData"] +export type SchemaExampleRequirements = + components["schemas"]["ExampleRequirements"] +export type SchemaExampleSettings = components["schemas"]["ExampleSettings"] +export type SchemaExampleSettingsMap = + components["schemas"]["ExampleSettingsMap"] +export type SchemaExampleSocketAddress = + components["schemas"]["ExampleSocketAddress"] +export type SchemaExampleStatus = components["schemas"]["ExampleStatus"] +export type SchemaFileListResource = components["schemas"]["FileListResource"] +export type SchemaFilePart = components["schemas"]["FilePart"] +export type SchemaGroup = components["schemas"]["Group"] +export type SchemaGroupAndUsers = components["schemas"]["GroupAndUsers"] +export type SchemaGroupPickerContext = + components["schemas"]["GroupPickerContext"] +export type SchemaOptionalBodyBeanParam = + components["schemas"]["OptionalBodyBeanParam"] +export type SchemaPageRequestImpl = components["schemas"]["PageRequestImpl"] +export type SchemaProject = components["schemas"]["Project"] +export type SchemaPropertyMap = components["schemas"]["PropertyMap"] +export type SchemaPullRequest = components["schemas"]["PullRequest"] +export type SchemaPullRequestParticipant = + components["schemas"]["PullRequestParticipant"] +export type SchemaPullRequestRef = components["schemas"]["PullRequestRef"] +export type SchemaRefType = components["schemas"]["RefType"] +export type SchemaRepository = components["schemas"]["Repository"] +export type SchemaRepositoryHookDetails = + components["schemas"]["RepositoryHookDetails"] +export type SchemaRestAccessToken = components["schemas"]["RestAccessToken"] +export type SchemaRestAccessTokenRequest = + components["schemas"]["RestAccessTokenRequest"] +export type SchemaRestAggregateRejectCounter = + components["schemas"]["RestAggregateRejectCounter"] +export type SchemaRestAnalyticsSettings = + components["schemas"]["RestAnalyticsSettings"] +export type SchemaRestAnnouncementBanner = + components["schemas"]["RestAnnouncementBanner"] +export type SchemaRestApplicationProperties = + components["schemas"]["RestApplicationProperties"] +export type SchemaRestApplicationUser = + components["schemas"]["RestApplicationUser"] +export type SchemaRestApplicationUserWithPermissions = + components["schemas"]["RestApplicationUserWithPermissions"] +export type SchemaRestApplySuggestionRequest = + components["schemas"]["RestApplySuggestionRequest"] +export type SchemaRestAttachmentMetadata = + components["schemas"]["RestAttachmentMetadata"] +export type SchemaRestAuthenticationRequest = + components["schemas"]["RestAuthenticationRequest"] +export type SchemaRestAutoDeclineSettings = + components["schemas"]["RestAutoDeclineSettings"] +export type SchemaRestAutoDeclineSettingsRequest = + components["schemas"]["RestAutoDeclineSettingsRequest"] +export type SchemaRestAutoMergeProcessingResult = + components["schemas"]["RestAutoMergeProcessingResult"] +export type SchemaRestAutoMergeProjectSettingsRequest = + components["schemas"]["RestAutoMergeProjectSettingsRequest"] +export type SchemaRestAutoMergeRequest = + components["schemas"]["RestAutoMergeRequest"] +export type SchemaRestAutoMergeRestrictedSettings = + components["schemas"]["RestAutoMergeRestrictedSettings"] +export type SchemaRestAutoMergeSettingsRequest = + components["schemas"]["RestAutoMergeSettingsRequest"] +export type SchemaRestBearerTokenCredentials = + components["schemas"]["RestBearerTokenCredentials"] +export type SchemaRestBitbucketLicense = + components["schemas"]["RestBitbucketLicense"] +export type SchemaRestBranch = components["schemas"]["RestBranch"] +export type SchemaRestBranchCreateRequest = + components["schemas"]["RestBranchCreateRequest"] +export type SchemaRestBranchDeleteRequest = + components["schemas"]["RestBranchDeleteRequest"] +export type SchemaRestBuildCapabilities = + components["schemas"]["RestBuildCapabilities"] +export type SchemaRestBuildStats = components["schemas"]["RestBuildStats"] +export type SchemaRestBuildStatus = components["schemas"]["RestBuildStatus"] +export type SchemaRestBuildStatusSetRequest = + components["schemas"]["RestBuildStatusSetRequest"] +export type SchemaRestBulkAddInsightAnnotationRequest = + components["schemas"]["RestBulkAddInsightAnnotationRequest"] +export type SchemaRestBulkUserRateLimitSettingsUpdateRequest = + components["schemas"]["RestBulkUserRateLimitSettingsUpdateRequest"] +export type SchemaRestChange = components["schemas"]["RestChange"] +export type SchemaRestChangeset = components["schemas"]["RestChangeset"] +export type SchemaRestClusterInformation = + components["schemas"]["RestClusterInformation"] +export type SchemaRestClusterNode = components["schemas"]["RestClusterNode"] +export type SchemaRestComment = components["schemas"]["RestComment"] +export type SchemaRestCommentJiraIssue = + components["schemas"]["RestCommentJiraIssue"] +export type SchemaRestCommentThreadDiffAnchor = + components["schemas"]["RestCommentThreadDiffAnchor"] +export type SchemaRestCommit = components["schemas"]["RestCommit"] +export type SchemaRestCommitMessageSuggestion = + components["schemas"]["RestCommitMessageSuggestion"] +export type SchemaRestConflict = components["schemas"]["RestConflict"] +export type SchemaRestConflictChange = + components["schemas"]["RestConflictChange"] +export type SchemaRestConnectivitySummary = + components["schemas"]["RestConnectivitySummary"] +export type SchemaRestCreateBranchRequest = + components["schemas"]["RestCreateBranchRequest"] +export type SchemaRestCreateTagRequest = + components["schemas"]["RestCreateTagRequest"] +export type SchemaRestDefaultBranch = components["schemas"]["RestDefaultBranch"] +export type SchemaRestDefaultReviewersRequest = + components["schemas"]["RestDefaultReviewersRequest"] +export type SchemaRestDefaultTask = components["schemas"]["RestDefaultTask"] +export type SchemaRestDefaultTaskRequest = + components["schemas"]["RestDefaultTaskRequest"] +export type SchemaRestDeployment = components["schemas"]["RestDeployment"] +export type SchemaRestDeploymentEnvironment = + components["schemas"]["RestDeploymentEnvironment"] +export type SchemaRestDeploymentSetRequest = + components["schemas"]["RestDeploymentSetRequest"] +export type SchemaRestDetailedGroup = components["schemas"]["RestDetailedGroup"] +export type SchemaRestDetailedInvocation = + components["schemas"]["RestDetailedInvocation"] +export type SchemaRestDetailedUser = components["schemas"]["RestDetailedUser"] +export type SchemaRestDiff = components["schemas"]["RestDiff"] +export type SchemaRestDiffHunk = components["schemas"]["RestDiffHunk"] +export type SchemaRestDiffLine = components["schemas"]["RestDiffLine"] +export type SchemaRestDiffSegment = components["schemas"]["RestDiffSegment"] +export type SchemaRestDiffStatsSummary = + components["schemas"]["RestDiffStatsSummary"] +export type SchemaRestEmoticon = components["schemas"]["RestEmoticon"] +export type SchemaRestEnhancedEntityLink = + components["schemas"]["RestEnhancedEntityLink"] +export type SchemaRestErasedUser = components["schemas"]["RestErasedUser"] +export type SchemaRestErrorMessage = components["schemas"]["RestErrorMessage"] +export type SchemaRestErrors = components["schemas"]["RestErrors"] +export type SchemaRestExportRequest = components["schemas"]["RestExportRequest"] +export type SchemaRestFarmSynchronizationRequest = + components["schemas"]["RestFarmSynchronizationRequest"] +export type SchemaRestGitTagCreateRequest = + components["schemas"]["RestGitTagCreateRequest"] +export type SchemaRestGpgKey = components["schemas"]["RestGpgKey"] +export type SchemaRestGpgSubKey = components["schemas"]["RestGpgSubKey"] +export type SchemaRestHookScript = components["schemas"]["RestHookScript"] +export type SchemaRestHookScriptConfig = + components["schemas"]["RestHookScriptConfig"] +export type SchemaRestHookScriptTriggers = + components["schemas"]["RestHookScriptTriggers"] +export type SchemaRestImportRequest = components["schemas"]["RestImportRequest"] +export type SchemaRestInsightAnnotation = + components["schemas"]["RestInsightAnnotation"] +export type SchemaRestInsightAnnotationsResponse = + components["schemas"]["RestInsightAnnotationsResponse"] +export type SchemaRestInsightReport = components["schemas"]["RestInsightReport"] +export type SchemaRestInsightReportData = + components["schemas"]["RestInsightReportData"] +export type SchemaRestInvocationHistory = + components["schemas"]["RestInvocationHistory"] +export type SchemaRestInvocationRequest = + components["schemas"]["RestInvocationRequest"] +export type SchemaRestInvocationResult = + components["schemas"]["RestInvocationResult"] +export type SchemaRestJiraIssue = components["schemas"]["RestJiraIssue"] +export type SchemaRestJob = components["schemas"]["RestJob"] +export type SchemaRestJobMessage = components["schemas"]["RestJobMessage"] +export type SchemaRestLabel = components["schemas"]["RestLabel"] +export type SchemaRestLabelable = components["schemas"]["RestLabelable"] +export type SchemaRestLogLevel = components["schemas"]["RestLogLevel"] +export type SchemaRestMailConfiguration = + components["schemas"]["RestMailConfiguration"] +export type SchemaRestMarkup = components["schemas"]["RestMarkup"] +export type SchemaRestMeshConnectivityReport = + components["schemas"]["RestMeshConnectivityReport"] +export type SchemaRestMeshMigrationQueueStateCounts = + components["schemas"]["RestMeshMigrationQueueStateCounts"] +export type SchemaRestMeshMigrationRequest = + components["schemas"]["RestMeshMigrationRequest"] +export type SchemaRestMeshMigrationSummary = + components["schemas"]["RestMeshMigrationSummary"] +export type SchemaRestMeshNode = components["schemas"]["RestMeshNode"] +export type SchemaRestMigrationRepository = + components["schemas"]["RestMigrationRepository"] +export type SchemaRestMinimalCommit = components["schemas"]["RestMinimalCommit"] +export type SchemaRestMinimalRef = components["schemas"]["RestMinimalRef"] +export type SchemaRestMirroredRepository = + components["schemas"]["RestMirroredRepository"] +export type SchemaRestMirroredRepositoryDescriptor = + components["schemas"]["RestMirroredRepositoryDescriptor"] +export type SchemaRestMirrorHashes = components["schemas"]["RestMirrorHashes"] +export type SchemaRestMirroringRequest = + components["schemas"]["RestMirroringRequest"] +export type SchemaRestMirrorRepositorySynchronizationStatus = + components["schemas"]["RestMirrorRepositorySynchronizationStatus"] +export type SchemaRestMirrorServer = components["schemas"]["RestMirrorServer"] +export type SchemaRestMirrorUpgradeRequest = + components["schemas"]["RestMirrorUpgradeRequest"] +export type SchemaRestMultipleBuildStats = + components["schemas"]["RestMultipleBuildStats"] +export type SchemaRestNamedLink = components["schemas"]["RestNamedLink"] +export type SchemaRestNode = components["schemas"]["RestNode"] +export type SchemaRestNodeConnectivityReport = + components["schemas"]["RestNodeConnectivityReport"] +export type SchemaRestNodeConnectivitySummary = + components["schemas"]["RestNodeConnectivitySummary"] +export type SchemaRestPageRestChange = + components["schemas"]["RestPageRestChange"] +export type SchemaRestPath = components["schemas"]["RestPath"] +export type SchemaRestPermitted = components["schemas"]["RestPermitted"] +export type SchemaRestPermittedGroup = + components["schemas"]["RestPermittedGroup"] +export type SchemaRestPermittedUser = components["schemas"]["RestPermittedUser"] +export type SchemaRestPerson = components["schemas"]["RestPerson"] +export type SchemaRestProgress = components["schemas"]["RestProgress"] +export type SchemaRestProject = components["schemas"]["RestProject"] +export type SchemaRestProjectSettingsRestriction = + components["schemas"]["RestProjectSettingsRestriction"] +export type SchemaRestProjectSettingsRestrictionRequest = + components["schemas"]["RestProjectSettingsRestrictionRequest"] +export type SchemaRestProperties = components["schemas"]["RestProperties"] +export type SchemaRestPullRequest = components["schemas"]["RestPullRequest"] +export type SchemaRestPullRequestActivity = + components["schemas"]["RestPullRequestActivity"] +export type SchemaRestPullRequestAssignParticipantRoleRequest = + components["schemas"]["RestPullRequestAssignParticipantRoleRequest"] +export type SchemaRestPullRequestAssignStatusRequest = + components["schemas"]["RestPullRequestAssignStatusRequest"] +export type SchemaRestPullRequestCommitMessageTemplate = + components["schemas"]["RestPullRequestCommitMessageTemplate"] +export type SchemaRestPullRequestCondition = + components["schemas"]["RestPullRequestCondition"] +export type SchemaRestPullRequestDeclineRequest = + components["schemas"]["RestPullRequestDeclineRequest"] +export type SchemaRestPullRequestDeleteRequest = + components["schemas"]["RestPullRequestDeleteRequest"] +export type SchemaRestPullRequestFinishReviewRequest = + components["schemas"]["RestPullRequestFinishReviewRequest"] +export type SchemaRestPullRequestMergeability = + components["schemas"]["RestPullRequestMergeability"] +export type SchemaRestPullRequestMergeConfig = + components["schemas"]["RestPullRequestMergeConfig"] +export type SchemaRestPullRequestMergeRequest = + components["schemas"]["RestPullRequestMergeRequest"] +export type SchemaRestPullRequestMergeStrategy = + components["schemas"]["RestPullRequestMergeStrategy"] +export type SchemaRestPullRequestParticipant = + components["schemas"]["RestPullRequestParticipant"] +export type SchemaRestPullRequestRebaseability = + components["schemas"]["RestPullRequestRebaseability"] +export type SchemaRestPullRequestRebaseRequest = + components["schemas"]["RestPullRequestRebaseRequest"] +export type SchemaRestPullRequestRebaseResult = + components["schemas"]["RestPullRequestRebaseResult"] +export type SchemaRestPullRequestRef = + components["schemas"]["RestPullRequestRef"] +export type SchemaRestPullRequestReopenRequest = + components["schemas"]["RestPullRequestReopenRequest"] +export type SchemaRestPullRequestSettings = + components["schemas"]["RestPullRequestSettings"] +export type SchemaRestPullRequestSuggestion = + components["schemas"]["RestPullRequestSuggestion"] +export type SchemaRestPushRefChange = components["schemas"]["RestPushRefChange"] +export type SchemaRestRateLimitSettings = + components["schemas"]["RestRateLimitSettings"] +export type SchemaRestRawAccessToken = + components["schemas"]["RestRawAccessToken"] +export type SchemaRestRefChange = components["schemas"]["RestRefChange"] +export type SchemaRestRefMatcher = components["schemas"]["RestRefMatcher"] +export type SchemaRestRefMatcherType = + components["schemas"]["RestRefMatcherType"] +export type SchemaRestRefRestriction = + components["schemas"]["RestRefRestriction"] +export type SchemaRestRefSyncQueue = components["schemas"]["RestRefSyncQueue"] +export type SchemaRestRefSyncRequest = + components["schemas"]["RestRefSyncRequest"] +export type SchemaRestRefSyncStatus = components["schemas"]["RestRefSyncStatus"] +export type SchemaRestRejectedRef = components["schemas"]["RestRejectedRef"] +export type SchemaRestRelatedLinks = components["schemas"]["RestRelatedLinks"] +export type SchemaRestRepositoriesExportRequest = + components["schemas"]["RestRepositoriesExportRequest"] +export type SchemaRestRepository = components["schemas"]["RestRepository"] +export type SchemaRestRepositoryHook = + components["schemas"]["RestRepositoryHook"] +export type SchemaRestRepositoryHookVeto = + components["schemas"]["RestRepositoryHookVeto"] +export type SchemaRestRepositoryMirrorEvent = + components["schemas"]["RestRepositoryMirrorEvent"] +export type SchemaRestRepositoryPolicy = + components["schemas"]["RestRepositoryPolicy"] +export type SchemaRestRepositoryPullRequestSettings = + components["schemas"]["RestRepositoryPullRequestSettings"] +export type SchemaRestRepositoryRefChangeActivity = + components["schemas"]["RestRepositoryRefChangeActivity"] +export type SchemaRestRepositorySelector = + components["schemas"]["RestRepositorySelector"] +export type SchemaRestRequiredBuildCondition = + components["schemas"]["RestRequiredBuildCondition"] +export type SchemaRestRequiredBuildConditionSetRequest = + components["schemas"]["RestRequiredBuildConditionSetRequest"] +export type SchemaRestRestrictionRequest = + components["schemas"]["RestRestrictionRequest"] +export type SchemaRestReviewerGroup = components["schemas"]["RestReviewerGroup"] +export type SchemaRestRollingUpgradeState = + components["schemas"]["RestRollingUpgradeState"] +export type SchemaRestScope = components["schemas"]["RestScope"] +export type SchemaRestScopesExample = components["schemas"]["RestScopesExample"] +export type SchemaRestSecretScanningAllowlistRule = + components["schemas"]["RestSecretScanningAllowlistRule"] +export type SchemaRestSecretScanningAllowlistRuleSetRequest = + components["schemas"]["RestSecretScanningAllowlistRuleSetRequest"] +export type SchemaRestSecretScanningRule = + components["schemas"]["RestSecretScanningRule"] +export type SchemaRestSecretScanningRuleSetRequest = + components["schemas"]["RestSecretScanningRuleSetRequest"] +export type SchemaRestSetInsightReportRequest = + components["schemas"]["RestSetInsightReportRequest"] +export type SchemaRestSingleAddInsightAnnotationRequest = + components["schemas"]["RestSingleAddInsightAnnotationRequest"] +export type SchemaRestSshAccessKey = components["schemas"]["RestSshAccessKey"] +export type SchemaRestSshAccessKeyLocations = + components["schemas"]["RestSshAccessKeyLocations"] +export type SchemaRestSshCredentials = + components["schemas"]["RestSshCredentials"] +export type SchemaRestSshKey = components["schemas"]["RestSshKey"] +export type SchemaRestSshKeySettings = + components["schemas"]["RestSshKeySettings"] +export type SchemaRestSshKeyTypeRestriction = + components["schemas"]["RestSshKeyTypeRestriction"] +export type SchemaRestSshSettings = components["schemas"]["RestSshSettings"] +export type SchemaRestSyncProgress = components["schemas"]["RestSyncProgress"] +export type SchemaRestSystemSigningConfiguration = + components["schemas"]["RestSystemSigningConfiguration"] +export type SchemaRestTag = components["schemas"]["RestTag"] +export type SchemaRestTestResults = components["schemas"]["RestTestResults"] +export type SchemaRestTokenBucketSettings = + components["schemas"]["RestTokenBucketSettings"] +export type SchemaRestUpstreamServer = + components["schemas"]["RestUpstreamServer"] +export type SchemaRestUpstreamSettings = + components["schemas"]["RestUpstreamSettings"] +export type SchemaRestUserDirectory = components["schemas"]["RestUserDirectory"] +export type SchemaRestUsernamePasswordCredentials = + components["schemas"]["RestUsernamePasswordCredentials"] +export type SchemaRestUserRateLimitSettings = + components["schemas"]["RestUserRateLimitSettings"] +export type SchemaRestUserRateLimitSettingsUpdateRequest = + components["schemas"]["RestUserRateLimitSettingsUpdateRequest"] +export type SchemaRestUserReaction = components["schemas"]["RestUserReaction"] +export type SchemaRestWebhook = components["schemas"]["RestWebhook"] +export type SchemaRestWebhookCredentials = + components["schemas"]["RestWebhookCredentials"] +export type SchemaRestWebhookRequestResponse = + components["schemas"]["RestWebhookRequestResponse"] +export type SchemaRestWebhookScope = components["schemas"]["RestWebhookScope"] +export type SchemaRestX509Certificate = + components["schemas"]["RestX509Certificate"] +export type SchemaScope = components["schemas"]["Scope"] +export type SchemaSimpleSshKeyFingerprint = + components["schemas"]["SimpleSshKeyFingerprint"] +export type SchemaUserAndGroups = components["schemas"]["UserAndGroups"] +export type SchemaUserPasswordUpdate = + components["schemas"]["UserPasswordUpdate"] +export type SchemaUserPickerContext = components["schemas"]["UserPickerContext"] +export type SchemaUserRename = components["schemas"]["UserRename"] +export type SchemaUserUpdate = components["schemas"]["UserUpdate"] +export type $defs = Record +export interface operations { + readonly getAllAccessTokens: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing a page of access tokens and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestAccessToken"][] + } + } + } + /** @description The currently authenticated user is not permitted to get access tokens for this project or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createAccessToken: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The request containing the details of the access token to create. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAccessTokenRequest"] + } + } + readonly responses: { + /** @description A response containing the raw access token and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRawAccessToken"] + } + } + /** @description One of the following error cases occurred (check the error message for more details). + * + * - The request does not contain a token name + * - The request does not contain a list of permissions, or the list of permissions is empty + * - One of the provided permission levels are unknown + * - The project already has the maximum number of tokens + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to create an access token for this project or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getById: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The token id. */ + readonly tokenId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing the access token and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAccessToken"] + } + } + /** @description The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or token does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateAccessToken: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The token id. */ + readonly tokenId: string + } + readonly cookie?: never + } + /** @description The request containing the details of the access token to modify */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAccessTokenRequest"] + } + } + readonly responses: { + /** @description A response containing the updated access token and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAccessToken"] + } + } + /** @description One of the provided permission levels are unknown. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteById: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The token id. */ + readonly tokenId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the token has been deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or token does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllAccessTokens_1: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing a page of access tokens and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestAccessToken"][] + } + } + } + /** @description The currently authenticated user is not permitted to get access tokens for this repository or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createAccessToken_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The request containing the details of the access token to create. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAccessTokenRequest"] + } + } + readonly responses: { + /** @description A response containing the raw access token and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRawAccessToken"] + } + } + /** @description One of the following error cases occurred (check the error message for more details). + * + * - The request does not contain a token name- The request does not contain a list of permissions, or the list of permissions is empty- One of the provided permission levels are unknown- The repository already has the maximum number of tokens */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to create an access token for this repository or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getById_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The token id. */ + readonly tokenId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing the access token and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAccessToken"] + } + } + /** @description The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or token does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateAccessToken_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The token id. */ + readonly tokenId: string + } + readonly cookie?: never + } + /** @description The request containing the details of the access token to modify */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAccessTokenRequest"] + } + } + readonly responses: { + /** @description A response containing the updated access token and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAccessToken"] + } + } + /** @description One of the provided permission levels are unknown. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteById_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The token id. */ + readonly tokenId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the token has been deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or token does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllAccessTokens_2: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing a page of access tokens and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestAccessToken"][] + } + } + } + /** @description The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createAccessToken_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + /** @description The request containing the details of the access token to create. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAccessTokenRequest"] + } + } + readonly responses: { + /** @description A response containing the raw access token and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRawAccessToken"] + } + } + /** @description One of the following error cases occurred (check the error message for more details). + * + * - The request does not contain a token name + * - The request does not contain a list of permissions, or the list of permissions is empty + * - One of the provided permission levels are unknown + * - The user already has their maximum number of tokens + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to create an access token on behalf of this user or authentication failed */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getById_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The token id. */ + readonly tokenId: string + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing the access token and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAccessToken"] + } + } + /** @description The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or token does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateAccessToken_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The token id. */ + readonly tokenId: string + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + /** @description The request containing the details of the access token to modify */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAccessTokenRequest"] + } + } + readonly responses: { + /** @description A response containing the updated access token and associated details. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAccessToken"] + } + } + /** @description One of the provided permission levels are unknown. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteById_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The token id. */ + readonly tokenId: string + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the token has been deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or token does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getGlobalSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The global ssh key settings configuration. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshKeySettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the ssh keys global settings configuration. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateGlobalSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description A request containing expiry length to be set for SSH keys and a list of SSH key type restrictions. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestSshKeySettings"] + } + } + readonly responses: { + /** @description The ssh key global settings were updated. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was invalid, which may be due to: + * + * + * - attempted to set expiry to less than 1 day + * - attempted to set expiry using partial days + * - attempted to set a restriction on a key type which was invalid + * + * + * The exact reason for the error will be provided in the error message. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update these settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSupportedKeyTypes: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A list of supported SSH key algorithms and lengths. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve this list. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getBanner: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested banner */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAnnouncementBanner"] + } + } + /** @description There is no banner to display */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The user does not have permission to access the banner service through this endpoint */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setBanner: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": { + /** @enum {string} */ + readonly audience: "ALL" | "AUTHENTICATED" + readonly enabled?: boolean + readonly message?: string + } + } + } + readonly responses: { + /** @description The banner was set successfully */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description There was malformed or incorrect data in the provided JSON */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The user does not have permission to access the banner service through this endpoint */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteBanner: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The query executed successfully, whether a banner was deleted or not */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The user does not have permission to access the banner service through this endpoint */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getInformation: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing information about the cluster */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestClusterInformation"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the cluster information. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getDefaultBranch: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The configured global default branch. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description No global default branch has been configured. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setDefaultBranch: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": { + readonly id?: string + } + } + } + readonly responses: { + /** @description The default branch has been set. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The current user does not have sufficient permissions to configure the global default branch. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly clearDefaultBranch: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The default branch has been cleared. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The current user does not have sufficient permissions to clear the global default branch. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getControlPlanePublicKey: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The control plane PEM. */ + readonly 200: { + headers: Readonly> + content: { + readonly "text/plain": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestErrors"] + } + } + } + } + readonly connectivity: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The connectivity report between the Bitbucket node(s) and Mesh node(s). */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMeshConnectivityReport"] + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllRegisteredMeshNodes: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of registered Mesh nodes. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMeshNode"] + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly registerNewMeshNode: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The request specifying the new Mesh node. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestMeshNode"] + } + } + readonly responses: { + /** @description The newly registered Mesh node. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMeshNode"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRegisteredMeshNodeById: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the Mesh node. */ + readonly id: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The Mesh node that matches the ID. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMeshNode"] + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The Mesh node does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateMeshNode: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the Mesh node to update. */ + readonly id: string + } + readonly cookie?: never + } + /** @description The request specifying the updated Mesh node. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestMeshNode"] + } + } + readonly responses: { + /** @description The updated Mesh node. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMeshNode"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete_2: { + readonly parameters: { + readonly query?: { + readonly force?: boolean + } + readonly header?: never + readonly path: { + readonly id: number + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description default response */ + readonly default: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": unknown + } + } + } + } + readonly getSupportZips: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The support zips for all the Mesh nodes. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/octet-stream": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestErrors"] + } + } + } + } + readonly getSupportZip: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the Mesh node. */ + readonly id: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The support zip for the Mesh node that matches the ID. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/octet-stream": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestErrors"] + } + } + /** @description The Mesh node does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestErrors"] + } + } + } + } + readonly getGroups_1: { + readonly parameters: { + readonly query?: { + /** @description If specified only group names containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of groups. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDetailedGroup"][] + } + } + } + /** @description The currently authenticated user is not a licensed user. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createGroup: { + readonly parameters: { + readonly query: { + /** @description Name of the group. */ + readonly name: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The newly created group. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDetailedGroup"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not an administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description A group with this name already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteGroup: { + readonly parameters: { + readonly query: { + /** @description The name identifying the group to delete. */ + readonly name: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The deleted group. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDetailedGroup"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user does not have the ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as the authenticated user has a lower permission level than the group being deleted. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would lower the authenticated user's permission level. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addUserToGroup: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["UserPickerContext"] + } + } + readonly responses: { + /** @description The user was added to the group. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The authenticated user does not have the ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addUsersToGroup: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["GroupAndUsers"] + } + } + readonly responses: { + /** @description All the users were added to the group */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The authenticated user does not have the ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findUsersInGroup: { + readonly parameters: { + readonly query: { + /** @description The group which should be used to locate members. */ + readonly context: string + /** @description If specified only users with usernames, display names or email addresses containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDetailedUser"][] + } + } + } + /** @description The currently authenticated user is not a licensed user. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findUsersNotInGroup: { + readonly parameters: { + readonly query: { + /** @description The group which should be used to locate members. */ + readonly context: string + /** @description If specified only users with usernames, display names or email addresses containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDetailedUser"][] + } + } + } + /** @description The currently authenticated user is not a licensed user. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly removeUserFromGroup: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["UserPickerContext"] + } + } + readonly responses: { + /** @description The user was removed from the group. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The authenticated user does not have the ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as the group has a higher permission level than the context user. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly get_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The currently-installed license. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestBitbucketLicense"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the license, or the request is anonymous. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No license has been installed. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateLicense: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description a JSON payload containing the encoded license to apply */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestBitbucketLicense"] + } + } + readonly responses: { + /** @description The newly-installed license. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestBitbucketLicense"] + } + } + /** @description No encoded license was provided in the JSON body for the POST. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update the license. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The encoded license could not be decoded, or it is not valid for use on this server. Some possible reasons a license may not be applied include: it may be for a different product, it may have already expired, or this Bitbucket version doesn't support Server licenses. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMailConfig: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The mail configuration */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMailConfiguration"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the mail configuration. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The mail server hasn't been configured */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setMailConfig: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": { + /** @example smtp.example.com */ + readonly hostname?: string + /** @example password */ + readonly password?: string + /** + * Format: int32 + * @example 465 + */ + readonly port?: number + /** @enum {string} */ + readonly protocol?: "SMTP" | "SMTPS" + readonly requireStartTls?: boolean + /** @example stash-no-reply@company.com */ + readonly senderAddress?: string + /** @example user */ + readonly username?: string + readonly useStartTls?: boolean + } + } + } + readonly responses: { + /** @description The updated mail configuration. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMailConfiguration"] + } + } + /** @description The mail configuration was not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update themail configuration. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteMailConfig: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The mail configuration was successfully deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the mail server configuration. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSenderAddress: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The server email address */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description he currently authenticated user has insufficient permissions to retrieve the server email address. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setSenderAddress: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": string + } + } + readonly responses: { + /** @description The from address used in notification emails */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The server email address was not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update the server email address. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly clearSenderAddress: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description he server email address was successfully cleared. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions toclear the server email address. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getGroupsWithAnyPermission: { + readonly parameters: { + readonly query?: { + /** @description If specified only group names containing the supplied string will be returned */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of groups and their highest global permissions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPermittedGroup"][] + } + } + } + /** @description The currently authenticated user is not an administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setPermissionForGroups: { + readonly parameters: { + readonly query: { + /** @description The names of the groups */ + readonly name: readonly string[] + /** @description The permission to grant */ + readonly permission: + | "ADMIN" + | "LICENSED_USER" + | "PROJECT_CREATE" + | "SYS_ADMIN" + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified permission was granted to the specified user. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed or the specified permission does not exist. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not an administrator or doesn't have the + * specified permission they are attempting to grant. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would exceed the server's license limits. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user's + * permission level or the currently authenticated user has a lower permission + * level than the group they are attempting to modify. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokePermissionsForGroup: { + readonly parameters: { + readonly query: { + /** @description The name of the group */ + readonly name: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All global permissions were revoked from the group. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description TThe currently authenticated user is not an administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user's + * permission level or the currently authenticated user has a lower permission + * level than the group they are attempting to modify. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getGroupsWithoutAnyPermission: { + readonly parameters: { + readonly query?: { + /** @description If specified only user names containing the supplied string will be returned */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of groups that have not been granted any global permissions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDetailedGroup"][] + } + } + } + /** @description The currently authenticated user is not an administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUsersWithAnyPermission: { + readonly parameters: { + readonly query?: { + /** @description If specified only user names containing the supplied string will be returned */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users and their highest global permissions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPermittedGroup"][] + } + } + } + /** @description The currently authenticated user is not an administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setPermissionForUsers: { + readonly parameters: { + readonly query: { + /** @description The names of the users */ + readonly name: readonly string[] + /** @description The permission to grant */ + readonly permission: + | "ADMIN" + | "LICENSED_USER" + | "PROJECT_CREATE" + | "SYS_ADMIN" + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested permission was granted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed or the specified permission does not exist. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not an administrator or doesn't have the + * specified permission they are attempting to grant. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would exceed the server's license limits. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user's + * permission level or the currently authenticated user has a lower permission + * level than the user they are attempting to modify. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokePermissionsForUser: { + readonly parameters: { + readonly query: { + /** @description The name of the user */ + readonly name: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All global permissions were revoked from the user. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not an administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user's + * permission level or the currently authenticated user has a lower permission + * level than the user they are attempting to modify. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUsersWithoutAnyPermission: { + readonly parameters: { + readonly query?: { + /** @description If specified only user names containing the supplied string will be returned */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users that have not been granted any global permissions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestApplicationUser"][] + } + } + } + /** @description The currently authenticated user is not an administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMergeConfig: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the id of the scm to get strategies for */ + readonly scmId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The merge configuration of this instance. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestMergeConfig"] + } + } + /** @description The currently authenticated user has insufficient permissions to see the request repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The request repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setMergeConfig: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the id of the scm to get strategies for */ + readonly scmId: string + } + readonly cookie?: never + } + /** @description the settings */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestSettings"] + } + } + readonly responses: { + /** @description The repository pull request merge strategies for the context repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestMergeConfig"] + } + } + /** @description The repository pull request merge strategies were not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to administrate thespecified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Setting or deleting merge configurations isn't supported on archived repositories. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getHistory: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description An optional sort category to arrange the results in descending order */ + readonly order?: "FREQUENCY" | "NEWEST" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing a page of aggregated counters for users who have been recently rate limited. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestAggregateRejectCounter"][] + } + } + } + /** @description The sort query parameter is invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve rate limit history. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSettings_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing the rate limit plugin settings for the instance. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRateLimitSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve rate limit settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setSettings_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description Sets the rate limit settings for the instance. + * + * The authenticated user must have ADMIN permission to call this resource. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRateLimitSettings"] + } + } + readonly responses: { + /** @description A response containing the updated rate limit plugin settings for the instance. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRateLimitSettings"] + } + } + /** @description One of the following error cases occurred (check the error message for more details): + * + * - The request is empty + * - The enabled field of the request is not a boolean + * - The defaultSettings field of the request does not contain both capacity and fillRate + * - The capacity and fillRate are not positive integers + * + * + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to set rate limit settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllRateLimitSettings: { + readonly parameters: { + readonly query?: { + /** @description Optional filter */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing all the user-specific rate limit settings filtered by the optional filter. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestUserRateLimitSettings"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve rate limit settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly set_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestBulkUserRateLimitSettingsUpdateRequest"] + } + } + readonly responses: { + /** @description A response containing the updated user settings. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestUserRateLimitSettings"] + } + } + /** @description One of the following valid state error cases occurred (check the error message for more details): + * + * - The request is empty + * - No users are provided in the request + * - One or more of the users are invalid + * - Whitelisted is false or not provided, and no settings are provided either + * - Whitelisted is false or not provided, settings are provided, but do not contain both capacity and fillRate + * - Whitelisted is false or not provided, settings are provided, but capacity and fillRate are not positive integers + * - Whitelisted is true, and settings are provided (only one must be provided) + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to set user settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly get_6: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing the user-specific rate limit settings for the given user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestUserRateLimitSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve rate limit settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist, or has no settings. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly set_3: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestUserRateLimitSettingsUpdateRequest"] + } + } + readonly responses: { + /** @description A response containing the updated user settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestUserRateLimitSettings"] + } + } + /** @description One of the following valid state error cases occurred (check the error message for more details): + * + * - The request is empty + * - Whitelisted is false or not provided, and no settings are provided either + * - Whitelisted is false or not provided, settings are provided, but do not contain both capacity and fillRate + * - Whitelisted is false or not provided, settings are provided, but capacity and fillRate are not positive integers + * - Whitelisted is true, and settings are provided (only one must be provided) + * + * + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to set user settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete_8: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the user settings have been deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to retrieve rate limit settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist, or has no settings. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUserDirectories: { + readonly parameters: { + readonly query?: { + /** @description Set true to include inactive directories; otherwise, false to only return active directories. */ + readonly includeInactive?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A list of directories */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestUserDirectory"] + } + } + /** @description The currently authenticated user is not an administrator */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUsers_1: { + readonly parameters: { + readonly query?: { + /** @description If specified only users with usernames, display name or email addresses containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDetailedUser"][] + } + } + } + /** @description The currently authenticated user is not a licensed user. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateUserDetails: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["UserUpdate"] + } + } + readonly responses: { + /** @description The updated user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDetailedUser"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user does not have the ADMIN permission or has a lower permission level than the user being updated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createUser: { + readonly parameters: { + readonly query: { + /** @description Set true to add the user to the default group, which can be used to grant them a set of initial permissions; otherwise, false to not add them to a group. */ + readonly addToDefaultGroup?: boolean + /** @description The display name for the new user. */ + readonly displayName: string + /** @description The e-mail address for the new user. */ + readonly emailAddress: string + /** @description The username for the new user. */ + readonly name: string + /** @description If present and not false instead of requiring a password, the create user will be notified via email their account has been created and requires a password to be reset. This option can only be used if a mail server has been configured. */ + readonly notify?: boolean + /** @description The password for the new user. Required if the notify parameter is not present or is set to false */ + readonly password?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user was successfully created. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not an administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Adding the user to the default group would exceed the server's license limit. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Another user with the same name already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteUser: { + readonly parameters: { + readonly query: { + /** @description The username identifying the user to delete. */ + readonly name: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The deleted user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDetailedUser"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user does not have the ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as the authenticated user has a lower permission level than the user being deleted. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as a user can not delete themselves. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addGroupToUser: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["GroupPickerContext"] + } + } + readonly responses: { + /** @description The user was added to the group */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The authenticated user does not have the ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addUserToGroups: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["UserAndGroups"] + } + } + readonly responses: { + /** @description The user was added to all the groups */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The authenticated user does not have the ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly clearUserCaptchaChallenge: { + readonly parameters: { + readonly query: { + /** @description The username */ + readonly name: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The CAPTCHA was successfully cleared. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user does not have the ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as the authenticated user has a lower permission level than the user to clear captcha for. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateUserPassword: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["AdminPasswordUpdate"] + } + } + readonly responses: { + /** @description The user's password was successfully updated. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user does not have the ADMIN permission or has a lower permission level than the user having their password updated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly validateErasable: { + readonly parameters: { + readonly query: { + /** @description The username of the user to validate erasability for. */ + readonly name: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the user is erasable */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed (e.g. if no username was supplied). */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user does not have the ADMIN permission or has a lower permission level than the user being erased. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested username does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested username is the username of a not deleted user. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly eraseUser: { + readonly parameters: { + readonly query: { + /** @description The username identifying the user to erase. */ + readonly name: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The identifier of the erased user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestErasedUser"] + } + } + /** @description The request was malformed (e.g. if no username was supplied). */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user does not have the ADMIN permission or has a lower permission level than the user being erased. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested username does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested username is the username of a not deleted user. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findGroupsForUser: { + readonly parameters: { + readonly query: { + /** @description The group which should be used to locate members. */ + readonly context: string + /** @description If specified only users with usernames, display names or email addresses containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDetailedUser"][] + } + } + } + /** @description The currently authenticated user is not a licensed user. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findOtherGroupsForUser: { + readonly parameters: { + readonly query: { + /** @description The user which should be used to locate groups. */ + readonly context: string + /** @description If specified only groups with names containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of groups. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDetailedGroup"][] + } + } + } + /** @description The currently authenticated user is not a licensed user. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly removeGroupFromUser: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["GroupPickerContext"] + } + } + readonly responses: { + /** @description The user was removed from the group. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The authenticated user does not have the ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as the group has a higher permission level than the context user. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user or group does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly renameUser: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["UserRename"] + } + } + readonly responses: { + /** @description The renamed user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDetailedUser"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user does not have the ADMIN permission or has a lower permission level than the user being renamed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getApplicationProperties: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The application properties */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestApplicationProperties"] + } + } + } + } + readonly getCapabilities: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description capabilities */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestBuildCapabilities"] + } + } + } + } + readonly getPullRequestSuggestions: { + readonly parameters: { + readonly query?: { + /** @description restrict pull request suggestions to be based on events that occurred since some timein the past. This is expressed in seconds since "now". So to return suggestionsbased only on activity within the past 48 hours, pass a value of 172800. */ + readonly changesSince?: string + /** @description restricts the result set to return at most this many suggestions. */ + readonly limit?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of pull requests that match the search criteria. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPullRequestSuggestion"][] + } + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The current user is not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPullRequests_1: { + readonly parameters: { + readonly query?: { + /** @description (optional, defaults to returning pull requests regardless of closed since date). Permits returning only pull requests with a closed timestamp set more recently that (now - closedSince). Units are in seconds. So for example if closed since 86400 is set only pull requests closed in the previous 24 hours will be returned. */ + readonly closedSince?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description (optional, defaults to NEWEST) the order/(s) to return pull requests in; can choose from OLDEST (as in: "oldest first"), NEWEST, DRAFT_STATUS, PARTICIPANT_STATUS, and/or CLOSED_DATE. Where CLOSED_DATE is specified and the result set includes pull requests that are not in the closed state, these pull requests will appear first in the result set, followed by most recently closed pull requests. */ + readonly order?: string + /** @description (optional, defaults to returning pull requests with any participant status). A comma separated list of participant status. That is, one or more of UNAPPROVED, NEEDS_WORK, or APPROVED. */ + readonly participantStatus?: string + /** @description (optional, defaults to returning pull requests for any role). If a role is supplied only pull requests where the authenticated user is a participant in the given role will be returned. Either REVIEWER, AUTHOR or PARTICIPANT. */ + readonly role?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description (optional, defaults to returning pull requests in any state). If a state is supplied only pull requests in the specified state will be returned. Either OPEN, DECLINED or MERGED. Omit this parameter to return pull request in any state. */ + readonly state?: string + /** @description The name of the involved user, defaults to the current user. */ + readonly user?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of pull requests that match the search criteria. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPullRequest"][] + } + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The current user is not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getCapabilities_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description capabilities */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description This instance of Bitbucket Data Center does not support deployments (for example, it has been disabled using the property 'plugin.deployment.capability.disabled'). */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getGroups: { + readonly parameters: { + readonly query?: { + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of group names. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly string[] + } + } + } + /** @description The currently authenticated user is not a project administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createHookScript: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The multipart form data containing the hook script */ + readonly requestBody?: { + readonly content: { + readonly "multipart/form-data": components["schemas"]["ExamplePostMultipartFormData"] + } + } + readonly responses: { + /** @description The newly created hook script. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestHookScript"] + } + } + /** @description The hook script was not created due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getHookScript: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the hook script to retrieve */ + readonly scriptId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The hook script. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestHookScript"] + } + } + /** @description The currently authenticated user has insufficient permissions. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The hook script ID supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateHookScript: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the hook script */ + readonly scriptId: string + } + readonly cookie?: never + } + /** @description The multipart form data containing the hook script */ + readonly requestBody?: { + readonly content: { + readonly "*/*": components["schemas"]["ExamplePutMultipartFormData"] + } + } + readonly responses: { + /** @description The updated hook script. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestHookScript"] + } + } + /** @description The currently authenticated user has insufficient permissions. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The hook script ID supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description A hook script with the same name already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description One or more fields to update must be specified: content, description and/or name. */ + readonly 422: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteHookScript: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the hook script to delete */ + readonly scriptId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The hook script was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied hook script ID. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly read: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the hook script */ + readonly scriptId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The hook script content. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The hook script ID supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAvatar: { + readonly parameters: { + readonly query?: { + /** @description (optional) Version used for HTTP caching only - any non-blank version will result in a large max-age Cache-Control header. Note that this does not affect the Last-Modified header. */ + readonly version?: string + } + readonly header?: never + readonly path: { + /** @description The complete module key of the hook module. */ + readonly hookKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The avatar of the project matching the supplied moduleKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to view the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPullRequests_2: { + readonly parameters: { + readonly query?: { + readonly limit?: number + readonly role?: string + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description default response */ + readonly default: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": unknown + } + } + } + } + readonly getPullRequestCount: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description default response */ + readonly default: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": unknown + } + } + } + } + readonly getLabels: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description (optional) prefix to filter the labels on. */ + readonly prefix?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Page of returned labels. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestLabel"][] + } + } + } + /** @description The user is currently not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getLabel: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the label name */ + readonly labelName: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The label. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestLabel"] + } + } + /** @description The user is currently not authenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified label does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getLabelables: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description the type of labelables to be returned. Supported values: REPOSITORY */ + readonly type?: string + } + readonly header?: never + readonly path: { + /** @description The page of labelables. */ + readonly labelName: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The page of labelables. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestLabelable"][] + } + } + } + /** @description The type of labelable is incorrect, correct values are REPOSITORY. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the labelables */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified label does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getLevel: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the logger. */ + readonly loggerName: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The log level of the logger. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestLogLevel"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the log level. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setLevel: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR */ + readonly levelName: string + /** @description The name of the logger. */ + readonly loggerName: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The log level was successfully changed. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The log level was invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to set the log level. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRootLevel: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The log level of the logger. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestLogLevel"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the log level. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setRootLevel: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR */ + readonly levelName: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The log level was successfully changed. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The log level was invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to set the log level. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly preview: { + readonly parameters: { + readonly query?: { + /** @description (Optional) Whether the markup implementation should convert newlines to breaks. By default this is false which reflects the standard markdown specification. */ + readonly hardwrap?: string + /** @description (Optional) true if HTML should be escaped in the input markup, false otherwise. */ + readonly htmlEscape?: string + /** @description (Optional) true if headers should contain an ID based on the heading content. */ + readonly includeHeadingId?: string + /** @description (Optional) The mode to use when building URLs. One of: ABSOLUTE, RELATIVE or, CONFIGURED. By default this is RELATIVE. */ + readonly urlMode?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "*/*": string + } + } + readonly responses: { + /** @description The rendered markdown. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMarkup"] + } + } + /** @description The markdown was invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions preview rendered markdown. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly startExport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The request */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestExportRequest"] + } + } + readonly responses: { + /** @description Details about the export job. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestJob"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to start anexport */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The export could not be started because the limit of concurrent migration jobs has been reached. */ + readonly 503: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getExportJob: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the job */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The job, including status and progress information. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestJob"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve information about this job. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly cancelExportJob: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the job to cancel */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The job has successfully been marked for cancellation */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to cancel this job. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The job was in a state that does not allow cancellation, e.g. it has already finished. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getExportJobMessages: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description The severity to include in the results */ + readonly severity?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description The subject */ + readonly subject?: string + } + readonly header?: never + readonly path: { + /** @description The ID of the job */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The messages generated by this job. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestJobMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve information about this job. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly previewExport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description the export request */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestExportRequest"] + } + } + readonly responses: { + /** @description The effectively selected projects and repositories. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestScopesExample"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to generate a preview. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly startImport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The request */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestImportRequest"] + } + } + readonly responses: { + /** @description Details about the export job. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestJob"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to start an import. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The import could not be started because the limit of concurrent migration jobs has been reached. */ + readonly 503: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getImportJob: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the job */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The job, including status and progress information. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestJob"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve information about this job. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly cancelImportJob: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the job to cancel */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The job has successfully been marked for cancellation. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to cancel this job. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The job was in a state that does not allow cancellation, e.g. it has already finished. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getImportJobMessages: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description The severity to include in the results */ + readonly severity?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description The subject */ + readonly subject?: string + } + readonly header?: never + readonly path: { + /** @description The ID of the job */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The messages generated by this job. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestJobMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve information about this job. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly startMeshMigration: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": { + readonly all?: boolean + readonly maxBytesPerSecond?: { + /** Format: int64 */ + readonly asLong?: number + readonly present?: boolean + } + readonly projectIds?: readonly number[] + readonly repositoryIds?: readonly number[] + } + } + } + readonly responses: { + /** @description The started job */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestJob"] + } + } + /** @description The migration request failed one/more validation checks. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description A migration job is already in progress */ + readonly 503: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMeshMigrationJob: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the job */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The details of the migration job. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The job ID parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job ID does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly cancelMeshMigrationJob: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the job to cancel */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The migration job was successfully marked for cancellation. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job ID does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The migration job has already been canceled or finished. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMeshMigrationJobMessages: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description The severity to include in the results */ + readonly severity?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description The subject */ + readonly subject?: string + } + readonly header?: never + readonly path: { + /** @description The ID of the job */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The details of the migration job. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestJobMessage"][] + } + } + } + /** @description The job ID parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job ID does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMeshMigrationJobSummary: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the job */ + readonly jobId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The summary of the migration job. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMeshMigrationSummary"] + } + } + /** @description The job ID parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified job ID does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly previewMeshMigration: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The export request */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestMeshMigrationRequest"] + } + } + readonly responses: { + /** @description Enumeration of projects and repositories that would be migrated for a given request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ExamplePreviewMigration"] + } + } + /** @description The request was invalid or missing. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly searchMeshMigrationRepos: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description (optional) The currently active migration job. If not passed, this is looked up internally. */ + readonly migrationId?: string + /** @description (optional) The repository name */ + readonly name?: string + /** @description (optional) The project key. Can be specified more than once to filter by more than one project. */ + readonly projectKey?: string + /** @description (optional) Whether the repository has been fully migrated to Mesh. If not present, all repositories are considered regardless of where they're located. */ + readonly remote?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description (optional) If a migration is active, the MeshMigrationQueueState state to filter results by. Can be specified more than once to filter by more than one state. */ + readonly state?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of repositories matching the specified criteria. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestMigrationRepository"][] + } + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No migration job with the given ID exists. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllMeshMigrationSummaries: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The summary of the migration job. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestMeshMigrationSummary"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getActiveMeshMigrationSummary: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The summary of the currently active migration job. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMeshMigrationSummary"] + } + } + /** @description The currently authenticated user has insufficient permissions to call this resource. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No active migration job found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositoriesRecentlyAccessed: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description (optional) If specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default REPO_READ permission level will be assumed. */ + readonly permission?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of recently accessed repositories. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepository"][] + } + } + } + /** @description The permission level is unknown or not related to repository. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The request is unauthenticated. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getProjects: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Name to filter by. */ + readonly name?: string + /** @description Permission to filter by */ + readonly permission?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of projects. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestProject"][] + } + } + } + /** @description The permission level is unknown or not related to projects. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The project. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestProject"] + } + } + readonly responses: { + /** @description The newly created project. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestProject"] + } + } + /** @description The currently authenticated user has insufficient permissions to update the project. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project key or name is already in use. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The project matching the supplied projectKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestProject"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description Project parameters to update. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestProject"] + } + } + readonly responses: { + /** @description The updated project. The project's key was not updated. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestProject"] + } + } + /** @description The updated project. The project's key was updated. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestProject"] + } + } + /** @description The project was not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The project matching the supplied projectKey was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project can not be deleted as it contains repositories. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getProjectAvatar: { + readonly parameters: { + readonly query?: { + /** @description The desired size of the image. The server will return an image as close as possible to the specified size. */ + readonly s?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The avatar of the project matching the supplied projectKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to view the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly uploadAvatar: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The mutlipart form data containing the file. */ + readonly requestBody?: { + readonly content: { + readonly "multipart/form-data": components["schemas"]["ExampleAvatarMultipartFormData"] + } + } + readonly responses: { + /** @description The avatar was uploaded successfully. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to update the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getConfigurations: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of hook scripts. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestHookScriptConfig"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setConfiguration: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the hook script */ + readonly scriptId: string + } + readonly cookie?: never + } + /** @description The hook triggers for which the hook script should be run */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestHookScriptTriggers"] + } + } + readonly responses: { + /** @description The updated hook script. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestHookScriptConfig"] + } + } + /** @description The hook script was not created/updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project key supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly removeConfiguration: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the hook script */ + readonly scriptId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The hook script was successfully deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to view the specified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project key or hook script ID supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokePermissions: { + readonly parameters: { + readonly query?: { + /** @description The names of the groups */ + readonly group?: string + /** @description The names of the users */ + readonly user?: string + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All project permissions were revoked from the users and groups for the specified project. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description No permissions were revoked because the request was invalid. No users or groups were provided. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user is not an administrator for the specifiedspecified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist, or one or more of the users or groups provided does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would revoke the currently authenticated user's permission on the project. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly hasAllUserPermission: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The permission to grant. Available project permissions are: + * + * - PROJECT_READ + * - PROJECT_WRITE + * - PROJECT_ADMIN + * + * + * */ + readonly permission: string + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A simple entity indicating whether the specified permission is the defaultpermission for this project. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPermitted"] + } + } + /** @description The request was malformed or the specified permission does not exist. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not an administrator for the specifiedspecified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user'spermission level. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly modifyAllUserPermission: { + readonly parameters: { + readonly query?: { + /** @description true to grant the specified permission to all users, or false to revoke it */ + readonly allow?: string + } + readonly header?: never + readonly path: { + /** @description The permission to grant. Available project permissions are: + * + * - PROJECT_READ + * - PROJECT_WRITE + * - PROJECT_ADMIN + * + * + * */ + readonly permission: string + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested permission was successfully granted or revoked. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed or the specified permission does not exist. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not an administrator for the specified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getGroupsWithAnyPermission_1: { + readonly parameters: { + readonly query?: { + /** @description If specified only group names containing the supplied string will be returned */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of groups and their highest permissions for the specified project. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPermittedGroup"][] + } + } + } + /** @description The currently authenticated user is not a project administrator for the specified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setPermissionForGroups_1: { + readonly parameters: { + readonly query?: { + /** @description The names of the groups */ + readonly name?: string + /** @description The permission to grant.See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions)for a detailed explanation of what each permission entails. Available project permissions are: + * + * - PROJECT_READ + * - PROJECT_WRITE + * - PROJECT_ADMIN + * + * + * */ + readonly permission?: string + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested permission was granted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed or the specified permission does not exist. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not an administrator for the specifiedspecified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user'spermission level. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokePermissionsForGroup_1: { + readonly parameters: { + readonly query?: { + /** @description The name of the group */ + readonly name?: string + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All project permissions were revoked from the group for the specified project. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not an administrator for the specifiedspecified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user'spermission level. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getGroupsWithoutAnyPermission_1: { + readonly parameters: { + readonly query?: { + /** @description If specified only group names containing the supplied string will be returned */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of groups that have not been granted any permissions for the specifiedproject. */ + readonly 202: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDetailedGroup"][] + } + } + } + /** @description The currently authenticated user is not a project administrator for thespecified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly searchPermissions: { + readonly parameters: { + readonly query?: { + /** @description Name of the user or group to filter the name of */ + readonly filterText?: string + /** @description Permissions to filter by. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions)for a detailed explanation of what each permission entails. This parameter can be specified multiple times to filter by more than one permission, and can contain global and project permissions. + * + * */ + readonly permission?: string + /** @description Type of entity (user or group)Valid entity types are: + * + * - USER- GROUP */ + readonly type?: string + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description default response */ + readonly default: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": unknown + } + } + } + } + readonly getUsersWithAnyPermission_1: { + readonly parameters: { + readonly query?: { + /** @description If specified only user names containing the supplied string will be returned */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users and their highest permissions for the specified project. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPermittedUser"][] + } + } + } + /** @description The currently authenticated user is not a project administrator for thespecified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setPermissionForUsers_1: { + readonly parameters: { + readonly query?: { + /** @description The names of the users */ + readonly name?: string + /** @description The permission to grant.See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions)for a detailed explanation of what each permission entails. Available project permissions are: + * + * - PROJECT_READ + * - PROJECT_WRITE + * - PROJECT_ADMIN + * + * + * */ + readonly permission?: string + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested permission was granted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed or the specified permission does not exist. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not an administrator for the specifiedspecified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user'spermission level. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokePermissionsForUser_1: { + readonly parameters: { + readonly query?: { + /** @description The name of the user */ + readonly name?: string + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All project permissions were revoked from the user for the specified project. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not an administrator for the specifiedspecified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user'spermission level. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUsersWithoutPermission: { + readonly parameters: { + readonly query?: { + /** @description If specified only user names containing the supplied string will be returned */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users that have not been granted any permissions for the specified project */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestApplicationUser"][] + } + } + } + /** @description The currently authenticated user is not a project administrator for thespecified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositories: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repositories matching the supplied projectKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepository"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to see the specified project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The repository */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRepository"] + } + } + readonly responses: { + /** @description The newly created repository. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepository"] + } + } + /** @description The repository was not created due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description A repository with same name already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository which matches the supplied projectKey and repositorySlug. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepository"] + } + } + /** @description The currently authenticated user has insufficient permissions to see the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The updated repository. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRepository"] + } + } + readonly responses: { + /** @description The updated repository. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepository"] + } + } + /** @description The repository was not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update a repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Cannot archive repository because it has open pull requests. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description A repository with the same name as the target already exists, or the repository is archived. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly forkRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The rest fork. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRepository"] + } + } + readonly responses: { + /** @description The newly created fork. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepository"] + } + } + /** @description A validation error prevented the fork from being created. Possible validation errors include: The name or slug for the fork collides with another repository in the target project; an SCM type was specified in the JSON body; a project was specified in the JSON body without a "key" property. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a fork. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist, or, if a target project was specified, the target project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository has been scheduled for deletion. */ + readonly 202: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description No repository matching the supplied projectKey and repositorySlug was found. */ + readonly 204: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to delete the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getArchive: { + readonly parameters: { + readonly query?: { + /** @description The commit to stream an archive of; if not supplied, an archive of the default branch is streamed */ + readonly at?: string + /** @description A filename to include the "Content-Disposition" header */ + readonly filename?: string + /** @description The format to stream the archive in; must be one of: zip, tar, tar.gz or tgz */ + readonly format?: string + /** @description Paths to include in the streamed archive; may be repeated to include multiple paths */ + readonly path?: string + /** @description A prefix to apply to all entries in the streamed archive; if the supplied prefix does not end with a trailing /, one will be added automatically */ + readonly prefix?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An archive or the requested commit, in zip, tar or gzipped-tar format. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The requested format is not supported. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist or does not contain the at commit. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAttachment: { + readonly parameters: { + readonly query?: never + readonly header?: { + readonly Range?: string + readonly "User-Agent"?: string + } + readonly path: { + /** @description the attachment ID */ + readonly attachmentId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the attachment */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description the requested range of bytes from the attachment */ + readonly 206: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description the user is currently not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The attachment does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAttachment: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the attachment ID */ + readonly attachmentId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the attachment */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The attachment does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAttachmentMetadata: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the attachment ID */ + readonly attachmentId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The attachment metadata */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAttachmentMetadata"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the attachment metadata */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The attachment or the attachment metadata does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly saveAttachmentMetadata: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the attachment ID */ + readonly attachmentId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The attachment metadata can be any valid JSON content */ + readonly requestBody?: { + readonly content: { + readonly "application/json": string + } + } + readonly responses: { + /** @description The attachment metadata */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The supplied content is not valid JSON */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to save theattachment metadata */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository or the attachment does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAttachmentMetadata: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the attachment ID */ + readonly attachmentId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete theattachment metadata */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The attachment or the attachment metadata does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getBranches: { + readonly parameters: { + readonly query?: { + /** @description Base branch or tag to compare each branch to (for the metadata providers that uses that information */ + readonly base?: string + /** @description Controls whether exact and prefix matches will be boosted to the top */ + readonly boostMatches?: boolean + readonly context?: string + /** @description Whether to retrieve plugin-provided metadata about each branch */ + readonly details?: boolean + /** @description The text to match on */ + readonly filterText?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated) */ + readonly orderBy?: "ALPHABETICAL" | "MODIFICATION" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The branches matching the supplied filterText. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestBranch"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to read the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createBranchForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The request to create a branch containing a name, startPoint, and optionally a message */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestCreateBranchRequest"] + } + } + readonly responses: { + /** @description The created branch. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestBranch"] + } + } + /** @description The currently authenticated user has insufficient permissions to write to the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getDefaultBranch_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The configured default branch for the repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestBranch"] + } + } + /** @description The repository is empty, and has no default branch. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to read the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist, or its configured default branch does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setDefaultBranch_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The branch to set as default */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestBranch"] + } + } + readonly responses: { + /** @description The operation was successful. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to update the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getContent: { + readonly parameters: { + readonly query?: { + /** @description The commit ID or ref to retrieve the content for */ + readonly at?: string + /** @description If present and not equal to 'false', the blame will be returned for the file as well */ + readonly blame?: string + /** @description If blame&noContent only the blame is retrieved instead of the contents */ + readonly noContent?: string + /** @description If true only the size will be returned for the file path instead of the contents */ + readonly size?: string + /** @description If true only the type will be returned for the file path instead of the contents */ + readonly type?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of contents from a file. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The path parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getContent_1: { + readonly parameters: { + readonly query?: { + /** @description The commit ID or ref to retrieve the content for */ + readonly at?: string + /** @description If present and not equal to 'false', the blame will be returned for the file as well */ + readonly blame?: string + /** @description If blame&noContent only the blame is retrieved instead of the contents */ + readonly noContent?: string + /** @description If true only the size will be returned for the file path instead of the contents */ + readonly size?: string + /** @description If true only the type will be returned for the file path instead of the contents */ + readonly type?: string + } + readonly header?: never + readonly path: { + /** @description The file path to retrieve content from */ + readonly path: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of contents from a file. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The path or until parameters were not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly editFile: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The path of the file that is to be modified or created */ + readonly path: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The multipart form data containing the file */ + readonly requestBody?: { + readonly content: { + readonly "multipart/form-data": components["schemas"]["ExampleMultipartFormData"] + } + } + readonly responses: { + /** @description The newly created commit. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestCommit"] + } + } + /** @description There are validation errors, e.g. The branch or content parameters were not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user does not have write permission for the given repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The request was authenticated using a project or repository access token, which does not have a valid user associated with it */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The file already exists when trying to create a file, or the given content does not modify the file, or the file has changed since the given sourceCommitId, or the repository is archived. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getChanges_1: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description The commit to which until should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists) */ + readonly since?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description The commit to retrieve changes for */ + readonly until?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of changes */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestChange"][] + } + } + } + /** @description The until parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository or the since or until parameters supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getCommits: { + readonly parameters: { + readonly query?: { + /** @description The desired scheme for the avatar URL. If the parameter is not present URLs will use the same scheme as this request */ + readonly avatarScheme?: string + /** @description If present the service adds avatar URLs for commit authors. Should be an integer specifying the desired size in pixels. If the parameter is not present, avatar URLs will not be set */ + readonly avatarSize?: string + /** @description If true, the commit history of the specified file will be followed past renames. Only valid for a path to a single file. */ + readonly followRenames?: string + /** @description true to ignore missing commits, false otherwise */ + readonly ignoreMissing?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description If present, controls how merge commits should be filtered. Can be either exclude, to exclude merge commits, include, to include both merge commits and non-merge commits or only, to only return merge commits. */ + readonly merges?: string + /** @description An optional path to filter commits by */ + readonly path?: string + /** @description The commit ID or ref (exclusively) to retrieve commits after */ + readonly since?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description The commit ID (SHA1) or ref (inclusively) to retrieve commits before */ + readonly until?: string + /** @description Optionally include the total number of commits and total number of unique authors */ + readonly withCounts?: string + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of commits */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestCommit"][] + } + } + } + /** @description One of the supplied commit IDs or refs was invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getCommit: { + readonly parameters: { + readonly query?: { + /** @description An optional path to filter the commit by. If supplied the details returned may not be for the specified commit. Instead, starting from the specified commit, they will be the details for the first commit affecting the specified path. */ + readonly path?: string + } + readonly header?: never + readonly path: { + /** @description The commit ID to retrieve */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A commit */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestCommit"] + } + } + /** @description The supplied commit ID was invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly get: { + readonly parameters: { + readonly query: { + /** @description the key of the build status */ + readonly key: string + } + readonly header?: never + readonly path: { + /** @description The commit. */ + readonly commitId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The build status associated with the provided commit and key */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestBuildStatus"] + } + } + /** @description The request has failed validation */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions this repository */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository, commit or build status does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly add: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit. */ + readonly commitId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The contents of the build status request are: + * These fields are **required**: + * + * + * - **key**: The string referring to this branch plan/job + * - **state**: The build status state, one of: "SUCCESSFUL", "FAILED", "INPROGRESS", "CANCELLED", "UNKNOWN" + * - **url**: URL referring to the build result page in the CI tool. + * + * + * These fields are optional: + * + * + * - **buildNumber** (optional): A unique identifier for this particular run of a plan< + * - **dateAdded** (optional): milliseconds since epoch. If not provided current date is used. + * - **description** (optional): Describes the build result + * - **duration** (optional): Duration of a completed build in milliseconds. + * - **name** (optional): A short string that describes the build plan + * - **parent** (optional): The identifier for the plan or job that ran the branch plan that produced this build status. + * - **ref** (optional): The fully qualified git reference e.g. refs/heads/master. + * - **testResults** (optional): A summary of the passed, failed and skipped tests. + * */ + readonly requestBody?: { + readonly content: { + readonly "*/*": components["schemas"]["RestBuildStatusSetRequest"] + } + } + readonly responses: { + /** @description The build status was posted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The build status was not added as the request was invalid. This could be because of a number of things: + * + * + * - an invalid commit hash was provided + * - build key was blank or longer than 255 characters + * - invalid branch was provided + * - invalid state was provided + * - build status url was blank or longer than 450 characters + * + * The specifics will be included in the error message. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to push a build status to this repository */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete: { + readonly parameters: { + readonly query?: { + /** @description the key of the build status */ + readonly key?: string + } + readonly header?: never + readonly path: { + /** @description The commit. */ + readonly commitId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The build status associated with the provided commit and key has been deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request has failed validation */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions this repository */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getChanges: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description The commit to which until should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists) */ + readonly since?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description true to apply comment counts in the changes (the default); otherwise, false to stream changes without comment counts */ + readonly withComments?: string + } + readonly header?: never + readonly path: { + /** @description The commit to retrieve changes for */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of changes */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestChange"][] + } + } + } + /** @description The until parameter was not supplied */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository or the since or until parameters supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getComments: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description The path to the file on which comments were made */ + readonly path?: string + /** @description For a merge commit, a parent can be provided to specify which diff the comments are on. For a commit range, a sinceId can be provided to specify where the comments are anchored from. */ + readonly since?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The full ID of the commit within the repository */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of comments that match the search criteria */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestComment"][] + } + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the comment */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, or commit. The missing entity will be specified in the error details. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createComment: { + readonly parameters: { + readonly query?: { + /** @description For a merge commit, a parent can be provided to specify which diff the comments should be on. For a commit range, a sinceId can be provided to specify where the comments should be anchored from. */ + readonly since?: string + } + readonly header?: never + readonly path: { + /** @description The full ID of the commit within the repository */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description the comment */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + readonly responses: { + /** @description The newly created comment. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + /** @description The comment was not created due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the commit, create a comment or watch the commit. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, commit or parent comment. The missing entity will be specified in the error details. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Adding, deleting, or editing comments isn't supported on archived repositories. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getComment: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the comment to retrieve */ + readonly commentId: string + /** @description The full ID of the commit within the repository */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the comment */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, commit or comment. The missing entity will be specified in the error details. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateComment: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the comment to retrieve */ + readonly commentId: string + /** @description The full ID of the commit within the repository */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The comment to update */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + readonly responses: { + /** @description The newly updated comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + /** @description The comment was not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the commit, update the comment or watch the commit. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, commit or comment. The missing entity will be specified in the error details. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The comment version supplied does not match the current version or the repository is archived. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteComment: { + readonly parameters: { + readonly query?: { + /** @description The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure. */ + readonly version?: string + } + readonly header?: never + readonly path: { + /** @description the comment */ + readonly commentId: string + /** @description The full ID of the commit within the repository */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The operation was successful */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the comment. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository or commit. The missing entity will be specified in the error details. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The comment has replies, the version supplied does not match the comment's current version or the repository is archived. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly get_1: { + readonly parameters: { + readonly query?: { + /** + * @description the sequence number of the deployment, as detailed by the query param + * @example deploymentSequenceNumber + */ + readonly deploymentSequenceNumber?: string + /** @description the key of the environment, as detailed by the query parameter */ + readonly environmentKey?: string + /** @description the key of the deployment, as detailed by the query parameter */ + readonly key?: string + } + readonly header?: never + readonly path: { + /** @description the commitId that was deployed as indicated by the query parameter */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The deployment */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDeployment"] + } + } + /** @description could not get the deployment because the request was invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or deployment does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createOrUpdateDeployment: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the commitId that was deployed as indicated by the path */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description the details of the deployment to create, as detailed by the request body */ + readonly requestBody?: { + readonly content: { + readonly "*/*": components["schemas"]["RestDeploymentSetRequest"] + } + } + readonly responses: { + /** @description The deployment was created */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDeployment"] + } + } + /** @description the deployment was not created because the request was invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete_1: { + readonly parameters: { + readonly query?: { + /** @description the sequence number of the deployment, as detailed by the query parameter */ + readonly deploymentSequenceNumber?: string + /** @description the key of the environment, as detailed by the query parameter */ + readonly environmentKey?: string + /** @description the key of the deployment, as detailed by the query parameter */ + readonly key?: string + } + readonly header?: never + readonly path: { + /** @description the commitId that was deployed as indicated by the path */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the request has been processed */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description the deployment was not deleted because the request was invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to delete a deployment */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getDiffStatsSummary: { + readonly parameters: { + readonly query?: { + /** @description true to automatically try to find the source path when it's not provided, false otherwise. Requires the path to be provided. */ + readonly autoSrcPath?: string + /** @description The base revision to diff from. If omitted the parent revision of the commit ID is used */ + readonly since?: string + /** @description The source path for the file, if it was copied, moved or renamed */ + readonly srcPath?: string + /** @description Optional whitespace flag which can be set to ignore-all */ + readonly whitespace?: string + } + readonly header?: never + readonly path: { + /** @description The commit ID to diff to. */ + readonly commitId: string + /** @description The path to the file which should be diffed (optional) */ + readonly path: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The diff stats summary for a commit. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDiffStatsSummary"] + } + } + /** @description The until parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamDiff: { + readonly parameters: { + readonly query?: { + /** @description true to automatically try to find the source path when it's not provided, false otherwise. Requires the path to be provided. */ + readonly autoSrcPath?: string + /** @description The security scheme for avatar URLs. If the scheme is not present then it is inherited from the request. It can be set to "https" to force the use of secure URLs. Not applicable if streaming raw diff */ + readonly avatarScheme?: string + /** @description If present the service adds avatar URLs for comment authors where the provided value specifies the desired avatar size in pixels. Not applicable if streaming raw diff */ + readonly avatarSize?: string + /** @description The number of context lines to include around added/removed lines in the diff.Not applicable if streaming raw diff */ + readonly contextLines?: string + /** @description Text used to filter files and lines (optional). Not applicable if streaming raw diff */ + readonly filter?: string + /** @description The base revision to diff from. If omitted the parent revision of the until revision is used */ + readonly since?: string + /** @description The source path for the file, if it was copied, moved or renamed */ + readonly srcPath?: string + /** @description Optional whitespace flag which can be set to ignore-all */ + readonly whitespace?: string + /** @description true to embed comments in the diff (the default); otherwise false to stream the diff without comments. Not applicable if streaming raw diff */ + readonly withComments?: string + } + readonly header?: never + readonly path: { + /** @description The full ID of the commit within the repository */ + readonly commitId: string + /** @description The path to the file which should be diffed (optional) */ + readonly path: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A diff between two revisions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDiff"] + } + } + /** @description The until parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMergeBase: { + readonly parameters: { + readonly query?: { + /** @description The other commit id to calculate the merge-base on */ + readonly otherCommitId?: string + } + readonly header?: never + readonly path: { + /** @description The full ID of the commit within the repository */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The common ancestor of the two given commits */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestCommit"] + } + } + /** @description No common parent between the two commits exist */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The supplied commit ID(s) was/were invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project, repository, or commit(s) does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPullRequests: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description the commit ID */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Return a page of pull requests in the current repository containing the given commit. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPullRequest"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to see the request repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The request repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly watch: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The full ID of the commit within the repository */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user is now watching the commit. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to view the pull request */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository or commit does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly unwatch: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The full ID of the commit within the repository */ + readonly commitId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user is no longer watching the commit. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to view the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository or commit does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamChanges: { + readonly parameters: { + readonly query?: { + /** @description the source commit (can be a partial/full commit ID or qualified/unqualified ref name) */ + readonly from?: string + /** @description an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug */ + readonly fromRepo?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description the target commit (can be a partial/full commit ID or qualified/unqualified ref name) */ + readonly to?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of changes. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestChange"][] + } + } + } + /** @description The source repository,target repository, or commit does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamCommits: { + readonly parameters: { + readonly query?: { + /** @description the source commit (can be a partial/full commit ID or qualified/unqualified ref name) */ + readonly from?: string + /** @description an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug */ + readonly fromRepo?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description the target commit (can be a partial/full commit ID or qualified/unqualified ref name) */ + readonly to?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of commits. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestCommit"][] + } + } + } + /** @description The source repository,target repository, or commit does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getDiffStatsSummary_1: { + readonly parameters: { + readonly query?: { + /** @description the source commit (can be a partial/full commit ID or qualified/unqualified ref name) */ + readonly from?: string + /** @description an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug */ + readonly fromRepo?: string + /** @description source path */ + readonly srcPath?: string + /** @description the target commit (can be a partial/full commit ID or qualified/unqualified ref name) */ + readonly to?: string + /** @description an optional whitespace flag which can be set to ignore-all */ + readonly whitespace?: string + } + readonly header?: never + readonly path: { + /** @description the path to the file to diff (optional) */ + readonly path: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The diff stats summary for the changes. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDiff"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The source repository,target repository, or commit does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamDiff_1: { + readonly parameters: { + readonly query?: { + /** @description an optional number of context lines to include around each added or removed lines in the diff */ + readonly contextLines?: string + /** @description the source commit (can be a partial/full commit ID or qualified/unqualified ref name) */ + readonly from?: string + /** @description an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug */ + readonly fromRepo?: string + /** @description source path */ + readonly srcPath?: string + /** @description the target commit (can be a partial/full commit ID or qualified/unqualified ref name) */ + readonly to?: string + /** @description an optional whitespace flag which can be set to ignore-all */ + readonly whitespace?: string + } + readonly header?: never + readonly path: { + /** @description the path to the file to diff (optional) */ + readonly path: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The diff of the changes. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDiff"] + } + } + /** @description The source repository,target repository, or commit does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamContributing: { + readonly parameters: { + readonly query?: { + /** @description A specific commit or ref to retrieve the guidelines at, or the default branch if not specified */ + readonly at?: string + /** @description (Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used */ + readonly hardwrap?: string + /** @description (Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used */ + readonly htmlEscape?: string + /** @description (Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used */ + readonly includeHeadingId?: string + /** @description If present or "true", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than "true", the content is streamed without markup */ + readonly markup?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The contributing guidelines for the repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to read the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getDefaultBranch_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The configured default branch for the repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMinimalRef"] + } + } + /** @description The currently authenticated user has insufficient permissions to read the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist, or its configured default branch does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setDefaultBranch_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The branch to set as default */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestBranch"] + } + } + readonly responses: { + /** @description The default branch was updated. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user does not have permission to modify the default branch. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamRawDiff: { + readonly parameters: { + readonly query?: { + /** @description The number of context lines to include around added/removed lines in the diff */ + readonly contextLines?: string + /** @description The base revision to diff from. If omitted the parent revision of the until revision is used */ + readonly since?: string + /** @description The source path for the file, if it was copied, moved or renamed */ + readonly srcPath?: string + /** @description The target revision to diff to (required) */ + readonly until?: string + /** @description Optional whitespace flag which can be set to ignore-all */ + readonly whitespace?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A raw diff between two revisions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The path parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamRawDiff_1: { + readonly parameters: { + readonly query?: { + /** @description The number of context lines to include around added/removed lines in the diff */ + readonly contextLines?: string + /** @description The base revision to diff from. If omitted the parent revision of the until revision is used */ + readonly since?: string + /** @description The source path for the file, if it was copied, moved or renamed */ + readonly srcPath?: string + /** @description The target revision to diff to (required) */ + readonly until?: string + /** @description Optional whitespace flag which can be set to ignore-all */ + readonly whitespace?: string + } + readonly header?: never + readonly path: { + /** @description The path to the file which should be diffed (required) */ + readonly path: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A raw diff between two revisions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The until parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamFiles: { + readonly parameters: { + readonly query?: { + /** @description The commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead. */ + readonly at?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of files. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["FileListResource"][] + } + } + } + /** @description The path parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The path requested does not exist at the supplied commit. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamFiles_1: { + readonly parameters: { + readonly query?: { + /** @description The commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead. */ + readonly at?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The directory to list files for. */ + readonly path: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of files. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["FileListResource"][] + } + } + } + /** @description The path requested is not a directory at the supplied commit. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The path requested does not exist at the supplied commit. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getForkedRepositories: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of repositories related to the request repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepository"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to see the request repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The request repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getConfigurations_1: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of hook scripts. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestHookScriptConfig"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setConfiguration_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The ID of the hook script */ + readonly scriptId: string + } + readonly cookie?: never + } + /** @description The hook triggers for which the hook script should be run */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestHookScriptTriggers"] + } + } + readonly responses: { + /** @description The updated hook script. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestHookScriptConfig"] + } + } + /** @description The hook script was not created/updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository slug supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly removeConfiguration_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The ID of the hook script */ + readonly scriptId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The hook script was successfully deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to view the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository slug or hook script ID supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllLabelsForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The applied label. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestLabel"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the labels. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addLabel: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The label to apply */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestLabel"] + } + } + readonly responses: { + /** @description The applied label. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestLabel"] + } + } + /** @description A validation error prevented the label from being created or applied. Possible validation errors include: The name of the label contains uppercase characters, the name is smaller than 3 characters or longer than 50 characters, the label contains other characters than a-z 0-9 and - or the label is already applied to the given repository. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to apply a label. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly removeLabel: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The label to remove */ + readonly labelName: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the label is no longer associated to the repository. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to remove the label. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly stream: { + readonly parameters: { + readonly query?: { + /** @description The commit to use as the starting point when listing files and calculating modifications */ + readonly at?: string + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A map of files to the last commit that modified them, and the latest commit to the repository (by nature, any commit to a repository modifies its root). */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ExampleFiles"] + } + } + /** @description No at commit was specified. When streaming modifications, an explicit starting commit must be supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist or does not contain the at commit. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly stream_1: { + readonly parameters: { + readonly query?: { + /** @description The commit to use as the starting point when listing files and calculating modifications */ + readonly at?: string + } + readonly header?: never + readonly path: { + /** @description The path within the repository whose files should be streamed */ + readonly path: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A map of files to the last commit that modified them, and the latest commit to update the requested path. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ExampleFiles"] + } + } + /** @description No at commit was specified. When streaming modifications, an explicit starting commit must be supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist or does not contain the at commit, or the at commit does not contain the requested path. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamLicense: { + readonly parameters: { + readonly query?: { + /** @description A specific commit or ref to retrieve the guidelines at, or the default branch if not specified */ + readonly at?: string + /** @description (Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used */ + readonly hardwrap?: string + /** @description (Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used */ + readonly htmlEscape?: string + /** @description (Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used */ + readonly includeHeadingId?: string + /** @description If present or "true", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than "true", the content is streamed without markup */ + readonly markup?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The license for the repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to read the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly search: { + readonly parameters: { + readonly query?: { + /** @description (optional), Defaults to INCOMING) the direction relative to the specified repository. Either INCOMING or OUTGOING. */ + readonly direction?: string + /** @description (optional) Return only users, whose username, name or email address contain the filter value */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description (optional) The role associated with the pull request participant. This must be one of AUTHOR, REVIEWER, or PARTICIPANT */ + readonly role?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users that match the search criteria. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestApplicationUser"][] + } + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamPatch: { + readonly parameters: { + readonly query?: { + /** @description indicates whether or not to generate a patch which includes all the ancestors of the 'until' revision. If true, the value provided by 'since' is ignored. */ + readonly allAncestors?: string + /** @description The base revision from which to generate the patch. This is only applicable when 'allAncestors' is false. If omitted the patch will represent one single commit, the 'until'. */ + readonly since?: string + /** @description The target revision from which to generate the patch (required) */ + readonly until?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The patch contents from a repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The until parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokePermissions_1: { + readonly parameters: { + readonly query?: { + /** @description The names of the groups */ + readonly group?: string + /** @description The names of the users */ + readonly user?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All repository permissions were revoked from the users and groups for the specified repository. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description No permissions were revoked because the request was invalid. No users or groups were provided. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user is not an administrator for the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist, or one or more of the users or groups provided does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would revoke the currently authenticated user's permission on the repository. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getGroupsWithAnyPermission_2: { + readonly parameters: { + readonly query?: { + /** @description If specified only group names containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of groups and their highest permissions for the specified repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPermittedGroup"][] + } + } + } + /** @description The currently authenticated user is not a repository administrator for the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setPermissionForGroup: { + readonly parameters: { + readonly query: { + /** @description The names of the groups. */ + readonly name: readonly string[] + /** @description The permission to grant */ + readonly permission: "REPO_ADMIN" | "REPO_READ" | "REPO_WRITE" + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested permission was granted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed or the specified permission does not exist. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not a repository administrator for the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user's permission level. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokePermissionsForGroup_2: { + readonly parameters: { + readonly query: { + /** @description The name of the group. */ + readonly name: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All repository permissions were revoked from the group for the specified repository. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not a repository administrator for the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user's permission level. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getGroupsWithoutAnyPermission_2: { + readonly parameters: { + readonly query?: { + /** @description If specified only group names containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of groups that have not been granted any permissions for the specified repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDetailedGroup"][] + } + } + } + /** @description The currently authenticated user is not a repository administrator for the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly searchPermissions_1: { + readonly parameters: { + readonly query?: { + /** @description Name of the user or group to filter the name of */ + readonly filterText?: string + /** @description Permissions to filter by. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+repository+permissions)for a detailed explanation of what each permission entails. This parameter can be specified multiple times to filter by more than one permission, and can contain repository, project, and global permissions. + * + * */ + readonly permission?: string + /** @description Type of entity (user or group)Valid entity types are: + * + * - USER- GROUP */ + readonly type?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description default response */ + readonly default: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": unknown + } + } + } + } + readonly getUsersWithAnyPermission_2: { + readonly parameters: { + readonly query?: { + /** @description If specified only user names containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users and their highest permissions for the specified repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPermittedUser"][] + } + } + } + /** @description The currently authenticated user is not a repository administrator for the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setPermissionForUser: { + readonly parameters: { + readonly query: { + /** @description The names of the users. */ + readonly name: readonly string[] + /** @description The permission to grant */ + readonly permission: "REPO_ADMIN" | "REPO_READ" | "REPO_WRITE" + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested permission was granted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed or the specified permission does not exist. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not a repository administrator for the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user's permission level. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokePermissionsForUser_2: { + readonly parameters: { + readonly query: { + /** @description The name of the user. */ + readonly name: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description All repository permissions were revoked from the user for the specified repository. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not a repository administrator for the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The action was disallowed as it would reduce the currently authenticated user's permission level. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUsersWithoutPermission_1: { + readonly parameters: { + readonly query?: { + /** @description If specified only user names containing the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users that have not been granted any permissions for the specified repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestApplicationUser"][] + } + } + } + /** @description The currently authenticated user is not a repository administrator for the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPage: { + readonly parameters: { + readonly query?: { + /** @description (optional) a fully-qualified branch ID to find pull requests to or from, such as refs/heads/master */ + readonly at?: string + /** @description (optional, defaults to INCOMING) the direction relative to the specified repository. Either INCOMING or OUTGOING. */ + readonly direction?: string + /** @description (optional) If specified, only pull requests matching the supplied draft status will be returned. */ + readonly draft?: string + /** @description (optional) If specified, only pull requests where the title or description contains the supplied string will be returned. */ + readonly filterText?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description (optional, defaults to NEWEST) the order to return pull requests in, either OLDEST (as in: "oldest first") or NEWEST. */ + readonly order?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description (optional, defaults to OPEN). Supply ALL to return pull request in any state. If a state is supplied only pull requests in the specified state will be returned. Either OPEN, DECLINED or MERGED. */ + readonly state?: string + /** @description (optional) defaults to true, whether to return additional pull request attributes */ + readonly withAttributes?: string + /** @description (optional) defaults to true, whether to return additional pull request properties */ + readonly withProperties?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of pull requests that match the search criteria. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPullRequest"][] + } + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly create: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The pull request data */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequest"] + } + } + readonly responses: { + /** @description The newly created pull request. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequest"] + } + } + /** @description The pull request entity supplied in the request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a pull request between the two specified repositories. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description One of the specified repositories or branches does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description One of the following error cases occurred (check the error message for more details): + * + * - There was a problem resolving one or more reviewers. + * - The specified branches were the same. + * - The to branch is already up-to-date with all the commits on the from branch. + * - A pull request between the two branches already exists. + * - The to repository is archived. + * */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly get_3: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequest"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly update: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The updated pull request */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequest"] + } + } + readonly responses: { + /** @description The updated pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequest"] + } + } + /** @description One of the following error cases occurred (check the error message for more details): + * + * - The request tried to modify the author or participants. + * - The pull request's version attribute was not specified. + * - A reviewer's username was not specified. + * - The toRef ID value was incorrectly left blank + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description One of the specified repositories or branches does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description One of the following error cases occurred (check the error message for more details): + * + * - The specified version is out of date. + * - One of the reviewers could not be added to the pull request. + * - If updating the destination branch: - There is already an open pull request with an identical to branch + * - The from and new to branch are the same + * - The new destination branch up-to-date is up-to-date with all of changes from the from branch, resulting in a pull request with nothing to merge + * - The to repository is archived. + * */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete_3: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description A body containing the version of the pull request */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestDeleteRequest"] + } + } + readonly responses: { + /** @description The pull request was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Deleting pull requests isn't supported on archived repositories. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamRawDiff_2: { + readonly parameters: { + readonly query?: { + /** @description The number of context lines to include around added/removed lines in the diff */ + readonly contextLines?: string + /** @description optional whitespace flag which can be set to ignore-all */ + readonly whitespace?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A raw diff for the specified pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "text/plain": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 400: { + headers: Readonly> + content: { + readonly "text/html": unknown + } + } + /** @description The pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "text/html": unknown + } + } + } + } + readonly streamPatch_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A patch representing the specified pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to access the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getActivities: { + readonly parameters: { + readonly query?: { + /** @description (optional) the ID of the activity item to use as the first item in the returned page */ + readonly fromId?: string + /** @description (required if fromId is present) the type of the activity item specified by fromId (either COMMENT or ACTIVITY) */ + readonly fromType?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of activity relating to the specified pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPullRequestActivity"][] + } + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly approve: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Details of the new participant. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestParticipant"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The pull request is not open. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly withdrawApproval: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Details of the updated participant. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestParticipant"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist or the current user is not a participant on the pull request. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The pull request is not open. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAutoMergeRequest: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The auto-merge request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoMergeRequest"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly tryAutoMerge: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The result of trying to auto-merge the pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoMergeProcessingResult"] + } + } + /** @description An auto-merge request was not submitted for this pull request. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to modify the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The auto-merge setting is not enabled for the repository that this pull request targets. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly cancelAutoMerge: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The auto-merge request was cancelled. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to modify the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified pull request is not open. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getComments_1: { + readonly parameters: { + readonly query?: { + /** @description If true only the count of the comments by state will be returned (and not the body of the comments). */ + readonly count?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + readonly state?: readonly string[] + /** @description (optional). If supplied, only comments with a state in the given list will be returned. The state can be OPEN or RESOLVED. */ + readonly states?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of Comments from the supplied pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestComment"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository or pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createComment_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The comment to add. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + readonly responses: { + /** @description The newly created comment. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + /** @description The comment was not created due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request, create a comment or watch the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, pull request or parent comment. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The new created name already exists or adding, deleting, or editing comments isn't supported on archived repositories. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getComment_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the comment to retrieve */ + readonly commentId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the comment. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, pull request or comment. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateComment_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the comment to retrieve. */ + readonly commentId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The comment to add. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + readonly responses: { + /** @description The newly updated comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + /** @description The comment was not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request, update a comment or watch the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, pull request or comment. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The comment version supplied does not match the current version or the repository is archived. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteComment_1: { + readonly parameters: { + readonly query?: { + /** @description The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure. */ + readonly version?: string + } + readonly header?: never + readonly path: { + /** @description The ID of the comment to retrieve. */ + readonly commentId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The operation was successful. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the comment. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository or pull request. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The comment has replies, the version supplied does not match the current version or the repository is archived. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamChanges_1: { + readonly parameters: { + readonly query?: { + /** @description UNREVIEWED to stream the unreviewed changes for the current user (if they exist); RANGE to stream changes between two arbitrary commits (requires 'sinceId' and 'untilId'); otherwise ALL to stream all changes (the default) */ + readonly changeScope?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description The since commit hash to stream changes for a RANGE arbitrary change scope */ + readonly sinceId?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description The until commit hash to stream changes for a RANGE arbitrary change scope */ + readonly untilId?: string + /** @description true to apply comment counts in the changes (the default); otherwise, false to stream changes without comment counts */ + readonly withComments?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of unreviewed Changes for the current user from the supplied pull request, including the unreviewedCommits in the properties map. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestChange"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository or pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getComments_2: { + readonly parameters: { + readonly query: { + /** @description ACTIVE to stream the active comments; ORPHANED to stream the orphaned comments; ALL to stream both the active and the orphaned comments; */ + readonly anchorState?: string + readonly diffType?: readonly string[] + /** @description EFFECTIVE to stream the comments related to the effective diff of the pull request; RANGE to stream comments related to a commit range between two arbitrary commits (requires 'fromHash' and 'toHash'); COMMIT to stream comments related to a commit between two arbitrary commits (requires 'fromHash' and 'toHash') */ + readonly diffTypes?: string + /** @description The from commit hash to stream comments for a RANGE or COMMIT arbitrary change scope */ + readonly fromHash?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description The path to stream comments for a given path */ + readonly path: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + readonly state?: readonly string[] + /** @description (optional). If supplied, only comments with a state in the given list will be returned. The state can be OPEN or RESOLVED. */ + readonly states?: string + /** @description The to commit hash to stream comments for a RANGE or COMMIT arbitrary change scope */ + readonly toHash?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of Comments from the supplied pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestComment"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository or pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createComment_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The comment to add */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + readonly responses: { + /** @description The newly created comment. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + /** @description The comment was not created due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request, create a comment or watch the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, pull request or parent comment. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Adding, deleting, or editing comments isn't supported on archived repositories. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getComment_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the comment to retrieve. */ + readonly commentId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the comment. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, pull request or comment. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateComment_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the comment to retrieve. */ + readonly commentId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The updated comment */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + readonly responses: { + /** @description The newly updated comment. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestComment"] + } + } + /** @description The comment was not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request, update a comment or watch the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, pull request or comment. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The comment version supplied does not match the current version or the repository is archived. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteComment_2: { + readonly parameters: { + readonly query?: { + /** @description The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure. */ + readonly version?: string + } + readonly header?: never + readonly path: { + /** @description The ID of the comment to retrieve. */ + readonly commentId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The operation was successful. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the comment. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository or pull request. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The comment has replies, the version supplied does not match the current version or the repository is archived. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly applySuggestion: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the comment to retrieve. */ + readonly commentId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description A request containing other parameters required to apply a suggestion - The given versions/hashes must match the server's version/hashes or the suggestion application will fail (in order to avoid applying the suggestion to the wrong place */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestApplySuggestionRequest"] + } + } + readonly responses: { + /** @description An empty response indicating the suggestion has been applied. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The suggestion was not applied due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to apply the suggestion. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied project, repository, pull request or parent comment. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description There was an error applying the suggestion to the source branch. It must be applied manually. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getCommitMessageSuggestion: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request to generate the suggestion for */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The suggested commit message */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestCommitMessageSuggestion"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getCommits_1: { + readonly parameters: { + readonly query?: { + /** @description The desired scheme for the avatar URL. If the parameter is not present URLs will use the same scheme as this request */ + readonly avatarScheme?: string + /** @description If present the service adds avatar URLs for commit authors. Should be an integer specifying the desired size in pixels. If the parameter is not present, avatar URLs will not be setCOMMIT to stream comments related to a commit between two arbitrary commits (requires 'fromHash' and 'toHash') */ + readonly avatarSize?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description If set to true, the service will add "authorCount" and "totalCount" at the end of the page. "authorCount" is the number of different authors and "totalCount" is the total number of commits. */ + readonly withCounts?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description ID of the pullrequest, part of the path */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of commits from the supplied pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestCommit"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository or pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly decline: { + readonly parameters: { + readonly query?: { + /** @description The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. */ + readonly version?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pullrequest ID provided by the path */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description Optional body */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestDeclineRequest"] + } + } + readonly responses: { + /** @description The pull request was declined. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequest"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The pull request is not OPEN or has been updated since the version specified by the request. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getDiffStatsSummary_2: { + readonly parameters: { + readonly query?: { + /** @description The since commit hash to stream a diff between two arbitrary hashes */ + readonly sinceId?: string + /** @description The previous path to the file, if the file has been copied, moved or renamed */ + readonly srcPath?: string + /** @description The until commit hash to stream a diff between two arbitrary hashes */ + readonly untilId?: string + /** @description Optional whitespace flag which can be set to ignore-all */ + readonly whitespace?: string + } + readonly header?: never + readonly path: { + /** @description Optional path to the file which should be diffed */ + readonly path: string + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The diff stats summary */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDiffStatsSummary"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamDiff_2: { + readonly parameters: { + readonly query?: { + /** @description The security scheme for avatar URLs. If the scheme is not present then it is inherited from the request. It can be set to "https" to force the use of secure URLs. Not applicable if streaming raw diff */ + readonly avatarScheme?: string + /** @description If present the service adds avatar URLs for comment authors where the provided value specifies the desired avatar size in pixels. Not applicable if streaming raw diff */ + readonly avatarSize?: string + /** @description The number of context lines to include around added/removed lines in the diff */ + readonly contextLines?: string + /** @description The type of diff being requested. When withComments is true this works as a hint to the system to attach the correct set of comments to the diff. Not applicable if streaming raw diff */ + readonly diffType?: string + /** @description The since commit hash to stream a diff between two arbitrary hashes */ + readonly sinceId?: string + /** @description The previous path to the file, if the file has been copied, moved or renamed */ + readonly srcPath?: string + /** @description The until commit hash to stream a diff between two arbitrary hashes */ + readonly untilId?: string + /** @description Optional whitespace flag which can be set to ignore-all */ + readonly whitespace?: string + /** @description true to embed comments in the diff (the default); otherwise, false to stream the diff without comments. Not applicable if streaming raw diff */ + readonly withComments?: string + } + readonly header?: never + readonly path: { + /** @description The path to the file which should be diffed (optional) */ + readonly path: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of differences from a pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDiff"] + } + } + /** @description If the request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository or pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly canMerge: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The mergeability status of the pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestMergeability"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified pull request is not open. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly merge: { + readonly parameters: { + readonly query?: { + /** @description The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. */ + readonly version?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The body holder */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestMergeRequest"] + } + } + readonly responses: { + /** @description The merged pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequest"] + } + } + /** @description The currently authenticated user has insufficient permissions to merge the specified pull request */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The auto-merge setting is not enabled for the repository that this pull request targets. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description One of the following error cases occurred (check the error message for more details): + * + * - The pull request has conflicts. + * - A merge check vetoed the merge. + * - The specified version is out of date. + * - The specified pull request is not open. + * - The to repository is archived. + * */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMergeBase_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The common ancestor of the latest commits in the source and target branches of this pull request */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestCommit"] + } + } + /** @description No common parent between exist */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The project, repository, or pull request does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly listParticipants: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Details of the participants in this pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestPullRequestParticipant"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly assignParticipantRole: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The participant to be added to the pull request, includes the user and their role */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestAssignParticipantRoleRequest"] + } + } + readonly responses: { + /** @description Details of the participants in this pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestParticipant"] + } + } + /** @description The request does not have the username and role, or is attempting an invalid assignment. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Adding reviewers isn't supported on archived repositories */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly unassignParticipantRole_1: { + readonly parameters: { + readonly query?: { + readonly username?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The update completed. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to update the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Removing reviewers isn't supported on archived repositories. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateStatus: { + readonly parameters: { + readonly query?: { + /** + * @deprecated + * @description The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. Note: This parameter is deprecated. Use last reviewed commit in request body instead + */ + readonly version?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The slug for the user changing their status */ + readonly userSlug: string + } + readonly cookie?: never + } + /** @description The participant representing the status to set, includes the status of the participant and last reviewed commit. If last reviewed commit is provided, it will be used to update the participant status. The operation will fail if the latest commit of the pull request does not match the provided last reviewed commit. If last reviewed commit is not provided, the latest commit of the pull request will be used for the update by default. */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestAssignStatusRequest"] + } + } + readonly responses: { + /** @description Details of the new participant. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestParticipant"] + } + } + /** @description The specified status was invalid or the currently authenticated user is the author of the PR and cannot have its status updated. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The pull request is not open, or has been updated since the last reviewed commit specified by the request. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly unassignParticipantRole: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The slug for the user being unassigned */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The update completed. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request does not have the username. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Removing reviewers isn't supported on archived repositories. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly reopen: { + readonly parameters: { + readonly query?: { + /** @description The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. */ + readonly version?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The body holder */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestReopenRequest"] + } + } + readonly responses: { + /** @description The merged pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequest"] + } + } + /** @description The currently authenticated user has insufficient permissions to reopen the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description One of the following error cases occurred (check the error message for more details): + * + * - The pull request is not in a declined state. + * - The specified version is out of date. + * - The to repository is archived. + * */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getReview: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of Comments from the supplied pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestComment"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository or pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly finishReview: { + readonly parameters: { + readonly query?: { + /** + * @deprecated + * @description The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. Note: This parameter is deprecated. Use last reviewed commit in request body instead + */ + readonly version?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The REST request which contains comment text, last reviewed commit and participant status. If last reviewed commit is provided, it will be used to update the participant status. The operation will fail if the latest commit of the pull request does not match the provided last reviewed commit. If last reviewed commit is not provided, the latest commit of the pull request will be used for the update by default. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestFinishReviewRequest"] + } + } + readonly responses: { + /** @description Getting back the number of published comments and completing the review on a pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The request is invalid when there is no request body provided, or the participant status in the request is invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request, update a comment or watch the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description There is no pull request review for the user to finish. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The pull request has been updated since the last reviewed commit specified by the request, or reviews cannot be made on pull requests in archived repositories. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly discardReview: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pull request review has been discarded. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to discard the the pull request review */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified pull request or repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly watch_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user is now watching the pull request. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to view the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly unwatch_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request ID. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user is no longer watching the pull request. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to view the pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamRaw: { + readonly parameters: { + readonly query?: { + /** @description A specific commit or ref to retrieve the raw content at, or the default branch if not specified */ + readonly at?: string + /** @description (Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used */ + readonly hardwrap?: string + /** @description (Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used */ + readonly htmlEscape?: string + /** @description (Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used */ + readonly includeHeadingId?: string + /** @description If present or "true", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than "true", the content is streamed without markup */ + readonly markup?: string + } + readonly header?: never + readonly path: { + /** @description The file path to retrieve content from */ + readonly path: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The raw contents from a file. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The path parameter was not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly streamReadme: { + readonly parameters: { + readonly query?: { + /** @description A specific commit or ref to retrieve the guidelines at, or the default branch if not specified */ + readonly at?: string + /** @description (Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used */ + readonly hardwrap?: string + /** @description (Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used */ + readonly htmlEscape?: string + /** @description (Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used */ + readonly includeHeadingId?: string + /** @description If present or "true", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than "true", the content is streamed without markup */ + readonly markup?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The README for the repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to read the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly retryCreateRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The newly created repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepository"] + } + } + /** @description The repository was not created due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRefChangeActivity: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description (optional) exact match for a ref ID to filter ref change activity for */ + readonly ref?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of ref change activity. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepositoryRefChangeActivity"][] + } + } + } + /** @description The user is currently not authenticated or the user does not have REPO_ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findBranches: { + readonly parameters: { + readonly query?: { + /** @description (optional) Partial match for a ref ID to filter minimal refs for */ + readonly filterText?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of branches with ref change activities. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestMinimalRef"][] + } + } + } + /** @description The user is currently not authenticated or the user does not have REPO_ADMIN permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRelatedRepositories: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of repositories related to the request repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepository"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to see the request repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The request repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly search_2: { + readonly parameters: { + readonly query?: { + /** + * @description Filter names by the provided text + * @example Access + */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Order by */ + readonly order?: "NAME_ASC" | "NAME_DESC" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Page of allowlist rules */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestSecretScanningAllowlistRule"][] + } + } + } + /** @description The request was not a correctly formed allowlist rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to view repository rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createAllowlistRule_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description Allowlist rule to create, either the line regular expression or the path regular expression must be present */ + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningAllowlistRuleSetRequest"] + } + } + readonly responses: { + /** @description The created rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningAllowlistRule"] + } + } + /** @description The request did not contain a correctly formed allowlist rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to create repository rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllowlistRule_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The allowlist rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested allowlist rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningAllowlistRule"] + } + } + /** @description The authenticated user is not permitted to view repository allowlist rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested allowlist rule was not found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly editAllowlistRule_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The allowlist rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningAllowlistRuleSetRequest"] + } + } + readonly responses: { + /** @description The updated allowlist rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningAllowlistRule"] + } + } + /** @description The request did not contain a correctly formed allowlist rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to edit repository allowlist rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAllowlistRule_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The allowlist rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Empty response indicating that the allowlist rule was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user is not permitted to delete repository allowlist rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly isRepoExempt: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description True if the repository is exempt from secret scanning, false otherwise */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The authenticated user is not permitted to check whether a repository is exempt from secret scanning */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addExemptRepo: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An exempt repo was added */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user is not permitted to exempt a repository from secret scanning */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description At least one of specified repositories have already been previously made exempt. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteExemptRepo: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Empty response indicating that the exempt repository was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user is not permitted to delete an exempt repository */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly search_3: { + readonly parameters: { + readonly query?: { + /** + * @description Filter names by the provided text + * @example Access + */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Order by */ + readonly order?: "NAME_ASC" | "NAME_DESC" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Page of rules */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestSecretScanningRule"][] + } + } + } + /** @description The request was not correctly formed rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to view repository rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createRule_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description Rule to create, either the line regular expression or the path regular expression must be present */ + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningRuleSetRequest"] + } + } + readonly responses: { + /** @description The created rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningRule"] + } + } + /** @description The request did not contain a correctly formed rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to create repository rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRule_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningRule"] + } + } + /** @description The authenticated user is not permitted to view repository rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested rule was not found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly editRule_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningRuleSetRequest"] + } + } + readonly responses: { + /** @description The updated rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningRule"] + } + } + /** @description The request did not contain a correctly formed rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to edit repository rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteRule_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Empty response indicating that the rule was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user is not permitted to delete repository rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAutoDeclineSettings_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The auto decline settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoDeclineSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the auto decline settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setAutoDeclineSettings_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The settings to create or update */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAutoDeclineSettingsRequest"] + } + } + readonly responses: { + /** @description The auto decline settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoDeclineSettings"] + } + } + /** @description inactivityWeeks was not one of 1, 2, 4, 8, or, 12, or the enabled parameter was not included in the request. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create or update the auto decline settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAutoDeclineSettings_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The auto decline settings have been deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the auto decline settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly get_5: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pull request auto-merge settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoMergeRestrictedSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the pull request auto-merge settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly set_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The settings to create or update */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAutoMergeSettingsRequest"] + } + } + readonly responses: { + /** @description The pull request auto-merge settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoMergeRestrictedSettings"] + } + } + /** @description The 'enabled' field was not provided correctly. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create or update the pull request auto-merge settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The pull request auto-merge settings cannot be modified due to a restriction enforced by the supplied repository's project. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete_5: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pull request auto-merge settings */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the pull request auto-merge settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The pull request auto-merge settings cannot be modified due to a restriction enforced by the supplied repository's project. */ + readonly 403: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositoryHooks_1: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description The optional type to filter by. */ + readonly type?: "POST_RECEIVE" | "PRE_RECEIVE" + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of repository hooks with their associated enabled state. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepositoryHook"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the hooks. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositoryHook_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository hooks with their associated enabled state for the supplied hookKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryHook"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the hook. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository hook does not exist for the given repository, or the repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteRepositoryHook: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The hook configuration matching the supplied hookKey and repositorySlug was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The settings specified are invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to delete the hook. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or hook does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly enableHook_1: { + readonly parameters: { + readonly query?: never + readonly header?: { + /** @description The content length. */ + readonly "Content-Length"?: string + } + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository hooks with their associated enabled state for the supplied hookKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryHook"] + } + } + /** @description The currently authenticated user has insufficient permissions to enable the hook. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or hook does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly disableHook_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository hooks with their associated enabled state for the supplied hookKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryHook"] + } + } + /** @description The currently authenticated user has insufficient permissions to disable the hook. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or hook does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSettings_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The settings for the hook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ExampleSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the hook settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or hook does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setSettings_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The raw settings. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["ExampleSettings"] + } + } + readonly responses: { + /** @description The settings for the hook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ExampleSettings"] + } + } + /** @description The settings specified are invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to modify the hook settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or hook does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPullRequestSettings_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository pull request settings for the context repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryPullRequestSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to see the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updatePullRequestSettings_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The updated settings. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRepositoryPullRequestSettings"] + } + } + readonly responses: { + /** @description The repository pull request settings for the context repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryPullRequestSettings"] + } + } + /** @description The repository pull request settings were not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to see the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getReviewerGroups_1: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A `page` of reviewer group(s) of the provided scope and its inherited scope. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestReviewerGroup"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository scope supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly create_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The request containing the details of the reviewer group. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + readonly responses: { + /** @description The newly created reviewer group. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + /** @description The request is missing a reviewer group name. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository scope supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The new created name already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getReviewerGroup_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the reviewer group to be retrieved */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The reviewer group. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The ID supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly update_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the reviewer group to be updated */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The request containing the attributes of the reviewer group to be updated. Only the attributes to be updated need to be present in this object. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + readonly responses: { + /** @description The updated reviewer group. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + /** @description The updated attribute does not meet the requirements. E.g. the name exceeds 50 characters, setting name to blank. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository scope supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The new updated name already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete_7: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the reviewer group to be deleted */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The operation was successful */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the reviewer group in this repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied reviewer group ID. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUsers: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the reviewer group to be retrieved */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of users of a reviewer group. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": readonly components["schemas"]["RestApplicationUser"][] + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": components["schemas"]["RestErrors"] + } + } + /** @description The ID supplied does not exist.d */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": components["schemas"]["RestErrors"] + } + } + } + } + readonly getTags: { + readonly parameters: { + readonly query?: { + /** @description The text to match on. */ + readonly filterText?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated) */ + readonly orderBy?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The tags matching the supplied filterText. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestTag"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to read the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createTagForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The request to create a tag containing a name, startPoint, and optionally a message */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestCreateTagRequest"] + } + } + readonly responses: { + /** @description The created tag. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestTag"] + } + } + /** @description The currently authenticated user has insufficient permissions to write to the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getTag: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the tag to be retrieved. */ + readonly name: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The tag which matches the supplied name. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestTag"] + } + } + /** @description The currently authenticated user has insufficient permissions to read the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified tag does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly watch_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The repository to watch. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRepository"] + } + } + readonly responses: { + /** @description The user is now watching the repository. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly unwatch_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user is no longer watching the repository. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to view the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findWebhooks_1: { + readonly parameters: { + readonly query?: { + /** @description List of com.atlassian.webhooks.WebhookEvent IDs to filter for */ + readonly event?: string + /** @description true if statistics should be provided for all found webhooks */ + readonly statistics?: boolean + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of webhooks. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to find webhooks in the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createWebhook_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The webhook to be created for this repository. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + readonly responses: { + /** @description A created webhook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + /** @description The webhook parameters were invalid or not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create webhooks in the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getWebhook_1: { + readonly parameters: { + readonly query?: { + /** @description true if statistics should be provided for the webhook */ + readonly statistics?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description ID of the webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A webhook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + /** @description The currently authenticated user has insufficient permissions to get a webhook in the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist, or the webhook does not exist in the repository. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateWebhook_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description Id of the existing webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + /** @description The representation of the updated values for the webhook */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + readonly responses: { + /** @description A webhook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + /** @description The currently authenticated user has insufficient permissions to update a webhook in this repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist, or the webhook does not exist in the repository. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteWebhook_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The ID of the webhook to be deleted. */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The webhook for the repository has been deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete webhooks in the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist, or webhook does not exist in this repository. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getLatestInvocation_1: { + readonly parameters: { + readonly query?: { + /** @description The string ID of a specific event to retrieve the last invocation for. */ + readonly event?: string + /** @description The outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered */ + readonly outcome?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description ID of the webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A webhook invocation dataset. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDetailedInvocation"] + } + } + /** @description No webhook invocations exist. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to get webhook invocations in the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist, or the webhook does not exist in the repository. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getStatistics_1: { + readonly parameters: { + readonly query?: { + /** @description The string ID of a specific event to retrieve the last invocation for. May be empty, in which case all events are considered */ + readonly event?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description ID of the webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A webhook invocation dataset. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestInvocationHistory"] + } + } + /** @description The currently authenticated user has insufficient permissions to get webhook statistics in the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist, or the webhook does not exist in the repository. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getStatisticsSummary_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description ID of the webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A webhook invocation dataset. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestInvocationHistory"] + } + } + /** @description The currently authenticated user has insufficient permissions to get webhook statistics summary in the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The repository does not exist, or the webhook does not exist in the repository. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly searchWebhooks: { + readonly parameters: { + readonly query?: { + /** @description List of com.atlassian.webhooks.WebhookEvent ids to filter for */ + readonly event?: string + /** @description Scopes to filter by. This parameter can be specified once e.g. "scopeType=repository", or twice e.g. "scopeType=repository&scopeType=project", to filter by more than one scope level. */ + readonly scopeType?: string + /** @description true if statistics should be provided for all found webhooks */ + readonly statistics?: boolean + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of webhooks. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to find webhooks in the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly testWebhook_1: { + readonly parameters: { + readonly query?: { + /** @description Whether SSL verification is required for the specified webhook URL. Default value is true. */ + readonly sslVerificationRequired?: string + /** @description The url in which to connect to */ + readonly url?: string + readonly webhookId?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description Basic authentication credentials, if required. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestWebhookCredentials"] + } + } + readonly responses: { + /** @description A webhook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestWebhookRequestResponse"] + } + } + /** @description The currently authenticated user has insufficient permissions to test a connection. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly searchAllowlistRule: { + readonly parameters: { + readonly query?: { + /** + * @description Filter names by the provided text + * @example Access + */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Order by */ + readonly order?: "NAME_ASC" | "NAME_DESC" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Page of allowlist rules */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestSecretScanningAllowlistRule"][] + } + } + } + /** @description The request was not correctly formed allowlist rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to view project allowlist rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createAllowlistRule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description Allowlist rule to create, either the line regular expression or the path regular expression must be present */ + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningAllowlistRuleSetRequest"] + } + } + readonly responses: { + /** @description The created allowlist rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningAllowlistRule"] + } + } + /** @description The request did not contain a correctly formed allowlist rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to create project allowlist rules. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllowlistRule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The allowlist rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested allowlist rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningAllowlistRule"] + } + } + /** @description The authenticated user is not permitted to view project allowlist rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested allowlist rules was not found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly editAllowlistRule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The allowlist rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningAllowlistRuleSetRequest"] + } + } + readonly responses: { + /** @description The updated allowlist rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningAllowlistRule"] + } + } + /** @description The request did not contain a correctly formed allowlist rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to modify project allowlist rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAllowlistRule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The allowlist rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Empty response indicating that the rule was deleted, or not found at this location */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user is not permitted to delete project rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findExemptReposByProject: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Order by project name followed by repository name either ascending or descending, defaults to ascending. */ + readonly order?: "NAME_ASC" | "NAME_DESC" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Page of repositories */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepository"][] + } + } + } + /** @description The authenticated user is not permitted to search exempt repositories for this project */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly bulkAddExemptRepositories_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "*/*": readonly components["schemas"]["RestRepositorySelector"][] + } + } + readonly responses: { + /** @description All requested repositories were made exempt */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user is not permitted to exempt a repository from secret scanning. No repositories were made exempt. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly search_1: { + readonly parameters: { + readonly query?: { + /** + * @description Filter names by the provided text + * @example Access + */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Order by */ + readonly order?: "NAME_ASC" | "NAME_DESC" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Page of rules */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestSecretScanningRule"][] + } + } + } + /** @description The request was not correctly formed rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to view project rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createRule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description Rule to create, either the line regular expression or the path regular expression must be present */ + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningRuleSetRequest"] + } + } + readonly responses: { + /** @description The created rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningRule"] + } + } + /** @description The request did not contain a correctly formed rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to create project rules. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningRule"] + } + } + /** @description The authenticated user is not permitted to view project rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested rules was not found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly editRule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningRuleSetRequest"] + } + } + readonly responses: { + /** @description The updated rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningRule"] + } + } + /** @description The request did not contain a correctly formed rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to modify project rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteRule: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The rule id. + * @example 7 + */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Empty response indicating that the rule was deleted, or not found at this location */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user is not permitted to delete project rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly get_7: { + readonly parameters: { + readonly query: { + /** @description The component key to uniquely identify individually restrictable subcomponents of a feature within the provided feature key and namespace */ + readonly componentKey?: string + /** @description The feature key to uniquely identify the feature within the provided namespace */ + readonly featureKey: string + /** @description The namespace used to identify the provider of the feature */ + readonly namespace: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The settings restriction associated with the provided namespace and feature key */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestProjectSettingsRestriction"] + } + } + /** @description The settings restriction could not be retrieved because the provided parameters were invalid. Possible issues include: + * + * - The namespace was not provided, or longer than 255 characters + * - The featureKey was not provided, or longer than 255 characters + * - The provided componentKey was fewer than 2 characters, or longer than 255 characters */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve a settings restriction */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, or settings restriction does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly create_3: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The project settings restriction to create */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["RestProjectSettingsRestrictionRequest"] + } + } + readonly responses: { + /** @description The settings restriction was successfully created */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestProjectSettingsRestriction"] + } + } + /** @description The settings restriction was not created because the request was invalid. Possible issues include: + * + * - The namespace was not provided, or longer than 255 characters + * - The featureKey was not provided, or longer than 255 characters + * - The provided componentKey was fewer than 2 characters, or longer than 255 characters */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a settings restriction */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description A settings restriction with the same namespace, featureKey and componentKey already exists on this project */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete_9: { + readonly parameters: { + readonly query: { + /** @description A key to uniquely identify individually restrictable subcomponents of a feature within the provided feature key and namespace */ + readonly componentKey?: string + /** @description A key to uniquely identify the feature within the provided namespace */ + readonly featureKey: string + /** @description A namespace used to identify the provider of the feature */ + readonly namespace: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified settings restriction was successfully deleted or there were no existing restrictions that match the specified criteria. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The settings restriction was not deleted because the request was invalid. Possible issues include: + * + * - The namespace was not provided, or longer than 255 characters + * - The featureKey was not provided, or longer than 255 characters + * - The provided componentKey was fewer than 2 characters, or longer than 255 characters */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to delete a settings restriction */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAll: { + readonly parameters: { + readonly query: { + /** @description A key to uniquely identify the feature within the provided namespace */ + readonly featureKey: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description A namespace used to identify the provider of the feature */ + readonly namespace: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of settings restrictions associated with the provided namespace and feature key */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestProjectSettingsRestriction"][] + } + } + } + /** @description The settings restrictions could not be retrieved because the provided parameters were invalid. Possible issues include: + * + * - The namespace was not provided, or longer than 255 characters + * - The featureKey was not provided, or longer than 255 characters */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve project settings restrictions */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAutoDeclineSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The auto decline settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoDeclineSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the auto decline settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setAutoDeclineSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The settings to create or update */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAutoDeclineSettingsRequest"] + } + } + readonly responses: { + /** @description The auto decline settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoDeclineSettings"] + } + } + /** @description inactivityWeeks was not one of 1, 2, 4, 8, or, 12, or the enabled parameter was not included in the request. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create or update the auto decline settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAutoDeclineSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The auto decline settings have been deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the auto decline settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly get_4: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pull request auto-merge settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoMergeRestrictedSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the pull request auto-merge settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly set: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The settings to create or update */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAutoMergeProjectSettingsRequest"] + } + } + readonly responses: { + /** @description The pull request auto-merge settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAutoMergeRestrictedSettings"] + } + } + /** @description The 'enabled' and 'restrictionAction' fields were not provided correctly. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create or update the pull request auto-merge settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete_4: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The pull request auto-merge settings */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the pull request auto-merge settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositoryHooks: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description The optional type to filter by. */ + readonly type?: "POST_RECEIVE" | "PRE_RECEIVE" + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of repository hooks with their associated enabled state. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepositoryHook"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the hooks. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositoryHook: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Returns the repository hooks with their associated enabled state for the supplied hookKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryHook"] + } + } + /** @description The currently authenticated user has insufficient permissions to enable the hook. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository hook does not exist for the given project, or the project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly enableHook: { + readonly parameters: { + readonly query?: never + readonly header?: { + /** @description The content length. */ + readonly "Content-Length"?: number + } + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository hooks with their associated enabled state for the supplied hookKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryHook"] + } + } + /** @description The settings specified are invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to enable the hook. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project or hook does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly disableHook: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository hooks with their associated enabled state for the supplied hookKey. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryHook"] + } + } + /** @description The currently authenticated user has insufficient permissions to disable the hook. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project or hook does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The hook key. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The settings for the hook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ExampleSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the hook settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project or hook does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The complete module key of the hook module. */ + readonly hookKey: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The raw settings. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["ExampleSettings"] + } + } + readonly responses: { + /** @description The settings for the hook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ExampleSettings"] + } + } + /** @description The settings specified are invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to modify the hook settings. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project or hook does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPullRequestSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The SCM to get strategies for. */ + readonly scmId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The merge configuration of the request project. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestSettings"] + } + } + /** @description The currently authenticated user has insufficient permissions to see the request repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The request repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updatePullRequestSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The SCM to get strategies for. */ + readonly scmId: string + } + readonly cookie?: never + } + /** @description The settings. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestSettings"] + } + } + readonly responses: { + /** @description The merge configuration of the request project. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestSettings"] + } + } + /** @description The repository pull request merge strategies were not updated due to a validation error. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to administrate the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getReviewerGroups: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of reviewer group(s) of the provided scope. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestReviewerGroup"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project scope supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly create_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The reviewer group to be create */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + readonly responses: { + /** @description The newly created reviewer group. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + /** @description The request is missing a reviewer group name. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project scope supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The new created name already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getReviewerGroup: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the reviewer group to be retrieved */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The reviewer group. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The ID supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly update_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the reviewer group to be updated */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The request containing the attributes of the reviewer group to be updated. Only the attributes to be updated need to be present in this object. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + readonly responses: { + /** @description A page of changes. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestReviewerGroup"] + } + } + /** @description The updated attribute does not meet the requirements. E.g. the name exceeds 50 characters, setting name to blank. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to view the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project scope supplied does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The new updated name already exists. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly delete_6: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the reviewer group to be deleted */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The operation was successful. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the reviewer group in this project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Unable to find the supplied reviewer group ID. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findWebhooks: { + readonly parameters: { + readonly query?: { + /** @description List of com.atlassian.webhooks.WebhookEvent IDs to filter for */ + readonly event?: string + /** @description true if statistics should be provided for all found webhooks */ + readonly statistics?: boolean + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of webhooks. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to find webhooks in the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createWebhook: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The webhook to be created for this project. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + readonly responses: { + /** @description A created webhook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + /** @description The webhook parameters were invalid or not supplied. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create webhooks in the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getWebhook: { + readonly parameters: { + readonly query?: { + /** @description true if statistics should be provided for the webhook */ + readonly statistics?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description ID of the webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A webhook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + /** @description The currently authenticated user has insufficient permissions to get a webhook in the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project does not exist, or the webhook does not exist in the project. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateWebhook: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description Id of the existing webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + /** @description The representation of the updated values for the webhook */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + readonly responses: { + /** @description A webhook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestWebhook"] + } + } + /** @description The currently authenticated user has insufficient permissions to update a webhook in this project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project does not exist, or the webhook does not exist in the project. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteWebhook: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the webhook to be deleted. */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The webhook for the project has been deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete webhooks in the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist, or webhook does not exist in this project. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getLatestInvocation: { + readonly parameters: { + readonly query?: { + /** @description The string ID of a specific event to retrieve the last invocation for. */ + readonly event?: string + /** @description The outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered */ + readonly outcome?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description ID of the webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A webhook invocation dataset. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDetailedInvocation"] + } + } + /** @description The currently authenticated user has insufficient permissions to get webhook invocations in the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist, or the webhook does not exist in the project. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getStatistics: { + readonly parameters: { + readonly query?: { + /** @description The string ID of a specific event to retrieve the last invocation for. May be empty, in which case all events are considered */ + readonly event?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description ID of the webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A webhook invocation dataset. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestInvocationHistory"] + } + } + /** @description The currently authenticated user has insufficient permissions to get webhook statistics in the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist, or the webhook does not exist in the project. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getStatisticsSummary: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description ID of the webhook */ + readonly webhookId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A webhook invocation dataset. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestInvocationHistory"] + } + } + /** @description No webhook invocations exist. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to get webhook statistics summary in the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The project does not exist, or the webhook does not exist in the project. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly testWebhook: { + readonly parameters: { + readonly query?: { + readonly sslVerificationRequired?: boolean + /** @description The url in which to connect to */ + readonly url?: string + readonly webhookId?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description Basic authentication credentials, if required. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestWebhookCredentials"] + } + } + readonly responses: { + /** @description A webhook. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestWebhookRequestResponse"] + } + } + /** @description The currently authenticated user has insufficient permissions to test a connection. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositories_1: { + readonly parameters: { + readonly query?: { + /** @description (optional) if specified, this will limit the resulting repository list to ones whose are ACTIVE, ARCHIVED or ALL for both. The match performed is case-insensitive. This filter defaults to ACTIVE when not set. Available since 8.0 */ + readonly archived?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description (optional) if specified, this will limit the resulting repository list to ones whose name matches this parameter's value. The match performed is case-insensitive and any leading and/or trailing whitespace characters on the name parameter will be stripped. */ + readonly name?: string + /** @description (optional) if specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default implicit 'read' permission level will be assumed. The currently supported explicit permission values are REPO_READ, REPO_WRITE and REPO_ADMIN. */ + readonly permission?: "REPO_ADMIN" | "REPO_READ" | "REPO_WRITE" + /** @description (optional) if specified, this will limit the resulting repository list to ones whose project's key matches this parameter's value. The match performed is case-insensitive and any leading and/or trailing whitespace characters on the projectKey parameter will be stripped. Available since 8.0 */ + readonly projectkey?: string + /** @description (optional) if specified, this will limit the resulting repository list to ones whose project's name matches this parameter's value. The match performed is case-insensitive and any leading and/or trailing whitespace characters on the projectname parameter will be stripped. */ + readonly projectname?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description (optional) if specified, it must be a valid repository state name and will limit the resulting repository list to ones that are in the specified state. The currently supported explicit state values are AVAILABLE, INITIALISING and INITIALISATION_FAILED.
Available since 5.13 */ + readonly state?: "AVAILABLE" | "INITIALISATION_FAILED" | "INITIALISING" + /** @description (optional) if specified, this will limit the resulting repository list based on the repositories visibility. Valid values are public or private. */ + readonly visibility?: "private" | "public" + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of repositories. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepository"][] + } + } + } + /** @description The visibility parameter contains an invalid value. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findExemptReposByScope: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Order by project name followed by repository name either ascending or descending, defaults to ascending. */ + readonly order?: "NAME_ASC" | "NAME_DESC" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Page of repositories */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRepository"][] + } + } + } + /** @description The authenticated user is not permitted to search exempt repositories globally */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly bulkAddExemptRepositories: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "*/*": readonly components["schemas"]["RestRepositorySelector"][] + } + } + readonly responses: { + /** @description All requested repositories were made exempt */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user is not permitted to exempt a repository from secret scanning. No repositories were made exempt. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description At least one of specified repositories have already been previously made exempt. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly search_4: { + readonly parameters: { + readonly query?: { + /** + * @description Filter by rule name + * @example Access + */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Order by */ + readonly order?: "NAME_ASC" | "NAME_DESC" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Page of rules */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestSecretScanningRule"][] + } + } + } + /** @description The request did not contain a correctly formed search request, see returned error for more details. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to search global rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createRule_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description Rule to create, either the line regular expression or the path regular expression must be present */ + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningRuleSetRequest"] + } + } + readonly responses: { + /** @description The created rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningRule"] + } + } + /** @description The request did not contain a correctly formed rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to create global rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRule_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The rule id. + * @example 7 + */ + readonly id: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningRule"] + } + } + /** @description The authenticated user is not permitted to get global rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested rule was not found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly editRule_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The rule id. + * @example 7 + */ + readonly id: string + } + readonly cookie?: never + } + readonly requestBody: { + readonly content: { + readonly "*/*": components["schemas"]["RestSecretScanningRuleSetRequest"] + } + } + readonly responses: { + /** @description The updated rule */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSecretScanningRule"] + } + } + /** @description The request did not contain a correctly formed rule. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to update global rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteRule_2: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description The rule id. + * @example 7 + */ + readonly id: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Empty response indicating that the rule was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The authenticated user is not permitted to delete global rules */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllCertificates: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of X.509 certificates */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestX509Certificate"] + } + } + /** @description The authenticated user is not permitted to get X.509 certificates */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createCertificate: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The multipart form data containing the certificate in a form-field named 'certificate' */ + readonly requestBody: { + readonly content: { + readonly "multipart/form-data": components["schemas"]["ExampleCertificateMultipartFormData"] + } + } + readonly responses: { + /** @description The newly created X.509 certificate */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestX509Certificate"] + } + } + /** @description The request did not contain a valid X.509 certificate request. See returned error for more details */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The authenticated user is not permitted to create X.509 certificates */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteCertificate: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the X.509 certificate. */ + readonly id: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response if the X.509 certificate was successfully deleted */ + readonly 204: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestX509Certificate"] + } + } + /** @description The authenticated user is not permitted to delete X.509 certificates */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description There is no X.509 certificate with the given ID */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateCertificateRevocationListEntries: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the issuer certificate. */ + readonly id: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Successfully started processing CRLs. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The authenticated user is not permitted to update X.509 CRL entries */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description There is no X.509 certificate with the given ID */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSystemSigningConfiguration: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The configuration details for system signing Git objects */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSystemSigningConfiguration"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the configuration details for system signing Git objects. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateSystemSigningConfiguration: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": { + /** @example false */ + readonly enabled?: boolean + } + } + } + readonly responses: { + /** @description The updated configuration details for system signing Git objects */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSystemSigningConfiguration"] + } + } + /** @description The configuration details could not be updated because the provided request was invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the configuration details for system signing Git objects. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUsers_2: { + readonly parameters: { + readonly query?: { + /** @description Return only users, whose username, name or email address contain the filter value */ + readonly filter?: string + /** @description return only users who are members of the given group */ + readonly group?: string + /** @description The "root" of a permission filter, whose value must be a valid global, project, or repository permission. Additional filter parameters referring to this filter that specify the resource (project or repository) to apply the filter to must be prefixed with permission.. See the section "Permission Filters" above for more details. */ + readonly permission?: string + /** @description The "root" of a single permission filter, similar to the permission parameter, where "N" is a natural number starting from 1. This allows clients to specify multiple permission filters, by providing consecutive filters as permission.1, permission.2 etc. Note that the filters numbering has to start with 1 and be continuous for all filters to be processed. The total allowed number of permission filters is 50 and all filters exceeding that limit will be dropped. See the section "Permission Filters" above for more details on how the permission filters are processed. */ + readonly "permission.N"?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of users. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestApplicationUser"] + } + } + /** @description The search request was invalid, which may happen for multiple reasons, among + * others: + * + * + * - permission filter for project/repository permission with no parameters specifying the project or repository to apply the filter to + * - invalid permission name + * - permission filter for a project/repository permission pointing to a non-existent project or repository + * + * + * The exact reason for the error and - in most cases - the request parameter name that had invalid value - will be + * provided in the error message. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Authentication failed or was not attempted. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateUserDetails_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The user update details */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["UserUpdate"] + } + } + readonly responses: { + /** @description The updated user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestApplicationUser"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Authentication failed or was not attempted. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUser: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The user slug */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user matching the supplied userSlug. Note, this may + * not be the user's username, always use the user.slug property. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestApplicationUser"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the user. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly uploadAvatar_1: { + readonly parameters: { + readonly query?: never + readonly header?: { + /** + * @description This resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to pass the XSRF check the caller needs to send an X-Atlassian-Token HTTP header with the value no-check. + * @example no-check + */ + readonly "X-Atlassian-Token"?: string + } + readonly path: { + /** @description The user slug */ + readonly userSlug: string + } + readonly cookie?: never + } + /** @description Multipart form data containing a single image in a form-field named 'avatar'. */ + readonly requestBody?: { + readonly content: { + readonly "multipart/form-data": components["schemas"]["ExampleAvatarMultipartFormData"] + } + } + readonly responses: { + /** @description The avatar was uploaded successfully. */ + readonly 201: { + headers: { + /** @description The Location response header which indicates the URL of the avatar. */ + readonly Location?: string + readonly [name: string]: unknown + } + content?: never + } + /** @description The currently authenticated user has insufficient permissions to update the avatar. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAvatar: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The user slug */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The new avatar URL if the local avatar was successfully deleted or did not exist */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestNamedLink"] + } + } + /** @description The authenticated user has insufficient permissions to delete the specified avatar. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified user does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getUserSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The user settings for the specified user slug. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["ExampleSettingsMap"] + } + } + /** @description The currently authenticated user does not have permission to view the settings of this user. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository, commit, or report does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The user slug. */ + readonly userSlug: string + } + readonly cookie?: never + } + /** @description A map with the UserSettings entries which must be updated. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["ExampleSettingsMap"] + } + } + readonly responses: { + /** @description The UserSettings were updated successfully */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not a project administrator. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateUserPassword_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The password update details */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["UserPasswordUpdate"] + } + } + readonly responses: { + /** @description The user's password was successfully updated. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request was malformed or the old password was incorrect. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Authentication failed or was not attempted. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly dismissRetentionConfigReviewNotification: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A blank response */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The currently authenticated user has insufficient permissions to dismiss the notification. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRestrictions_1: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Matcher id to filter on. Requires the matcherType parameter to be specified also. */ + readonly matcherId?: string + /** @description Matcher type to filter on */ + readonly matcherType?: + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description Types of restrictions to filter on. */ + readonly type?: + | "fast-forward-only" + | "no-deletes" + | "pull-request-only" + | "read-only" + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing a page of restrictions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRefRestriction"][] + } + } + } + /** @description The request has failed validation. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to get restrictions on the provided project */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No restriction exists for the provided ID. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createRestrictions_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The request containing a list of the details of the restrictions to create. */ + readonly requestBody?: { + readonly content: { + readonly "application/vnd.atl.bitbucket.bulk+json": readonly components["schemas"]["RestRestrictionRequest"][] + } + } + readonly responses: { + /** @description Response contains the ref restriction that was just created. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRefRestriction"] + } + } + /** @description The request has failed validation. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to perform this operation. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRestriction_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The restriction id. */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing the restriction. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRefRestriction"] + } + } + /** @description The request has failed validation. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to get restrictions on the provided project */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No restriction exists for the provided ID. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteRestriction_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The restriction id. */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the operation was successful */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request has failed validation. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to delete restrictions on the provided project */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRestrictions: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description Matcher id to filter on. Requires the matcherType parameter to be specified also. */ + readonly matcherId?: string + /** @description Matcher type to filter on */ + readonly matcherType?: + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description Types of restrictions to filter on. */ + readonly type?: + | "fast-forward-only" + | "no-deletes" + | "pull-request-only" + | "read-only" + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing a page of restrictions. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRefRestriction"][] + } + } + } + /** @description The request has failed validation. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to get restrictions on the provided project */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No restriction exists for the provided ID. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createRestrictions: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The request containing a list of the details of the restrictions to create. */ + readonly requestBody?: { + readonly content: { + readonly "application/vnd.atl.bitbucket.bulk+json": readonly components["schemas"]["RestRestrictionRequest"][] + } + } + readonly responses: { + /** @description Response contains the ref restriction that was just created. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRefRestriction"] + } + } + /** @description The request has failed validation. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to perform this operation. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRestriction: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The restriction id. */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing the restriction. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRefRestriction"] + } + } + /** @description The request has failed validation. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to get restrictions on the provided project */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No restriction exists for the provided ID. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteRestriction: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The restriction id. */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the operation was successful */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request has failed validation. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to delete restrictions on the provided project */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createBranch: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["RestBranchCreateRequest"] + } + } + readonly responses: { + /** @description JSON representation of the newly created branch */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestBranch"] + } + } + /** @description The branch was not created because the request was invalid, e.g. the provided + * ref name already existed in the repository, or was not a valid ref name in the + * repository */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a branch. This could be due to insufficient repository permissions, or lack of branch permission for the provided ref name */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The branch name overlapped with an existing branch */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteBranch: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description Branch delete request */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestBranchDeleteRequest"] + } + } + readonly responses: { + /** @description An empty response indicating that the branch no longer exists in the repository */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The branch was not deleted because the request was invalid, e.g. no ref name + * to delete was provided, or the provided ref name points to the default branch + * in the repository that cannot be deleted */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to delete a + * branch. This could be due to insufficient repository permissions, or lack of + * branch permission for the provided ref name. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly findByCommit: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + readonly commitId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of branch refs associated with the commit */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestMinimalRef"][] + } + } + } + /** @description The request has timed out processing the branch request */ + readonly 500: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getBuildStatus: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description How the results should be ordered. Options are NEWEST, OLDEST, STATUS + * @example newest, oldest, or status + */ + readonly orderBy?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description Full SHA1 of the commit (ex: e00cf62997a027bbf785614a93e2e55bb331d268) */ + readonly commitId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A Page of build statuses associated with the commit
(limited to the most recent 100 build statuses associated with the commit) */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestBuildStatus"][] + } + } + } + /** @description The user is not authenticated or does not have the LICENSED permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addBuildStatus: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** + * @description full SHA1 of the commit + * @example e00cf62997a027bbf785614a93e2e55bb331d268 + */ + readonly commitId: string + } + readonly cookie?: never + } + /** @description build status to associate with the commit */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestBuildStatus"] + } + } + readonly responses: { + /** @description An empty response if the build status was successfully stored */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description An error message if the commitId is not a full 40-characters SHA1, if the build status has a missing mandatory field or if the fields are too large */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The user is not authenticated or does not have the LICENSED permission */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMultipleBuildStatusStats: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description full SHA1 of each commit */ + readonly requestBody?: { + readonly content: { + readonly "application/json": readonly string[] + } + } + readonly responses: { + /** @description The number of successful/failed/in-progress/cancelled/unknown builds for each commit (with the caveat that the commits without any builds associated with them will not be present in the response) */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMultipleBuildStats"] + } + } + /** @description The user is not authenticated or does not have the LICENSED permission */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getBuildStatusStats: { + readonly parameters: { + readonly query?: { + /** @description include a unique build result if there is either only one failed build, only one in-progress build or only one successful build */ + readonly includeUnique?: boolean + } + readonly header?: never + readonly path: { + /** + * @description full SHA1 of the commit + * @example e00cf62997a027bbf785614a93e2e55bb331d268 + */ + readonly commitId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The number of successful/failed/in-progress/cancelled/unknown builds for the commit */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestBuildStats"] + } + } + /** @description The user is not authenticated or does not have the LICENSED permission. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly react: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The comment id */ + readonly commentId: string + /** @description The commit id */ + readonly commitId: string + /** @description The emoticon to add */ + readonly emoticon: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The added reaction */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestUserReaction"] + } + } + } + } + readonly unReact: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The comment id */ + readonly commentId: string + /** @description The commit id */ + readonly commitId: string + /** @description The emoticon to remove */ + readonly emoticon: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The added reaction */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly react_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The comment id. */ + readonly commentId: string + /** @description The emoticon to add */ + readonly emoticon: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request id. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The added reaction */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestUserReaction"] + } + } + } + } + readonly unReact_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The comment id. */ + readonly commentId: string + /** @description The emoticon to remove */ + readonly emoticon: string + /** @description The project key. */ + readonly projectKey: string + /** @description The pull request id. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The added reaction */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly createPullRequestCondition: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The details needed to create a default reviewer pull request condition. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestDefaultReviewersRequest"] + } + } + readonly responses: { + /** @description The default reviewer pull request condition that was created. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestCondition"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updatePullRequestCondition: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the pull request condition. */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The new details for the default reviewer pull request condition. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestDefaultReviewersRequest"] + } + } + readonly responses: { + /** @description The updated default reviewer pull request condition. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestCondition"] + } + } + /** @description The request was malformed */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deletePullRequestCondition: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the pull request condition. */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the pull request condition was deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description An empty response indicating a pull request condition with the given ID could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPullRequestConditions: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The default reviewer pull request conditions associated with the given project. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": readonly components["schemas"]["RestPullRequestCondition"][] + } + } + } + } + readonly createPullRequestCondition_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The details needed to create a default reviewer pull request condition. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestDefaultReviewersRequest"] + } + } + readonly responses: { + /** @description The default reviewer pull request condition that was created. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestCondition"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updatePullRequestCondition_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The ID of the pull request condition */ + readonly id: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": { + /** + * Format: int32 + * @example 1 + */ + readonly requiredApprovals?: number + readonly reviewers?: readonly components["schemas"]["RestApplicationUser"][] + readonly sourceMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + readonly targetMatcher?: { + /** @example main */ + readonly displayId?: string + /** @example refs/heads/main */ + readonly id?: string + readonly type?: { + /** @enum {string} */ + readonly id?: + | "ANY_REF" + | "BRANCH" + | "MODEL_BRANCH" + | "MODEL_CATEGORY" + | "PATTERN" + /** @example Branch */ + readonly name?: string + } + } + } + } + } + readonly responses: { + /** @description The updated default reviewer pull request condition. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestCondition"] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deletePullRequestCondition_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + readonly id: number + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the pull request condition was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description An empty response indicating a pull request condition with the given ID could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPullRequestConditions_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The default reviewer pull request conditions associated with the given repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": readonly components["schemas"]["RestPullRequestCondition"][] + } + } + } + } + readonly getReviewers: { + readonly parameters: { + readonly query?: { + /** @description The ID of the source ref */ + readonly sourceRefId?: string + /** @description The ID of the repository in which the source ref exists */ + readonly sourceRepoId?: string + /** @description The ID of the target ref */ + readonly targetRefId?: string + /** @description The ID of the repository in which the target ref exists */ + readonly targetRepoId?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The default reviewer pull request conditions associated with the given repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": readonly components["schemas"]["RestPullRequestCondition"][] + } + } + /** @description The request was malformed. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestErrors"] + } + } + } + } + readonly getDefaultTasks_1: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description If present or `"true"`, includes a markup-rendered description */ + readonly markup?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of default tasks */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDefaultTask"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to delete default tasks */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addDefaultTask_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The task to be added */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["RestDefaultTaskRequest"] + } + } + readonly responses: { + /** @description The default task */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDefaultTask"] + } + } + /** @description One or more of the following error cases occurred (check the error message for more details): + * + * + * - the description is empty- the sourceMatcher or targetMatcher is invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to add a default task */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAllDefaultTasks_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The default tasks have been deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete default tasks */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateDefaultTask_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The ID of the default task */ + readonly taskId: string + } + readonly cookie?: never + } + /** @description The task to be updated */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["RestDefaultTaskRequest"] + } + } + readonly responses: { + /** @description The default task */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDefaultTask"] + } + } + /** @description One or more of the following error cases occurred (check the error message for more details): + * + * + * - the provided taskId does not exist- the description is empty- the sourceMatcher or targetMatcher is invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to add a default task */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteDefaultTask_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + /** @description The ID of the default task */ + readonly taskId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The default task has been deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete default tasks */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or task does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getDefaultTasks: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description If present or "true", includes a markup-rendered description */ + readonly markup?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of default tasks */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestDefaultTask"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to delete default tasks */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addDefaultTask: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + /** @description The task to be added */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["RestDefaultTaskRequest"] + } + } + readonly responses: { + /** @description The default task */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDefaultTask"] + } + } + /** @description One or more of the following error cases occurred (check the error message for more details): + * + * + * - the description is empty- the sourceMatcher or targetMatcher is invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to add a default task */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAllDefaultTasks: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The default tasks have been deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete default tasks */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateDefaultTask: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the default task */ + readonly taskId: string + } + readonly cookie?: never + } + /** @description The task to be updated */ + readonly requestBody: { + readonly content: { + readonly "application/json": components["schemas"]["RestDefaultTaskRequest"] + } + } + readonly responses: { + /** @description The default task */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestDefaultTask"] + } + } + /** @description One or more of the following error cases occurred (check the error message for more details): + * + * + * - the provided taskId does not exist- the description is empty- the sourceMatcher or targetMatcher is invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to add a default task */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteDefaultTask: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the default task */ + readonly taskId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The default task has been deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete default tasks */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project or task does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly canRebase: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The rebaseability status of the pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestRebaseability"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the specified pull request. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly rebase: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The ID of the pull request within the repository. */ + readonly pullRequestId: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The pull request rebase request. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestPullRequestRebaseRequest"] + } + } + readonly responses: { + /** @description The merged pull request. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestPullRequestRebaseResult"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the pull request and/or to update its source branch. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or pull request does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Any of the following error cases occurred (check the error message for more details): + * + * - The rebase encountered conflicts. + * - The rebase discarded all of the incoming commits and would have left the pull request empty + * - A PreRepositoryHook vetoed the rebase. + * - The specified version is out of date. + * - The specified pull request is not open. + * - The target repository is archived. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createTag: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The create git tag request. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestGitTagCreateRequest"] + } + } + readonly responses: { + /** @description A JSON representation of the newly created tag. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestTag"] + } + } + /** @description The tag was not created because the request was invalid, e.g. the provided ref name already existed in the repository, or was not a valid ref name in the repository, or the start point is invalid. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a tag. This could be due to insufficient repository permissions. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteTag: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The name of the tag to be deleted. */ + readonly name: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating that the tag no longer exists in the repository. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The tag was not deleted because repository is either empty, or is not a git repository. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to delete a tag. This could be due to insufficient repository permissions. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description If the tag doesn't exist in the repository. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getKeysForUser: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description The name of the user to get keys for (optional; requires ADMIN permission or higher). */ + readonly user?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Returns a paged response of of keys for the user. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestGpgKey"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to perform this operation. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addKey: { + readonly parameters: { + readonly query?: { + /** @description The name of the user to add a key for (optional; requires ADMIN permission or higher). */ + readonly user?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The request body. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestGpgKey"] + } + } + readonly responses: { + /** @description Response contains the GPG key that was just created. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestGpgKey"] + } + } + /** @description The request has failed validation. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to perform this operation. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteForUser: { + readonly parameters: { + readonly query?: { + /** @description The username of the user to delete the keys for. If no username is specified, the GPG keys will be deleted for the currently authenticated user. */ + readonly user?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The GPG keys matching the supplied user were deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the GPG keys. This is only possible when a user is explicitly supplied. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No user matches the supplied user. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteKey: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The GPG fingerprint or ID. */ + readonly fingerprintOrId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The key has been deleted successfully. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to perform this operation. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAnnotations_1: { + readonly parameters: { + readonly query?: { + /** @description Return only annotations that have one of the provided external IDs. Can be specified more than once to filter by more than one external ID. */ + readonly externalId?: string + /** @description Return only annotations that belong to one of the provided report keys. Can be specified more than once to filter by more than one report */ + readonly key?: string + /** @description Return only annotations that appear on one of the provided paths. Can be specified more than once to filter by more than one path. */ + readonly path?: string + /** @description Return only annotations that have one of the given severities. Can be specified more than once to filter by more than one severity. Valid severities are LOW, MEDIUM and HIGH. */ + readonly severity?: string + /** @description Return only annotations that have one of the given types. Can be specified more than once to filter by multiple types. Valid types are BUG, CODE_SMELL, and VULNERABILITY. */ + readonly type?: string + } + readonly header?: never + readonly path: { + /** @description The commit ID on which to record the annotation. This must be a full 40 character commit hash. */ + readonly commitId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The requested annotations. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestInsightAnnotationsResponse"] + } + } + /** @description The currently authenticated user has insufficient permissions (REPO_READ) to get insight annotations. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository, commit, or report does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getReports: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The commit ID on which to record the annotation. This must be a full 40 character commit hash. */ + readonly commitId: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of reports */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestInsightReport"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions (REPO_READ) to get insight reports. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository or commit does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getACodeInsightsReport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit ID on which to record the annotation. This must be a full 40 character commit hash. */ + readonly commitId: string + /** @description The report key. */ + readonly key: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified report. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestInsightReport"] + } + } + /** @description The currently authenticated user has insufficient permissions (REPO_READ needed) to get insight reports. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository, commit, or report does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setACodeInsightsReport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit ID on which to record the annotation. This must be a full 40 character commit hash. */ + readonly commitId: string + /** @description A unique string representing the report as chosen by the reporter. This should be unique enough to not clash with other report's keys. To do this, we recommend namespacing the key using reverse DNS */ + readonly key: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The request object containing the details of the report to create (see example). */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestSetInsightReportRequest"] + } + } + readonly responses: { + /** @description The created report. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestInsightReport"] + } + } + /** @description One of the following error cases occurred (check the error message for more details): + * + * - The request does not contain a report title. + * - The data field contains unsupported objects. + * - The request does not contain a report key/ + * - The provided commit hash is invalid, according to the validation rules mentioned for the commitId above. + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to create an insight report or authentication failed. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteACodeInsightsReport: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit ID on which to record the annotation. This must be a full 40 character commit hash. */ + readonly commitId: string + /** @description The key of the report to which this annotation belongs. */ + readonly key: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The report and associated annotations were successfully deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete insight reports or was not the author (REPO_READ for author otherwise REPO_ADMIN). */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository, commit or report does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAnnotations: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit ID on which to record the annotation. This must be a full 40 character commit hash. */ + readonly commitId: string + /** @description The report key. */ + readonly key: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The specified annotations. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestInsightAnnotationsResponse"] + } + } + /** @description The currently authenticated user has insufficient permissions (REPO_READ needed) to get insight reports. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository, commit, or report does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addAnnotations: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit ID on which to record the annotation. This must be a full 40 character commit hash. */ + readonly commitId: string + /** @description The key of the report to which this annotation belongs. */ + readonly key: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The annotations to add. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestBulkAddInsightAnnotationRequest"] + } + } + readonly responses: { + /** @description An empty response indicating that the request succeeded. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not the author of the report, or the author no longer has sufficient permissions (REPO_READ). */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository, commit, or report does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteAnnotations: { + readonly parameters: { + readonly query?: { + /** @description The external IDs for the annotations that are to be deleted. Can be specified more than once to delete by more than one external ID, or can be unspecified to delete all annotations. */ + readonly externalId?: string + } + readonly header?: never + readonly path: { + /** @description The commit ID on which to record the annotation. This must be a full 40 character commit hash. */ + readonly commitId: string + /** @description The key of the report to which this annotation belongs. */ + readonly key: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The annotations were successfully deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete insight reports or was not the author (REPO_READ for author otherwise REPO_ADMIN). */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository, commit or report does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setAnnotation: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The commit ID on which to record the annotation. This must be a full 40 character commit hash. */ + readonly commitId: string + /** @description The external ID of the annotation that is to be updated or created */ + readonly externalId: string + /** @description The key of the report to which this annotation belongs */ + readonly key: string + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The new annotation that is to replace the existing one. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestSingleAddInsightAnnotationRequest"] + } + } + readonly responses: { + /** @description No content, indicating that the request succeeded. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user is not the author of the report, or the author no longer has sufficient permissions (REPO_READ). */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project, repository, commit, report or annotation does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createIssue: { + readonly parameters: { + readonly query?: { + /** @description id of the Jira server */ + readonly applicationId?: string + } + readonly header?: never + readonly path: { + /** @description the comment to associate the created Jira issue to */ + readonly commentId: string + } + readonly cookie?: never + } + /** @description A String representation of the JSON format Jira create issue request see: Jira REST API */ + readonly requestBody?: { + readonly content: { + readonly "application/json": string + } + } + readonly responses: { + /** @description The created Jira issue key and the associated comment ID */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestCommentJiraIssue"] + } + } + /** @description The specified application link ID does not match any linked Jira instance. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Authentication with the Jira instance is required. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getCommitsByIssueKey: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description The maximum number of changes to retrieve for each changeset */ + readonly maxChanges?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The issue key to search by */ + readonly issueKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of detailed changesets */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestChangeset"][] + } + } + } + } + } + readonly getEnhancedEntityLinkForProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The primary enhanced entitylink. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestEnhancedEntityLink"] + } + } + } + } + readonly getIssueKeysForPullRequest: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The pull request id */ + readonly pullRequestId: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A list of Jira issues keys for the pull request */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": readonly components["schemas"]["RestJiraIssue"][] + } + } + } + } + readonly getForRepository_1: { + readonly parameters: { + readonly query?: { + /** @description Controls whether SSH access keys configured at the project level should be included in the results or not. When set to true all keys that have access to the repository (including project level keys) are included in the results. When set to false, only access keys configured for the specified repository are considered. Default is false. */ + readonly effective?: string + /** @description If specified only SSH access keys with a label prefixed with the supplied string will be returned */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description If specified only SSH access keys with at least the supplied permission will be returned. Default is Permission.REPO_READ. */ + readonly minimumPermission?: string + readonly permission?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A single page of access keys for the repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestSshAccessKey"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the access keys for this repository */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestSshAccessKey"] + } + } + readonly responses: { + /** @description The newly created access key. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshAccessKey"] + } + } + /** @description The current request contains invalid or missing values. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to add an access key to the repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key id */ + readonly keyId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The access key for the repository and SSH key with ID keyId. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshAccessKey"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the access keys for this repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or key does not exist or the key does not have access on the repository. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokeForRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key id */ + readonly keyId: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The access key was deleted (or none was found matching the given id). */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to remove access keys for this repository */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updatePermission_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The newly created access key */ + readonly keyId: string + /** @description The new permission to be granted to the SSH key */ + readonly permission: string + /** @description The project key */ + readonly projectKey: string + /** @description The repository slug */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The newly created access key. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshAccessKey"] + } + } + /** @description The currently authenticated user has insufficient permissions on the repository to edit its access keys. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSshKeysForProject: { + readonly parameters: { + readonly query?: { + /** @description If specified only SSH access keys with a label prefixed with the supplied string will be returned. */ + readonly filter?: string + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** @description If specified only SSH access keys with at least the supplied permission will be returned Default is PROJECT_READ. */ + readonly permission?: string + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A single page of access keys associated with the project. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestSshAccessKey"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the access keys for this project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addForProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestSshAccessKey"] + } + } + readonly responses: { + /** @description The newly created access key. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshAccessKey"] + } + } + /** @description The current request contains invalid or missing values. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to add an access key to the project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getForProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key id */ + readonly keyId: string + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The access key for the repository and SSH key with ID keyId. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshAccessKey"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the access keys for this repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository or key does not exist or the key does not have access on the repository. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokeForProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The key id */ + readonly keyId: string + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The access key was deleted (or none was found matching the given id). */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to remove access keys for this project. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updatePermission: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The newly created access key */ + readonly keyId: string + /** @description The new permission to be granted to the SSH key */ + readonly permission: string + /** @description The project key */ + readonly projectKey: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The newly created access key. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshAccessKey"] + } + } + /** @description The currently authenticated user has insufficient permissions on the project to edit its access keys. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified project does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly revokeMany: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The identifier of the SSH key */ + readonly keyId: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": { + readonly projects?: components["schemas"]["RestProject"] + readonly repositories?: components["schemas"]["RestRepository"] + } + } + } + readonly responses: { + /** @description The access keys were deleted (or none was found matching the given id and repositories or projects). */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to remove access keys for one or more of the specified projects or repositories. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description On or more of the specified repositories or projects does not exist or the key itself does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getForProjects: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + readonly keyId: number + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The SSH key with ID keyId. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The specified key does not exist */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getForRepositories: { + readonly parameters: { + readonly query?: { + /** @description Include the readOnly field. The `readOnly` field is contextual for the user making the request. `readOnly` returns true if there is a restriction and the user does not have`PROJECT_ADMIN` access for the repository the key is associated with. */ + readonly withRestrictions?: string + } + readonly header?: never + readonly path: { + /** @description The key id */ + readonly keyId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The SSH key with ID keyId. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The specified key does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPreferredMirrorId: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the preferred mirror server */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirrorServer"] + } + } + /** @description The user's preferred mirror server could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setPreferredMirrorId: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description the mirror ID */ + readonly requestBody?: { + readonly content: { + readonly "application/json": string + } + } + readonly responses: { + /** @description an empty response indicating that the user setting has been updated */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The mirror could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deletePreferredMirrorId: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description an empty response indicating that the user setting has been updated */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly analyticsSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The analytics settings from upstream */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestAnalyticsSettings"] + } + } + } + } + readonly authenticate: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestAuthenticationRequest"] + } + } + readonly responses: { + /** @description The user for the supplied credentials and their effective permissions}. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestApplicationUserWithPermissions"] + } + } + /** @description If the supplied credentials are incomplete or not understood. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user is not permitted to authenticate on behalf of users or authentication with the supplied user credentials failed for some reason */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getFarmNodes: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The list of farm nodes */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": readonly components["schemas"]["RestClusterNode"][] + } + } + /** @description The upstream server could not be found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": components["schemas"]["RestErrors"] + } + } + } + } + readonly getMirroredRepository: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the repository ID */ + readonly externalRepositoryId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The mirrored repository's information. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirroredRepository"] + } + } + /** @description The upstream server or the repository could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly listMirrors: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description a page of mirrors */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestMirrorServer"][] + } + } + } + } + } + readonly getMirror: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the mirror ID */ + readonly mirrorId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the mirror */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirrorServer"] + } + } + /** @description The mirror could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly upgrade: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the mirror to upgrade */ + readonly mirrorId: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestMirrorUpgradeRequest"] + } + } + readonly responses: { + /** @description the mirror */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirrorServer"] + } + } + } + } + readonly remove: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the mirror to remove */ + readonly mirrorId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description an empty response indicating that the mirror has been removed */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly publishEvent: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the server id of the mirror that raised this event */ + readonly mirrorId: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRepositoryMirrorEvent"] + } + } + readonly responses: { + /** @description The event was successfully placed on the queue */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSynchronizationProgress: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the synchronization progress state */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSyncProgress"] + } + } + /** @description The upstream server could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getProjectById: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the requested project */ + readonly projectId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The project with the specified ID */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestProject"] + } + } + /** @description Project not found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllReposForProject: { + readonly parameters: { + readonly query?: { + /** @description includes defaultBranchId in the response, if true. Default value is false */ + readonly includeDefaultBranch?: "false" | "true" + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description the id of the requested project */ + readonly projectId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of repositories with content hashes */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["EnrichedRepository"][] + } + } + } + /** @description Mirroring is not available */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getAllContentHashes: { + readonly parameters: { + readonly query?: { + /** @description includes defaultBranchId for each repository in the response, if true. Default value is false. */ + readonly includeDefaultBranch?: "false" | "true" + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of repositories with content hashes and default branch */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["EnrichedRepository"] + } + } + /** @description Mirroring is not available */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getContentHashById: { + readonly parameters: { + readonly query?: { + readonly includeDefaultBranch?: boolean + } + readonly header?: never + readonly path: { + /** @description the ID of the requested repository */ + readonly repoId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The repository with the specified repoId */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["EnrichedRepository"] + } + } + /** @description Repository not found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositoryMirrors: { + readonly parameters: { + readonly query?: { + readonly preAuthorized?: boolean + } + readonly header?: never + readonly path: { + /** @description the ID of the requested repository */ + readonly repoId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The mirrored repository descriptor */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirroredRepositoryDescriptor"] + } + } + /** @description Mirroring is not available */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly listRequests: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + /** @description (optional) the request state to filter on */ + readonly state?: "ACCEPTED" | "PENDING" | "REJECTED" + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of mirroring requests */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestMirroringRequest"][] + } + } + } + } + } + readonly register: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestMirroringRequest"] + } + } + readonly responses: { + /** @description The created mirroring request */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirroringRequest"] + } + } + /** @description The request was invalid or missing */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMirroringRequest: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the mirroring request to retrieve */ + readonly mirroringRequestId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The mirroring request */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirroringRequest"] + } + } + /** @description The request could not be found */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteMirroringRequest: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the mirroring request to delete */ + readonly mirroringRequestId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The request was deleted */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The request could not be found */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly accept: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the request to accept */ + readonly mirroringRequestId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The accepted mirror server */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirrorServer"] + } + } + /** @description The request could not be found */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly reject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the request to reject */ + readonly mirroringRequestId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The rejected mirror server */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirrorServer"] + } + } + /** @description The request could not be found */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepoSyncStatus_1: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + readonly projectKey: string + readonly repoSlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The sync status of the repository on this node */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestMirrorRepositorySynchronizationStatus"] + } + } + } + } + readonly getRefChangesQueue: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The contents of the ref changes queue */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json;charset=UTF-8": components["schemas"]["RestRefSyncQueue"] + } + } + } + } + readonly getRefChangesQueueCount: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The total number of items currently in the ref changes queue */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + } + } + readonly getRepoSyncStatus: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The sync status of the repositories on this node */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestMirrorRepositorySynchronizationStatus"][] + } + } + } + } + } + readonly getMirrorSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the mirror settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestUpstreamSettings"] + } + } + /** @description The upstream server could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setMirrorSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description the mirror settings to update to */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestUpstreamSettings"] + } + } + readonly responses: { + /** @description the updated mirror settings */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestUpstreamSettings"] + } + } + /** @description The upstream server could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMirrorMode: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the current mirror mode */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The upstream server could not be found. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setMirrorMode: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": string + } + } + readonly responses: { + /** @description the mode to set */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + /** @description The provided mode is invalid */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getMirroredProjects: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the currently mirrored project IDs */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + } + } + readonly startMirroringProjects: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": readonly string[] + } + } + readonly responses: { + /** @description the currently mirrored project IDs */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + } + } + readonly startMirroringProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + readonly projectId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the currently mirrored project IDs */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": unknown + } + } + } + } + readonly stopMirroringProject: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the project ID to stop mirroring */ + readonly projectId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description the request has been processed */ + readonly 204: { + headers: Readonly> + content?: never + } + } + } + readonly getUpstreamServer: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The upstream server. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestUpstreamServer"] + } + } + /** @description The upstream server could not be found */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly endRollingUpgrade: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The state of the rolling upgrade which includes the current version on all the nodes in the farm. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRollingUpgradeState"] + } + } + /** @description When the user doesn't have SYS_ADMIN permission */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly startRollingUpgrade: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The state of the rolling upgrade which includes the minimum version of all the nodes in the farm. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRollingUpgradeState"] + } + } + /** @description When the user doesn't have SYS_ADMIN permission */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositoryArchivePolicy: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing the repository archive policy for the instance */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryPolicy"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the repository archive policy */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setRepositoryArchivePolicy: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The request containing the details of the policy. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRepositoryPolicy"] + } + } + readonly responses: { + /** @description A response containing the repository archive policy for the instance */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryPolicy"] + } + } + /** @description The permission was invalid or does not exist */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to set the repository archive policy */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getRepositoryDeletePolicy: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A response containing the repository delete policy for the instance */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryPolicy"] + } + } + /** @description The currently authenticated user has insufficient permissions to retrieve the repository delete policy */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setRepositoryDeletePolicy: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + /** @description The request containing the details of the policy. */ + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRepositoryPolicy"] + } + } + readonly responses: { + /** @description A response containing the repository delete policy for the instance */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRepositoryPolicy"] + } + } + /** @description The permission was invalid or does not exist */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to set the repository delete policy */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly createRequiredBuildsMergeCheck: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project that the repository belongs to */ + readonly projectKey: string + /** @description The repository being used */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The request specifying the required build parent keys, ref matcher and exemption matcher */ + readonly requestBody?: { + readonly content: { + readonly "*/*": components["schemas"]["RestRequiredBuildConditionSetRequest"] + } + } + readonly responses: { + /** @description A response containing the newly created required build merge check. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRequiredBuildCondition"] + } + } + /** @description The request was malformed. This could be caused because: + * + * - The build parent key list is empty + * - Either of the provided ref matchers is of an unrecognized type + * - Either of the provided ref matchers could not be created with the provided type and id + * + * + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a required build merge check in this repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly updateRequiredBuildsMergeCheck: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + readonly id: number + /** @description The project that the repository belongs to */ + readonly projectKey: string + /** @description The repository being used */ + readonly repositorySlug: string + } + readonly cookie?: never + } + /** @description The request specifying the required build parent keys, ref matcher and exemption matcher */ + readonly requestBody?: { + readonly content: { + readonly "*/*": components["schemas"]["RestRequiredBuildConditionSetRequest"] + } + } + readonly responses: { + /** @description The details needed to update a required build merge check. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRequiredBuildCondition"] + } + } + /** @description The request was malformed. This could be caused because: + * + * - The build parent key list is empty + * - Either of the provided ref matchers is of an unrecognized type + * - Either of the provided ref matchers could not be created with the provided type and id + * + * + * */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to create a required build merge check in this repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteRequiredBuildsMergeCheck: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + readonly id: number + /** @description The project that the repository belongs to */ + readonly projectKey: string + /** @description The repository being used */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An empty response indicating the merge check was successfully deleted, or was never present. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete a required build merge check in this repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getPageOfRequiredBuildsMergeChecks: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + } + readonly header?: never + readonly path: { + /** @description The project that the repository belongs to */ + readonly projectKey: string + /** @description The repository being used */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The required build merge checks associated with the provided repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestRequiredBuildCondition"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to request a page of required build merge checks in this repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSshKeys: { + readonly parameters: { + readonly query?: { + /** + * @description Number of items to return. If not passed, a page size of 25 is used. + * @example 25 + */ + readonly limit?: number + /** + * @description Start number for the page (inclusive). If not passed, first page is assumed. + * @example 0 + */ + readonly start?: number + readonly user?: string + /** @description the username of the user to retrieve the keys for. If no username is specified, the SSH keys will be retrieved for the current authenticated user. */ + readonly userName?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description A page of SSH keys. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": { + readonly isLastPage?: boolean + /** @example 25 */ + readonly limit?: number + /** Format: int32 */ + readonly nextPageStart?: number + /** @example 1 */ + readonly size?: number + /** Format: int32 */ + readonly start?: number + readonly values?: readonly components["schemas"]["RestSshKey"][] + } + } + } + /** @description The currently authenticated user has insufficient permissionsto retrieve the SSH keys. This is only possible when auser is explicitly supplied. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No user matches the supplied user */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly addSshKey: { + readonly parameters: { + readonly query?: { + /** @description the username of the user to add the SSH key for. If no username is specified, the SSH key will be added for the current authenticated user. */ + readonly user?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": { + readonly algorithmType?: string + /** Format: int32 */ + readonly bitLength?: number + /** Format: date-time */ + readonly createdDate?: string + /** + * Format: int32 + * @example 30 + */ + readonly expiryDays?: number + /** @example Cbg38r+gDCiNHqBk6Y1BKO+EvufFBqhFWIEXh8oq9MI */ + readonly fingerprint?: string + /** + * Format: int32 + * @example 1 + */ + readonly id?: number + /** @example me@127.0.0.1 */ + readonly label?: string + /** @example 1630041546434 */ + readonly lastAuthenticated?: string + /** @example ssh-rsa AAAAB3... me@127.0.0.1 */ + readonly text?: string + } + } + } + readonly responses: { + /** @description The newly created SSH key. */ + readonly 201: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshKey"] + } + } + /** @description The SSH key was not created because the key was not a valid RSA/DSA/ECDSA/Ed25519 key of a supported length. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Either there is no authenticated user or the currently authenticated user has insufficient permissions to add an SSH key. The latter is only possible when a user is explicitly supplied. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No user matches the supplied user */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The SSH key already exists on the system. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteSshKeys: { + readonly parameters: { + readonly query?: { + readonly user?: string + /** @description the username of the user to delete the keys for. If no username is specified, the SSH keys will be deleted for the current authenticated user. */ + readonly userName?: string + } + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The SSH keys matching the supplied user were deleted. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the SSH keys. This is only possible when a user is explicitly supplied. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No user matches the supplied user */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getSshKey: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the ID of the key to retrieve. */ + readonly keyId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description An SSH key. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshKey"] + } + } + /** @description The currently authenticated user has insufficient permissionsto retrieve the SSH key. This is only possible when akeyId is explicitly supplied. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description No SSH key matches the supplied keyId */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly deleteSshKey: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description the id of the key to delete. */ + readonly keyId: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The SSH key matching the supplied id was deleted or did not exist. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The currently authenticated user has insufficient permissions to delete the SSH key. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly sshSettings: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path?: never + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description The ssh settings from upstream */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestSshSettings"] + } + } + /** @description The request was not authenticated */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly getStatus: { + readonly parameters: { + readonly query?: { + /** @description Retrieves the synchronization status for the specified ref within the repository, rather than for the entire repository */ + readonly at?: string + } + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: never + readonly responses: { + /** @description Synchronization status for the specified repository, or specific ref within that repository. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRefSyncStatus"] + } + } + /** @description The currently authenticated user has insufficient permissions to view the repository, or the repository is not public if the request is anonymous. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly setEnabled: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRefSyncStatus"] + } + } + readonly responses: { + /** @description The updated synchronization status for the repository, after enabling synchronization. 204 NO CONTENT is returned instead after disabling synchronization. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRefSyncStatus"] + } + } + /** @description Synchronization has successfully been disabled. 200 OK, with updated status information, is returned instead after enabling synchronization. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The JSON payload for the request did not define the "enabled" property. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to manage synchronization in the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } + readonly synchronize: { + readonly parameters: { + readonly query?: never + readonly header?: never + readonly path: { + /** @description The project key. */ + readonly projectKey: string + /** @description The repository slug. */ + readonly repositorySlug: string + } + readonly cookie?: never + } + readonly requestBody?: { + readonly content: { + readonly "application/json": components["schemas"]["RestRefSyncRequest"] + } + } + readonly responses: { + /** @description The requested action was successfully performed, and has updated the ref's state, but the ref if is still not in sync with upstream. For example, after applying the MERGE action, the ref will still be AHEAD of upstream. If the action brings the ref in sync with upstream, 204 NO CONTENT is returned instead. */ + readonly 200: { + headers: Readonly> + content: { + readonly "application/json": components["schemas"]["RestRejectedRef"] + } + } + /** @description The requested action was successfully performed and the ref is now in sync with upstream. If the action updates the ref but does not bring it in sync with upstream, 200 OK is returned instead. */ + readonly 204: { + headers: Readonly> + content?: never + } + /** @description The requested synchronization action was not understood. */ + readonly 400: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The currently authenticated user has insufficient permissions to update refs within the specified repository. */ + readonly 401: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The specified repository does not exist. */ + readonly 404: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description Synchronization is not available or enabled for the specified repository, or the ref is already in sync with upstream. */ + readonly 409: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + /** @description The requested synchronization action was understood by the server, but the mechanism to apply it has not been implemented. */ + readonly 501: { + headers: Readonly> + content: { + readonly "application/json": { + readonly errors?: readonly components["schemas"]["RestErrorMessage"][] + } + } + } + } + } +} diff --git a/src/server/openapi/swagger.v3.json b/src/server/openapi/swagger.v3.json new file mode 100644 index 0000000..5b07b30 --- /dev/null +++ b/src/server/openapi/swagger.v3.json @@ -0,0 +1,52326 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Bitbucket Data Center", + "description": "This is the reference document for the Atlassian Bitbucket REST API. The REST API is for developers who want to: \n\n - integrate Bitbucket with other applications;\n\n - create scripts that interact with Bitbucket; or\n\n - develop plugins that enhance the Bitbucket UI, using REST to interact with the backend. \n\n You can read more about developing Bitbucket plugins in the [Bitbucket Developer Documentation](https://developer.atlassian.com/bitbucket/server/docs/latest/).", + "termsOfService": "https://www.atlassian.com/legal/software-license-agreement", + "contact": { + "name": "Bitbucket Data Center Jira Project", + "url": "https://jira.atlassian.com/projects/BSERV/summary" + }, + "version": "9.1" + }, + "servers": [ + { + "url": "http://{baseurl}/rest", + "variables": { + "baseurl": { + "default": "example.com:7990", + "description": "Address of your Bitbucket instance" + } + } + } + ], + "components": { + "securitySchemes": { + "basic": { + "type": "http", + "description": "In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.", + "scheme": "basic" + } + }, + "schemas": { + "ApplicationUser": { + "properties": { + "active": { "type": "boolean" }, + "displayName": { "type": "string" }, + "emailAddress": { "type": "string" }, + "id": { "type": "integer", "format": "int32" }, + "name": { "type": "string" }, + "slug": { "type": "string" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + }, + "PageRequestImpl": { + "type": "object", + "properties": { + "limit": { "type": "integer", "format": "int32" }, + "start": { "type": "integer", "format": "int32" } + } + }, + "RestAccessToken": { + "properties": { + "createdDate": { "type": "string", "format": "date-time" }, + "id": { "type": "string", "example": "252973515069" }, + "name": { "type": "string", "example": "My access token" } + } + }, + "RestAccessTokenRequest": { + "type": "object", + "properties": { + "expiryDays": { "type": "integer", "format": "int32" }, + "name": { "type": "string", "example": "My access token" }, + "permissions": { + "type": "array", + "example": ["REPO_ADMIN", "PROJECT_READ"], + "items": { + "type": "string", + "example": "[\"REPO_ADMIN\",\"PROJECT_READ\"]" + }, + "uniqueItems": true + } + } + }, + "RestErrorMessage": { + "properties": { + "context": { "type": "string" }, + "exceptionName": { "type": "string" }, + "message": { "type": "string" } + } + }, + "RestErrors": { + "properties": { + "errors": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestErrorMessage" } + } + } + }, + "RestRawAccessToken": { + "properties": { + "createdDate": { "type": "string", "format": "date-time" }, + "id": { "type": "string", "example": "252973515069" }, + "name": { "type": "string", "example": "My access token" }, + "token": { + "type": "string", + "example": "MjUyOTczNTE1MDY5On2rDbID2EgYpH8AVOECHv0saruQ" + } + } + }, + "Scope": { + "type": "object", + "properties": { + "resourceId": { "type": "integer", "format": "int32" }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + } + }, + "RestBuildStats": { + "properties": { + "cancelled": { "type": "integer", "format": "int32" }, + "failed": { "type": "integer", "format": "int32" }, + "inProgress": { "type": "integer", "format": "int32" }, + "successful": { "type": "integer", "format": "int32" }, + "unknown": { "type": "integer", "format": "int32" } + } + }, + "RestBuildStatus": { + "properties": { + "buildNumber": { "type": "string", "example": "3" }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 1587533099278 + }, + "description": { + "type": "string", + "example": "A description of the build goes here" + }, + "duration": { "type": "integer", "format": "int64" }, + "key": { "type": "string", "example": "TEST-REP3" }, + "name": { "type": "string", "example": "Database Matrix Tests" }, + "parent": { "type": "string", "example": "TEST-REP" }, + "ref": { "type": "string", "example": "refs/heads/master" }, + "state": { + "type": "string", + "enum": [ + "CANCELLED", + "FAILED", + "INPROGRESS", + "SUCCESSFUL", + "UNKNOWN" + ] + }, + "testResults": { + "type": "object", + "properties": { + "failed": { "type": "integer", "format": "int32", "example": 1 }, + "skipped": { "type": "integer", "format": "int32", "example": 5 }, + "successful": { + "type": "integer", + "format": "int32", + "example": 134 + } + } + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 1587533699278 + }, + "url": { + "type": "string", + "example": "https://bamboo.example.com/browse/TEST-REP3" + } + } + }, + "RestMultipleBuildStats": { "properties": {} }, + "RestRefMatcher": { + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + }, + "RestRefMatcherType": { + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + }, + "RestRequiredBuildCondition": { + "properties": { + "buildParentKeys": { + "type": "array", + "description": "A non-empty list of build parent keys that require green builds for this merge check to pass", + "example": ["build-key-1", "build-key-2"], + "items": { "type": "string" } + }, + "exemptRefMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + }, + "id": { "type": "integer", "format": "int64", "example": 15 }, + "refMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + } + } + }, + "RestRequiredBuildConditionSetRequest": { + "type": "object", + "properties": { + "buildParentKeys": { + "type": "array", + "description": "A non-empty list of build parent keys that require green builds for this merge check to pass", + "example": ["build-key-1", "build-key-2"], + "items": { "type": "string" }, + "maxItems": 100, + "minItems": 0 + }, + "exemptRefMatcher": { "$ref": "#/components/schemas/RestRefMatcher" }, + "refMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + } + }, + "required": ["buildParentKeys", "refMatcher"] + }, + "Project": { + "type": "object", + "properties": { + "description": { "type": "string" }, + "id": { "type": "integer", "format": "int32" }, + "key": { "type": "string" }, + "name": { "type": "string", "pattern": "^[^~].*" }, + "public": { "type": "boolean" }, + "type": { "type": "string", "enum": ["NORMAL", "PERSONAL"] } + } + }, + "RefType": {}, + "Repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean" }, + "description": { "type": "string" }, + "fork": { "type": "boolean" }, + "forkable": { "type": "boolean" }, + "hierarchyId": { "type": "string" }, + "id": { "type": "integer", "format": "int32" }, + "local": { "type": "boolean" }, + "name": { "type": "string" }, + "offline": { "type": "boolean" }, + "origin": { "$ref": "#/components/schemas/Repository" }, + "partition": { "type": "integer", "format": "int32" }, + "project": { "$ref": "#/components/schemas/Project" }, + "public": { "type": "boolean" }, + "readOnly": { "type": "boolean" }, + "remote": { "type": "boolean" }, + "scmId": { "type": "string" }, + "slug": { "type": "string" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ] + }, + "statusMessage": { "type": "string" } + } + }, + "RestBranch": { + "properties": { + "default": { "type": "boolean", "readOnly": true }, + "displayId": { "type": "string", "readOnly": true }, + "id": { "type": "string", "example": "refs/heads/master" }, + "latestChangeset": { + "type": "string", + "example": "8d51122def5632836d1cb1026e879069e10a1e13", + "readOnly": true + }, + "latestCommit": { + "type": "string", + "example": "8d51122def5632836d1cb1026e879069e10a1e13", + "readOnly": true + }, + "type": { "$ref": "#/components/schemas/RefType" } + } + }, + "RestBranchCreateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the branch to be created" + }, + "startPoint": { + "type": "string", + "description": "Commit ID from which the branch is created", + "maxLength": 40 + } + } + }, + "RestBranchDeleteRequest": { + "type": "object", + "properties": { + "dryRun": { + "type": "boolean", + "description": "Don't actually delete the ref name, just do a dry run" + }, + "endPoint": { + "type": "string", + "description": "Commit ID that the provided ref name is expected to point to", + "maxLength": 40 + }, + "name": { + "type": "string", + "description": "Name of the ref to be deleted" + } + } + }, + "RestMinimalRef": { + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "RestApplicationUser": { + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { "type": "string", "example": "jane@example.com" }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + }, + "RestDefaultReviewersRequest": { + "type": "object", + "properties": { + "requiredApprovals": { + "type": "integer", + "format": "int32", + "example": 1 + }, + "reviewers": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestApplicationUser" } + }, + "sourceMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + }, + "targetMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + } + } + }, + "RestPullRequestCondition": { + "properties": { + "id": { + "type": "integer", + "format": "int32", + "example": 1, + "readOnly": true + }, + "requiredApprovals": { + "type": "integer", + "format": "int32", + "example": 1 + }, + "reviewers": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestApplicationUser" } + }, + "scope": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + }, + "readOnly": true + }, + "sourceRefMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + }, + "targetRefMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + } + } + }, + "RestRelatedLinks": { "properties": {} }, + "RestScope": { + "properties": { + "resourceId": { "type": "integer", "format": "int32", "example": 2 }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + } + }, + "RestBulkAddInsightAnnotationRequest": { + "type": "object", + "properties": { + "annotations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestSingleAddInsightAnnotationRequest" + }, + "maxItems": 2147483647, + "minItems": 1 + } + } + }, + "RestInsightAnnotation": { + "properties": { + "externalId": { "type": "string", "example": "external.id" }, + "line": { "type": "integer", "format": "int32", "example": 5 }, + "link": { + "type": "string", + "example": "http://example.com/my/file/analysis?line=5" + }, + "message": { + "type": "string", + "example": "This is an annotation message" + }, + "path": { + "type": "string", + "example": "src/some/structure/file.ext" + }, + "reportKey": { "type": "string", "example": "report.key" }, + "severity": { "type": "string", "example": "HIGH" }, + "type": { "type": "string", "example": "BUG" } + } + }, + "RestInsightAnnotationsResponse": { + "properties": { + "annotations": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestInsightAnnotation" } + } + } + }, + "RestInsightReport": { + "properties": { + "createdDate": { "type": "number", "example": 1630041546433 }, + "data": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestInsightReportData" } + }, + "details": { + "type": "string", + "example": "This is the details of the report, it can be a longer string describing the report" + }, + "key": { "type": "string", "example": "report.key" }, + "link": { + "type": "string", + "format": "uri", + "example": "http://integration.example.com" + }, + "logoUrl": { + "type": "string", + "format": "uri", + "example": "http://integration.example.com/logo" + }, + "reporter": { + "type": "string", + "example": "Reporter/tool that produced this report" + }, + "result": { + "type": "string", + "enum": ["FAIL", "PASS"], + "example": "PASS" + }, + "title": { "type": "string", "example": "report.title" } + } + }, + "RestInsightReportData": { + "properties": { + "title": { "type": "string", "example": "data.title" }, + "type": { + "type": "string", + "example": "NUMBER", + "pattern": "BOOLEAN|DATE|DURATION|LINK|NUMBER|PERCENTAGE|TEXT" + }, + "value": { "type": "object", "example": 9 } + } + }, + "RestSetInsightReportRequest": { + "type": "object", + "properties": { + "coverageProviderKey": { "type": "string" }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 1630041546433 + }, + "data": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestInsightReportData" }, + "maxItems": 6, + "minItems": 0 + }, + "details": { + "type": "string", + "example": "This is the details of the report, it can be a longer string describing the report." + }, + "link": { "type": "string", "example": "http://insight.example.com" }, + "logoUrl": { + "type": "string", + "example": "http://insight.example.com/logo" + }, + "reporter": { + "type": "string", + "example": "Reporter/tool that produced this report", + "maxLength": 450, + "minLength": 0 + }, + "result": { + "type": "string", + "example": "PASS", + "pattern": "FAIL|PASS" + }, + "title": { + "type": "string", + "example": "report.title", + "maxLength": 450, + "minLength": 0 + } + }, + "required": ["data", "title"] + }, + "RestSingleAddInsightAnnotationRequest": { + "type": "object", + "properties": { + "externalId": { + "type": "string", + "example": "message-1", + "maxLength": 450, + "minLength": 0 + }, + "line": { + "type": "integer", + "format": "int32", + "example": 4, + "minimum": 0 + }, + "link": { + "type": "string", + "example": "https://link.to.tool/that/produced/annotation/message-1" + }, + "message": { + "type": "string", + "example": "This is a bug here because reasons", + "maxLength": 2000, + "minLength": 0 + }, + "path": { + "type": "string", + "example": "path/to/file/in/repo", + "maxLength": 50000, + "minLength": 0 + }, + "severity": { + "type": "string", + "example": "MEDIUM", + "pattern": "LOW|MEDIUM|HIGH" + }, + "type": { + "type": "string", + "example": "CODE_SMELL", + "pattern": "VULNERABILITY|CODE_SMELL|BUG" + } + }, + "required": ["message", "severity"] + }, + "Comment": { + "type": "object", + "properties": { + "anchor": { "$ref": "#/components/schemas/CommentThreadDiffAnchor" }, + "author": { "$ref": "#/components/schemas/ApplicationUser" }, + "comments": { + "type": "array", + "items": { "$ref": "#/components/schemas/Comment" } + }, + "createdDate": { "type": "string", "format": "date-time" }, + "id": { "type": "integer", "format": "int64" }, + "permittedOperations": { + "$ref": "#/components/schemas/CommentOperations" + }, + "properties": { "type": "object", "properties": {} }, + "resolvedDate": { "type": "string", "format": "date-time" }, + "resolver": { "$ref": "#/components/schemas/ApplicationUser" }, + "severity": { "type": "string", "enum": ["NORMAL", "BLOCKER"] }, + "state": { + "type": "string", + "enum": ["OPEN", "PENDING", "RESOLVED"] + }, + "text": { "type": "string" }, + "thread": { "$ref": "#/components/schemas/CommentThread" }, + "updatedDate": { "type": "string", "format": "date-time" }, + "version": { "type": "integer", "format": "int32" } + } + }, + "CommentOperations": { + "type": "object", + "properties": { + "deletable": { "type": "boolean" }, + "editable": { "type": "boolean" }, + "transitionable": { "type": "boolean" } + } + }, + "CommentThread": { + "type": "object", + "properties": { + "anchor": { "$ref": "#/components/schemas/CommentThreadDiffAnchor" }, + "anchored": { "type": "boolean" }, + "commentable": { "$ref": "#/components/schemas/Commentable" }, + "createdDate": { "type": "string", "format": "date-time" }, + "id": { "type": "integer", "format": "int64" }, + "resolved": { "type": "boolean" }, + "resolvedDate": { "type": "string", "format": "date-time" }, + "resolver": { "$ref": "#/components/schemas/ApplicationUser" }, + "rootComment": { "$ref": "#/components/schemas/Comment" }, + "updatedDate": { "type": "string", "format": "date-time" } + } + }, + "CommentThreadDiffAnchor": { + "type": "object", + "properties": { + "diffType": { + "type": "string", + "enum": ["COMMIT", "EFFECTIVE", "RANGE"] + }, + "fileAnchor": { "type": "boolean" }, + "fileType": { "type": "string", "enum": ["FROM", "TO"] }, + "fromHash": { "type": "string" }, + "line": { "type": "integer", "format": "int32" }, + "lineAnchor": { "type": "boolean" }, + "lineType": { + "type": "string", + "enum": ["ADDED", "CONTEXT", "REMOVED"] + }, + "orphaned": { "type": "boolean" }, + "path": { "type": "string" }, + "srcPath": { "type": "string" }, + "toHash": { "type": "string" } + } + }, + "Commentable": { "type": "object" }, + "PropertyMap": { "type": "object", "properties": {} }, + "PullRequest": { + "type": "object", + "properties": { + "author": { "$ref": "#/components/schemas/PullRequestParticipant" }, + "closed": { "type": "boolean" }, + "closedDate": { "type": "string", "format": "date-time" }, + "createdDate": { "type": "string", "format": "date-time" }, + "crossRepository": { "type": "boolean" }, + "description": { "type": "string" }, + "draft": { "type": "boolean" }, + "fromRef": { "$ref": "#/components/schemas/PullRequestRef" }, + "id": { "type": "integer", "format": "int64" }, + "locked": { "type": "boolean" }, + "open": { "type": "boolean" }, + "participants": { + "type": "array", + "items": { "$ref": "#/components/schemas/PullRequestParticipant" }, + "uniqueItems": true + }, + "properties": { "type": "object", "properties": {} }, + "reviewers": { + "type": "array", + "items": { "$ref": "#/components/schemas/PullRequestParticipant" }, + "uniqueItems": true + }, + "state": { "type": "string", "enum": ["DECLINED", "MERGED", "OPEN"] }, + "title": { "type": "string" }, + "toRef": { "$ref": "#/components/schemas/PullRequestRef" }, + "updatedDate": { "type": "string", "format": "date-time" }, + "version": { "type": "integer", "format": "int32" } + } + }, + "PullRequestParticipant": { + "type": "object", + "properties": { + "approved": { "type": "boolean" }, + "lastReviewedCommit": { "type": "string" }, + "pullRequest": { "$ref": "#/components/schemas/PullRequest" }, + "role": { + "type": "string", + "enum": ["AUTHOR", "REVIEWER", "PARTICIPANT"] + }, + "status": { + "type": "string", + "enum": ["UNAPPROVED", "NEEDS_WORK", "APPROVED"] + }, + "user": { "$ref": "#/components/schemas/ApplicationUser" } + } + }, + "PullRequestRef": { + "type": "object", + "properties": { + "displayId": { "type": "string" }, + "id": { "type": "string" }, + "latestCommit": { "type": "string" }, + "repository": { "$ref": "#/components/schemas/Repository" }, + "type": { "$ref": "#/components/schemas/RefType" } + } + }, + "RestComment": { + "properties": { + "anchor": { + "type": "object", + "properties": { + "diffType": { + "type": "string", + "enum": ["COMMIT", "EFFECTIVE", "RANGE"] + }, + "fileType": { "type": "string", "enum": ["FROM", "TO"] }, + "fromHash": { + "type": "string", + "example": "62a0505e8204115b8b9c8a95bfa264a8c0896a93" + }, + "line": { "type": "integer", "format": "int32", "example": 98 }, + "lineComment": { "type": "boolean", "readOnly": true }, + "lineType": { + "type": "string", + "enum": ["ADDED", "CONTEXT", "REMOVED"] + }, + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "pullRequest": { + "type": "object", + "properties": { + "closed": { "type": "boolean" }, + "closedDate": { + "type": "integer", + "format": "int64", + "example": 19990759200 + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 13590759200 + }, + "description": { + "type": "string", + "example": "It is a kludge, but put the tuple from the database in the cache." + }, + "descriptionAsHtml": { "type": "string" }, + "draft": { "type": "boolean" }, + "fromRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "htmlDescription": { "type": "string", "writeOnly": true }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "locked": { "type": "boolean" }, + "open": { "type": "boolean" }, + "participants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "reviewers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "state": { + "type": "string", + "enum": ["DECLINED", "MERGED", "OPEN"] + }, + "title": { "type": "string", "example": "Talking Nerdy" }, + "toRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 14490759200 + }, + "version": { "type": "integer", "format": "int32" } + }, + "readOnly": true + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "toHash": { + "type": "string", + "example": "3cdd5d19178a54d2e51b5098d43b57571241d0ab" + } + }, + "readOnly": true + }, + "anchored": { "type": "boolean", "readOnly": true }, + "author": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + }, + "readOnly": true + }, + "comments": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestComment" }, + "readOnly": true + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 1359075920, + "readOnly": true + }, + "html": { "type": "string", "readOnly": true }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "parent": { + "type": "object", + "properties": { + "anchor": { + "type": "object", + "properties": { + "diffType": { + "type": "string", + "enum": ["COMMIT", "EFFECTIVE", "RANGE"] + }, + "fileType": { "type": "string", "enum": ["FROM", "TO"] }, + "fromHash": { + "type": "string", + "example": "62a0505e8204115b8b9c8a95bfa264a8c0896a93" + }, + "line": { + "type": "integer", + "format": "int32", + "example": 98 + }, + "lineComment": { "type": "boolean", "readOnly": true }, + "lineType": { + "type": "string", + "enum": ["ADDED", "CONTEXT", "REMOVED"] + }, + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "pullRequest": { + "type": "object", + "properties": { + "closed": { "type": "boolean" }, + "closedDate": { + "type": "integer", + "format": "int64", + "example": 19990759200 + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 13590759200 + }, + "description": { + "type": "string", + "example": "It is a kludge, but put the tuple from the database in the cache." + }, + "descriptionAsHtml": { "type": "string" }, + "draft": { "type": "boolean" }, + "fromRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "origin": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { + "type": "string", + "example": "PRJ" + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { + "type": "string", + "example": "git" + }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { + "type": "string", + "enum": ["BRANCH", "TAG"] + } + } + }, + "htmlDescription": { + "type": "string", + "writeOnly": true + }, + "id": { + "type": "integer", + "format": "int64", + "example": 1 + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "locked": { "type": "boolean" }, + "open": { "type": "boolean" }, + "participants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "reviewers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "state": { + "type": "string", + "enum": ["DECLINED", "MERGED", "OPEN"] + }, + "title": { "type": "string", "example": "Talking Nerdy" }, + "toRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "origin": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { + "type": "string", + "example": "PRJ" + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { + "type": "string", + "example": "git" + }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { + "type": "string", + "enum": ["BRANCH", "TAG"] + } + } + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 14490759200 + }, + "version": { "type": "integer", "format": "int32" } + }, + "readOnly": true + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "toHash": { + "type": "string", + "example": "3cdd5d19178a54d2e51b5098d43b57571241d0ab" + } + }, + "readOnly": true + }, + "anchored": { "type": "boolean", "readOnly": true }, + "author": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { + "type": "string", + "example": "Jane Citizen" + }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + }, + "readOnly": true + }, + "comments": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestComment" }, + "readOnly": true + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 1359075920, + "readOnly": true + }, + "html": { "type": "string", "readOnly": true }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "pending": { "type": "boolean", "readOnly": true }, + "properties": { "type": "object" }, + "reply": { "type": "boolean", "readOnly": true }, + "resolvedDate": { + "type": "integer", + "format": "int64", + "example": 1239075920, + "readOnly": true + }, + "resolver": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { + "type": "string", + "example": "Jane Citizen" + }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + }, + "readOnly": true + }, + "severity": { "type": "string", "example": "NORMAL" }, + "state": { "type": "string", "example": "OPEN" }, + "text": { "type": "string", "example": "An insightful comment." }, + "threadResolved": { + "type": "boolean", + "description": "Indicates if this comment thread has been marked as resolved or not" + }, + "threadResolvedDate": { + "type": "integer", + "format": "int64", + "example": 1569075920, + "readOnly": true + }, + "threadResolver": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { + "type": "string", + "example": "Jane Citizen" + }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + }, + "readOnly": true + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 1449075920, + "readOnly": true + }, + "version": { "type": "integer", "format": "int32", "example": 1 } + }, + "readOnly": true + }, + "pending": { "type": "boolean", "readOnly": true }, + "properties": { "type": "object" }, + "reply": { "type": "boolean", "readOnly": true }, + "resolvedDate": { + "type": "integer", + "format": "int64", + "example": 1239075920, + "readOnly": true + }, + "resolver": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + }, + "readOnly": true + }, + "severity": { "type": "string", "example": "NORMAL" }, + "state": { "type": "string", "example": "OPEN" }, + "text": { "type": "string", "example": "An insightful comment." }, + "threadResolved": { + "type": "boolean", + "description": "Indicates if this comment thread has been marked as resolved or not" + }, + "threadResolvedDate": { + "type": "integer", + "format": "int64", + "example": 1569075920, + "readOnly": true + }, + "threadResolver": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + }, + "readOnly": true + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 1449075920, + "readOnly": true + }, + "version": { "type": "integer", "format": "int32", "example": 1 } + } + }, + "RestCommentThreadDiffAnchor": { + "properties": { + "diffType": { + "type": "string", + "enum": ["COMMIT", "EFFECTIVE", "RANGE"] + }, + "fileType": { "type": "string", "enum": ["FROM", "TO"] }, + "fromHash": { + "type": "string", + "example": "62a0505e8204115b8b9c8a95bfa264a8c0896a93" + }, + "line": { "type": "integer", "format": "int32", "example": 98 }, + "lineComment": { "type": "boolean", "readOnly": true }, + "lineType": { + "type": "string", + "enum": ["ADDED", "CONTEXT", "REMOVED"] + }, + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "pullRequest": { + "type": "object", + "properties": { + "closed": { "type": "boolean" }, + "closedDate": { + "type": "integer", + "format": "int64", + "example": 19990759200 + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 13590759200 + }, + "description": { + "type": "string", + "example": "It is a kludge, but put the tuple from the database in the cache." + }, + "descriptionAsHtml": { "type": "string" }, + "draft": { "type": "boolean" }, + "fromRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "htmlDescription": { "type": "string", "writeOnly": true }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "locked": { "type": "boolean" }, + "open": { "type": "boolean" }, + "participants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "reviewers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "state": { + "type": "string", + "enum": ["DECLINED", "MERGED", "OPEN"] + }, + "title": { "type": "string", "example": "Talking Nerdy" }, + "toRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 14490759200 + }, + "version": { "type": "integer", "format": "int32" } + }, + "readOnly": true + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "toHash": { + "type": "string", + "example": "3cdd5d19178a54d2e51b5098d43b57571241d0ab" + } + } + }, + "RestEmoticon": { + "properties": { + "shortcut": { "type": "string" }, + "url": { "type": "string" }, + "value": { "type": "string" } + } + }, + "RestPath": { + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "RestProject": { + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "key": { "type": "string", "example": "PRJ" }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { "type": "string", "example": "PROJECT", "readOnly": true }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + } + }, + "RestPullRequest": { + "properties": { + "closed": { "type": "boolean" }, + "closedDate": { + "type": "integer", + "format": "int64", + "example": 19990759200 + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 13590759200 + }, + "description": { + "type": "string", + "example": "It is a kludge, but put the tuple from the database in the cache." + }, + "descriptionAsHtml": { "type": "string" }, + "draft": { "type": "boolean" }, + "fromRef": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "feature-ABC-1233" }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "htmlDescription": { "type": "string", "writeOnly": true }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "locked": { "type": "boolean" }, + "open": { "type": "boolean" }, + "participants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "reviewers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "state": { "type": "string", "enum": ["DECLINED", "MERGED", "OPEN"] }, + "title": { "type": "string", "example": "Talking Nerdy" }, + "toRef": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "feature-ABC-1233" }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 14490759200 + }, + "version": { "type": "integer", "format": "int32" } + } + }, + "RestPullRequestParticipant": { + "properties": { + "approved": { "type": "boolean" }, + "lastReviewedCommit": { + "type": "string", + "example": "7549846524f8aed2bd1c0249993ae1bf9d3c9998" + }, + "role": { + "type": "string", + "enum": ["AUTHOR", "REVIEWER", "PARTICIPANT"] + }, + "status": { + "type": "string", + "enum": ["UNAPPROVED", "NEEDS_WORK", "APPROVED"] + }, + "user": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + } + } + }, + "RestPullRequestRef": { + "properties": { + "displayId": { "type": "string", "example": "feature-ABC-1233" }, + "id": { "type": "string", "example": "refs/heads/feature-ABC-123" }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "RestRepository": { + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "RestUserReaction": { + "properties": { + "comment": { + "type": "object", + "properties": { + "anchor": { + "type": "object", + "properties": { + "diffType": { + "type": "string", + "enum": ["COMMIT", "EFFECTIVE", "RANGE"] + }, + "fileType": { "type": "string", "enum": ["FROM", "TO"] }, + "fromHash": { + "type": "string", + "example": "62a0505e8204115b8b9c8a95bfa264a8c0896a93" + }, + "line": { + "type": "integer", + "format": "int32", + "example": 98 + }, + "lineComment": { "type": "boolean", "readOnly": true }, + "lineType": { + "type": "string", + "enum": ["ADDED", "CONTEXT", "REMOVED"] + }, + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "pullRequest": { + "type": "object", + "properties": { + "closed": { "type": "boolean" }, + "closedDate": { + "type": "integer", + "format": "int64", + "example": 19990759200 + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 13590759200 + }, + "description": { + "type": "string", + "example": "It is a kludge, but put the tuple from the database in the cache." + }, + "descriptionAsHtml": { "type": "string" }, + "draft": { "type": "boolean" }, + "fromRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "origin": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { + "type": "string", + "example": "PRJ" + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { + "type": "string", + "example": "git" + }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { + "type": "string", + "enum": ["BRANCH", "TAG"] + } + } + }, + "htmlDescription": { + "type": "string", + "writeOnly": true + }, + "id": { + "type": "integer", + "format": "int64", + "example": 1 + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "locked": { "type": "boolean" }, + "open": { "type": "boolean" }, + "participants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "reviewers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "state": { + "type": "string", + "enum": ["DECLINED", "MERGED", "OPEN"] + }, + "title": { "type": "string", "example": "Talking Nerdy" }, + "toRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "origin": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { + "type": "string", + "example": "PRJ" + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { + "type": "string", + "example": "git" + }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { + "type": "string", + "enum": ["BRANCH", "TAG"] + } + } + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 14490759200 + }, + "version": { "type": "integer", "format": "int32" } + }, + "readOnly": true + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "toHash": { + "type": "string", + "example": "3cdd5d19178a54d2e51b5098d43b57571241d0ab" + } + }, + "readOnly": true + }, + "anchored": { "type": "boolean", "readOnly": true }, + "author": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { + "type": "string", + "example": "Jane Citizen" + }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + }, + "readOnly": true + }, + "comments": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestComment" }, + "readOnly": true + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 1359075920, + "readOnly": true + }, + "html": { "type": "string", "readOnly": true }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "parent": { + "type": "object", + "properties": { + "anchor": { + "type": "object", + "properties": { + "diffType": { + "type": "string", + "enum": ["COMMIT", "EFFECTIVE", "RANGE"] + }, + "fileType": { "type": "string", "enum": ["FROM", "TO"] }, + "fromHash": { + "type": "string", + "example": "62a0505e8204115b8b9c8a95bfa264a8c0896a93" + }, + "line": { + "type": "integer", + "format": "int32", + "example": 98 + }, + "lineComment": { "type": "boolean", "readOnly": true }, + "lineType": { + "type": "string", + "enum": ["ADDED", "CONTEXT", "REMOVED"] + }, + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "pullRequest": { + "type": "object", + "properties": { + "closed": { "type": "boolean" }, + "closedDate": { + "type": "integer", + "format": "int64", + "example": 19990759200 + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 13590759200 + }, + "description": { + "type": "string", + "example": "It is a kludge, but put the tuple from the database in the cache." + }, + "descriptionAsHtml": { "type": "string" }, + "draft": { "type": "boolean" }, + "fromRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "origin": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { + "type": "string", + "example": "PRJ" + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { + "type": "string", + "example": "git" + }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { + "type": "string", + "example": "PRJ" + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { + "type": "string", + "example": "git" + }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { + "type": "string", + "enum": ["BRANCH", "TAG"] + } + } + }, + "htmlDescription": { + "type": "string", + "writeOnly": true + }, + "id": { + "type": "integer", + "format": "int64", + "example": 1 + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "locked": { "type": "boolean" }, + "open": { "type": "boolean" }, + "participants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "reviewers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "state": { + "type": "string", + "enum": ["DECLINED", "MERGED", "OPEN"] + }, + "title": { + "type": "string", + "example": "Talking Nerdy" + }, + "toRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "origin": { + "type": "object", + "properties": { + "archived": { + "type": "boolean", + "readOnly": true + }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { + "type": "boolean", + "readOnly": true + }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My repo" + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { + "type": "string", + "example": "PRJ" + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { + "type": "string", + "example": "git" + }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { + "type": "string", + "example": "PRJ" + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { + "type": "boolean", + "readOnly": true + }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { + "type": "string", + "example": "git" + }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { + "type": "string", + "example": "my-repo" + }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { + "type": "string", + "enum": ["BRANCH", "TAG"] + } + } + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 14490759200 + }, + "version": { "type": "integer", "format": "int32" } + }, + "readOnly": true + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "toHash": { + "type": "string", + "example": "3cdd5d19178a54d2e51b5098d43b57571241d0ab" + } + }, + "readOnly": true + }, + "anchored": { "type": "boolean", "readOnly": true }, + "author": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { + "type": "string", + "example": "Jane Citizen" + }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { + "type": "string", + "enum": ["NORMAL", "SERVICE"] + } + }, + "readOnly": true + }, + "comments": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestComment" }, + "readOnly": true + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 1359075920, + "readOnly": true + }, + "html": { "type": "string", "readOnly": true }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "pending": { "type": "boolean", "readOnly": true }, + "properties": { "type": "object" }, + "reply": { "type": "boolean", "readOnly": true }, + "resolvedDate": { + "type": "integer", + "format": "int64", + "example": 1239075920, + "readOnly": true + }, + "resolver": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { + "type": "string", + "example": "Jane Citizen" + }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { + "type": "string", + "enum": ["NORMAL", "SERVICE"] + } + }, + "readOnly": true + }, + "severity": { "type": "string", "example": "NORMAL" }, + "state": { "type": "string", "example": "OPEN" }, + "text": { + "type": "string", + "example": "An insightful comment." + }, + "threadResolved": { + "type": "boolean", + "description": "Indicates if this comment thread has been marked as resolved or not" + }, + "threadResolvedDate": { + "type": "integer", + "format": "int64", + "example": 1569075920, + "readOnly": true + }, + "threadResolver": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { + "type": "string", + "example": "Jane Citizen" + }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { + "type": "string", + "enum": ["NORMAL", "SERVICE"] + } + }, + "readOnly": true + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 1449075920, + "readOnly": true + }, + "version": { + "type": "integer", + "format": "int32", + "example": 1 + } + }, + "readOnly": true + }, + "pending": { "type": "boolean", "readOnly": true }, + "properties": { "type": "object" }, + "reply": { "type": "boolean", "readOnly": true }, + "resolvedDate": { + "type": "integer", + "format": "int64", + "example": 1239075920, + "readOnly": true + }, + "resolver": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { + "type": "string", + "example": "Jane Citizen" + }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + }, + "readOnly": true + }, + "severity": { "type": "string", "example": "NORMAL" }, + "state": { "type": "string", "example": "OPEN" }, + "text": { "type": "string", "example": "An insightful comment." }, + "threadResolved": { + "type": "boolean", + "description": "Indicates if this comment thread has been marked as resolved or not" + }, + "threadResolvedDate": { + "type": "integer", + "format": "int64", + "example": 1569075920, + "readOnly": true + }, + "threadResolver": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { + "type": "string", + "example": "Jane Citizen" + }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + }, + "readOnly": true + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 1449075920, + "readOnly": true + }, + "version": { "type": "integer", "format": "int32", "example": 1 } + } + }, + "emoticon": { + "type": "object", + "properties": { + "shortcut": { "type": "string" }, + "url": { "type": "string" }, + "value": { "type": "string" } + } + }, + "user": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + } + } + }, + "RestGitTagCreateRequest": { + "type": "object", + "properties": { + "force": { "type": "boolean" }, + "message": { "type": "string", "example": "A new release tag" }, + "name": { "type": "string", "example": "release-tag" }, + "startPoint": { "type": "string", "example": "refs/heads/master" }, + "type": { "type": "string", "enum": ["ANNOTATED", "LIGHTWEIGHT"] } + } + }, + "RestPullRequestRebaseRequest": { + "type": "object", + "properties": { + "version": { "type": "integer", "format": "int32", "example": 1 } + } + }, + "RestPullRequestRebaseResult": { + "properties": { + "refChange": { + "type": "object", + "properties": { + "fromHash": { + "type": "string", + "example": "6053a1eaa1c009dd11092d09a72f3c41af1b59ad" + }, + "ref": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "refId": { "type": "string", "example": "refs/heads/master" }, + "toHash": { + "type": "string", + "example": "d6edcbf924697ab811a867421dab60d954ccad99" + }, + "type": { "type": "string", "enum": ["ADD", "DELETE", "UPDATE"] } + } + } + } + }, + "RestPullRequestRebaseability": { + "properties": { + "vetoes": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepositoryHookVeto" } + } + } + }, + "RestRefChange": { + "properties": { + "fromHash": { + "type": "string", + "example": "6053a1eaa1c009dd11092d09a72f3c41af1b59ad" + }, + "ref": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "refId": { "type": "string", "example": "refs/heads/master" }, + "toHash": { + "type": "string", + "example": "d6edcbf924697ab811a867421dab60d954ccad99" + }, + "type": { "type": "string", "enum": ["ADD", "DELETE", "UPDATE"] } + } + }, + "RestRepositoryHookVeto": { + "properties": { + "detailedMessage": { + "type": "string", + "example": "You have insufficient permissions to rebase 'refs/heads/feature-branch'." + }, + "summaryMessage": { + "type": "string", + "example": "Insufficient branch permissions" + } + } + }, + "RestTag": { + "properties": { + "displayId": { "type": "string", "example": "master" }, + "hash": { + "type": "string", + "example": "8d51122def5632836d1cb1026e879069e10a1e13" + }, + "id": { "type": "string", "example": "refs/heads/master" }, + "latestChangeset": { + "type": "string", + "example": "8d51122def5632836d1cb1026e879069e10a1e13", + "readOnly": true + }, + "latestCommit": { + "type": "string", + "example": "8d51122def5632836d1cb1026e879069e10a1e13", + "readOnly": true + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "RestRepositoryPolicy": { + "properties": { + "permission": { + "type": "string", + "description": "The permission required to delete repositories. Must be one of: \"SYS_ADMIN\", \"ADMIN\", \"PROJECT_ADMIN\", \"REPO_ADMIN\".", + "enum": ["SYS_ADMIN", "ADMIN", "PROJECT_ADMIN", "REPO_ADMIN"], + "example": "ADMIN" + } + } + }, + "RestGpgKey": { + "properties": { + "emailAddress": { + "type": "string", + "example": "bitbucket@example.com", + "readOnly": true + }, + "expiryDate": { + "type": "integer", + "format": "int64", + "example": 61550496000000, + "readOnly": true + }, + "fingerprint": { + "type": "string", + "example": "43:51:43:a1:b5:fc:8b:b7:0a:3a:a9:b1:0f:66:73:a8", + "readOnly": true + }, + "id": { + "type": "string", + "example": "00000000000004d2", + "readOnly": true + }, + "subKeys": { + "type": "array", + "example": [], + "items": { "$ref": "#/components/schemas/RestGpgSubKey" }, + "readOnly": true + }, + "text": { + "type": "string", + "example": "-----BEGIN PGP SIGNATURE-----\n\niQEzBAABCAAdFiEEM8MrWnoxlp3K1lFY5BMGiWNefn4FAlkqKE4ACgkQ5BMGiWNe\nfn6/kggAyzKhDDqdVb3Rq02hiSqeqKa1JuKRqDmzIpa6Pxa+1CpCnxwaIVrGgIii\nvj0ZNJzL1Bm2xm0JasotJDiZq5pFKi0FfQ0WmskuhsW1VY/f08TltHpHvK2kHVRr\nGEMVDUb0nj0I7Duc8XTipiYoDGS1GvydNR/bu3SsFTcZyapXirQcTCRT6/Sn0/IP\npUeIwQo1qK4e8gTOhWhfWEiVig39lQhiZFtm5S/vfAY72/Rgp68zMYmwasMSnBgF\n/LLFW6lXAqZIoAP8AnmsMRjCH6mS98+/lxKq2+K71+2YUUIAnNEeO09Lufo3B3Da\nPbs7BpD28w4lKlzb2EQ0n0C9rrxdPA==\n=VZpm\n-----END PGP SIGNATURE-----\n", + "writeOnly": true + } + } + }, + "RestGpgSubKey": { + "properties": { + "expiryDate": { "type": "string", "format": "date-time" }, + "fingerprint": { "type": "string" } + } + }, + "RestDefaultTask": { + "properties": { + "description": { + "type": "string", + "example": "Default task description", + "readOnly": true + }, + "html": { "type": "string", "writeOnly": true }, + "id": { + "type": "integer", + "format": "int64", + "example": 1, + "readOnly": true + } + } + }, + "RestDefaultTaskRequest": { + "type": "object", + "properties": { + "description": { + "type": "string", + "example": "Default task description" + }, + "sourceMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + }, + "targetMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + } + } + }, + "Credentials": { + "type": "object", + "oneOf": [ + { "$ref": "#/components/schemas/RestUsernamePasswordCredentials" }, + { "$ref": "#/components/schemas/RestBearerTokenCredentials" }, + { "$ref": "#/components/schemas/RestSshCredentials" } + ] + }, + "EnrichedRepository": { + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "properties": { + "type": "object", + "properties": { + "contentHash": { + "type": "string", + "example": "457389a0b871fb61012a7351d09aefc0cf1c57c306449d4b5df4d2f381df8433" + }, + "defaultBranchId": { + "type": "string", + "example": "refs/heads/master" + }, + "metadataHash": { + "type": "string", + "example": "11e5cd17e8d74d84a11f2c8a6bbc6ae0a2b69059e54030f49214c94d980364c1" + } + } + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "RestAnalyticsSettings": { + "properties": { + "canCollectAnalytics": { "type": "boolean" }, + "serverTime": { + "type": "integer", + "format": "int64", + "example": 1640390400000 + }, + "supportEntitlementNumber": { "type": "string", "example": "SEN-500" } + } + }, + "RestApplicationUserWithPermissions": { + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "effectivePermissions": { "type": "object" }, + "emailAddress": { "type": "string", "example": "jane@example.com" }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + }, + "RestAuthenticationRequest": { + "type": "object", + "properties": { + "credentials": { "$ref": "#/components/schemas/Credentials" }, + "repositoryId": { "type": "integer", "format": "int32" } + }, + "required": ["credentials"] + }, + "RestBearerTokenCredentials": { + "type": "object", + "properties": { + "token": { + "type": "string", + "example": "NjU4MjM0NDkxMzM0OuPEm9jk1TZUuhuAw45pdirCqvbD" + } + }, + "required": ["token"] + }, + "RestMirrorServer": { + "properties": { + "baseUrl": { + "type": "string", + "example": "http://vietnam.example.com" + }, + "enabled": { "type": "boolean" }, + "id": { "type": "string", "example": "B0F5-CS21-45C2-CCK3" }, + "lastSeenDate": { "type": "string", "format": "date-time" }, + "mirrorType": { "type": "string", "enum": ["SINGLE", "FARM"] }, + "name": { "type": "string", "example": "Mirror" }, + "productVersion": { "type": "string", "example": "8.0.0" } + } + }, + "RestMirrorUpgradeRequest": { + "type": "object", + "properties": { + "baseUrl": { + "type": "string", + "example": "https://bitbucket-eu.example.com:7990/bitbucket" + }, + "productVersion": { "type": "string", "example": "8.0.0" } + } + }, + "RestMirroredRepositoryDescriptor": { + "properties": { + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "mirrorServer": { + "type": "object", + "properties": { + "baseUrl": { + "type": "string", + "example": "http://vietnam.example.com" + }, + "enabled": { "type": "boolean" }, + "id": { "type": "string", "example": "B0F5-CS21-45C2-CCK3" }, + "lastSeenDate": { "type": "string", "format": "date-time" }, + "mirrorType": { "type": "string", "enum": ["SINGLE", "FARM"] }, + "name": { "type": "string", "example": "Mirror" }, + "productVersion": { "type": "string", "example": "8.0.0" } + }, + "required": ["lastSeenDate"] + } + } + }, + "RestMirroringRequest": { + "properties": { + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "mirrorBaseUrl": { + "type": "string", + "example": "https://bitbucket-eu.example.com:7990/bitbucket" + }, + "mirrorId": { + "type": "string", + "example": "4f0eb5fc-67fc-48f8-b4a7-87981f026c6a" + }, + "mirrorName": { "type": "string", "example": "Bitbucket Mirror" }, + "mirrorType": { "type": "string", "enum": ["SINGLE", "FARM"] }, + "productVersion": { "type": "string", "example": "8.0.0" }, + "state": { + "type": "string", + "enum": ["PENDING", "ACCEPTED", "REJECTED"] + } + } + }, + "RestProperties": { + "properties": { + "contentHash": { + "type": "string", + "example": "457389a0b871fb61012a7351d09aefc0cf1c57c306449d4b5df4d2f381df8433" + }, + "defaultBranchId": { + "type": "string", + "example": "refs/heads/master" + }, + "metadataHash": { + "type": "string", + "example": "11e5cd17e8d74d84a11f2c8a6bbc6ae0a2b69059e54030f49214c94d980364c1" + } + } + }, + "RestRepositoryMirrorEvent": { + "type": "object", + "properties": { + "mirrorRepoId": { + "type": "integer", + "format": "int32", + "example": 42 + }, + "type": { + "type": "string", + "enum": ["SYNCHRONIZED", "SYNCHRONIZATION_FAILED"] + }, + "upstreamRepoId": { "type": "string", "example": "24" } + } + }, + "RestSshCredentials": { + "type": "object", + "properties": { + "algorithm": { + "type": "string", + "description": "The key algorithm, if passing in a legacy X.509 encoded key. Do not specify for OpenSSH encoded keys", + "example": "RSA" + }, + "publicKey": { + "type": "string", + "description": "The public key text in the OpenSSH format. The algorithm must be specified in case of the legacy X.509 keys", + "example": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKjFjYCLJjrIY/jCXPbJ9wd3drcGospvPkKFNZ1ZcacA test@test.local" + }, + "username": { "type": "string", "example": "git" } + }, + "required": ["publicKey"] + }, + "RestUsernamePasswordCredentials": { + "type": "object", + "properties": { + "password": { "type": "string", "example": "secr3t" }, + "username": { "type": "string", "example": "user1" } + }, + "required": ["password", "username"] + }, + "RestClusterNode": { + "properties": { + "address": { + "type": "object", + "properties": { + "address": { "type": "string", "example": "node.example.com" }, + "port": { "type": "integer", "format": "int32", "example": 8230 } + } + }, + "buildVersion": { "type": "string", "example": "7.0.0" }, + "id": { + "type": "string", + "example": "d4fde8b1-2504-4998-a0ba-14fbe98edd4d" + }, + "local": { "type": "boolean" }, + "name": { "type": "string", "example": "foo" } + } + }, + "RestFarmSynchronizationRequest": { + "type": "object", + "properties": { + "attempt": { "type": "integer", "format": "int32", "example": 1 }, + "createdAt": { + "type": "string", + "example": "2022-08-18T02:04:46.435Z" + }, + "externalRepoId": { "type": "string", "example": "1" }, + "type": { + "type": "string", + "enum": ["incremental", "snapshot"], + "example": "INCREMENTAL" + } + } + }, + "RestMirrorHashes": { + "properties": { + "content": { + "type": "string", + "example": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a" + }, + "metadata": { + "type": "string", + "example": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a" + } + } + }, + "RestMirrorRepositorySynchronizationStatus": { + "properties": { + "externalRepoId": { "type": "string", "example": "1" }, + "failedSyncCount": { + "type": "integer", + "format": "int32", + "example": 1 + }, + "hashes": { + "type": "object", + "properties": { + "content": { + "type": "string", + "example": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a" + }, + "metadata": { + "type": "string", + "example": "677513e1f2a93ff50e7b709e3c96454c23a3fcd40046ab385c4093e30809500a" + } + } + }, + "initialSyncDate": { "type": "string", "format": "date-time" }, + "lastSyncDate": { "type": "string", "format": "date-time" }, + "localProjectId": { + "type": "integer", + "format": "int32", + "example": 1 + }, + "localRepoId": { "type": "integer", "format": "int32", "example": 1 }, + "upstreamId": { + "type": "string", + "example": "148728f5-df0f-3f3e-af11-5ca16be3725f" + } + } + }, + "RestMirroredRepository": { + "properties": { + "available": { "type": "boolean" }, + "cloneUrls": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestNamedLink" } + }, + "lastUpdated": { "type": "string", "format": "date-time" }, + "mirrorName": { "type": "string", "example": "Saigon Mirror" }, + "pushUrls": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestNamedLink" } + }, + "repositoryId": { "type": "string", "example": "1" }, + "status": { + "type": "string", + "enum": [ + "NOT_MIRRORED", + "INITIALIZING", + "AVAILABLE", + "ERROR_INITIALIZING", + "ERROR_AVAILABLE" + ] + } + } + }, + "RestNamedLink": { + "properties": { + "href": { + "type": "string", + "example": "https://bitbucket.example.com/scm/awesomeproject/awesomerepo.git" + }, + "name": { "type": "string", "example": "http" } + } + }, + "RestRefSyncQueue": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestFarmSynchronizationRequest" + } + } + } + }, + "RestRollingUpgradeState": { + "properties": { + "rollingUpgradeEnabled": { "type": "boolean", "example": true }, + "version": { "type": "string", "example": "9.0.0" } + } + }, + "RestSyncProgress": { + "properties": { + "discovering": { "type": "boolean" }, + "syncedRepos": { "type": "integer", "format": "int32" }, + "totalRepos": { "type": "integer", "format": "int32" } + } + }, + "RestUpstreamServer": { + "properties": { + "baseUrl": { + "type": "string", + "example": "https://bitbucket.example.com" + }, + "id": { + "type": "string", + "example": "f76a35c5-4592-425d-bf85-b4d9db68e809" + }, + "state": { + "type": "string", + "enum": [ + "INITIALIZING", + "PENDING", + "INSTALLED", + "UNKNOWN", + "REMOVED" + ], + "example": "INSTALLED" + } + } + }, + "RestUpstreamSettings": { + "properties": { + "mode": { + "type": "string", + "enum": ["ALL_PROJECTS", "SELECTED_PROJECTS"] + }, + "projectIds": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true + } + } + }, + "RestRefRestriction": { + "properties": { + "accessKeys": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestSshAccessKey" } + }, + "groups": { + "type": "array", + "example": ["group_a", "group_b"], + "items": { + "type": "string", + "example": "[\"group_a\",\"group_b\"]" + } + }, + "id": { + "type": "integer", + "format": "int32", + "example": 1, + "readOnly": true + }, + "matcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + }, + "scope": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + }, + "readOnly": true + }, + "type": { "type": "string", "example": "pull-request-only" }, + "users": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestApplicationUser" } + } + } + }, + "RestRestrictionRequest": { + "type": "object", + "properties": { + "accessKeyIds": { + "type": "array", + "example": [1, 2, 3], + "items": { "type": "integer", "format": "int32" } + }, + "accessKeys": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestSshAccessKey" } + }, + "groupNames": { + "type": "array", + "example": ["bitbucket-developers"], + "items": { + "type": "string", + "example": "[\"bitbucket-developers\"]" + } + }, + "groups": { + "type": "array", + "example": ["group_a", "group_b"], + "items": { + "type": "string", + "example": "[\"group_a\",\"group_b\"]" + } + }, + "id": { + "type": "integer", + "format": "int32", + "example": 1, + "readOnly": true + }, + "matcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + }, + "scope": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + }, + "readOnly": true + }, + "type": { "type": "string", "example": "pull-request-only" }, + "userSlugs": { + "type": "array", + "example": ["bman", "tstark", "hulk"], + "items": { + "type": "string", + "example": "[\"bman\",\"tstark\",\"hulk\"]" + } + }, + "users": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestApplicationUser" } + } + } + }, + "RestSshAccessKey": { + "properties": { + "key": { + "type": "object", + "properties": { + "algorithmType": { "type": "string" }, + "bitLength": { "type": "integer", "format": "int32" }, + "createdDate": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "expiryDays": { + "type": "integer", + "format": "int32", + "example": 30 + }, + "fingerprint": { + "type": "string", + "example": "Cbg38r+gDCiNHqBk6Y1BKO+EvufFBqhFWIEXh8oq9MI", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "example": 1, + "readOnly": true + }, + "label": { "type": "string", "example": "me@127.0.0.1" }, + "lastAuthenticated": { + "type": "string", + "example": "1630041546434", + "readOnly": true + }, + "text": { + "type": "string", + "example": "ssh-rsa AAAAB3... me@127.0.0.1" + } + } + }, + "permission": { + "type": "string", + "enum": [ + "USER_ADMIN", + "PROJECT_VIEW", + "REPO_READ", + "REPO_WRITE", + "REPO_ADMIN", + "PROJECT_READ", + "PROJECT_WRITE", + "REPO_CREATE", + "PROJECT_ADMIN", + "LICENSED_USER", + "PROJECT_CREATE", + "ADMIN", + "SYS_ADMIN" + ] + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + } + } + }, + "RestSshKey": { + "properties": { + "algorithmType": { "type": "string" }, + "bitLength": { "type": "integer", "format": "int32" }, + "createdDate": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "expiryDays": { "type": "integer", "format": "int32", "example": 30 }, + "fingerprint": { + "type": "string", + "example": "Cbg38r+gDCiNHqBk6Y1BKO+EvufFBqhFWIEXh8oq9MI", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "example": 1, + "readOnly": true + }, + "label": { "type": "string", "example": "me@127.0.0.1" }, + "lastAuthenticated": { + "type": "string", + "example": "1630041546434", + "readOnly": true + }, + "text": { + "type": "string", + "example": "ssh-rsa AAAAB3... me@127.0.0.1" + } + } + }, + "Context": { + "type": "object", + "properties": { + "commitMessage": { + "type": "string", + "example": "Merging in latest from upstream." + } + } + }, + "RestRefSyncRequest": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": ["DISCARD", "MERGE", "REBASE"], + "example": "MERGE" + }, + "context": { "$ref": "#/components/schemas/Context" }, + "refId": { "type": "string", "example": "refs/heads/master" } + } + }, + "RestRefSyncStatus": { + "properties": { + "aheadRefs": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "state": { + "type": "string", + "enum": ["AHEAD", "DIVERGED", "ORPHANED"] + }, + "tag": { "type": "boolean" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + }, + "readOnly": true + }, + "available": { "type": "boolean", "readOnly": true }, + "divergedRefs": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "state": { + "type": "string", + "enum": ["AHEAD", "DIVERGED", "ORPHANED"] + }, + "tag": { "type": "boolean" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + }, + "readOnly": true + }, + "enabled": { "type": "boolean" }, + "lastSync": { + "type": "number", + "example": 1331038800000, + "readOnly": true + }, + "orphanedRefs": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "state": { + "type": "string", + "enum": ["AHEAD", "DIVERGED", "ORPHANED"] + }, + "tag": { "type": "boolean" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + }, + "readOnly": true + } + } + }, + "RestRejectedRef": { + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "state": { + "type": "string", + "enum": ["AHEAD", "DIVERGED", "ORPHANED"] + }, + "tag": { "type": "boolean" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "ApplicationId": { "type": "object" }, + "RestChangeset": { + "properties": { + "changes": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "integer", "format": "int32" }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "integer", "format": "int32" }, + "start": { "type": "integer", "format": "int32" }, + "values": { "type": "object" } + } + }, + "fromCommit": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "abcdef0" }, + "id": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + } + } + }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "toCommit": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "authorTimestamp": { + "type": "integer", + "format": "int64", + "example": 1359075920 + }, + "committer": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "committerTimestamp": { + "type": "integer", + "format": "int64", + "example": 1449075830 + }, + "displayId": { "type": "string", "example": "abcdef0" }, + "id": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + }, + "message": { + "type": "string", + "example": "More work on feature 1" + }, + "parents": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestMinimalCommit" } + } + } + } + } + }, + "RestCommentJiraIssue": { + "properties": { + "commentId": { "type": "integer", "format": "int64", "example": 1 }, + "issueKey": { "type": "string", "example": "TEST-123" } + } + }, + "RestCommit": { + "properties": { + "author": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "authorTimestamp": { + "type": "integer", + "format": "int64", + "example": 1359075920 + }, + "committer": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "committerTimestamp": { + "type": "integer", + "format": "int64", + "example": 1449075830 + }, + "displayId": { "type": "string", "example": "abcdef0" }, + "id": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + }, + "message": { "type": "string", "example": "More work on feature 1" }, + "parents": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestMinimalCommit" } + } + } + }, + "RestEnhancedEntityLink": { + "properties": { + "applicationLinkId": { "type": "string", "example": "a1b54cs4wsd45" }, + "displayUrl": { "type": "string", "example": "example.com/jira" }, + "projectId": { + "type": "integer", + "format": "int64", + "example": 10000 + }, + "projectKey": { "type": "string", "example": "MPROJ" }, + "projectName": { "type": "string", "example": "My Project" } + } + }, + "RestJiraIssue": { + "type": "object", + "properties": { + "key": { "type": "string", "example": "JRA-9" }, + "url": { + "type": "string", + "example": "https://jira.atlassian.com/browse/JRA-9" + } + } + }, + "RestMinimalCommit": { + "properties": { + "displayId": { "type": "string", "example": "abcdef0" }, + "id": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + } + } + }, + "RestPageRestChange": { + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "integer", "format": "int32" }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "integer", "format": "int32" }, + "start": { "type": "integer", "format": "int32" }, + "values": { "type": "object" } + } + }, + "RestPerson": { + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "RestSshAccessKeyLocations": { + "type": "object", + "properties": { + "projects": { "$ref": "#/components/schemas/RestProject" }, + "repositories": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "RestSshKeySettings": { + "properties": { + "keyTypeRestrictions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestSshKeyTypeRestriction" + } + }, + "maxExpiryDays": { + "type": "object", + "properties": { + "asInt": { "type": "integer", "format": "int32" }, + "present": { "type": "boolean" } + } + } + } + }, + "RestSshKeyTypeRestriction": { + "properties": { + "algorithm": { "type": "string", "example": "RSA" }, + "allowed": { "type": "boolean", "example": true }, + "minKeyLength": { + "type": "object", + "example": 2048, + "properties": { + "asInt": { "type": "integer", "format": "int32" }, + "present": { "type": "boolean" } + } + } + } + }, + "RestSshSettings": { + "properties": { + "accessKeysEnabled": { "type": "boolean" }, + "baseUrl": { "type": "string", "example": "ssh://example.com" }, + "enabled": { "type": "boolean", "example": true }, + "fingerprint": { + "$ref": "#/components/schemas/SimpleSshKeyFingerprint" + }, + "port": { "type": "integer", "format": "int32", "example": 7999 } + } + }, + "SimpleSshKeyFingerprint": { + "properties": { + "algorithm": { "type": "string" }, + "value": { "type": "string" } + } + }, + "AdminPasswordUpdate": { + "type": "object", + "properties": { + "name": { "type": "string", "example": "jcitizen" }, + "password": { + "type": "string", + "example": "my-secret-password", + "writeOnly": true + }, + "passwordConfirm": { + "type": "string", + "example": "my-secret-password", + "writeOnly": true + } + } + }, + "DiffContentFilter": { "type": "object" }, + "ExampleAvatarMultipartFormData": { + "type": "object", + "properties": { + "avatar": { + "type": "string", + "format": "binary", + "description": "The avatar file to upload." + } + } + }, + "ExampleCertificateMultipartFormData": { + "type": "object", + "properties": { + "certificate": { + "type": "string", + "format": "binary", + "description": "The X.509 certificate file to upload." + } + } + }, + "ExampleFiles": { + "properties": { + "files": { + "$ref": "#/components/schemas/ExampleJsonLastModifiedCallback" + } + } + }, + "ExampleJsonLastModifiedCallback": { + "properties": { + "latestCommit": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "authorTimestamp": { + "type": "integer", + "format": "int64", + "example": 1359075920 + }, + "committer": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "committerTimestamp": { + "type": "integer", + "format": "int64", + "example": 1449075830 + }, + "displayId": { "type": "string", "example": "abcdef0" }, + "id": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + }, + "message": { + "type": "string", + "example": "More work on feature 1" + }, + "parents": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestMinimalCommit" } + } + } + }, + "pomXml": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "authorTimestamp": { + "type": "integer", + "format": "int64", + "example": 1359075920 + }, + "committer": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "committerTimestamp": { + "type": "integer", + "format": "int64", + "example": 1449075830 + }, + "displayId": { "type": "string", "example": "abcdef0" }, + "id": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + }, + "message": { + "type": "string", + "example": "More work on feature 1" + }, + "parents": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestMinimalCommit" } + } + } + }, + "readmeMd": { + "type": "object", + "properties": { + "author": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "authorTimestamp": { + "type": "integer", + "format": "int64", + "example": 1359075920 + }, + "committer": { + "type": "object", + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "emailAddress": { + "type": "string", + "example": "charlie@example.com" + }, + "name": { "type": "string", "example": "Charlie" } + } + }, + "committerTimestamp": { + "type": "integer", + "format": "int64", + "example": 1449075830 + }, + "displayId": { "type": "string", "example": "abcdef0" }, + "id": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + }, + "message": { + "type": "string", + "example": "More work on feature 1" + }, + "parents": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestMinimalCommit" } + } + } + } + } + }, + "ExampleMultipartFormData": { + "type": "object", + "properties": { + "branch": { + "type": "string", + "description": "The branch on which the path should be modified or created." + }, + "content": { + "type": "string", + "description": "The full content of the file at path." + }, + "message": { + "type": "string", + "description": "The message associated with this change, to be used as the commit message. Or null if the default message should be used." + }, + "sourceBranch": { + "type": "string", + "description": "The starting point for branch. If provided and different from branch, branch will be created as a new branch, branching off from sourceBranch." + }, + "sourceCommitId": { + "type": "string", + "description": "The commit ID of the file before it was edited, used to identify if content has changed. Or null if this is a new file" + } + } + }, + "ExamplePostMultipartFormData": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The hook script contents." + }, + "description": { + "type": "string", + "description": "A description of the hook script (useful when querying registered hook scripts)." + }, + "name": { + "type": "string", + "description": "The name of the hook script (useful when querying registered hook scripts)." + }, + "type": { + "type": "string", + "description": "The type of hook script; supported values are \"PRE\" for pre-receive hooks and \"POST\" for post-receive hooks." + } + } + }, + "ExamplePreviewMigration": { + "properties": { + "repositories": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepository" } + } + } + }, + "ExamplePutMultipartFormData": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The hook script contents." + }, + "description": { + "type": "string", + "description": "A description of the hook script (useful when querying registered hook scripts)." + }, + "name": { + "type": "string", + "description": "The name of the hook script (useful when querying registered hook scripts)." + } + } + }, + "ExampleRequirements": { + "properties": { + "count": { "type": "string", "example": "3" }, + "enabled": { "type": "boolean", "example": true } + } + }, + "ExampleSettings": { + "properties": { + "booleanValue": { "type": "boolean", "example": true }, + "doubleValue": { + "type": "number", + "format": "double", + "example": 1.1 + }, + "integerValue": { + "type": "integer", + "format": "int32", + "example": 1 + }, + "longValue": { + "type": "integer", + "format": "int64", + "example": -2147483648 + }, + "stringValue": { + "type": "string", + "example": "This is an arbitrary string" + } + } + }, + "ExampleSettingsMap": { + "properties": { + "boolean key": { "type": "boolean", "example": true }, + "long key": { "type": "number", "example": 10 }, + "string key": { "type": "string", "example": "string value" } + } + }, + "ExampleSocketAddress": { + "properties": { + "address": { "type": "string", "example": "node.example.com" }, + "port": { "type": "integer", "format": "int32", "example": 8230 } + } + }, + "ExampleStatus": { + "properties": { + "currentNumberOfUsers": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "serverId": { "type": "string", "example": "" } + } + }, + "FileListResource": {}, + "FilePart": { + "type": "object", + "properties": { + "contentType": { "type": "string" }, + "formField": { "type": "boolean" }, + "inputStream": { "type": "object" }, + "name": { "type": "string" }, + "size": { "type": "integer", "format": "int64" }, + "value": { "type": "string" } + } + }, + "Group": { + "properties": { "name": { "type": "string", "example": "group_a" } } + }, + "GroupAndUsers": { + "type": "object", + "properties": { + "group": { "type": "string", "example": "group" }, + "users": { + "type": "array", + "example": ["user1", "user2"], + "items": { "type": "string" }, + "uniqueItems": true + } + }, + "required": ["users"] + }, + "GroupPickerContext": { + "type": "object", + "properties": { + "context": { "type": "string", "example": "user_a" }, + "itemName": { "type": "string", "example": "group_a" } + } + }, + "OptionalBodyBeanParam": { "type": "object" }, + "RepositoryHookDetails": { + "properties": { + "configFormKey": { "type": "string" }, + "description": { "type": "string" }, + "key": { "type": "string" }, + "name": { "type": "string" }, + "supportedScopes": { + "type": "array", + "items": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + }, + "uniqueItems": true + }, + "type": { + "type": "string", + "enum": ["PRE_RECEIVE", "PRE_PULL_REQUEST_MERGE", "POST_RECEIVE"] + }, + "version": { "type": "string" } + } + }, + "RestAggregateRejectCounter": { + "properties": { + "lastRejectTime": { "type": "number", "example": 1630041546433 }, + "rejectCount": { "type": "integer", "format": "int64", "example": 5 }, + "user": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + } + } + }, + "RestAnnouncementBanner": { + "properties": { + "audience": { "type": "string", "enum": ["AUTHENTICATED", "ALL"] }, + "enabled": { "type": "boolean" }, + "message": { "type": "string" } + } + }, + "RestApplicationProperties": { + "properties": { + "buildDate": { "type": "string", "example": "1358897885952000" }, + "buildNumber": { "type": "string", "example": "20220123103656677" }, + "displayName": { + "type": "string", + "example": "Example.com Bitbucket" + }, + "version": { "type": "string", "example": "2.1.0" } + } + }, + "RestApplySuggestionRequest": { + "type": "object", + "properties": { + "commentVersion": { + "type": "object", + "example": 0, + "properties": { + "asInt": { "type": "integer", "format": "int32" }, + "present": { "type": "boolean" } + } + }, + "commitMessage": { "type": "string", "example": "A commit message" }, + "pullRequestVersion": { + "type": "object", + "example": 1, + "properties": { + "asInt": { "type": "integer", "format": "int32" }, + "present": { "type": "boolean" } + } + }, + "suggestionIndex": { + "type": "object", + "example": 2, + "properties": { + "asInt": { "type": "integer", "format": "int32" }, + "present": { "type": "boolean" } + } + } + } + }, + "RestAttachmentMetadata": { + "properties": { + "id": { "type": "integer", "format": "int64", "example": 1 }, + "metadata": { "type": "string", "example": "{\\\"A\\\":\\\"B\\\"}" }, + "url": { "type": "string", "example": "test.com/test" } + } + }, + "RestAutoDeclineSettings": { + "properties": { + "enabled": { "type": "boolean", "example": true }, + "inactivityWeeks": { + "type": "integer", + "format": "int32", + "example": 4 + }, + "scope": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + } + } + } + }, + "RestAutoDeclineSettingsRequest": { + "type": "object", + "properties": { + "enabled": { "type": "boolean", "example": true }, + "inactivityWeeks": { + "type": "integer", + "format": "int32", + "example": 4 + } + } + }, + "RestAutoMergeProcessingResult": { + "properties": { + "autoMergeProcessingStatus": { + "type": "string", + "enum": [ + "CANCELLED", + "VETOED", + "STALE", + "MERGED", + "LOCK_FAILURE", + "UNKNOWN" + ], + "example": "CANCELLED" + }, + "pullRequest": { + "type": "object", + "properties": { + "closed": { "type": "boolean" }, + "closedDate": { + "type": "integer", + "format": "int64", + "example": 19990759200 + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 13590759200 + }, + "description": { + "type": "string", + "example": "It is a kludge, but put the tuple from the database in the cache." + }, + "descriptionAsHtml": { "type": "string" }, + "draft": { "type": "boolean" }, + "fromRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "htmlDescription": { "type": "string", "writeOnly": true }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "locked": { "type": "boolean" }, + "open": { "type": "boolean" }, + "participants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "reviewers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + }, + "state": { + "type": "string", + "enum": ["DECLINED", "MERGED", "OPEN"] + }, + "title": { "type": "string", "example": "Talking Nerdy" }, + "toRef": { + "type": "object", + "properties": { + "displayId": { + "type": "string", + "example": "feature-ABC-1233" + }, + "id": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + }, + "latestCommit": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { + "type": "string", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 14490759200 + }, + "version": { "type": "integer", "format": "int32" } + } + } + } + }, + "RestAutoMergeProjectSettingsRequest": { + "type": "object", + "properties": { + "enabled": { "type": "boolean", "example": false }, + "restrictionAction": { + "type": "string", + "enum": ["CREATE", "DELETE", "NONE"], + "example": "CREATE" + } + } + }, + "RestAutoMergeRequest": { + "properties": { + "autoSubject": { "type": "boolean", "example": true }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 13590759200 + }, + "fromHash": { + "type": "string", + "example": "babecafebabecafebabecafebabecafebabecafe" + }, + "message": { + "type": "string", + "example": "(Optional) A descriptive message for the merge commit" + }, + "strategyId": { "type": "string", "example": "(Optional) squash" }, + "toRefId": { + "type": "string", + "example": "refs/heads/feature-ABC-123" + } + } + }, + "RestAutoMergeRestrictedSettings": { + "properties": { + "enabled": { "type": "boolean", "example": false }, + "restrictionState": { + "type": "string", + "description": "The restriction state of this scope's project.", + "enum": ["NONE", "RESTRICTED_UNMODIFIABLE", "RESTRICTED_MODIFIABLE"] + }, + "scope": { + "type": "object", + "description": "The scope that these settings apply to.", + "properties": { + "resourceId": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + } + } + } + }, + "RestAutoMergeSettingsRequest": { + "type": "object", + "properties": { "enabled": { "type": "boolean", "example": false } } + }, + "RestBitbucketLicense": { + "properties": { + "creationDate": { + "type": "integer", + "format": "int64", + "example": 1331038800000, + "readOnly": true + }, + "daysBeforeExpiry": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "expiryDate": { + "type": "integer", + "format": "int64", + "example": 1372493732817, + "readOnly": true + }, + "gracePeriodEndDate": { + "type": "integer", + "format": "int64", + "example": 1372493732817, + "readOnly": true + }, + "license": { "type": "string", "example": "" }, + "maintenanceExpiryDate": { + "type": "integer", + "format": "int64", + "example": 1372493732817, + "readOnly": true + }, + "maximumNumberOfUsers": { + "type": "integer", + "format": "int32", + "example": 12, + "readOnly": true + }, + "numberOfDaysBeforeExpiry": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "numberOfDaysBeforeGracePeriodExpiry": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "numberOfDaysBeforeMaintenanceExpiry": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "purchaseDate": { + "type": "integer", + "format": "int64", + "example": 1331038800000, + "readOnly": true + }, + "serverId": { + "type": "string", + "example": "", + "readOnly": true + }, + "status": { + "type": "object", + "properties": { + "currentNumberOfUsers": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "serverId": { "type": "string", "example": "" } + }, + "readOnly": true + }, + "supportEntitlementNumber": { + "type": "string", + "example": "", + "readOnly": true + }, + "unlimitedNumberOfUsers": { "type": "boolean", "readOnly": true } + } + }, + "RestBuildCapabilities": { + "properties": { + "buildStatus": { + "type": "array", + "items": { "type": "string", "example": "richBuildStatus" } + } + } + }, + "RestBuildStatusSetRequest": { + "type": "object", + "properties": { + "buildNumber": { + "type": "string", + "example": "3", + "maxLength": 255, + "minLength": 0 + }, + "description": { "type": "string", "example": "Unit test build" }, + "duration": { + "type": "integer", + "format": "int64", + "example": 1500000 + }, + "key": { + "type": "string", + "example": "TEST-REP123", + "maxLength": 255, + "minLength": 0 + }, + "lastUpdated": { + "type": "integer", + "format": "int64", + "example": 1359075920 + }, + "name": { + "type": "string", + "example": "Database Matrix Tests", + "maxLength": 255, + "minLength": 0 + }, + "parent": { + "type": "string", + "example": "TEST-REP", + "maxLength": 1024, + "minLength": 0 + }, + "ref": { + "type": "string", + "example": "refs/heads/master", + "maxLength": 1024, + "minLength": 0, + "pattern": "^refs\\/.*" + }, + "state": { + "type": "string", + "enum": [ + "CANCELLED", + "FAILED", + "INPROGRESS", + "SUCCESSFUL", + "UNKNOWN" + ] + }, + "testResults": { + "type": "object", + "properties": { + "failed": { "type": "integer", "format": "int32", "example": 1 }, + "skipped": { "type": "integer", "format": "int32", "example": 5 }, + "successful": { + "type": "integer", + "format": "int32", + "example": 134 + } + } + }, + "url": { + "type": "string", + "example": "https://bamboo.example.com/browse/TEST-REP1-3", + "maxLength": 450, + "minLength": 0 + } + }, + "required": ["key", "state", "url"] + }, + "RestBulkUserRateLimitSettingsUpdateRequest": { + "type": "object", + "properties": { + "settings": { + "type": "object", + "properties": { + "capacity": { + "type": "integer", + "format": "int32", + "example": 60 + }, + "fillRate": { "type": "integer", "format": "int32", "example": 5 } + } + }, + "usernames": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true + }, + "whitelisted": { "type": "boolean" } + } + }, + "RestChange": { + "properties": { + "conflict": { + "type": "object", + "properties": { + "ourChange": { + "type": "object", + "properties": { + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "type": { + "type": "string", + "enum": [ + "ADD", + "COPY", + "DELETE", + "MODIFY", + "MOVE", + "UNKNOWN" + ] + } + } + }, + "theirChange": { + "type": "object", + "properties": { + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "type": { + "type": "string", + "enum": [ + "ADD", + "COPY", + "DELETE", + "MODIFY", + "MOVE", + "UNKNOWN" + ] + } + } + } + } + }, + "contentId": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + }, + "executable": { "type": "boolean" }, + "fromContentId": { + "type": "string", + "example": "bcdef0123abcdef4567abcdef8987abcdef6543a" + }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "nodeType": { + "type": "string", + "enum": ["DIRECTORY", "FILE", "SUBMODULE"] + }, + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "percentUnchanged": { + "type": "integer", + "format": "int32", + "example": 98 + }, + "srcExecutable": { "type": "boolean" }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "type": { + "type": "string", + "enum": ["ADD", "COPY", "DELETE", "MODIFY", "MOVE", "UNKNOWN"] + } + } + }, + "RestClusterInformation": { + "properties": { + "localNode": { + "type": "object", + "properties": { + "address": { + "type": "object", + "properties": { + "address": { + "type": "string", + "example": "node.example.com" + }, + "port": { + "type": "integer", + "format": "int32", + "example": 8230 + } + } + }, + "buildVersion": { "type": "string", "example": "7.0.0" }, + "id": { + "type": "string", + "example": "d4fde8b1-2504-4998-a0ba-14fbe98edd4d" + }, + "local": { "type": "boolean" }, + "name": { "type": "string", "example": "foo" } + } + }, + "nodes": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestClusterNode" } + }, + "running": { "type": "boolean" } + } + }, + "RestCommitMessageSuggestion": { + "properties": { + "body": { + "type": "string", + "example": "Merge in PROJECT_1/repo_1 from feature/feature-2 to main" + }, + "title": { + "type": "string", + "example": "Pull request #2: add new feature" + } + } + }, + "RestConflict": { + "properties": { + "ourChange": { + "type": "object", + "properties": { + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "type": { + "type": "string", + "enum": ["ADD", "COPY", "DELETE", "MODIFY", "MOVE", "UNKNOWN"] + } + } + }, + "theirChange": { + "type": "object", + "properties": { + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "type": { + "type": "string", + "enum": ["ADD", "COPY", "DELETE", "MODIFY", "MOVE", "UNKNOWN"] + } + } + } + } + }, + "RestConflictChange": { + "properties": { + "path": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "srcPath": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "type": { + "type": "string", + "enum": ["ADD", "COPY", "DELETE", "MODIFY", "MOVE", "UNKNOWN"] + } + } + }, + "RestConnectivitySummary": { + "properties": { + "errorMessage": { + "type": "string", + "example": "Unable to connect to the node." + }, + "reachable": { "type": "boolean", "example": true }, + "roundTripTime": { + "type": "integer", + "format": "int64", + "example": 100 + } + } + }, + "RestCreateBranchRequest": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "This is my branch or tag" + }, + "name": { "type": "string", "example": "my-branch-or-tag" }, + "startPoint": { + "type": "string", + "example": "8d351a10fb428c0c1239530256e21cf24f136e73" + } + } + }, + "RestCreateTagRequest": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "This is my branch or tag" + }, + "name": { "type": "string", "example": "my-branch-or-tag" }, + "startPoint": { + "type": "string", + "example": "8d351a10fb428c0c1239530256e21cf24f136e73" + } + } + }, + "RestDefaultBranch": { + "type": "object", + "properties": { "id": { "type": "string" } } + }, + "RestDeployment": { + "properties": { + "deploymentSequenceNumber": { + "type": "integer", + "format": "int64", + "example": 5 + }, + "description": { + "type": "string", + "example": "Production and mirror environments" + }, + "displayName": { "type": "string", "example": "US East Mirror" }, + "environment": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "example": "US East Mirror", + "maxLength": 255, + "minLength": 0 + }, + "key": { + "type": "string", + "example": "us-east-mirror", + "maxLength": 255, + "minLength": 0 + }, + "type": { + "type": "string", + "example": "production", + "pattern": "DEVELOPMENT|TESTING|STAGING|PRODUCTION" + }, + "url": { + "type": "string", + "example": "https://foo-bar.production/us-east", + "maxLength": 1024, + "minLength": 0 + } + }, + "required": ["displayName", "key"] + }, + "fromCommit": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "abcdef0" }, + "id": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + } + } + }, + "key": { "type": "string", "example": "PROD-MIR" }, + "lastUpdated": { + "type": "integer", + "format": "int64", + "example": 1449075920 + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "state": { + "type": "string", + "enum": [ + "PENDING", + "IN_PROGRESS", + "CANCELLED", + "FAILED", + "ROLLED_BACK", + "SUCCESSFUL", + "UNKNOWN" + ] + }, + "toCommit": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "abcdef0" }, + "id": { + "type": "string", + "example": "abcdef0123abcdef4567abcdef8987abcdef6543" + } + } + }, + "url": { + "type": "string", + "example": "http://example.ci.org/projects/PROJ/deploy/mirror-deploy/100" + } + } + }, + "RestDeploymentEnvironment": { + "properties": { + "displayName": { + "type": "string", + "example": "US East Mirror", + "maxLength": 255, + "minLength": 0 + }, + "key": { + "type": "string", + "example": "us-east-mirror", + "maxLength": 255, + "minLength": 0 + }, + "type": { + "type": "string", + "example": "production", + "pattern": "DEVELOPMENT|TESTING|STAGING|PRODUCTION" + }, + "url": { + "type": "string", + "example": "https://foo-bar.production/us-east", + "maxLength": 1024, + "minLength": 0 + } + } + }, + "RestDeploymentSetRequest": { + "type": "object", + "properties": { + "deploymentSequenceNumber": { + "type": "integer", + "format": "int64", + "example": 2 + }, + "description": { + "type": "string", + "example": "2nd deployment of commit 44bca31f4be to US East production", + "maxLength": 255, + "minLength": 0 + }, + "displayName": { + "type": "string", + "example": "US East marketing website production", + "maxLength": 255, + "minLength": 0 + }, + "environment": { + "$ref": "#/components/schemas/RestDeploymentEnvironment" + }, + "key": { + "type": "string", + "example": "marketing-us-prod", + "maxLength": 255, + "minLength": 0 + }, + "lastUpdated": { + "type": "integer", + "format": "int64", + "example": 1359075920, + "minimum": 0 + }, + "state": { + "type": "string", + "enum": [ + "PENDING", + "IN_PROGRESS", + "CANCELLED", + "FAILED", + "ROLLED_BACK", + "SUCCESSFUL", + "UNKNOWN" + ], + "example": "SUCCESSFUL" + }, + "url": { + "type": "string", + "example": "https://my-dep-tool/marketing-us-prod/2", + "maxLength": 1024, + "minLength": 0 + } + }, + "required": [ + "deploymentSequenceNumber", + "description", + "displayName", + "environment", + "key", + "state", + "url" + ] + }, + "RestDetailedGroup": { + "properties": { + "deletable": { "type": "boolean" }, + "name": { "type": "string", "example": "group-a" } + } + }, + "RestDetailedInvocation": { + "properties": { + "duration": { "type": "integer", "format": "int32" }, + "event": { "type": "string" }, + "eventScope": { + "type": "object", + "properties": { + "id": { "type": "string" }, + "type": { "type": "string" } + } + }, + "finish": { "type": "integer", "format": "int32" }, + "id": { "type": "integer", "format": "int32" }, + "request": { "type": "object", "properties": {} }, + "result": { "type": "object", "properties": {} }, + "start": { "type": "integer", "format": "int32" } + } + }, + "RestDetailedUser": { + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "deletable": { "type": "boolean" }, + "directoryName": { + "type": "string", + "example": "Bitbucket Internal Directory" + }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { "type": "string", "example": "jane@example.com" }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "lastAuthenticationTimestamp": { + "type": "number", + "example": 1368145580548 + }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "mutableDetails": { "type": "boolean" }, + "mutableGroups": { "type": "boolean" }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + }, + "RestDiff": { + "properties": { + "binary": { "type": "boolean" }, + "destination": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "hunks": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestDiffHunk" } + }, + "lineComments": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestComment" } + }, + "properties": { "type": "object" }, + "source": { + "type": "object", + "properties": { + "components": { + "type": "array", + "example": ["path", "to", "file.txt"], + "items": { "type": "string" } + }, + "extension": { "type": "string", "example": "txt" }, + "name": { "type": "string", "example": "file.txt" }, + "parent": { "type": "string", "example": "path/to" } + } + }, + "truncated": { "type": "boolean" } + } + }, + "RestDiffHunk": { + "properties": { + "context": { "type": "string" }, + "destinationLine": { "type": "integer", "format": "int32" }, + "destinationSpan": { "type": "integer", "format": "int32" }, + "segments": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestDiffSegment" } + }, + "sourceLine": { "type": "integer", "format": "int32" }, + "sourceSpan": { "type": "integer", "format": "int32" }, + "truncated": { "type": "boolean" } + } + }, + "RestDiffLine": { + "properties": { + "commentIds": { + "type": "array", + "items": { "type": "integer", "format": "int64" } + }, + "conflictMarker": { + "type": "string", + "enum": ["MARKER", "OURS", "THEIRS"] + }, + "destination": { "type": "integer", "format": "int32" }, + "line": { "type": "string" }, + "source": { "type": "integer", "format": "int32" }, + "truncated": { "type": "boolean" } + } + }, + "RestDiffSegment": { + "properties": { + "lines": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestDiffLine" } + }, + "truncated": { "type": "boolean" }, + "type": { "type": "string", "enum": ["ADDED", "CONTEXT", "REMOVED"] } + } + }, + "RestDiffStatsSummary": { "properties": {} }, + "RestErasedUser": { + "properties": { + "newIdentifier": { "type": "string", "example": "user-123ab" } + } + }, + "RestExportRequest": { + "type": "object", + "properties": { + "exportLocation": { + "type": "string", + "example": "example/sub/directory" + }, + "repositoriesRequest": { + "type": "object", + "properties": { + "includes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRepositorySelector" + }, + "uniqueItems": true + } + }, + "required": ["includes"] + } + }, + "required": ["repositoriesRequest"] + }, + "RestHookScript": { + "properties": { + "createdDate": { "type": "string", "format": "date-time" }, + "description": { "type": "string" }, + "id": { "type": "integer", "format": "int64" }, + "name": { "type": "string" }, + "pluginKey": { "type": "string" }, + "type": { "type": "string", "enum": ["POST", "PRE"] }, + "updatedDate": { "type": "string", "format": "date-time" }, + "version": { "type": "integer", "format": "int32" } + } + }, + "RestHookScriptConfig": { + "properties": { + "scope": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + } + }, + "script": { + "type": "object", + "properties": { + "createdDate": { "type": "string", "format": "date-time" }, + "description": { "type": "string" }, + "id": { "type": "integer", "format": "int64" }, + "name": { "type": "string" }, + "pluginKey": { "type": "string" }, + "type": { "type": "string", "enum": ["POST", "PRE"] }, + "updatedDate": { "type": "string", "format": "date-time" }, + "version": { "type": "integer", "format": "int32" } + } + }, + "triggerIds": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true + } + } + }, + "RestHookScriptTriggers": { + "type": "object", + "properties": { + "triggerIds": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true + } + } + }, + "RestImportRequest": { + "type": "object", + "properties": { + "archivePath": { + "type": "string", + "example": "Bitbucket_export_1.tar" + } + } + }, + "RestInvocationHistory": { "properties": {} }, + "RestInvocationRequest": { "properties": {} }, + "RestInvocationResult": { "properties": {} }, + "RestJob": { + "properties": { + "endDate": { + "type": "integer", + "format": "int64", + "example": 1497657603000 + }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "initiator": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + }, + "nodeId": { + "type": "string", + "example": "1bec7499-077a-4b58-b27c-996a9c2187a4" + }, + "progress": { + "type": "object", + "properties": { + "message": { "type": "string", "example": "Working on it..." }, + "percentage": { + "type": "integer", + "format": "int32", + "example": 42 + } + } + }, + "startDate": { + "type": "integer", + "format": "int64", + "example": 1497657601000 + }, + "state": { + "type": "string", + "enum": [ + "INITIALISING", + "READY", + "RUNNING", + "FINALISING", + "COMPLETED", + "FAILED", + "CANCELING", + "CANCELED", + "TIMED_OUT", + "ABORTED" + ] + }, + "type": { + "type": "string", + "example": "com.atlassian.bitbucket.migration.export" + }, + "updatedDate": { + "type": "integer", + "format": "int64", + "example": 1497657603000 + } + } + }, + "RestJobMessage": { + "properties": { + "createdDate": { "type": "string", "format": "date-time" }, + "id": { "type": "string", "example": "617" }, + "severity": { "type": "string", "enum": ["INFO", "WARN", "ERROR"] }, + "subject": { "type": "string", "example": "job" }, + "text": { + "type": "string", + "example": "Something of interest happened" + } + } + }, + "RestLabel": { + "properties": { "name": { "type": "string", "example": "labelName" } } + }, + "RestLabelable": { + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "labelableType": { "type": "string", "enum": ["REPOSITORY"] }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "RestLogLevel": { + "properties": { "logLevel": { "type": "string", "example": "DEBUG" } } + }, + "RestMailConfiguration": { + "properties": { + "hostname": { "type": "string", "example": "smtp.example.com" }, + "password": { "type": "string", "example": "password" }, + "port": { "type": "integer", "format": "int32", "example": 465 }, + "protocol": { "type": "string", "enum": ["SMTP", "SMTPS"] }, + "requireStartTls": { "type": "boolean" }, + "senderAddress": { + "type": "string", + "example": "stash-no-reply@company.com" + }, + "useStartTls": { "type": "boolean" }, + "username": { "type": "string", "example": "user" } + } + }, + "RestMarkup": { + "properties": { + "html": { "type": "string", "example": "

Hello World!

" } + } + }, + "RestMeshConnectivityReport": { + "properties": { + "reports": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestNodeConnectivityReport" + } + } + } + }, + "RestMeshMigrationQueueStateCounts": { "properties": {} }, + "RestMeshMigrationRequest": { + "type": "object", + "properties": { + "all": { "type": "boolean" }, + "maxBytesPerSecond": { + "type": "object", + "properties": { + "asLong": { "type": "integer", "format": "int64" }, + "present": { "type": "boolean" } + } + }, + "projectIds": { + "type": "array", + "items": { "type": "integer", "format": "int32" }, + "uniqueItems": true + }, + "repositoryIds": { + "type": "array", + "items": { "type": "integer", "format": "int32" }, + "uniqueItems": true + } + } + }, + "RestMeshMigrationSummary": { + "properties": { + "endTime": { + "type": "integer", + "format": "int64", + "example": 1331038800000 + }, + "jobId": { "type": "integer", "format": "int64" }, + "maxBandwidth": { "type": "integer", "format": "int64" }, + "progress": { "type": "integer", "format": "int32", "example": 53 }, + "queue": { "type": "object", "properties": {} }, + "startTime": { + "type": "integer", + "format": "int64", + "example": 1331038800000 + }, + "state": { "type": "string", "example": "RUNNING" } + } + }, + "RestMeshNode": { + "properties": { + "id": { "type": "string", "example": "1" }, + "lastSeenDate": { "type": "number", "example": 1630041546433 }, + "name": { "type": "string", "example": "My node" }, + "offline": { "type": "boolean", "example": false }, + "rpcId": { "type": "string", "example": "1" }, + "rpcUrl": { "type": "string", "example": "http://127.0.0.1:7999" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "DELETING", + "DISABLED", + "DRAINING", + "OFFLINE" + ], + "example": "AVAILABLE" + } + } + }, + "RestMigrationRepository": { + "properties": { + "migrationState": { + "type": "string", + "enum": [ + "QUEUED", + "STAGING", + "STAGED", + "MIGRATED", + "FAILED", + "CANCELED", + "SKIPPED" + ] + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + } + } + }, + "RestNode": { + "properties": { + "id": { "type": "string", "example": "1" }, + "name": { "type": "string", "example": "My Node" }, + "type": { "type": "string", "enum": ["BITBUCKET", "MESH"] } + } + }, + "RestNodeConnectivityReport": { + "properties": { + "node": { + "type": "object", + "properties": { + "id": { "type": "string", "example": "1" }, + "name": { "type": "string", "example": "My Node" }, + "type": { "type": "string", "enum": ["BITBUCKET", "MESH"] } + } + }, + "summaries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestNodeConnectivitySummary" + } + } + } + }, + "RestNodeConnectivitySummary": { + "properties": { + "node": { + "type": "object", + "properties": { + "id": { "type": "string", "example": "1" }, + "name": { "type": "string", "example": "My Node" }, + "type": { "type": "string", "enum": ["BITBUCKET", "MESH"] } + } + }, + "summary": { + "type": "object", + "properties": { + "errorMessage": { + "type": "string", + "example": "Unable to connect to the node." + }, + "reachable": { "type": "boolean", "example": true }, + "roundTripTime": { + "type": "integer", + "format": "int64", + "example": 100 + } + } + } + } + }, + "RestPermitted": { + "properties": { "permitted": { "type": "boolean", "example": true } } + }, + "RestPermittedGroup": { + "properties": { + "group": { + "type": "object", + "properties": { "name": { "type": "string", "example": "group_a" } } + }, + "permission": { "type": "string", "example": "ADMIN" } + } + }, + "RestPermittedUser": { + "properties": { + "permission": { + "type": "string", + "enum": [ + "USER_ADMIN", + "PROJECT_VIEW", + "REPO_READ", + "REPO_WRITE", + "REPO_ADMIN", + "PROJECT_READ", + "PROJECT_WRITE", + "REPO_CREATE", + "PROJECT_ADMIN", + "LICENSED_USER", + "PROJECT_CREATE", + "ADMIN", + "SYS_ADMIN" + ] + }, + "user": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + } + } + }, + "RestProgress": { + "properties": { + "message": { "type": "string", "example": "Working on it..." }, + "percentage": { "type": "integer", "format": "int32", "example": 42 } + } + }, + "RestProjectSettingsRestriction": { + "properties": { + "componentKey": { "type": "string", "example": "my-admin-component" }, + "featureKey": { "type": "string", "example": "my-admin-feature" }, + "namespace": { "type": "string", "example": "org.featuredeveloper" }, + "processedState": { + "type": "string", + "enum": ["UNPROCESSED", "PROCESSED", "FAILED", "IN_PROGRESS"], + "example": "PROCESSED" + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + } + } + }, + "RestProjectSettingsRestrictionRequest": { + "type": "object", + "properties": { + "componentKey": { "type": "string", "example": "my-admin-component" }, + "featureKey": { "type": "string", "example": "my-admin-feature" }, + "namespace": { "type": "string", "example": "org.featuredeveloper" } + }, + "required": ["featureKey", "namespace"] + }, + "RestPullRequestActivity": { + "properties": { + "action": { + "type": "string", + "enum": [ + "APPROVED", + "AUTO_MERGE_CANCELLED", + "AUTO_MERGE_REQUESTED", + "COMMENTED", + "DECLINED", + "DELETED", + "MERGED", + "OPENED", + "REOPENED", + "RESCOPED", + "REVIEW_COMMENTED", + "REVIEW_DISCARDED", + "REVIEW_FINISHED", + "REVIEWED", + "UNAPPROVED", + "UPDATED" + ] + }, + "createdDate": { + "type": "integer", + "format": "int64", + "example": 19990759200 + }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "user": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + } + } + }, + "RestPullRequestAssignParticipantRoleRequest": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": ["AUTHOR", "REVIEWER", "PARTICIPANT"] + }, + "user": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + } + } + }, + "RestPullRequestAssignStatusRequest": { + "type": "object", + "properties": { + "lastReviewedCommit": { + "type": "string", + "example": "685cac2c4499ff1f308851e35d2b4357844d8927" + }, + "status": { + "type": "string", + "enum": ["UNAPPROVED", "NEEDS_WORK", "APPROVED"] + } + } + }, + "RestPullRequestCommitMessageTemplate": { + "properties": { + "body": { + "type": "string", + "example": "Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName}" + }, + "title": { + "type": "string", + "example": "Pull request #${id}: ${title}" + } + } + }, + "RestPullRequestDeclineRequest": { + "type": "object", + "properties": { + "comment": { + "type": "string", + "example": "An optional comment explaining why the pull request is being declined" + }, + "version": { "type": "integer", "format": "int32" } + } + }, + "RestPullRequestDeleteRequest": { + "type": "object", + "properties": { "version": { "type": "integer", "format": "int32" } } + }, + "RestPullRequestFinishReviewRequest": { + "type": "object", + "properties": { + "commentText": { + "type": "string", + "example": "General comment text" + }, + "lastReviewedCommit": { + "type": "string", + "example": "685cac2c4499ff1f308851e35d2b4357844d8927" + }, + "participantStatus": { "type": "string", "example": "approved" } + } + }, + "RestPullRequestMergeConfig": { + "properties": { + "commitMessageTemplate": { + "type": "object", + "properties": { + "body": { + "type": "string", + "example": "Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName}" + }, + "title": { + "type": "string", + "example": "Pull request #${id}: ${title}" + } + } + }, + "commitSummaries": { "type": "integer", "format": "int32" }, + "defaultStrategy": { + "type": "object", + "properties": { + "description": { + "type": "string", + "example": "Always create a merge commit", + "readOnly": true + }, + "enabled": { "type": "boolean", "readOnly": true }, + "flag": { + "type": "string", + "example": "--no-ff", + "readOnly": true + }, + "id": { "type": "string", "example": "no-ff" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "Merge commit", + "readOnly": true + } + } + }, + "strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestMergeStrategy" + } + }, + "type": { + "type": "string", + "example": "repository", + "readOnly": true + } + } + }, + "RestPullRequestMergeRequest": { + "type": "object", + "properties": { + "autoMerge": { "type": "boolean", "example": false }, + "autoSubject": { + "type": "string", + "example": "(Optional, 5.7+) true to prepend an auto-generated subject to the message (default), or false to use the message as-is" + }, + "message": { + "type": "string", + "example": "(Optional) A descriptive message for the merge commit" + }, + "strategyId": { "type": "string", "example": "(Optional) squash" }, + "version": { "type": "integer", "format": "int32" } + } + }, + "RestPullRequestMergeStrategy": { + "properties": { + "description": { + "type": "string", + "example": "Always create a merge commit", + "readOnly": true + }, + "enabled": { "type": "boolean", "readOnly": true }, + "flag": { "type": "string", "example": "--no-ff", "readOnly": true }, + "id": { "type": "string", "example": "no-ff" }, + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "name": { + "type": "string", + "example": "Merge commit", + "readOnly": true + } + } + }, + "RestPullRequestMergeability": { + "properties": { + "conflicted": { "type": "boolean" }, + "outcome": { + "type": "string", + "enum": ["CLEAN", "CONFLICTED", "UNKNOWN"] + }, + "vetoes": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepositoryHookVeto" } + } + } + }, + "RestPullRequestReopenRequest": { + "type": "object", + "properties": { "version": { "type": "integer", "format": "int32" } } + }, + "RestPullRequestSettings": { + "properties": { + "mergeConfig": { + "type": "object", + "properties": { + "commitMessageTemplate": { + "type": "object", + "properties": { + "body": { + "type": "string", + "example": "Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName}" + }, + "title": { + "type": "string", + "example": "Pull request #${id}: ${title}" + } + } + }, + "commitSummaries": { "type": "integer", "format": "int32" }, + "defaultStrategy": { + "type": "object", + "properties": { + "description": { + "type": "string", + "example": "Always create a merge commit", + "readOnly": true + }, + "enabled": { "type": "boolean", "readOnly": true }, + "flag": { + "type": "string", + "example": "--no-ff", + "readOnly": true + }, + "id": { "type": "string", "example": "no-ff" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "Merge commit", + "readOnly": true + } + } + }, + "strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestMergeStrategy" + } + }, + "type": { + "type": "string", + "example": "repository", + "readOnly": true + } + } + } + } + }, + "RestPullRequestSuggestion": { + "properties": { + "changeTme": { + "type": "integer", + "format": "int64", + "example": 1359075920 + }, + "fromRef": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "refChange": { + "type": "object", + "properties": { + "fromHash": { + "type": "string", + "example": "6053a1eaa1c009dd11092d09a72f3c41af1b59ad" + }, + "ref": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "refId": { "type": "string", "example": "refs/heads/master" }, + "toHash": { + "type": "string", + "example": "d6edcbf924697ab811a867421dab60d954ccad99" + }, + "type": { "type": "string", "enum": ["ADD", "DELETE", "UPDATE"] } + } + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "toRef": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + } + } + }, + "RestPushRefChange": { + "properties": { + "fromHash": { + "type": "string", + "example": "6053a1eaa1c009dd11092d09a72f3c41af1b59ad" + }, + "ref": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "refId": { "type": "string", "example": "refs/heads/master" }, + "toHash": { + "type": "string", + "example": "d6edcbf924697ab811a867421dab60d954ccad99" + }, + "type": { "type": "string", "enum": ["ADD", "DELETE", "UPDATE"] }, + "updatedType": { + "type": "string", + "enum": ["UNKNOWN", "UNRESOLVED", "NOT_FORCED", "FORCED"] + } + } + }, + "RestRateLimitSettings": { + "properties": { + "defaultSettings": { + "type": "object", + "properties": { + "capacity": { + "type": "integer", + "format": "int32", + "example": 60 + }, + "fillRate": { "type": "integer", "format": "int32", "example": 5 } + } + }, + "enabled": { "type": "boolean" } + } + }, + "RestRepositoriesExportRequest": { + "type": "object", + "properties": { + "includes": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepositorySelector" }, + "uniqueItems": true + } + }, + "required": ["includes"] + }, + "RestRepositoryHook": { + "properties": { + "configured": { "type": "boolean" }, + "details": { "$ref": "#/components/schemas/RepositoryHookDetails" }, + "enabled": { "type": "boolean" }, + "scope": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + } + } + } + }, + "RestRepositoryPullRequestSettings": { + "properties": { + "mergeConfig": { + "type": "object", + "properties": { + "commitMessageTemplate": { + "type": "object", + "properties": { + "body": { + "type": "string", + "example": "Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName}" + }, + "title": { + "type": "string", + "example": "Pull request #${id}: ${title}" + } + } + }, + "commitSummaries": { "type": "integer", "format": "int32" }, + "defaultStrategy": { + "type": "object", + "properties": { + "description": { + "type": "string", + "example": "Always create a merge commit", + "readOnly": true + }, + "enabled": { "type": "boolean", "readOnly": true }, + "flag": { + "type": "string", + "example": "--no-ff", + "readOnly": true + }, + "id": { "type": "string", "example": "no-ff" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "Merge commit", + "readOnly": true + } + } + }, + "strategies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestMergeStrategy" + } + }, + "type": { + "type": "string", + "example": "repository", + "readOnly": true + } + } + }, + "requiredAllApprovers": { "type": "boolean" }, + "requiredAllTasksComplete": { "type": "boolean" }, + "requiredApprovers": { + "type": "object", + "properties": { + "count": { "type": "string", "example": "3" }, + "enabled": { "type": "boolean", "example": true } + } + }, + "requiredApproversDeprecated": { + "type": "integer", + "format": "int32" + }, + "requiredSuccessfulBuilds": { + "type": "object", + "properties": { + "count": { "type": "string", "example": "3" }, + "enabled": { "type": "boolean", "example": true } + } + }, + "requiredSuccessfulBuildsDeprecated": { + "type": "integer", + "format": "int32" + } + } + }, + "RestRepositoryRefChangeActivity": { + "properties": { + "createdDate": { + "type": "integer", + "format": "int64", + "example": 19990759200 + }, + "id": { "type": "integer", "format": "int64", "example": 1 }, + "refChange": { + "type": "object", + "properties": { + "fromHash": { + "type": "string", + "example": "6053a1eaa1c009dd11092d09a72f3c41af1b59ad" + }, + "ref": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "master" }, + "id": { "type": "string", "example": "refs/heads/master" }, + "type": { "type": "string", "enum": ["BRANCH", "TAG"] } + } + }, + "refId": { "type": "string", "example": "refs/heads/master" }, + "toHash": { + "type": "string", + "example": "d6edcbf924697ab811a867421dab60d954ccad99" + }, + "type": { "type": "string", "enum": ["ADD", "DELETE", "UPDATE"] }, + "updatedType": { + "type": "string", + "enum": ["UNKNOWN", "UNRESOLVED", "NOT_FORCED", "FORCED"] + } + } + }, + "repository": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { "type": "integer", "format": "int32", "readOnly": true }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "origin": { + "type": "object", + "properties": { + "archived": { "type": "boolean", "readOnly": true }, + "defaultBranch": { + "type": "string", + "example": "main", + "writeOnly": true + }, + "description": { + "type": "string", + "example": "My repo description", + "readOnly": true + }, + "forkable": { "type": "boolean", "readOnly": true }, + "hierarchyId": { + "type": "string", + "example": "e3c939f9ef4a7fae272e", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "My repo" }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + }, + "readOnly": true + }, + "partition": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "project": { + "type": "object", + "properties": { + "avatar": { "type": "string" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { + "type": "string", + "example": "The description for my cool project", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "readOnly": true + }, + "key": { "type": "string", "example": "PRJ" }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { + "type": "string", + "example": "My Cool Project", + "pattern": "^[^~].*", + "readOnly": true + }, + "public": { "type": "boolean", "readOnly": true }, + "scope": { + "type": "string", + "example": "PROJECT", + "readOnly": true + }, + "type": { + "type": "string", + "enum": ["NORMAL", "PERSONAL"], + "readOnly": true + } + }, + "required": ["key"] + }, + "public": { "type": "boolean", "readOnly": true }, + "relatedLinks": { + "type": "object", + "properties": {}, + "readOnly": true + }, + "scmId": { "type": "string", "example": "git" }, + "scope": { + "type": "string", + "example": "REPOSITORY", + "readOnly": true + }, + "slug": { "type": "string", "example": "my-repo" }, + "state": { + "type": "string", + "enum": [ + "AVAILABLE", + "INITIALISATION_FAILED", + "INITIALISING", + "OFFLINE" + ], + "readOnly": true + }, + "statusMessage": { + "type": "string", + "example": "Available", + "readOnly": true + } + } + }, + "trigger": { "type": "string", "example": "push" }, + "user": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + } + } + }, + "RestRepositorySelector": { + "type": "object", + "properties": { + "projectKey": { "type": "string", "example": "PRJ" }, + "slug": { "type": "string", "example": "my-repo" } + } + }, + "RestReviewerGroup": { + "properties": { + "avatarUrl": { "type": "string", "writeOnly": true }, + "description": { "type": "string", "example": "null" }, + "id": { "type": "integer", "format": "int64" }, + "name": { "type": "string", "example": "name" }, + "scope": { + "type": "object", + "properties": { + "resourceId": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + } + }, + "users": { + "type": "array", + "items": { "$ref": "#/components/schemas/ApplicationUser" } + } + } + }, + "RestScopesExample": { + "properties": { + "links": { "type": "object", "properties": {}, "writeOnly": true }, + "scopes": { "type": "array", "items": { "type": "object" } } + } + }, + "RestSecretScanningAllowlistRule": { + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The ID of the rule", + "example": 7 + }, + "lineRegex": { + "type": "string", + "description": "If present, regular expression for matching a secret on a code line", + "example": "(BBDC-[a-zA-Z0-9+]{44})" + }, + "name": { + "type": "string", + "description": "Human readable name for the rule", + "example": "Bitbucket DC HTTP access token" + }, + "pathRegex": { + "type": "string", + "description": "If present, regular expression matching file names", + "example": "*.pem" + } + } + }, + "RestSecretScanningAllowlistRuleSetRequest": { + "type": "object", + "properties": { + "lineRegex": { + "type": "string", + "description": "Regular expression for matching a secret on a code line", + "example": "(BBDC-[a-zA-Z0-9+]{44})" + }, + "name": { + "type": "string", + "description": "Human readable name for the rule", + "example": "Bitbucket DC HTTP access token" + }, + "pathRegex": { + "type": "string", + "description": "Regular expression matching file names", + "example": "*.pem" + } + } + }, + "RestSecretScanningRule": { + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "The ID of the rule", + "example": 7 + }, + "lineRegex": { + "type": "string", + "description": "If present, regular expression for matching a secret on a code line", + "example": "(BBDC-[a-zA-Z0-9+]{44})" + }, + "name": { + "type": "string", + "description": "Human readable name for the rule", + "example": "Bitbucket DC HTTP access token" + }, + "pathRegex": { + "type": "string", + "description": "If present, regular expression matching file names", + "example": "*.pem" + }, + "scope": { + "type": "object", + "description": "The scope in which this rule was configured for.", + "properties": { + "resourceId": { + "type": "integer", + "format": "int32", + "example": 2 + }, + "type": { + "type": "string", + "enum": ["GLOBAL", "PROJECT", "REPOSITORY"] + } + } + } + } + }, + "RestSecretScanningRuleSetRequest": { + "type": "object", + "properties": { + "lineRegex": { + "type": "string", + "description": "Regular expression for matching a secret on a code line", + "example": "(BBDC-[a-zA-Z0-9+]{44})" + }, + "name": { + "type": "string", + "description": "Human readable name for the rule", + "example": "Bitbucket DC HTTP access token" + }, + "pathRegex": { + "type": "string", + "description": "Regular expression matching file names", + "example": "*.pem" + } + } + }, + "RestSystemSigningConfiguration": { + "properties": { "enabled": { "type": "boolean", "example": false } } + }, + "RestTestResults": { + "properties": { + "failed": { "type": "integer", "format": "int32", "example": 1 }, + "skipped": { "type": "integer", "format": "int32", "example": 5 }, + "successful": { "type": "integer", "format": "int32", "example": 134 } + } + }, + "RestTokenBucketSettings": { + "properties": { + "capacity": { "type": "integer", "format": "int32", "example": 60 }, + "fillRate": { "type": "integer", "format": "int32", "example": 5 } + } + }, + "RestUserDirectory": { + "properties": { + "active": { "type": "boolean", "example": true }, + "description": { + "type": "string", + "example": "This directory has users that are able to access Bitbucket DC" + }, + "name": { + "type": "string", + "example": "Bitbucket Internal Directory" + }, + "type": { "type": "string", "example": "Crowd" } + } + }, + "RestUserRateLimitSettings": { + "properties": { + "settings": { + "type": "object", + "properties": { + "capacity": { + "type": "integer", + "format": "int32", + "example": 60 + }, + "fillRate": { "type": "integer", "format": "int32", "example": 5 } + } + }, + "user": { + "type": "object", + "properties": { + "active": { "type": "boolean" }, + "avatarUrl": { "type": "string", "writeOnly": true }, + "displayName": { "type": "string", "example": "Jane Citizen" }, + "emailAddress": { + "type": "string", + "example": "jane@example.com" + }, + "id": { + "type": "integer", + "format": "int32", + "example": 101, + "readOnly": true + }, + "links": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "name": { "type": "string", "example": "jcitizen" }, + "slug": { "type": "string", "example": "jcitizen" }, + "type": { "type": "string", "enum": ["NORMAL", "SERVICE"] } + } + }, + "whitelisted": { "type": "boolean" } + } + }, + "RestUserRateLimitSettingsUpdateRequest": { + "type": "object", + "properties": { + "settings": { + "type": "object", + "properties": { + "capacity": { + "type": "integer", + "format": "int32", + "example": 60 + }, + "fillRate": { "type": "integer", "format": "int32", "example": 5 } + } + }, + "whitelisted": { "type": "boolean" } + } + }, + "RestWebhook": { + "properties": { + "active": { "type": "boolean" }, + "configuration": { "type": "object" }, + "credentials": { + "$ref": "#/components/schemas/RestWebhookCredentials" + }, + "events": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true + }, + "name": { "type": "string" }, + "scopeType": { "type": "string" }, + "sslVerificationRequired": { "type": "boolean" }, + "statistics": { + "type": "object", + "properties": {}, + "writeOnly": true + }, + "url": { "type": "string" } + } + }, + "RestWebhookCredentials": { + "properties": { + "password": { "type": "string" }, + "username": { "type": "string" } + } + }, + "RestWebhookRequestResponse": { "properties": {} }, + "RestWebhookScope": { + "properties": { + "id": { "type": "string" }, + "type": { "type": "string" } + } + }, + "RestX509Certificate": { + "properties": { + "fingerprint": { + "type": "string", + "description": "The SHA-256 fingerprint of the X.509 certificate", + "example": "e5e8d632c0b86f5bd5ef9a0d55c58ba1fd7776f6bb7c35ca23d85d23281ce58f" + }, + "id": { + "type": "integer", + "format": "int64", + "description": "The ID of the X.509 certificate", + "example": 7 + } + } + }, + "UserAndGroups": { + "type": "object", + "properties": { + "groups": { + "type": "array", + "example": ["group_a", "group_b"], + "items": { "type": "string" }, + "uniqueItems": true + }, + "user": { "type": "string", "example": "user" } + }, + "required": ["groups"] + }, + "UserPasswordUpdate": { + "type": "object", + "properties": { + "oldPassword": { + "type": "string", + "example": "my-old-secret-password" + }, + "password": { + "type": "string", + "example": "my-secret-password", + "writeOnly": true + }, + "passwordConfirm": { + "type": "string", + "example": "my-secret-password", + "writeOnly": true + } + } + }, + "UserPickerContext": { + "type": "object", + "properties": { + "context": { "type": "string", "example": "group_a" }, + "itemName": { "type": "string", "example": "user_a" } + } + }, + "UserRename": { + "type": "object", + "properties": { + "name": { "type": "string", "example": "jcitizen" }, + "newName": { "type": "string", "example": "jcitizen-new" } + } + }, + "UserUpdate": { + "type": "object", + "properties": { + "displayName": { "type": "string", "example": "Jane Citizen" }, + "email": { "type": "string", "example": "jane@example.com" }, + "name": { "type": "string", "example": "jcitizen" } + } + } + } + }, + "x-atlassian-narrative": { + "documents": [ + { + "title": "About", + "anchor": "about", + "body": "The Bitbucket Data Center and Server REST API enables you to interact with Bitbucket programmatically. This page documents the REST resources available in Bitbucket, including the HTTP response codes and example requests and responses.\n\nGeneral information about using the REST APIs can be found at [Using the REST API](/server/bitbucket/how-tos/command-line-rest/)\nand [Authenticating with the REST API](/server/bitbucket/how-tos/example-basic-authentication/).\n" + }, + { + "title": "Intro", + "anchor": "intro", + "body": "This is the reference document for the Bitbucket Data Center REST API. The REST API is for developers who want to:\n\n- integrate &product_name; with other applications;\n- create scripts that interact with Bitbucket Data Center or\n- develop plugins that enhance the Bitbucket Data Center UI, using REST to interact with the backend.\n\nYou can read more about developing Bitbucket Data Center plugins in the\n[Developer Documentation](https://developer.atlassian.com/server/bitbucket/)\n\n## Getting started\n\nBecause the REST API is based on open standards, you can use any web development language or command line tool\ncapable of generating an HTTP request to access the API.\n\nIf you're already working with the\n[Atlassian SDK](https://developer.atlassian.com/server/framework/atlassian-sdk/),\nthe [REST API Browser](https://developer.atlassian.com/server/framework/atlassian-sdk/using-the-rest-api-browser)\nis a great tool for exploring and experimenting with the &product_name; REST API.\n\n## Structure of the REST URIs\n\nBitbucket Data Center's REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will\nmake an HTTP request and parse the response. The Bitbucket Data Center REST API uses JSON as its communication format, and the standard\nHTTP(S) methods like GET, PUT, POST and DELETE. URIs for Bitbucket Data Center's REST API resource have the following structure:\n\n`http://host:port/context/rest/api-name/api-version/path/to/resource`\n\nFor example, the following URI would retrieve a page of the latest commits to the _jira_ repository in\nthe _Jira_ project on `https://bitbucket.example.com`\n\n```\nhttps://bitbucket.example.com/rest/api/1.0/projects/JIRA/repos/jira/commits\n```\n\nSee the API descriptions on the left for a full list of available resources.\n\nAlternatively we also publish a list of resources in\n[https://en.wikipedia.org/wiki/OpenAPI_Specification](OpenAPI) format. It is available via the triple dot menu above.\n\n## Paged APIs\n\nBitbucket Data Center uses paging to conserve server resources and limit response size for resources that return potentially large\ncollections of items. A request to a paged API will result in a values array wrapped in a JSON object\nwith some paging metadata, like this:\n\n```json\n{\n \"size\": 3,\n \"limit\": 3,\n \"isLastPage\": false,\n \"values\": [\n {\n /* result 0 */\n },\n {\n /* result 1 */\n },\n {\n /* result 2 */\n }\n ],\n \"start\": 0,\n \"filter\": null,\n \"nextPageStart\": 3\n}\n```\n\nClients can use the `limit` and `start` query parameters to retrieve the desired number of results.\n\nThe `limit` parameter indicates how many results to return per page. Most APIs default to returning\n`25` if the limit is left unspecified. This number can be increased, but note that a resource-specific\nhard limit will apply. These hard limits can be configured by server administrators, so it's always best practice to\ncheck the `limit` attribute on the response to see what limit has been applied.\nThe request to get a larger page should look like this:\n\n```\nhttp://host:port/context/rest/api-name/api-version/path/to/resource?limit={desired size of page}\n```\n\nFor example:\n\n```\n https://bitbucket.example.com/rest/api/1.0/projects/JIRA/repos/jira/commits?limit=1000\n```\n\nThe `start` parameter indicates which item should be used as the first item in the page of results. All\npaged responses contain an isLastPage attribute indicating whether another page of items exists.\n\n_Important:_ If more than one page exists (i.e. the response contains\n`\"isLastPage\": false`), the response object will also contain a `nextPageStart` attribute\nwhich _*must*_ be used by the client as the `start` parameter on the next request.\nIdentifiers of adjacent objects in a page may not be contiguous, so the start of the next page is _not_\nnecessarily the start of the last page plus the last page's size. A client should always use\n`nextPageStart` to avoid unexpected results from a paged API.\nThe request to get a subsequent page should look like this:\n\n```\n http://host:port/context/rest/api-name/api-version/path/to/resource?start={nextPageStart from previous response}\n```\n\nFor example:\n\n```\n https://bitbucket.example.com/rest/api/1.0/projects/JIRA/repos/jira/commits?start=25\n```\n\n## Authentication\n\nAny authentication that works against Bitbucket Data Center will work against the REST API. _The preferred authentication methods\nare HTTP Basic (when using SSL) and OAuth_. Other supported methods include: HTTP Cookies and HTTP Aaccess Tokens\n\nYou can find OAuth code samples in several programming languages at\n[bitbucket.org/atlassianlabs/atlassian-oauth-examples/](https://bitbucket.org/atlassianlabs/atlassian-oauth-examples/)\n\nThe log-in page uses cookie-based authentication, so if you are using Bitbucket Data Center in a browser you can call REST from\nJavaScript on the page and rely on the authentication that the browser has established.\n\n## Errors & Validation\n\nIf a request fails due to client error, the resource will return an HTTP response code in the 40x range. These can\nbe broadly categorised into:\n\n| HTTP Code | Description |\n| ---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 400 (Bad Request) | One or more of the required parameters or attributes: were missing from the request; incorrectly formatted; or inappropriate in the given context. |\n| 401 (Unauthorized) | Either: Authentication is required but was not attempted, or authentication was attempted but failed, or authentication was successful but the authenticated user does not have the requisite permission for the resource. See the individual resource documentation for details of required permissions. |\n| 403 (Forbidden) | Actions are usually \"forbidden\" if they involve breaching the licensed user limit of the server, or degrading the authenticated user's permission level. See the individual resource documentation for more details. |\n| 404 (Not Found) | The entity you are attempting to access, or the project or repository containing it, does not exist. |\n| 405 (Method Not Allowed) | The request HTTP method is not appropriate for the targeted resource. For example an HTTP GET to a resource that only accepts an HTTP POST will result in a 405. |\n| 409 (Conflict) | The attempted update failed due to some conflict with an existing resource. For example: creating a project with a key that already exists, merging an out-of-date pull request, deleting a comment that has replies, etc. |\n| 415 (Unsupported Media Type) | The request entity has a `Content-Type` that the server does not support. Almost all of the Bitbucket Data Center REST API accepts `application/json` format, but check the individual resource documentation for more details. Additionally, double-check that you are setting the `Content-Type` header correctly on your request (e.g. using `-H \"Content-Type: application/json\"` in cURL). |\n\nFor _400_ HTTP codes the response will typically contain one or more validation error messages,\nfor example:\n\nSee the individual resource documentation for\n\n```json\n{\n \"errors\": [\n {\n \"context\": \"name\",\n \"message\": \"The name should be between 1 and 255 characters.\",\n \"exceptionName\": null\n },\n {\n \"context\": \"email\",\n \"message\": \"The email should be a valid email address.\",\n \"exceptionName\": null\n }\n ]\n}\n```\n\nThe `context` attribute indicates which parameter or request entity attribute failed validation. Note\nthat the `context` may be null.\n\nFor _401_, _403_, _404_ and _409_\nHTTP codes, the response will contain one or more descriptive error messages:\n\n```json\n{\n \"errors\": [\n {\n \"context\": null,\n \"message\": \"A detailed error message.\",\n \"exceptionName\": null\n }\n ]\n}\n```\n\nA _500_ (Server Error) HTTP code indicates an incorrect resource url or an unexpected server error.\nDouble-check the URL you are trying to access, then report the issue to your server administrator or\n[Atlassian Support](https://getsupport.atlassian.com]) if problems persist.\n\n## Personal Repositories\n\nBitbucket Data Center allows users to manage their own repositories, called personal repositories. These are repositories associated\nwith the user and to which they always have REPO_ADMIN permission.\n\nAccessing personal repositories via REST is achieved through the normal project-centric REST URLs\nusing the user's slug prefixed by tilde as the project key. E.g. to list personal repositories for a\nuser with slug \"johnsmith\" you would make a GET to:\n`http://example.com/rest/api/1.0/projects/~johnsmith/repos`\n\nIn addition to this, Bitbucket Data Center allows access to these repositories through an alternate set of user-centric REST URLs\nbeginning with:\n`http://example.com/rest/api/1.0/users/~{userSlug}/repos`\nE.g. to list the forks of the repository with slug\n\"nodejs\" in the personal project of user with slug \"johnsmith\" using the regular REST URL you would make a GET to:\n`http://example.com/rest/api/1.0/projects/~johnsmith/repos/nodejs/forks`\nUsing the alternate URL, you would make a GET to:\n`http://example.com/rest/api/1.0/users/johnsmith/repos/nodejs/forks`\n" + }, + { + "title": "Rolling Upgrades REST API", + "anchor": "rolling-upgrades", + "body": "Provides Rolling Upgrade capabilities.\n\n### Table of Contents\n\n- [Servers](#servers)\n- [Paths](#paths)\n - [`GET` /state](#op-get-state)\n - [`GET` /nodes/{nodeId}](#op-get-nodes-nodeid)\n - [`GET` /cluster](#op-get-cluster)\n - [`POST` /start](#op-post-start)\n - [`POST` /cancel](#op-post-cancel)\n - [`POST` /approve](#op-post-approve)\n- [Schemas](#schemas)\n - ClusterStateResponse\n - Link\n - NodeInfoDTO\n - Cluster\n\n### Servers\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
URLDescription
/rest/zduThe ZDU REST resource for the server
\n\n### Paths\n\n### `GET` /state\n\n\n\n> Gets the Cluster State\n\nGets the State of the Cluster and the responding Node's information.\n\n#### Responses\n\n##### ▶ 200 - Returns full JSON representation of cluster state\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
buildInfo\n object\n Represents a Cluster Node and its current state.Any
buildInfo.id\n string\n The id of the Node in cluster.Any
buildInfo.name\n string\n The name of the Node.Any
buildInfo.ipAddress\n string\n The IP address of the Node.Any
buildInfo.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
buildInfo.tasksTotal\n integer\n The total number of active tasks on the Node.Any
buildInfo.activeUserCount\n integer\n The total number of active users on the Node.Any
buildInfo.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
buildInfo.version\n string\n The version of the Node's installed Product.Any
buildInfo.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
buildInfo.portNumber\n integer\n Any
buildInfo.links\n array(object)\n Hypermedia linksAny
buildInfo.links.rel\n string\n relAny
buildInfo.links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"state\": \"STABLE\",\n \"buildInfo\": {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n}\n```\n\n##### ▶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `GET` /nodes/{nodeId}\n\n\n\n> Gets the Node's overview\n\nGets the requested Node's information.\n\n#### Path parameters\n\n##### ▷ nodeId\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeInDescriptionAccepted values
nodeId (required)\n string\n pathAny
\n\n#### Responses\n\n##### ▶ 200 - Returns full JSON representation of the cluster node\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
id\n string\n The id of the Node in cluster.Any
name\n string\n The name of the Node.Any
ipAddress\n string\n The IP address of the Node.Any
state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
tasksTotal\n integer\n The total number of active tasks on the Node.Any
activeUserCount\n integer\n The total number of active users on the Node.Any
buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
version\n string\n The version of the Node's installed Product.Any
local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
portNumber\n integer\n Any
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### ▶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 404 - Returned if there is no content with the given id\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `GET` /cluster\n\n\n\n> Gets the Cluster overview\n\nGets an overview of a Cluster including its current state and composition of Nodes.\n\n#### Responses\n\n##### ▶ 200 - Returns full JSON representation of the cluster\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### ▶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `POST` /start\n\n\n\n> Start ZDU upgrade\n\nEnables Upgrading of individual Nodes within the Cluster, allowing a heterogeneous Cluster formation.\n\n#### Responses\n\n##### ▶ 200 - Returns full JSON representation of the cluster\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### ▶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 409 - Returned if the cluster is not in a valid state\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `POST` /cancel\n\n\n\n> Cancel ZDU upgrade\n\nProhibits the Upgrading of individual Nodes within the Cluster. All Nodes need to be on the same version before performing this request.\n\n#### Responses\n\n##### ▶ 200 - Returns full JSON representation of the cluster\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### ▶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 409 - Returned if the cluster is not in a valid state\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `POST` /approve\n\n\n\n> Approve the ZDU upgrade\n\nFinalizes the ZDU upgrade and runs specific tasks such as cleanup scripts.\n\n#### Responses\n\n##### ▶ 200 - Returns full JSON representation of the cluster\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### ▶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 409 - Returned if the cluster is not in a valid state\n\n###### Headers\n\n_No headers specified_\n\n##### ▶ 500 - Internal Error\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### Schemas\n\n#### ClusterStateResponse\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
buildInfo\n object\n Represents a Cluster Node and its current state.Any
buildInfo.id\n string\n The id of the Node in cluster.Any
buildInfo.name\n string\n The name of the Node.Any
buildInfo.ipAddress\n string\n The IP address of the Node.Any
buildInfo.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
buildInfo.tasksTotal\n integer\n The total number of active tasks on the Node.Any
buildInfo.activeUserCount\n integer\n The total number of active users on the Node.Any
buildInfo.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
buildInfo.version\n string\n The version of the Node's installed Product.Any
buildInfo.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
buildInfo.portNumber\n integer\n Any
buildInfo.links\n array(object)\n Hypermedia linksAny
buildInfo.links.rel\n string\n relAny
buildInfo.links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"state\": \"STABLE\",\n \"buildInfo\": {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n}\n```\n\n#### Link\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
rel\n string\n relAny
href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n}\n```\n\n#### NodeInfoDTO\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
id\n string\n The id of the Node in cluster.Any
name\n string\n The name of the Node.Any
ipAddress\n string\n The IP address of the Node.Any
state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
tasksTotal\n integer\n The total number of active tasks on the Node.Any
activeUserCount\n integer\n The total number of active users on the Node.Any
buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
version\n string\n The version of the Node's installed Product.Any
local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
portNumber\n integer\n Any
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n#### Cluster\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n" + } + ] + }, + "tags": [ + { "name": "Authentication" }, + { "name": "Builds and Deployments" }, + { "name": "Capabilities" }, + { "name": "Dashboard" }, + { "name": "Deprecated" }, + { "name": "Jira Integration" }, + { "name": "Markup" }, + { "name": "Mirroring (Mirror)" }, + { "name": "Mirroring (Upstream)" }, + { "name": "Permission Management" }, + { "name": "Project" }, + { "name": "Pull Requests" }, + { "name": "Repository" }, + { "name": "Security" }, + { "name": "System Maintenance" }, + { "name": "System Signing" } + ], + "paths": { + "/access-tokens/latest/projects/{projectKey}": { + "get": { + "description": "Get all access tokens associated with the given project.", + "operationId": "getAllAccessTokens", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestAccessToken" + } + } + } + } + } + }, + "description": "A response containing a page of access tokens and associated details." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get access tokens for this project or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get project HTTP tokens", + "tags": ["Authentication"] + }, + "put": { + "description": "Create an access token for the project according to the given request.", + "operationId": "createAccessToken", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAccessTokenRequest" + } + } + }, + "description": "The request containing the details of the access token to create." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRawAccessToken" } + } + }, + "description": "A response containing the raw access token and associated details." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details).\n\n- The request does not contain a token name\n- The request does not contain a list of permissions, or the list of permissions is empty\n- One of the provided permission levels are unknown\n- The project already has the maximum number of tokens\n" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to create an access token for this project or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Create project HTTP token", + "tags": ["Authentication"] + } + }, + "/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}": { + "get": { + "description": "Get all access tokens associated with the given repository.", + "operationId": "getAllAccessTokens_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestAccessToken" + } + } + } + } + } + }, + "description": "A response containing a page of access tokens and associated details." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get access tokens for this repository or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get repository HTTP tokens", + "tags": ["Authentication"] + }, + "put": { + "description": "Create an access token for the repository according to the given request.", + "operationId": "createAccessToken_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAccessTokenRequest" + } + } + }, + "description": "The request containing the details of the access token to create." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRawAccessToken" } + } + }, + "description": "A response containing the raw access token and associated details." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details).\n\n- The request does not contain a token name- The request does not contain a list of permissions, or the list of permissions is empty- One of the provided permission levels are unknown- The repository already has the maximum number of tokens" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to create an access token for this repository or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Create repository HTTP token", + "tags": ["Authentication"] + } + }, + "/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}": { + "delete": { + "description": "Delete the access token identified by the given ID.", + "operationId": "deleteById_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The token id.", + "in": "path", + "name": "tokenId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating that the token has been deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or token does not exist." + } + }, + "summary": "Delete a HTTP token", + "tags": ["Authentication"] + }, + "get": { + "description": "Get the access token identified by the given ID.", + "operationId": "getById_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The token id.", + "in": "path", + "name": "tokenId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestAccessToken" } + } + }, + "description": "A response containing the access token and associated details." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or token does not exist." + } + }, + "summary": "Get HTTP token by ID", + "tags": ["Authentication"] + }, + "post": { + "description": "Modify an access token according to the given request. Any fields not specified will not be altered.", + "operationId": "updateAccessToken_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The token id.", + "in": "path", + "name": "tokenId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAccessTokenRequest" + } + } + }, + "description": "The request containing the details of the access token to modify" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestAccessToken" } + } + }, + "description": "A response containing the updated access token and associated details." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the provided permission levels are unknown." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed." + } + }, + "summary": "Update HTTP token", + "tags": ["Authentication"] + } + }, + "/access-tokens/latest/projects/{projectKey}/{tokenId}": { + "delete": { + "description": "Delete the access token identified by the given ID.", + "operationId": "deleteById", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The token id.", + "in": "path", + "name": "tokenId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating that the token has been deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or token does not exist." + } + }, + "summary": "Delete a HTTP token", + "tags": ["Authentication"] + }, + "get": { + "description": "Get the access token identified by the given ID.", + "operationId": "getById", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The token id.", + "in": "path", + "name": "tokenId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestAccessToken" } + } + }, + "description": "A response containing the access token and associated details." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or token does not exist." + } + }, + "summary": "Get HTTP token by ID", + "tags": ["Authentication"] + }, + "post": { + "description": "Modify an access token according to the given request. Any fields not specified will not be altered.", + "operationId": "updateAccessToken", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The token id.", + "in": "path", + "name": "tokenId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAccessTokenRequest" + } + } + }, + "description": "The request containing the details of the access token to modify" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestAccessToken" } + } + }, + "description": "A response containing the updated access token and associated details." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the provided permission levels are unknown." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed." + } + }, + "summary": "Update HTTP token", + "tags": ["Authentication"] + } + }, + "/access-tokens/latest/users/{userSlug}": { + "get": { + "description": "Get all access tokens associated with the given user.", + "operationId": "getAllAccessTokens_2", + "parameters": [ + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestAccessToken" + } + } + } + } + } + }, + "description": "A response containing a page of access tokens and associated details." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + } + }, + "summary": "Get personal HTTP tokens", + "tags": ["Authentication"] + }, + "put": { + "description": "Create an access token for the user according to the given request.", + "operationId": "createAccessToken_2", + "parameters": [ + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAccessTokenRequest" + } + } + }, + "description": "The request containing the details of the access token to create." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRawAccessToken" } + } + }, + "description": "A response containing the raw access token and associated details." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details).\n\n- The request does not contain a token name\n- The request does not contain a list of permissions, or the list of permissions is empty\n- One of the provided permission levels are unknown\n- The user already has their maximum number of tokens\n" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to create an access token on behalf of this user or authentication failed" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + } + }, + "summary": "Create personal HTTP token", + "tags": ["Authentication"] + } + }, + "/access-tokens/latest/users/{userSlug}/{tokenId}": { + "delete": { + "description": "Delete the access token identified by the given ID.", + "operationId": "deleteById_2", + "parameters": [ + { + "description": "The token id.", + "in": "path", + "name": "tokenId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating that the token has been deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or token does not exist." + } + }, + "summary": "Delete a HTTP token", + "tags": ["Authentication"] + }, + "get": { + "description": "Get the access token identified by the given ID.", + "operationId": "getById_2", + "parameters": [ + { + "description": "The token id.", + "in": "path", + "name": "tokenId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestAccessToken" } + } + }, + "description": "A response containing the access token and associated details." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or token does not exist." + } + }, + "summary": "Get HTTP token by ID", + "tags": ["Authentication"] + }, + "post": { + "description": "Modify an access token according to the given request. Any fields not specified will not be altered.", + "operationId": "updateAccessToken_2", + "parameters": [ + { + "description": "The token id.", + "in": "path", + "name": "tokenId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAccessTokenRequest" + } + } + }, + "description": "The request containing the details of the access token to modify" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestAccessToken" } + } + }, + "description": "A response containing the updated access token and associated details." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the provided permission levels are unknown." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed." + } + }, + "summary": "Update HTTP token", + "tags": ["Authentication"] + } + }, + "/build-status/latest/commits/stats": { + "post": { + "description": "Produces a list of the build statistics for multiple commits. Commits without any builds associated with them will not be returned.
For example if the commit e00cf62997a027bbf785614a93e2e55bb331d268 does not have any build statuses associated with it, it will not be present in the response.", + "operationId": "getMultipleBuildStatusStats", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "db0dd118fa6ccdf1d593fef00df839dd27702df7" + } + } + } + }, + "description": "full SHA1 of each commit" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMultipleBuildStats" + } + } + }, + "description": "The number of successful/failed/in-progress/cancelled/unknown builds for each commit (with the caveat that the commits without any builds associated with them will not be present in the response)" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user is not authenticated or does not have the LICENSED permission" + } + }, + "summary": "Get build status statistics for multiple commits", + "tags": ["Builds and Deployments", "Deprecated"] + } + }, + "/build-status/latest/commits/stats/{commitId}": { + "get": { + "description": "Gets statistics regarding the builds associated with a commit", + "operationId": "getBuildStatusStats", + "parameters": [ + { + "description": "include a unique build result if there is either only one failed build, only one in-progress build or only one successful build", + "in": "query", + "name": "includeUnique", + "schema": { "type": "boolean" } + }, + { + "description": "full SHA1 of the commit", + "example": "e00cf62997a027bbf785614a93e2e55bb331d268", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestBuildStats" } + } + }, + "description": "The number of successful/failed/in-progress/cancelled/unknown builds for the commit" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user is not authenticated or does not have the LICENSED permission." + } + }, + "summary": "Get build status statistics for commit", + "tags": ["Builds and Deployments", "Deprecated"] + } + }, + "/build-status/latest/commits/{commitId}": { + "get": { + "deprecated": true, + "description": "Gets build statuses associated with a commit.\n\nDeprecated in 7.14, please use the repository based builds resource instead.", + "operationId": "getBuildStatus", + "parameters": [ + { + "description": "How the results should be ordered. Options are NEWEST, OLDEST, STATUS", + "example": "newest, oldest, or status", + "in": "query", + "name": "orderBy", + "schema": { "type": "string" } + }, + { + "description": "Full SHA1 of the commit (ex: e00cf62997a027bbf785614a93e2e55bb331d268)", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestBuildStatus" + } + } + } + } + } + }, + "description": "A Page of build statuses associated with the commit
(limited to the most recent 100 build statuses associated with the commit)" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user is not authenticated or does not have the LICENSED permission." + } + }, + "summary": "Get build statuses for commit", + "tags": ["Deprecated"] + }, + "post": { + "deprecated": true, + "description": "Associates a build status with a commit.The state, the key and the url fields are mandatory. The name anddescription fields are optional.All fields (mandatory or optional) are limited to 255 characters, except for the url,which is limited to 450 characters.Supported values for the state are SUCCESSFUL, FAILEDand INPROGRESS.The authenticated user must have LICENSED permission or higher to call this resource.\n\nDeprecated in 7.14, please use the repository based builds resource instead.", + "operationId": "addBuildStatus", + "parameters": [ + { + "description": "full SHA1 of the commit", + "example": "e00cf62997a027bbf785614a93e2e55bb331d268", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestBuildStatus" } + } + }, + "description": "build status to associate with the commit" + }, + "responses": { + "204": { + "description": "An empty response if the build status was successfully stored" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "An error message if the commitId is not a full 40-characters SHA1, if the build status has a missing mandatory field or if the fields are too large" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user is not authenticated or does not have the LICENSED permission" + } + }, + "summary": "Create build status for commit", + "tags": ["Deprecated"] + } + }, + "/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition": { + "post": { + "description": "Create a required build merge check for the given repository.\n\nThe authenticated user must have **REPO_ADMIN** permission for the target repository to register a required build merge check.\n\nThe contents of the required build merge check request are:\n\nThese fields are **required**:\n\n- **buildParentKeys**: A non-empty list of build parent keys that require green builds for this merge check to pass\n- **refMatcher.id**: The value to match refs against in the target branch\n- **refMatcher.type.id**: The type of ref matcher, one of: \"ANY_REF\", \"BRANCH\", \"PATTERN\", \"MODEL_CATEGORY\" or \"MODEL_BRANCH\"\n\n\nThese fields are optional:\n\n- **exemptRefMatcher.id** The value to exempt refs in the source branch from this check\n- **exemptRefMatcher.type.id**: The type of exempt ref matcher, one of: \"ANY_REF\", \"BRANCH\", \"PATTERN\", \"MODEL_CATEGORY\" or \"MODEL_BRANCH\"\n\n\n", + "operationId": "createRequiredBuildsMergeCheck", + "parameters": [ + { + "description": "The project that the repository belongs to", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository being used", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestRequiredBuildConditionSetRequest" + } + } + }, + "description": "The request specifying the required build parent keys, ref matcher and exemption matcher" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRequiredBuildCondition" + } + } + }, + "description": "A response containing the newly created required build merge check." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed. This could be caused because:\n\n- The build parent key list is empty\n- Either of the provided ref matchers is of an unrecognized type\n- Either of the provided ref matchers could not be created with the provided type and id\n\n\n" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a required build merge check in this repository." + } + }, + "summary": "Create a required builds merge check", + "tags": ["Builds and Deployments"] + } + }, + "/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}": { + "delete": { + "description": "Deletes a required build existing merge check, given it's ID.\n\nThe authenticated user must have **REPO_ADMIN** permission for the target repository to delete a required build merge check.", + "operationId": "deleteRequiredBuildsMergeCheck", + "parameters": [ + { + "description": "The project that the repository belongs to", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "integer", "format": "int64" } + }, + { + "description": "The repository being used", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating the merge check was successfully deleted, or was never present." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete a required build merge check in this repository." + } + }, + "summary": "Delete a required builds merge check", + "tags": ["Builds and Deployments"] + }, + "put": { + "description": "Update the required builds merge check for the given ID.\n\nThe authenticated user must have **REPO_ADMIN** permission for the target repository to update a required build merge check.\n\nThe contents of the required build merge check request are:\n\nThese fields are **required**:\n\n- **buildParentKeys**: A non-empty list of build parent keys that require green builds for this merge check to pass\n- **refMatcher.id**: The value to match refs against in the target branch\n- **refMatcher.type.id**: The type of ref matcher, one of: \"ANY_REF\", \"BRANCH\", \"PATTERN\", \"MODEL_CATEGORY\" or \"MODEL_BRANCH\"\n\n\nThese fields are optional:\n\n- **exemptRefMatcher.id** The value to exempt refs in the source branch from this check\n- **exemptRefMatcher.type.id**: The type of exempt ref matcher, one of: \"ANY_REF\", \"BRANCH\", \"PATTERN\", \"MODEL_CATEGORY\" or \"MODEL_BRANCH\"\n\n\n", + "operationId": "updateRequiredBuildsMergeCheck", + "parameters": [ + { + "description": "The project that the repository belongs to", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "integer", "format": "int64" } + }, + { + "description": "The repository being used", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestRequiredBuildConditionSetRequest" + } + } + }, + "description": "The request specifying the required build parent keys, ref matcher and exemption matcher" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRequiredBuildCondition" + } + } + }, + "description": "The details needed to update a required build merge check." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed. This could be caused because:\n\n- The build parent key list is empty\n- Either of the provided ref matchers is of an unrecognized type\n- Either of the provided ref matchers could not be created with the provided type and id\n\n\n" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a required build merge check in this repository." + } + }, + "summary": "Update a required builds merge check", + "tags": ["Builds and Deployments"] + } + }, + "/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/conditions": { + "get": { + "description": "Returns a page of required build merge checks that have been configured for this repository.\n\nThe authenticated user must have **REPO_READ** permission for the target repository to request a page of required build merge checks.", + "operationId": "getPageOfRequiredBuildsMergeChecks", + "parameters": [ + { + "description": "The project that the repository belongs to", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository being used", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRequiredBuildCondition" + } + } + } + } + } + }, + "description": "The required build merge checks associated with the provided repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to request a page of required build merge checks in this repository." + } + }, + "summary": "Get required builds merge checks", + "tags": ["Builds and Deployments"] + } + }, + "/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches": { + "delete": { + "description": " Deletes a branch in the specified repository.\n\n\n If the branch does not exist, this operation will not raise an error. In other words after calling this resource\n and receiving a 204 response the branch provided in the request is guaranteed to not exist in the specified\n repository any more, regardless of its existence beforehand.\n\n\n The optional 'endPoint' parameter of the request may contain a commit ID that the provided ref name is\n expected to point to. Should the ref point to a different commit ID, a 400 response will be returned with\n appropriate error details.\n\n\n The authenticated user must have an effective REPO_WRITE permission to call this resource. If\n branch permissions are set up in the repository, the authenticated user must also have access to the branch name\n that is to be deleted.", + "operationId": "deleteBranch", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestBranchDeleteRequest" + } + } + }, + "description": "Branch delete request" + }, + "responses": { + "204": { + "description": "An empty response indicating that the branch no longer exists in the repository" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The branch was not deleted because the request was invalid, e.g. no ref name\nto delete was provided, or the provided ref name points to the default branch\nin the repository that cannot be deleted" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete a\nbranch. This could be due to insufficient repository permissions, or lack of\nbranch permission for the provided ref name." + } + }, + "summary": "Delete branch", + "tags": ["Repository"] + }, + "post": { + "description": " Creates a branch in the specified repository.\n\n\nThe authenticated user must have an effective REPO_WRITE permission to call this resource. If\nbranch permissions are set up in the repository, the authenticated user must also have access to the branch name\nthat is to be created.", + "operationId": "createBranch", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestBranchCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestBranch" } + } + }, + "description": "JSON representation of the newly created branch" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The branch was not created because the request was invalid, e.g. the provided\nref name already existed in the repository, or was not a valid ref name in the\nrepository" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a branch. This could be due to insufficient repository permissions, or lack of branch permission for the provided ref name" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The branch name overlapped with an existing branch" + } + }, + "summary": "Create branch", + "tags": ["Repository"] + } + }, + "/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches/info/{commitId}": { + "get": { + "description": "Gets the branch information associated with a single commit from a given repository.", + "operationId": "findByCommit", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "content": { + "application/json": { + "schema": { "type": "string", "maxLength": 40 } + } + }, + "in": "path", + "name": "commitId", + "required": true + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestMinimalRef" } + } + } + } + } + }, + "description": "A page of branch refs associated with the commit" + }, + "500": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has timed out processing the branch request" + } + }, + "summary": "Get branch", + "tags": ["Repository"] + } + }, + "/audit/latest/notification-settings/retention-config-review": { + "delete": { + "description": "Dismisses the retention config review notification displayed by the audit plugin for the user that's currently logged in.", + "operationId": "dismissRetentionConfigReviewNotification", + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "A blank response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to dismiss the notification." + } + }, + "summary": "Dismiss retention config notification", + "tags": ["System Maintenance"] + } + }, + "/default-reviewers/latest/projects/{projectKey}/condition": { + "post": { + "description": "Create a default reviewer pull request condition for the given project.", + "operationId": "createPullRequestCondition", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDefaultReviewersRequest" + } + } + }, + "description": "The details needed to create a default reviewer pull request condition." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestCondition" + } + } + }, + "description": "The default reviewer pull request condition that was created." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + } + }, + "summary": "Create default reviewer", + "tags": ["Pull Requests"] + } + }, + "/default-reviewers/latest/projects/{projectKey}/condition/{id}": { + "delete": { + "description": "Delete the default reviewer pull request condition associated with the given ID.", + "operationId": "deletePullRequestCondition", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request condition.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating that the pull request condition was deleted." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "An empty response indicating a pull request condition with the given ID could not be found." + } + }, + "summary": "Remove default reviewer", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Update the default reviewer pull request condition for the given ID.", + "operationId": "updatePullRequestCondition", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request condition.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDefaultReviewersRequest" + } + } + }, + "description": "The new details for the default reviewer pull request condition." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestCondition" + } + } + }, + "description": "The updated default reviewer pull request condition." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed" + } + }, + "summary": "Update the default reviewer", + "tags": ["Pull Requests"] + } + }, + "/default-reviewers/latest/projects/{projectKey}/conditions": { + "get": { + "description": "Return a page of default reviewer pull request conditions that have been configured for this project.", + "operationId": "getPullRequestConditions", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestCondition" + } + } + } + }, + "description": "The default reviewer pull request conditions associated with the given project." + } + }, + "summary": "Get default reviewers", + "tags": ["Pull Requests"] + } + }, + "/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/condition": { + "post": { + "description": "Create a default reviewer pull request condition for the given repository.", + "operationId": "createPullRequestCondition_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDefaultReviewersRequest" + } + } + }, + "description": "The details needed to create a default reviewer pull request condition." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestCondition" + } + } + }, + "description": "The default reviewer pull request condition that was created." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + } + }, + "summary": "Create default reviewers condition", + "tags": ["Pull Requests"] + } + }, + "/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}": { + "delete": { + "description": "Delete the default reviewer pull request condition associated with the given ID.", + "operationId": "deletePullRequestCondition_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "integer", "format": "int32" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating that the pull request condition was deleted" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "An empty response indicating a pull request condition with the given ID could not be found." + } + }, + "summary": "Delete a default reviewer condition", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Update the default reviewer pull request condition for the given ID.", + "operationId": "updatePullRequestCondition_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request condition", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "requiredApprovals": { + "type": "integer", + "format": "int32", + "example": 1 + }, + "reviewers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestApplicationUser" + } + }, + "sourceMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + }, + "targetMatcher": { + "type": "object", + "properties": { + "displayId": { "type": "string", "example": "main" }, + "id": { "type": "string", "example": "refs/heads/main" }, + "type": { + "type": "object", + "properties": { + "id": { + "type": "string", + "enum": [ + "ANY_REF", + "BRANCH", + "PATTERN", + "MODEL_CATEGORY", + "MODEL_BRANCH" + ] + }, + "name": { "type": "string", "example": "Branch" } + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestCondition" + } + } + }, + "description": "The updated default reviewer pull request condition." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + } + }, + "summary": "Update a default reviewer condition", + "tags": ["Pull Requests"] + } + }, + "/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/conditions": { + "get": { + "description": "Return a page of default reviewer pull request conditions that have been configured for this repository.", + "operationId": "getPullRequestConditions_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestCondition" + } + } + } + }, + "description": "The default reviewer pull request conditions associated with the given repository." + } + }, + "summary": "Get configured default reviewers", + "tags": ["Pull Requests"] + } + }, + "/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/reviewers": { + "get": { + "description": "Return a set of users who are required reviewers for pull requests created from the given source repository and ref to the given target ref in this repository.", + "operationId": "getReviewers", + "parameters": [ + { + "description": "The ID of the repository in which the target ref exists", + "in": "query", + "name": "targetRepoId", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the repository in which the source ref exists", + "in": "query", + "name": "sourceRepoId", + "schema": { "type": "string" } + }, + { + "description": "The ID of the source ref", + "in": "query", + "name": "sourceRefId", + "schema": { "type": "string" } + }, + { + "description": "The ID of the target ref", + "in": "query", + "name": "targetRefId", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestCondition" + } + } + } + }, + "description": "The default reviewer pull request conditions associated with the given repository." + }, + "400": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestErrors" } + } + }, + "description": "The request was malformed." + } + }, + "summary": "Get required reviewers for PR creation", + "tags": ["Pull Requests"] + } + }, + "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/annotations": { + "get": { + "description": "Get annotations for the given commit ID, filtered by any query parameters given.", + "operationId": "getAnnotations_1", + "parameters": [ + { + "description": "Return only annotations that have one of the given severities. Can be specified more than once to filter by more than one severity. Valid severities are LOW, MEDIUM and HIGH.", + "in": "query", + "name": "severity", + "schema": { "type": "string" } + }, + { + "description": "Return only annotations that appear on one of the provided paths. Can be specified more than once to filter by more than one path.", + "in": "query", + "name": "path", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Return only annotations that have one of the provided external IDs. Can be specified more than once to filter by more than one external ID.", + "in": "query", + "name": "externalId", + "schema": { "type": "string" } + }, + { + "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Return only annotations that have one of the given types. Can be specified more than once to filter by multiple types. Valid types are BUG, CODE_SMELL, and VULNERABILITY.", + "in": "query", + "name": "type", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Return only annotations that belong to one of the provided report keys. Can be specified more than once to filter by more than one report", + "in": "query", + "name": "key", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestInsightAnnotationsResponse" + } + } + }, + "description": "The requested annotations." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions (REPO_READ) to get insight annotations." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, repository, commit, or report does not exist." + } + }, + "summary": "Get Code Insights annotations for a commit", + "tags": ["Builds and Deployments"] + } + }, + "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports": { + "get": { + "description": "Retrieve all reports for the given commit.", + "operationId": "getReports", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestInsightReport" + } + } + } + } + } + }, + "description": "A page of reports" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions (REPO_READ) to get insight reports." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, repository or commit does not exist." + } + }, + "summary": "Get all Code Insights reports for a commit", + "tags": ["Builds and Deployments"] + } + }, + "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}": { + "delete": { + "description": "Delete a report for the given commit. Also deletes any annotations associated with this report.", + "operationId": "deleteACodeInsightsReport", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The key of the report to which this annotation belongs.", + "in": "path", + "name": "key", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The report and associated annotations were successfully deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete insight reports or was not the author (REPO_READ for author otherwise REPO_ADMIN)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, repository, commit or report does not exist." + } + }, + "summary": "Delete a Code Insights report", + "tags": ["Builds and Deployments"] + }, + "get": { + "description": "Retrieve the specified report.", + "operationId": "getACodeInsightsReport", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The report key.", + "in": "path", + "name": "key", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestInsightReport" } + } + }, + "description": "The specified report." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions (REPO_READ needed) to get insight reports." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, repository, commit, or report does not exist." + } + }, + "summary": "Get a Code Insights report", + "tags": ["Builds and Deployments"] + }, + "put": { + "description": "Create a new insight report, or replace the existing one if a report already exists for the given repository, commit, and report key. A request to replace an existing report will be rejected if the authenticated user was not the creator of the specified report.\n\nThe report key should be a unique string chosen by the reporter and should be unique enough not to potentially clash with report keys from other reporters. We recommend using reverse DNS namespacing or a similar standard to ensure that collision is avoided.

Report parameters

Parameter Description Required? Restrictions Type
title A short string representing the name of the report Yes Max length: 450 characters (but we recommend that it is shorter so that the display is nicer) String
details A string to describe the purpose of the report. This string may contain escaped newlines and if it does it will display the content accordingly. No Max length: 2000 characters String
result Indicates whether the report is in a passed or failed state No One of: PASS, FAIL String
data An array of data fields (described below) to display information on the report No Maximum 6 data fields Array
reporter A string to describe the tool or company who created the report No Max length: 450 characters String
link A URL linking to the results of the report in an external tool. No Must be a valid http or https URL String
logoUrl A URL to the report logo. If none is provided, the default insights logo will be used. No Must be a valid http or https URL String

Data parameters

The data field on the report is an array with at most 6 data fields (JSON maps) containing information that is to be displayed on the report (see the request example).
Parameter Description Type
title A string describing what this data field represents String
type The type of data contained in the value field. If not provided, then the value will be detected as a boolean, number or string. One of: BOOLEAN, DATE, DURATION, LINK, NUMBER, PERCENTAGE, TEXT String
value A value based on the type provided. Either a raw value (string, number or boolean) or a map. See below.
Type Field Value Field Type Value Field Display
None/Omitted Number, String or Boolean (not an array or object) Plain text
BOOLEAN Boolean The value will be read as a JSON boolean and displayed as 'Yes' or 'No'.
DATE Number The value will be read as a JSON number in the form of a Unix timestamp (milliseconds) and will be displayed as a relative date if the date is less than one week ago, otherwise it will be displayed as an absolute date.
DURATION Number The value will be read as a JSON number in milliseconds and will be displayed in a human readable duration format.
LINK Object: {\"linktext\": \"Link text here\", \"href\": \"https://link.to.annotation/in/external/tool\"} The value will be read as a JSON object containing the fields \"linktext\" and \"href\" and will be displayed as a clickable link on the report.
NUMBER Number The value will be read as a JSON number and large numbers will be displayed in a human readable format (e.g. 14.3k).
PERCENTAGE Number (between 0 and 100) The value will be read as a JSON number between 0 and 100 and will be displayed with a percentage sign.
TEXT String The value will be read as a JSON string and will be displayed as-is
", + "externalDocs": { + "description": "Tutorial adding Code Insights to your CI system", + "url": "https://developer.atlassian.com/server/bitbucket/tutorials-and-examples/code-insights-tutorial/" + }, + "operationId": "setACodeInsightsReport", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "A unique string representing the report as chosen by the reporter. This should be unique enough to not clash with other report's keys. To do this, we recommend namespacing the key using reverse DNS", + "in": "path", + "name": "key", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSetInsightReportRequest" + } + } + }, + "description": "The request object containing the details of the report to create (see example)." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestInsightReport" } + } + }, + "description": "The created report." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details):\n\n- The request does not contain a report title.\n- The data field contains unsupported objects.\n- The request does not contain a report key/\n- The provided commit hash is invalid, according to the validation rules mentioned for the commitId above.\n" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to create an insight report or authentication failed." + } + }, + "summary": "Create a Code Insights report", + "tags": ["Builds and Deployments"] + } + }, + "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}/annotations": { + "delete": { + "description": "Delete annotations for a given report that match the given external IDs, or all annotations if no external IDs are provided.", + "operationId": "deleteAnnotations", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The external IDs for the annotations that are to be deleted. Can be specified more than once to delete by more than one external ID, or can be unspecified to delete all annotations.", + "in": "query", + "name": "externalId", + "schema": { "type": "string" } + }, + { + "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The key of the report to which this annotation belongs.", + "in": "path", + "name": "key", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The annotations were successfully deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete insight reports or was not the author (REPO_READ for author otherwise REPO_ADMIN)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, repository, commit or report does not exist." + } + }, + "summary": "Delete Code Insights annotations", + "tags": ["Builds and Deployments"] + }, + "get": { + "description": "Retrieve the specified report's annotations.", + "operationId": "getAnnotations", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The report key.", + "in": "path", + "name": "key", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestInsightAnnotationsResponse" + } + } + }, + "description": "The specified annotations." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions (REPO_READ needed) to get insight reports." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, repository, commit, or report does not exist." + } + }, + "summary": "Get Code Insights annotations for a report", + "tags": ["Builds and Deployments"] + }, + "post": { + "description": "Add annotations to the given report. The request should be a JSON object mapping the string \"annotations\" to an array of maps containing the annotation data, as described below. See also the example request.\n\nA few things to note:- Annotations are an extension of a report, so a report must first exist in order to post annotations. Annotations are posted separately from the report, and can be posted in bulk using this endpoint.\n- Only the annotations that are on lines changed in the unified diff will be displayed. This means it is likely not all annotations posted will be displayed on the pull request It also means that if the user is viewing a side-by-side diff, commit diff or iterative review diff they will not be able to view the annotations.\n- A report cannot have more than 1000 annotations by default, however this property is congurable at an instance level. If the request would result in more than the maximum number of annotations being stored then the entire request is rejected and no new annotations are stored. \n- There is no de-duplication of annotations on Bitbucket so be sure that reruns of builds will first delete the report and annotations before creating them.\n\n# Annotation parameters\n\n|Parameter|Description|Required?|Restrictions|Type|\n|--- |--- |--- |--- |--- |\n|path|The path of the file on which this annotation should be placed. This is the path of the filerelative to the git repository. If no path is provided, then it will appear in the overview modalon all pull requests where the tip of the branch is the given commit, regardless of which files weremodified.|No||String|\n|line|The line number that the annotation should belong to. If no line number is provided, then it willdefault to 0 and in a pull request it will appear at the top of the file specified by the path field.|No|Non-negative integer|Integer|\n|message|The message to display to users|Yes|The maximum length accepted is 2000 characters, however the user interface may truncate this valuefor display purposes. We recommend that the message is short and succinct, with further detailsavailable to the user if needed on the page linked to by the the annotation link.|String|\n|severity|The severity of the annotation|Yes|One of: LOW, MEDIUM, HIGH|String|\n|link|An http or https URL representing the location of the annotation in the external tool|No||String|\n|type|The type of annotation posted|No|One of: VULNERABILITY, CODE_SMELL, BUG|String|\n|externalId|If the caller requires a link to get or modify this annotation, then an ID must be provided. It isnot used or required by Bitbucket, but only by the annotation creator for updating or deleting thisspecific annotation.|No|A string value shorter than 450 characters|String|", + "operationId": "addAnnotations", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The key of the report to which this annotation belongs.", + "in": "path", + "name": "key", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestBulkAddInsightAnnotationRequest" + } + } + }, + "description": "The annotations to add." + }, + "responses": { + "204": { + "description": "An empty response indicating that the request succeeded." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not the author of the report, or the author no longer has sufficient permissions (REPO_READ)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, repository, commit, or report does not exist." + } + }, + "summary": "Add Code Insights annotations", + "tags": ["Builds and Deployments"] + } + }, + "/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}/annotations/{externalId}": { + "put": { + "description": "Create an annotation with the given external ID, or replace it if it already exists. A request to replace an existing annotation will be rejected if the authenticated user was not the creator of the specified report.", + "operationId": "setAnnotation", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The external ID of the annotation that is to be updated or created", + "in": "path", + "name": "externalId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID on which to record the annotation. This must be a full 40 character commit hash.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The key of the report to which this annotation belongs", + "in": "path", + "name": "key", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSingleAddInsightAnnotationRequest" + } + } + }, + "description": "The new annotation that is to replace the existing one." + }, + "responses": { + "204": { + "description": "No content, indicating that the request succeeded." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not the author of the report, or the author no longer has sufficient permissions (REPO_READ)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, repository, commit, report or annotation does not exist." + } + }, + "summary": "Create or replace a Code Insights annotation", + "tags": ["Builds and Deployments"] + } + }, + "/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/reactions/{emoticon}": { + "delete": { + "description": "Remove an emoticon reaction from a comment", + "operationId": "unReact", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The comment id", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit id", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The emoticon to remove", + "in": "path", + "name": "emoticon", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "The added reaction" } }, + "summary": "Remove a reaction from comment", + "tags": ["Repository"] + }, + "put": { + "description": "Add an emoticon reaction to a comment", + "operationId": "react", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The comment id", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit id", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The emoticon to add", + "in": "path", + "name": "emoticon", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestUserReaction" } + } + }, + "description": "The added reaction" + } + }, + "summary": "React to a comment", + "tags": ["Repository"] + } + }, + "/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/reactions/{emoticon}": { + "delete": { + "description": "Remove an emoticon reaction from a pull request comment", + "operationId": "unReact_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The comment id.", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request id.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The emoticon to remove", + "in": "path", + "name": "emoticon", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { "204": { "description": "The added reaction" } }, + "summary": "Remove a reaction from a PR comment", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Add an emoticon reaction to a pull request comment", + "operationId": "react_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The comment id.", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request id.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The emoticon to add", + "in": "path", + "name": "emoticon", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestUserReaction" } + } + }, + "description": "The added reaction" + } + }, + "summary": "React to a PR comment", + "tags": ["Pull Requests"] + } + }, + "/git/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase": { + "get": { + "description": "Checks preconditions to determine whether the pull request can be rebased.\n\nSome of the preconditions are:\n\n- The pull request is between Git repositories\n- The pull request is currently open\n- The pull request's {@link PullRequest#getFromRef \"from\" ref} is a branch\n - In other words, the qualified ID for the \"from\" ref must start with refs/heads/\n - Tags, and other non-standard refs, cannot be rebased\n- The current user has an e-mail address\n - Pull requests cannot be rebased anonymously\n - `git rebase` records the current user as the committer for the rebased commits, which requires a name and e-mail address\n- The current user has write access to the {@link PullRequest#getFromRef \"from\" ref}'s repository\n - Note that in order to view a pull request a user is only required to have read access to the {@link PullRequest#getToRef toRef}'s repository, so just because a user can see a pull request does not mean they can request a rebase\n\n\nThis list is not exhaustive, and the exact set of preconditions applied can be extended by third-party add-ons.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "canRebase", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestRebaseability" + } + } + }, + "description": "The rebaseability status of the pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Check PR rebase precondition", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Rebases the specified pull request, rewriting the incoming commits to start from the tip commit of the pull request's target branch. This operation alters the pull request's source branch and cannot be undone.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets and REPO_WRITE permission for the pull request's source repository to call this resource.", + "operationId": "rebase", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestRebaseRequest" + } + } + }, + "description": "The pull request rebase request." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestRebaseResult" + } + } + }, + "description": "The merged pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request and/or to update its source branch." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Any of the following error cases occurred (check the error message for more details):\n\n- The rebase encountered conflicts.\n- The rebase discarded all of the incoming commits and would have left the pull request empty\n- A PreRepositoryHook vetoed the rebase.\n- The specified version is out of date.\n- The specified pull request is not open.\n- The target repository is archived." + } + }, + "summary": "Rebase pull request", + "tags": ["Pull Requests"] + } + }, + "/git/latest/projects/{projectKey}/repos/{repositorySlug}/tags": { + "post": { + "description": "Creates a tag in the specified repository.\n\nThe authenticated user must have an effective REPO_WRITE permission to call this resource.\n\n'LIGHTWEIGHT' and 'ANNOTATED' are the two type of tags that can be created. The 'startPoint' can either be a ref or a 'commit'.", + "operationId": "createTag", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestGitTagCreateRequest" + } + } + }, + "description": "The create git tag request." + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestTag" } + } + }, + "description": "A JSON representation of the newly created tag." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The tag was not created because the request was invalid, e.g. the provided ref name already existed in the repository, or was not a valid ref name in the repository, or the start point is invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a tag. This could be due to insufficient repository permissions." + } + }, + "summary": "Create tag", + "tags": ["Repository"] + } + }, + "/git/latest/projects/{projectKey}/repos/{repositorySlug}/tags/{name}": { + "delete": { + "description": "Deletes a tag in the specified repository.\n\nThe authenticated user must have an effective REPO_WRITE permission to call this resource.", + "operationId": "deleteTag", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The name of the tag to be deleted.", + "in": "path", + "name": "name", + "required": true, + "schema": { "type": "string", "pattern": ".*" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating that the tag no longer exists in the repository." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The tag was not deleted because repository is either empty, or is not a git repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete a tag. This could be due to insufficient repository permissions." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "If the tag doesn't exist in the repository." + } + }, + "summary": "Delete tag", + "tags": ["Repository"] + } + }, + "/policies/latest/admin/repos/archive": { + "get": { + "description": "Retrieves the repository archive policy for the instance.\n\nThe user must be authenticated to access this resource.", + "operationId": "getRepositoryArchivePolicy", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRepositoryPolicy" + } + } + }, + "description": "A response containing the repository archive policy for the instance" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the repository archive policy" + } + }, + "summary": "Get repository archive policy", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Sets the repository archive policy for the instance.\n\nThe authenticated user must have SYS_ADMIN permission.", + "operationId": "setRepositoryArchivePolicy", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepositoryPolicy" } + } + }, + "description": "The request containing the details of the policy." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRepositoryPolicy" + } + } + }, + "description": "A response containing the repository archive policy for the instance" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The permission was invalid or does not exist" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to set the repository archive policy" + } + }, + "summary": "Update repository archive policy", + "tags": ["System Maintenance"] + } + }, + "/policies/latest/admin/repos/delete": { + "get": { + "description": "Retrieves the repository delete policy for the instance.\n\nThe user must be authenticated to access this resource.", + "operationId": "getRepositoryDeletePolicy", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRepositoryPolicy" + } + } + }, + "description": "A response containing the repository delete policy for the instance" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the repository delete policy" + } + }, + "summary": "Get repository delete policy", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Sets the repository delete policy for the instance.\n\nThe authenticated user must have SYS_ADMIN permission.", + "operationId": "setRepositoryDeletePolicy", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepositoryPolicy" } + } + }, + "description": "The request containing the details of the policy." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRepositoryPolicy" + } + } + }, + "description": "A response containing the repository delete policy for the instance" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The permission was invalid or does not exist" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to set the repository delete policy" + } + }, + "summary": "Update the repository delete policy", + "tags": ["System Maintenance"] + } + }, + "/gpg/latest/keys": { + "delete": { + "description": "Delete all GPG keys for a supplied user.", + "operationId": "deleteForUser", + "parameters": [ + { + "description": "The username of the user to delete the keys for. If no username is specified, the GPG keys will be deleted for the currently authenticated user.", + "in": "query", + "name": "user", + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The GPG keys matching the supplied user were deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the GPG keys. This is only possible when a user is explicitly supplied." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No user matches the supplied user." + } + }, + "summary": "Delete all GPG keys for user", + "tags": ["Security"] + }, + "get": { + "description": "Find all the keys for the currently authenticated user. Optionally, users with ADMIN and higher permissions may choose to specify the user parameter to retrieve GPG keys for another user.\n\nOnly authenticated users may call this endpoint.", + "operationId": "getKeysForUser", + "parameters": [ + { + "description": "The name of the user to get keys for (optional; requires ADMIN permission or higher).", + "in": "query", + "name": "user", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestGpgKey" } + } + } + } + } + }, + "description": "Returns a paged response of of keys for the user." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to perform this operation." + } + }, + "summary": "Get all GPG keys", + "tags": ["Security"] + }, + "post": { + "description": "Add a GPG key to the authenticated user's account. Optionally, users with ADMIN and higher permissions may choose to specify the user parameter to add a GPG key for another user.\n\nOnly authenticated users may call this endpoint.", + "operationId": "addKey", + "parameters": [ + { + "description": "The name of the user to add a key for (optional; requires ADMIN permission or higher).", + "in": "query", + "name": "user", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestGpgKey" } + } + }, + "description": "The request body." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestGpgKey" } + } + }, + "description": "Response contains the GPG key that was just created." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to perform this operation." + } + }, + "summary": "Create a GPG key", + "tags": ["Security"] + } + }, + "/gpg/latest/keys/{fingerprintOrId}": { + "delete": { + "description": "Delete the GPG key with the specified ID or Key Fingerprint.", + "operationId": "deleteKey", + "parameters": [ + { + "description": "The GPG fingerprint or ID.", + "in": "path", + "name": "fingerprintOrId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The key has been deleted successfully." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to perform this operation." + } + }, + "summary": "Delete a GPG key", + "tags": ["Security"] + } + }, + "/default-tasks/latest/projects/{projectKey}/repos/{repositorySlug}/tasks": { + "delete": { + "description": "Delete all the default tasks for the supplied repository\n\nThe authenticated user must have **REPO_ADMIN** permission for this repository to call the resource.", + "operationId": "deleteAllDefaultTasks_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The default tasks have been deleted successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete default tasks" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist" + } + }, + "summary": "Deletes all default tasks for the repository", + "tags": ["Repository"] + }, + "get": { + "description": "Retrieves the default tasks for the supplied repository.\n\nThe authenticated user must have **REPO_VIEW** permission for this repository to call the resource.", + "operationId": "getDefaultTasks_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "If present or `\"true\"`, includes a markup-rendered description", + "in": "query", + "name": "markup", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDefaultTask" + } + } + } + } + } + }, + "description": "A page of default tasks" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete default tasks" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist" + } + }, + "summary": "Get a page of default tasks", + "tags": ["Repository"] + }, + "post": { + "description": "Creates a default task for the supplied repository.\n\nThe authenticated user must have **REPO_ADMIN** permission for this repository to call the resource.", + "operationId": "addDefaultTask_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDefaultTaskRequest" + } + } + }, + "description": "The task to be added", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDefaultTask" } + } + }, + "description": "The default task" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One or more of the following error cases occurred (check the error message for more details): \n\n\n- the description is empty- the sourceMatcher or targetMatcher is invalid" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to add a default task" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist" + } + }, + "summary": "Add a default task", + "tags": ["Repository"] + } + }, + "/default-tasks/latest/projects/{projectKey}/repos/{repositorySlug}/tasks/{taskId}": { + "delete": { + "description": "Delete a specific default task for a repository.\n\nThe authenticated user must have **REPO_ADMIN** permission for this repository to call the resource.", + "operationId": "deleteDefaultTask_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the default task", + "in": "path", + "name": "taskId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The default task has been deleted successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete default tasks" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or task does not exist" + } + }, + "summary": "Delete a specific default task", + "tags": ["Repository"] + }, + "put": { + "description": "Updates a default task for the supplied repository.\n\nThe authenticated user must have **REPO_ADMIN** permission for this repository to call the resource.", + "operationId": "updateDefaultTask_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the default task", + "in": "path", + "name": "taskId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDefaultTaskRequest" + } + } + }, + "description": "The task to be updated", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDefaultTask" } + } + }, + "description": "The default task" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One or more of the following error cases occurred (check the error message for more details): \n\n\n- the provided taskId does not exist- the description is empty- the sourceMatcher or targetMatcher is invalid" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to add a default task" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist" + } + }, + "summary": "Update a default task", + "tags": ["Repository"] + } + }, + "/default-tasks/latest/projects/{projectKey}/tasks": { + "delete": { + "description": "Delete all the default tasks for the supplied project\n\nThe authenticated user must have **PROJECT_ADMIN** permission for this project to call the resource.", + "operationId": "deleteAllDefaultTasks", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The default tasks have been deleted successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete default tasks" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist" + } + }, + "summary": "Deletes all default tasks for the project", + "tags": ["Project"] + }, + "get": { + "description": "Retrieves the default tasks for the supplied project.\n\nThe authenticated user must have **PROJECT_VIEW** permission for this project to call the resource.", + "operationId": "getDefaultTasks", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "If present or \"true\", includes a markup-rendered description", + "in": "query", + "name": "markup", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDefaultTask" + } + } + } + } + } + }, + "description": "A page of default tasks" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete default tasks" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist" + } + }, + "summary": "Get a page of default tasks", + "tags": ["Project"] + }, + "post": { + "description": "Creates a default task for the project.\n\nThe authenticated user must have **PROJECT_ADMIN** permission for this project to call the resource.", + "operationId": "addDefaultTask", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDefaultTaskRequest" + } + } + }, + "description": "The task to be added", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDefaultTask" } + } + }, + "description": "The default task" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One or more of the following error cases occurred (check the error message for more details): \n\n\n- the description is empty- the sourceMatcher or targetMatcher is invalid" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to add a default task" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist" + } + }, + "summary": "Add a default task", + "tags": ["Project"] + } + }, + "/default-tasks/latest/projects/{projectKey}/tasks/{taskId}": { + "delete": { + "description": "Delete a specific default task for a project.\n\nThe authenticated user must have **PROJECT_ADMIN** permission for this project to call the resource.", + "operationId": "deleteDefaultTask", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the default task", + "in": "path", + "name": "taskId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The default task has been deleted successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete default tasks" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project or task does not exist" + } + }, + "summary": "Delete a specific default task", + "tags": ["Project"] + }, + "put": { + "description": "Updates a default task for the supplied project.\n\nThe authenticated user must have **PROJECT_ADMIN** permission for this project to call the resource.", + "operationId": "updateDefaultTask", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the default task", + "in": "path", + "name": "taskId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDefaultTaskRequest" + } + } + }, + "description": "The task to be updated", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDefaultTask" } + } + }, + "description": "The default task" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One or more of the following error cases occurred (check the error message for more details): \n\n\n- the provided taskId does not exist- the description is empty- the sourceMatcher or targetMatcher is invalid" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to add a default task" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist" + } + }, + "summary": "Update a default task", + "tags": ["Project"] + } + }, + "/mirroring/latest/account/settings/preferred-mirror": { + "delete": { + "description": "Removes the current user's preferred mirror", + "operationId": "deletePreferredMirrorId", + "responses": { + "204": { + "description": "an empty response indicating that the user setting has been updated" + } + }, + "summary": "Remove preferred mirror", + "tags": ["Mirroring (Upstream)"] + }, + "get": { + "description": "Retrieves the current user's preferred mirror server", + "operationId": "getPreferredMirrorId", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMirrorServer" } + } + }, + "description": "the preferred mirror server" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user's preferred mirror server could not be found." + } + }, + "summary": "Get preferred mirror", + "tags": ["Mirroring (Upstream)"] + }, + "post": { + "description": "Sets the mirror specified by a mirror ID as the current user's preferred mirror", + "operationId": "setPreferredMirrorId", + "requestBody": { + "content": { "application/json": { "schema": { "type": "string" } } }, + "description": "the mirror ID" + }, + "responses": { + "204": { + "description": "an empty response indicating that the user setting has been updated" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The mirror could not be found." + } + }, + "summary": "Set preferred mirror", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/analyticsSettings": { + "get": { + "description": "Gets the analytics settings from the mirroring upstream", + "operationId": "analyticsSettings", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAnalyticsSettings" + } + } + }, + "description": "The analytics settings from upstream" + } + }, + "summary": "Get analytics settings from upstream", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/authenticate": { + "post": { + "description": "Authenticates on behalf of a user. Used by mirrors to check the credentials supplied to them by users. If successful a user and their effective permissions are returned as follows -\n\n* For SSH credentials - all the effective user permissions are returned.\n* For all other credentials - the highest global permission is returned along with highest repository permission if repository ID is also provided in the request.\n\nCurrently only username/password, bearer token and SSH credentials are supported.", + "operationId": "authenticate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAuthenticationRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestApplicationUserWithPermissions" + } + } + }, + "description": "The user for the supplied credentials and their effective permissions}." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "If the supplied credentials are incomplete or not understood." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": " The currently authenticated user is not permitted to authenticate on behalf of users or authentication with the supplied user credentials failed for some reason" + } + }, + "summary": "Authenticate on behalf of a user", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/mirrorServers": { + "get": { + "description": "Returns a list of mirrors", + "operationId": "listMirrors", + "parameters": [ + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestMirrorServer" + } + } + } + } + } + }, + "description": "a page of mirrors" + } + }, + "summary": "Get all mirrors", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/mirrorServers/{mirrorId}": { + "delete": { + "description": "Removes a mirror, disabling all access and notifications for the mirror server in question", + "operationId": "remove", + "parameters": [ + { + "description": "the ID of the mirror to remove", + "in": "path", + "name": "mirrorId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "an empty response indicating that the mirror has been removed" + } + }, + "summary": "Delete mirror by ID", + "tags": ["Mirroring (Upstream)"] + }, + "get": { + "description": "Returns the mirror specified by a mirror ID", + "operationId": "getMirror", + "parameters": [ + { + "description": "the mirror ID", + "in": "path", + "name": "mirrorId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMirrorServer" } + } + }, + "description": "the mirror" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The mirror could not be found." + } + }, + "summary": "Get mirror by ID", + "tags": ["Mirroring (Upstream)"] + }, + "put": { + "description": "Upgrades the mirror server in question with the provided details.This endpoint can only be called by the mirror instance or system administrators
Since 5.8", + "operationId": "upgrade", + "parameters": [ + { + "description": "the ID of the mirror to upgrade", + "in": "path", + "name": "mirrorId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMirrorUpgradeRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMirrorServer" } + } + }, + "description": "the mirror" + } + }, + "summary": "Upgrade mirror server", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/mirrorServers/{mirrorId}/events": { + "post": { + "description": "Publishes a RepositoryMirrorEvent on the event queue.", + "operationId": "publishEvent", + "parameters": [ + { + "description": "the server id of the mirror that raised this event", + "in": "path", + "name": "mirrorId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRepositoryMirrorEvent" + } + } + } + }, + "responses": { + "204": { + "description": "The event was successfully placed on the queue" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Publish RepositoryMirrorEvent", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/projects/{projectId}": { + "get": { + "description": "Returns the requested project using its primary key ID.
Since 6.7", + "operationId": "getProjectById", + "parameters": [ + { + "description": "the ID of the requested project", + "in": "path", + "name": "projectId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestProject" } + } + }, + "description": "The project with the specified ID" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Project not found" + } + }, + "summary": "Get project", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/projects/{projectId}/repos": { + "get": { + "description": "Returns a page of repositories for a given project, enriched with a content hash", + "operationId": "getAllReposForProject", + "parameters": [ + { + "description": "includes defaultBranchId in the response, if true. Default value is false", + "in": "query", + "name": "includeDefaultBranch", + "schema": { + "type": "string", + "default": "false", + "enum": ["true", "false"] + } + }, + { + "description": "the id of the requested project", + "in": "path", + "name": "projectId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrichedRepository" + } + } + } + } + } + }, + "description": "A page of repositories with content hashes" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Mirroring is not available" + } + }, + "summary": "Get hashes for repositories in project", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/repos": { + "get": { + "description": "Returns a page of repositories enriched with a content hash and default branch", + "operationId": "getAllContentHashes", + "parameters": [ + { + "description": "includes defaultBranchId for each repository in the response, if true. Default value is false.", + "in": "query", + "name": "includeDefaultBranch", + "schema": { + "type": "string", + "default": "false", + "enum": ["true", "false"] + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/EnrichedRepository" } + } + }, + "description": "A page of repositories with content hashes and default branch" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Mirroring is not available" + } + }, + "summary": "Get content hashes for repositories", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/repos/{repoId}": { + "get": { + "description": "Returns a repository enriched with a content hash and default branch", + "operationId": "getContentHashById", + "parameters": [ + { + "description": "the ID of the requested repository", + "in": "path", + "name": "repoId", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "query", + "name": "includeDefaultBranch", + "schema": { "type": "boolean", "default": false } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/EnrichedRepository" } + } + }, + "description": "The repository with the specified repoId" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Repository not found" + } + }, + "summary": "Get content hash for a repository", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/repos/{repoId}/mirrors": { + "get": { + "description": "Returns a page of mirrors for a repository. This resource will return all mirrors along with authorized links to the mirror's repository REST resource. To determine if a repository is available on the mirror, the returned URL needs to be called.", + "operationId": "getRepositoryMirrors", + "parameters": [ + { + "description": "the ID of the requested repository", + "in": "path", + "name": "repoId", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "query", + "name": "preAuthorized", + "schema": { "type": "boolean" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMirroredRepositoryDescriptor" + } + } + }, + "description": "The mirrored repository descriptor" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Mirroring is not available" + } + }, + "summary": "Get mirrors for repository", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/requests": { + "get": { + "description": "Retrieves a mirroring request", + "operationId": "listRequests", + "parameters": [ + { + "description": "(optional) the request state to filter on", + "in": "query", + "name": "state", + "schema": { + "type": "string", + "enum": ["PENDING", "ACCEPTED", "REJECTED"] + } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestMirroringRequest" + } + } + } + } + } + }, + "description": "A page of mirroring requests" + } + }, + "summary": "Get mirroring requests", + "tags": ["Mirroring (Upstream)"] + }, + "post": { + "description": "Creates a new mirroring request", + "operationId": "register", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMirroringRequest" } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMirroringRequest" + } + } + }, + "description": "The created mirroring request" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was invalid or missing" + } + }, + "summary": "Create a mirroring request", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/requests/{mirroringRequestId}": { + "delete": { + "description": "Deletes a mirroring request", + "operationId": "deleteMirroringRequest", + "parameters": [ + { + "description": "the ID of the mirroring request to delete", + "in": "path", + "name": "mirroringRequestId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The request was deleted" }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request could not be found" + } + }, + "summary": "Delete a mirroring request", + "tags": ["Mirroring (Upstream)"] + }, + "get": { + "description": "Retrieves a mirroring request", + "operationId": "getMirroringRequest", + "parameters": [ + { + "description": "the ID of the mirroring request to retrieve", + "in": "path", + "name": "mirroringRequestId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMirroringRequest" + } + } + }, + "description": "The mirroring request" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request could not be found" + } + }, + "summary": "Get a mirroring request", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/requests/{mirroringRequestId}/accept": { + "post": { + "description": "Accepts a mirroring request", + "operationId": "accept", + "parameters": [ + { + "description": "the ID of the request to accept", + "in": "path", + "name": "mirroringRequestId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMirrorServer" } + } + }, + "description": "The accepted mirror server" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request could not be found" + } + }, + "summary": "Accept a mirroring request", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/requests/{mirroringRequestId}/reject": { + "post": { + "description": "Rejects a mirroring request", + "operationId": "reject", + "parameters": [ + { + "description": "the ID of the request to reject", + "in": "path", + "name": "mirroringRequestId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMirrorServer" } + } + }, + "description": "The rejected mirror server" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request could not be found" + } + }, + "summary": "Reject a mirroring request", + "tags": ["Mirroring (Upstream)"] + } + }, + "/mirroring/latest/farmNodes": { + "get": { + "description": "Retrieves the list of farm nodes in this cluster", + "operationId": "getFarmNodes", + "responses": { + "200": { + "content": { + "application/json;charset=UTF-8": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestClusterNode" } + } + } + }, + "description": "The list of farm nodes" + }, + "404": { + "content": { + "application/json;charset=UTF-8": { + "schema": { "$ref": "#/components/schemas/RestErrors" } + } + }, + "description": "The upstream server could not be found" + } + }, + "summary": "Get farm nodes", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/mirrorRepos/{externalRepositoryId}": { + "get": { + "description": "Retrieves all available clone urls for the specified repository.", + "operationId": "getMirroredRepository", + "parameters": [ + { + "description": "the repository ID", + "in": "path", + "name": "externalRepositoryId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMirroredRepository" + } + } + }, + "description": "The mirrored repository's information." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The upstream server or the repository could not be found." + } + }, + "summary": "Get clone URLs", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/progress": { + "get": { + "description": " Retrieves synchronization progress state.If there's no progress to report, this resource will return
 {\"discovering\":false,\"syncedRepos\":0,\"totalRepos\":0}
If there are repositories in the process of synchronizing, but the precise number hasn't been discovered yet, this resource will return:
 {\"discovering\":true,\"syncedRepos\":3,\"totalRepos\":100}
If there is progress to report and the total number of repositories is known, this resource will return:
  {\"discovering\":false,\"syncedRepos\":242,\"totalRepos\":1071} 
", + "operationId": "getSynchronizationProgress", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSyncProgress" } + } + }, + "description": "the synchronization progress state" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The upstream server could not be found." + } + }, + "summary": "Get synchronization progress state", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/supportInfo/projects/{projectKey}/repos/{repoSlug}/repoSyncStatus": { + "get": { + "description": "Retrieves information about an external repository mirrored by the mirror server. Particularly the local ID & external ID of the repository", + "operationId": "getRepoSyncStatus_1", + "parameters": [ + { + "in": "path", + "name": "repoSlug", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMirrorRepositorySynchronizationStatus" + } + } + }, + "description": "The sync status of the repository on this node" + } + }, + "summary": "Gets information about the mirrored repository", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/supportInfo/refChangesQueue": { + "get": { + "description": "Retrieves a list of up to plugin.mirroring.farm.max.ref.change.queue.dump.size items currently in the ref changes queue. The ref changes queue is an internal component of every mirror farm, and is shared between all nodes. When the contents of an upstream repository changes, an item is added to this queue so that the mirror farm nodes know to synchronize. The mirror farm constantly polls and removes items from this queue for processing, so it is empty most of the time.", + "operationId": "getRefChangesQueue", + "responses": { + "200": { + "content": { + "application/json;charset=UTF-8": { + "schema": { "$ref": "#/components/schemas/RestRefSyncQueue" } + } + }, + "description": "The contents of the ref changes queue" + } + }, + "summary": "Get items in ref changes queue", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/supportInfo/refChangesQueue/count": { + "get": { + "description": "Retrieves the total number of items currently in the ref changes queue", + "operationId": "getRefChangesQueueCount", + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The total number of items currently in the ref changes queue" + } + }, + "summary": "Get total number of items in ref changes queue", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/supportInfo/repoSyncStatus": { + "get": { + "description": "Retrieves a page of sync statuses of the repositories on this mirror node", + "operationId": "getRepoSyncStatus", + "parameters": [ + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestMirrorRepositorySynchronizationStatus" + } + } + } + } + } + }, + "description": "The sync status of the repositories on this node" + } + }, + "summary": "Get sync status of repositories", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/syncSettings": { + "get": { + "description": "Retrieves upstream settings", + "operationId": "getMirrorSettings", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestUpstreamSettings" + } + } + }, + "description": "the mirror settings" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The upstream server could not be found." + } + }, + "summary": "Get upstream settings", + "tags": ["Mirroring (Mirror)"] + }, + "put": { + "description": "Sets the settings for the specified upstream", + "operationId": "setMirrorSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestUpstreamSettings" } + } + }, + "description": "the mirror settings to update to" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestUpstreamSettings" + } + } + }, + "description": "the updated mirror settings" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The upstream server could not be found." + } + }, + "summary": "Update upstream settings", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/syncSettings/mode": { + "get": { + "description": "Gets the current mirror mode", + "operationId": "getMirrorMode", + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "the current mirror mode" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The upstream server could not be found." + } + }, + "summary": "Get mirror mode", + "tags": ["Mirroring (Mirror)"] + }, + "put": { + "description": "Sets the mirror mode for the specified upstream", + "operationId": "setMirrorMode", + "requestBody": { + "content": { "application/json": { "schema": { "type": "string" } } } + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "the mode to set" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The provided mode is invalid" + } + }, + "summary": "Update mirror mode", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/syncSettings/projects": { + "get": { + "description": "Returns the IDs of the projects that the mirror is configured to mirror", + "operationId": "getMirroredProjects", + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "the currently mirrored project IDs" + } + }, + "summary": "Get mirrored project IDs", + "tags": ["Mirroring (Mirror)"] + }, + "post": { + "description": "Configures the mirror to mirror the provided projects", + "operationId": "startMirroringProjects", + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "array", "items": { "type": "string" } } + } + } + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "the currently mirrored project IDs" + } + }, + "summary": "Add multiple projects to be mirrored", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/syncSettings/projects/{projectId}": { + "delete": { + "description": "Configures the mirror to no longer mirror the provided project", + "operationId": "stopMirroringProject", + "parameters": [ + { + "description": "the project ID to stop mirroring", + "in": "path", + "name": "projectId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "the request has been processed" } + }, + "summary": "Stop mirroring project", + "tags": ["Mirroring (Mirror)"] + }, + "post": { + "description": "Configures the mirror to mirror the provided project", + "operationId": "startMirroringProject", + "parameters": [ + { + "in": "path", + "name": "projectId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "the currently mirrored project IDs" + } + }, + "summary": "Add project to be mirrored", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/upstreamServer": { + "get": { + "description": "Retrieves upstream server details.", + "operationId": "getUpstreamServer", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestUpstreamServer" } + } + }, + "description": "The upstream server." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The upstream server could not be found" + } + }, + "summary": "Get upstream server", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/zdu/end": { + "post": { + "description": "Finalizes the ZDU upgrade on the mirror farm denying heterogeneous cluster formation", + "operationId": "endRollingUpgrade", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRollingUpgradeState" + } + } + }, + "description": "The state of the rolling upgrade which includes the current version on all the nodes in the farm." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "When the user doesn't have SYS_ADMIN permission" + } + }, + "summary": "End ZDU upgrade on mirror farm", + "tags": ["Mirroring (Mirror)"] + } + }, + "/mirroring/latest/zdu/start": { + "post": { + "description": "Enables upgrading of individual nodes within the cluster, allowing a heterogeneous cluster formation", + "operationId": "startRollingUpgrade", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRollingUpgradeState" + } + } + }, + "description": "The state of the rolling upgrade which includes the minimum version of all the nodes in the farm." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "When the user doesn't have SYS_ADMIN permission" + } + }, + "summary": "Start ZDU upgrade on mirror farm", + "tags": ["Mirroring (Mirror)"] + } + }, + "/branch-permissions/latest/projects/{projectKey}/repos/{repositorySlug}/restrictions": { + "get": { + "description": "Search for restrictions using the supplied parameters.\n\nThe authenticated user must have REPO_ADMIN permission or higher to call this resource. Only authenticated users may call this resource.", + "operationId": "getRestrictions_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Matcher type to filter on", + "in": "query", + "name": "matcherType", + "schema": { + "type": "string", + "enum": ["BRANCH", "PATTERN", "MODEL_CATEGORY", "MODEL_BRANCH"] + } + }, + { + "description": "Matcher id to filter on. Requires the matcherType parameter to be specified also.", + "in": "query", + "name": "matcherId", + "schema": { "type": "string" } + }, + { + "description": "Types of restrictions to filter on.", + "in": "query", + "name": "type", + "schema": { + "type": "string", + "enum": [ + "read-only", + "no-deletes", + "fast-forward-only", + "pull-request-only" + ] + } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRefRestriction" + } + } + } + } + } + }, + "description": "A response containing a page of restrictions." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get restrictions on the provided project" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No restriction exists for the provided ID." + } + }, + "summary": "Search for ref restrictions", + "tags": ["Repository"] + }, + "post": { + "description": "Allows creating multiple restrictions at once.", + "operationId": "createRestrictions_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/vnd.atl.bitbucket.bulk+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRestrictionRequest" + } + } + } + }, + "description": "The request containing a list of the details of the restrictions to create." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRefRestriction" } + } + }, + "description": "Response contains the ref restriction that was just created." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to perform this operation." + } + }, + "summary": "Create multiple ref restrictions", + "tags": ["Repository"] + } + }, + "/branch-permissions/latest/projects/{projectKey}/repos/{repositorySlug}/restrictions/{id}": { + "delete": { + "description": "Deletes a restriction as specified by a restriction id.\n\nThe authenticated user must have REPO_ADMIN permission or higher to call this resource. Only authenticated users may call this resource.", + "operationId": "deleteRestriction_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The restriction id.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating that the operation was successful" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to delete restrictions on the provided project" + } + }, + "summary": "Delete a ref restriction", + "tags": ["Repository"] + }, + "get": { + "description": "Returns a restriction as specified by a restriction id. \n\nThe authenticated user must have REPO_ADMIN permission or higher to call this resource. Only authenticated users may call this resource.", + "operationId": "getRestriction_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The restriction id.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRefRestriction" } + } + }, + "description": "A response containing the restriction." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get restrictions on the provided project" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No restriction exists for the provided ID." + } + }, + "summary": "Get a ref restriction", + "tags": ["Repository"] + } + }, + "/branch-permissions/latest/projects/{projectKey}/restrictions": { + "get": { + "description": "Search for restrictions using the supplied parameters.\n\nThe authenticated user must have PROJECT_ADMIN permission or higher to call this resource. Only authenticated users may call this resource.", + "operationId": "getRestrictions", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Matcher type to filter on", + "in": "query", + "name": "matcherType", + "schema": { + "type": "string", + "enum": ["BRANCH", "PATTERN", "MODEL_CATEGORY", "MODEL_BRANCH"] + } + }, + { + "description": "Matcher id to filter on. Requires the matcherType parameter to be specified also.", + "in": "query", + "name": "matcherId", + "schema": { "type": "string" } + }, + { + "description": "Types of restrictions to filter on.", + "in": "query", + "name": "type", + "schema": { + "type": "string", + "enum": [ + "read-only", + "no-deletes", + "fast-forward-only", + "pull-request-only" + ] + } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRefRestriction" + } + } + } + } + } + }, + "description": "A response containing a page of restrictions." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get restrictions on the provided project" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No restriction exists for the provided ID." + } + }, + "summary": "Search for ref restrictions", + "tags": ["Project"] + }, + "post": { + "description": "Allows creating multiple restrictions at once.", + "operationId": "createRestrictions", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/vnd.atl.bitbucket.bulk+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRestrictionRequest" + } + } + } + }, + "description": "The request containing a list of the details of the restrictions to create." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRefRestriction" } + } + }, + "description": "Response contains the ref restriction that was just created." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to perform this operation." + } + }, + "summary": "Create multiple ref restrictions", + "tags": ["Project"] + } + }, + "/branch-permissions/latest/projects/{projectKey}/restrictions/{id}": { + "delete": { + "description": "Deletes a restriction as specified by a restriction id.\n\nThe authenticated user must have PROJECT_ADMIN permission or higher to call this resource. Only authenticated users may call this resource.", + "operationId": "deleteRestriction", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The restriction id.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating that the operation was successful" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to delete restrictions on the provided project" + } + }, + "summary": "Delete a ref restriction", + "tags": ["Project"] + }, + "get": { + "description": "Returns a restriction as specified by a restriction id.\n\nThe authenticated user must have PROJECT_ADMIN permission or higher to call this resource. Only authenticated users may call this resource.", + "operationId": "getRestriction", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The restriction id.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRefRestriction" } + } + }, + "description": "A response containing the restriction." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not permitted to get restrictions on the provided project" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No restriction exists for the provided ID." + } + }, + "summary": "Get a ref restriction", + "tags": ["Project"] + } + }, + "/sync/latest/projects/{projectKey}/repos/{repositorySlug}": { + "get": { + "description": "Retrieves the synchronization status for the specified repository. In addition to listing refs which cannot be synchronized, if any, the status also provides the timestamp for the most recent synchronization and indicates whether synchronization is available and enabled. If \"?at\" is specified in the URL, the synchronization status for the specified ref is returned, rather than the complete repository status.\n\nThe authenticated user must have REPO_READ permission for the repository, or it must be public if the request is anonymous. Additionally, after synchronization is enabled for a repository, meaning synchronization was available at that time, permission changes and other actions can cause it to become unavailable. Even when synchronization is enabled, if it is no longer available for the repository it will not be performed.", + "operationId": "getStatus", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Retrieves the synchronization status for the specified ref within the repository, rather than for the entire repository", + "in": "query", + "name": "at", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRefSyncStatus" } + } + }, + "description": "Synchronization status for the specified repository, or specific ref within that repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository, or the repository is not public if the request is anonymous." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get synchronization status", + "tags": ["Repository"] + }, + "post": { + "description": "Enables or disables synchronization for the specified repository. When synchronization is enabled, branches within the repository are immediately synchronized and the status is updated with the outcome. That initial synchronization is performed before the REST request returns, allowing it to return the updated status.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository. Anonymous users cannot manage synchronization, even on public repositories. Additionally, synchronization must be available for the specified repository. Synchronization is only available if:\n\n- The repository is a fork, since its origin is used as upstream\n- The owning user still has access to the fork's origin, if the repository is a personalfork", + "operationId": "setEnabled", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRefSyncStatus" } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRefSyncStatus" } + } + }, + "description": "The updated synchronization status for the repository, after enabling synchronization. 204 NO CONTENT is returned instead after disabling synchronization." + }, + "204": { + "description": "Synchronization has successfully been disabled. 200 OK, with updated status information, is returned instead after enabling synchronization." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The JSON payload for the request did not define the \"enabled\" property." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to manage synchronization in the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Disable synchronization", + "tags": ["Repository"] + } + }, + "/sync/latest/projects/{projectKey}/repos/{repositorySlug}/synchronize": { + "post": { + "description": "Allows developers to apply a manual operation to bring a ref back in sync with upstream when it becomes out of sync due to conflicting changes. The following actions are supported:\n\n- MERGE: Merges in commits from the upstream ref. After applying this action, the synchronized ref will be AHEAD (as it still includes commits that do not exist upstream.\n - This action is only supported for DIVERGED refs\n - If a \"commitMessage\" is provided in the context, it will be used on the merge commit. Otherwise a default message is used.\n- DISCARD: Throws away local changes in favour of those made upstream. This is a destructive operation where commits in the local repository are lost.\n - No context entries are supported for this action\n - If the upstream ref has been deleted, the local ref is deleted as well\n - Otherwise, the local ref is updated to reference the same commit as upstream, even if the update is not fast-forward (similar to a forced push)\n\n\nThe authenticated user must have REPO_WRITE permission for the specified repository. Anonymous users cannot synchronize refs, even on public repositories. Additionally, synchronization must be enabled and available for the specified repository.", + "operationId": "synchronize", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRefSyncRequest" } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRejectedRef" } + } + }, + "description": "The requested action was successfully performed, and has updated the ref's state, but the ref if is still not in sync with upstream. For example, after applying the MERGE action, the ref will still be AHEAD of upstream. If the action brings the ref in sync with upstream, 204 NO CONTENT is returned instead." + }, + "204": { + "description": "The requested action was successfully performed and the ref is now in sync with upstream. If the action updates the ref but does not bring it in sync with upstream, 200 OK is returned instead." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested synchronization action was not understood." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update refs within the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Synchronization is not available or enabled for the specified repository, or the ref is already in sync with upstream." + }, + "501": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested synchronization action was understood by the server, but the mechanism to apply it has not been implemented." + } + }, + "summary": "Manual synchronization", + "tags": ["Repository"] + } + }, + "/jira/latest/comments/{commentId}/issues": { + "post": { + "description": "Create a Jira issue and associate it with a comment on a pull request.\n\nThis resource can only be used with comments on a pull request. Attempting to call this resource with a different type of comment (for example, a comment on a commit) will result in an error. \n\n The authenticated user must have REPO_READ permission for the repository containing the comment to call this resource.\n\nThe JSON structure for the create issue format is specified by Jira's REST v2 API.", + "operationId": "createIssue", + "parameters": [ + { + "description": "the comment to associate the created Jira issue to", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "id of the Jira server", + "in": "query", + "name": "applicationId", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "type": "string", "description": "application/json" } + } + }, + "description": "A String representation of the JSON format Jira create issue request see: Jira REST API" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestCommentJiraIssue" + } + } + }, + "description": "The created Jira issue key and the associated comment ID" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified application link ID does not match any linked Jira instance." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Authentication with the Jira instance is required." + } + }, + "summary": "Create Jira Issue", + "tags": ["Jira Integration"] + } + }, + "/jira/latest/issues/{issueKey}/commits": { + "get": { + "description": "Retrieve a page of changesets associated with the given issue key.", + "operationId": "getCommitsByIssueKey", + "parameters": [ + { + "description": "The issue key to search by", + "in": "path", + "name": "issueKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The maximum number of changes to retrieve for each changeset", + "in": "query", + "name": "maxChanges", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestChangeset" } + } + } + } + } + }, + "description": "A page of detailed changesets" + } + }, + "summary": "Get changesets for issue key", + "tags": ["Jira Integration"] + } + }, + "/jira/latest/projects/{projectKey}/primary-enhanced-entitylink": { + "get": { + "description": "Retrieves the enchanced primary entitylink \n\nThe authenticated user must have PROJECT_READ permission for the project having the primary enhanced entitylink. \n\n", + "operationId": "getEnhancedEntityLinkForProject", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestEnhancedEntityLink" + } + } + }, + "description": "The primary enhanced entitylink." + } + }, + "summary": "Get entity link", + "tags": ["Jira Integration"] + } + }, + "/jira/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/issues": { + "get": { + "description": "Retrieves Jira issue keys that are associated with the commits in the specified pull request. The number of commits checked for issues is limited to a default of 100.", + "operationId": "getIssueKeysForPullRequest", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request id", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json;charset=UTF-8": { + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestJiraIssue" } + } + } + }, + "description": "A list of Jira issues keys for the pull request" + } + }, + "summary": "Get issues for a pull request", + "tags": ["Jira Integration"] + } + }, + "/admin": { + "get": { + "description": "Gets the global settings that enforce the maximum expiry of SSH keys and restrictions on SSH key types.", + "operationId": "getGlobalSettings", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshKeySettings" } + } + }, + "description": "The global ssh key settings configuration." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the ssh keys global settings configuration." + } + }, + "summary": "Get global SSH key settings", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Updates the global settings that enforces the maximum expiry of SSH keys and restrictions on SSH key types.", + "operationId": "updateGlobalSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshKeySettings" } + } + }, + "description": "A request containing expiry length to be set for SSH keys and a list of SSH key type restrictions." + }, + "responses": { + "204": { "description": "The ssh key global settings were updated." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was invalid, which may be due to:\n\n\n- attempted to set expiry to less than 1 day\n- attempted to set expiry using partial days\n- attempted to set a restriction on a key type which was invalid\n\n\nThe exact reason for the error will be provided in the error message." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update these settings." + } + }, + "summary": "Update global SSH key settings", + "tags": ["System Maintenance"] + } + }, + "/admin/supported-key-types": { + "get": { + "description": "Retrieves a list of all supported SSH key algorithms and lengths.", + "operationId": "getSupportedKeyTypes", + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "A list of supported SSH key algorithms and lengths." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve this list." + } + }, + "summary": "Get supported SSH key algorithms and lengths", + "tags": ["System Maintenance"] + } + }, + "/keys/latest/projects/{projectKey}/repos/{repositorySlug}/ssh": { + "get": { + "description": "Retrieves the access keys for the repository identified in the URL.", + "operationId": "getForRepository_1", + "parameters": [ + { + "description": "If specified only SSH access keys with a label prefixed with the supplied string will be returned", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "Controls whether SSH access keys configured at the project level should be included in the results or not. When set to true all keys that have access to the repository (including project level keys) are included in the results. When set to false, only access keys configured for the specified repository are considered. Default is false.", + "in": "query", + "name": "effective", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "If specified only SSH access keys with at least the supplied permission will be returned. Default is Permission.REPO_READ.", + "in": "query", + "name": "minimumPermission", + "schema": { "type": "string" } + }, + { + "in": "query", + "name": "permission", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestSshAccessKey" + } + } + } + } + } + }, + "description": "A single page of access keys for the repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the access keys for this repository" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist" + } + }, + "summary": "Get repository SSH keys", + "tags": ["Authentication"] + }, + "post": { + "description": "Register a new SSH key and grants access to the repository identified in the URL.", + "operationId": "addForRepository", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshAccessKey" } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshAccessKey" } + } + }, + "description": "The newly created access key." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The current request contains invalid or missing values." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to add an access key to the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Add repository SSH key", + "tags": ["Authentication"] + } + }, + "/keys/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}": { + "delete": { + "description": "Remove an existing access key for the repository identified in the URL. If the same SSH key is used as an access key for multiple projects or repositories, only the access to the repository identified in the URL will be revoked.", + "operationId": "revokeForRepository", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The key id", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The access key was deleted (or none was found matching the given id)." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to remove access keys for this repository" + } + }, + "summary": "Revoke repository SSH key", + "tags": ["Authentication"] + }, + "get": { + "description": "Retrieves the access key for the SSH key with id keyId on the repository identified in the URL.", + "operationId": "getForRepository", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The key id", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshAccessKey" } + } + }, + "description": "The access key for the repository and SSH key with ID keyId." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the access keys for this repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or key does not exist or the key does not have access on the repository." + } + }, + "summary": "Get repository SSH key", + "tags": ["Authentication"] + } + }, + "/keys/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}/permission/{permission}": { + "put": { + "description": "Updates the permission granted to the specified SSH key to the repository identified in the URL.", + "operationId": "updatePermission_1", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The newly created access key", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The new permission to be granted to the SSH key", + "in": "path", + "name": "permission", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshAccessKey" } + } + }, + "description": "The newly created access key." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions on the repository to edit its access keys." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Update repository SSH key permission", + "tags": ["Authentication"] + } + }, + "/keys/latest/projects/{projectKey}/ssh": { + "get": { + "description": "Retrieves the access keys for the project identified in the URL.", + "operationId": "getSshKeysForProject", + "parameters": [ + { + "description": "If specified only SSH access keys with a label prefixed with the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "If specified only SSH access keys with at least the supplied permission will be returned Default is PROJECT_READ.", + "in": "query", + "name": "permission", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestSshAccessKey" + } + } + } + } + } + }, + "description": "A single page of access keys associated with the project." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the access keys for this project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get SSH key", + "tags": ["Authentication"] + }, + "post": { + "description": "Register a new SSH key and grants access to the project identified in the URL.", + "operationId": "addForProject", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshAccessKey" } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshAccessKey" } + } + }, + "description": "The newly created access key." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The current request contains invalid or missing values." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to add an access key to the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Add project SSH key", + "tags": ["Authentication"] + } + }, + "/keys/latest/projects/{projectKey}/ssh/{keyId}": { + "delete": { + "description": "Remove an existing access key for the project identified in the URL. If the same SSH key is used as an access key for multiple projects or repositories, only the access to the project identified in the URL will be revoked.", + "operationId": "revokeForProject", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The key id", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The access key was deleted (or none was found matching the given id)." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to remove access keys for this project." + } + }, + "summary": "Revoke project SSH key", + "tags": ["Authentication"] + }, + "get": { + "description": "Retrieves the access key for the SSH key with id keyId on the project identified in the URL.", + "operationId": "getForProject", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The key id", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshAccessKey" } + } + }, + "description": "The access key for the repository and SSH key with ID keyId." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the access keys for this repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or key does not exist or the key does not have access on the repository." + } + }, + "summary": "Get project SSH key", + "tags": ["Authentication"] + } + }, + "/keys/latest/projects/{projectKey}/ssh/{keyId}/permission/{permission}": { + "put": { + "description": "Updates the permission granted to the specified SSH key to the project identified in the URL.", + "operationId": "updatePermission", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The newly created access key", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The new permission to be granted to the SSH key", + "in": "path", + "name": "permission", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshAccessKey" } + } + }, + "description": "The newly created access key." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions on the project to edit its access keys." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Update project SSH key permission", + "tags": ["Authentication"] + } + }, + "/keys/latest/ssh/{keyId}": { + "delete": { + "description": "Remove an existing access key for the projects and repositories in the submitted entity. If the same SSH key is used as an access key for multiple projects or repositories not supplied, only the access to the projects or repositories identified will be revoked.", + "operationId": "revokeMany", + "parameters": [ + { + "description": "The identifier of the SSH key", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "projects": { "$ref": "#/components/schemas/RestProject" }, + "repositories": { + "$ref": "#/components/schemas/RestRepository" + } + } + } + } + } + }, + "responses": { + "204": { + "description": "The access keys were deleted (or none was found matching the given id and repositories or projects)." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to remove access keys for one or more of the specified projects or repositories." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "On or more of the specified repositories or projects does not exist or the key itself does not exist." + } + }, + "summary": "Revoke project SSH key", + "tags": ["Authentication"] + } + }, + "/keys/latest/ssh/{keyId}/projects": { + "get": { + "description": "Retrieves all project-related access keys for the SSH key with id keyId. If the current user is not an admin any of the projects the key provides access to, none are returned.", + "operationId": "getForProjects", + "parameters": [ + { + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "integer", "format": "int32" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The SSH key with ID keyId." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified key does not exist" + } + }, + "summary": "Get project SSH keys", + "tags": ["Authentication"] + } + }, + "/keys/latest/ssh/{keyId}/repos": { + "get": { + "description": "Retrieves all repository-related access keys for the SSH key with id keyId. If the current user is not an admin of any of the projects the key provides access to, none are returned.", + "operationId": "getForRepositories", + "parameters": [ + { + "description": "The key id", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Include the readOnly field. The `readOnly` field is contextual for the user making the request. `readOnly` returns true if there is a restriction and the user does not have`PROJECT_ADMIN` access for the repository the key is associated with.", + "in": "query", + "name": "withRestrictions", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The SSH key with ID keyId." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified key does not exist." + } + }, + "summary": "Get repository SSH key", + "tags": ["Authentication"] + } + }, + "/ssh/latest/keys": { + "delete": { + "description": "Delete all SSH keys for a supplied user.", + "operationId": "deleteSshKeys", + "parameters": [ + { + "description": "the username of the user to delete the keys for. If no username is specified, the SSH keys will be deleted for the current authenticated user.", + "in": "query", + "name": "userName", + "schema": { "type": "string" } + }, + { "in": "query", "name": "user", "schema": { "type": "string" } } + ], + "responses": { + "204": { + "description": "The SSH keys matching the supplied user were deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the SSH keys. This is only possible when a user is explicitly supplied." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No user matches the supplied user" + } + }, + "summary": "Delete all user SSH key", + "tags": ["Authentication"] + }, + "get": { + "description": "Retrieve a page of SSH keys.", + "operationId": "getSshKeys", + "parameters": [ + { + "description": "the username of the user to retrieve the keys for. If no username is specified, the SSH keys will be retrieved for the current authenticated user.", + "in": "query", + "name": "userName", + "schema": { "type": "string" } + }, + { "in": "query", "name": "user", "schema": { "type": "string" } }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestSshKey" } + } + } + } + } + }, + "description": "A page of SSH keys." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissionsto retrieve the SSH keys. This is only possible when auser is explicitly supplied." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No user matches the supplied user" + } + }, + "summary": "Get SSH keys for user", + "tags": ["Authentication"] + }, + "post": { + "description": "Add a new SSH key to a supplied user.", + "operationId": "addSshKey", + "parameters": [ + { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshKey" } + } + }, + "description": "the username of the user to add the SSH key for. If no username is specified, the SSH key will be added for the current authenticated user.", + "in": "query", + "name": "user" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "algorithmType": { "type": "string" }, + "bitLength": { "type": "integer", "format": "int32" }, + "createdDate": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "expiryDays": { + "type": "integer", + "format": "int32", + "example": 30 + }, + "fingerprint": { + "type": "string", + "example": "Cbg38r+gDCiNHqBk6Y1BKO+EvufFBqhFWIEXh8oq9MI", + "readOnly": true + }, + "id": { + "type": "integer", + "format": "int32", + "example": 1, + "readOnly": true + }, + "label": { "type": "string", "example": "me@127.0.0.1" }, + "lastAuthenticated": { + "type": "string", + "example": "1630041546434", + "readOnly": true + }, + "text": { + "type": "string", + "example": "ssh-rsa AAAAB3... me@127.0.0.1" + } + } + } + } + } + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshKey" } + } + }, + "description": "The newly created SSH key." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The SSH key was not created because the key was not a valid RSA/DSA/ECDSA/Ed25519 key of a supported length." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Either there is no authenticated user or the currently authenticated user has insufficient permissions to add an SSH key. The latter is only possible when a user is explicitly supplied." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No user matches the supplied user" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The SSH key already exists on the system." + } + }, + "summary": "Add SSH key for user", + "tags": ["Authentication"] + } + }, + "/ssh/latest/keys/{keyId}": { + "delete": { + "description": "Delete an SSH key.\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "deleteSshKey", + "parameters": [ + { + "description": "the id of the key to delete.", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The SSH key matching the supplied id was deleted or did not exist." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the SSH key." + } + }, + "summary": "Remove SSH key", + "tags": ["Authentication"] + }, + "get": { + "description": "Retrieve an SSH key by keyId\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "getSshKey", + "parameters": [ + { + "description": "the ID of the key to retrieve.", + "in": "path", + "name": "keyId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshKey" } + } + }, + "description": "An SSH key." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissionsto retrieve the SSH key. This is only possible when akeyId is explicitly supplied." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No SSH key matches the supplied keyId" + } + }, + "summary": "Get SSH key for user by keyId", + "tags": ["Authentication"] + } + }, + "/ssh/latest/settings": { + "get": { + "description": "Gets the SSH settings from the upstream.", + "operationId": "sshSettings", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestSshSettings" } + } + }, + "description": "The ssh settings from upstream" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was not authenticated" + } + }, + "summary": "Get SSH settings", + "tags": ["Authentication"] + } + }, + "/api/latest/admin/banner": { + "delete": { + "description": "Deletes a banner, if one is present in the database.", + "operationId": "deleteBanner", + "responses": { + "204": { + "description": "The query executed successfully, whether a banner was deleted or not" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user does not have permission to access the banner service through this endpoint" + } + }, + "summary": "Delete announcement banner", + "tags": ["System Maintenance"] + }, + "get": { + "description": "Gets the announcement banner, if one exists and is available to the user", + "operationId": "getBanner", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAnnouncementBanner" + } + } + }, + "description": "The requested banner" + }, + "204": { "description": "There is no banner to display" }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user does not have permission to access the banner service through this endpoint" + } + }, + "summary": "Get announcement banner", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Sets the announcement banner with the provided JSON.\nOnly users authenticated as Admins may call this resource", + "operationId": "setBanner", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "audience": { + "type": "string", + "enum": ["AUTHENTICATED", "ALL"] + }, + "enabled": { "type": "boolean" }, + "message": { "type": "string" } + }, + "required": ["audience"] + } + } + } + }, + "responses": { + "204": { "description": "The banner was set successfully" }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "There was malformed or incorrect data in the provided JSON" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user does not have permission to access the banner service through this endpoint" + } + }, + "summary": "Update/Set announcement banner", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/cluster": { + "get": { + "description": "Gets information about the nodes that currently make up the stash cluster.\n\nThe authenticated user must have the SYS_ADMIN permission to call this resource.", + "operationId": "getInformation", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestClusterInformation" + } + } + }, + "description": "A response containing information about the cluster" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the cluster information." + } + }, + "summary": "Get cluster node information", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/default-branch": { + "delete": { + "description": "Clears the global default branch, which is used when creating new repositories if an explicit default branch is not specified, if one has been configured.\n\nThe authenticated user must have ADMIN permission to call this resource.", + "operationId": "clearDefaultBranch", + "responses": { + "204": { "description": "The default branch has been cleared." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The current user does not have sufficient permissions to clear the global default branch." + } + }, + "summary": "Clear default branch", + "tags": ["System Maintenance"] + }, + "get": { + "description": "Retrieves the configured global default branch, which is used when creating new repositories if an explicit default branch is not specified.\n\nThe user must be authenticated to call this resource.", + "operationId": "getDefaultBranch", + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The configured global default branch." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No global default branch has been configured." + } + }, + "summary": "Get the default branch", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Configures the global default branch, which is used when creating new repositories if an explicit default branch is not specified.\n\nThe authenticated user must have ADMIN permission to call this resource.", + "operationId": "setDefaultBranch", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "id": { "type": "string" } } + } + } + } + }, + "responses": { + "204": { "description": "The default branch has been set." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The current user does not have sufficient permissions to configure the global default branch." + } + }, + "summary": "Update/Set default branch", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/git/mesh/config/control-plane.pem": { + "get": { + "description": "Obtain the control plane PEM.\n\nThe authenticated user must have **SYS_ADMIN** permission.", + "operationId": "getControlPlanePublicKey", + "responses": { + "200": { + "content": { "text/plain": {} }, + "description": "The control plane PEM." + }, + "401": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestErrors" } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + } + }, + "summary": "Get the control plane PEM", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/git/mesh/diagnostics/connectivity": { + "get": { + "description": "Generates a connectivity report between the Bitbucket node(s) and the Mesh node(s).\n\nThe authenticated user must have **SYS_ADMIN** permission.", + "operationId": "connectivity", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMeshConnectivityReport" + } + } + }, + "description": "The connectivity report between the Bitbucket node(s) and Mesh node(s)." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + } + }, + "summary": "Generate Mesh connectivity report", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/git/mesh/nodes": { + "get": { + "description": "Get all the registered Mesh nodes.\n\nThe authenticated user must have **SYS_ADMIN** permission.", + "operationId": "getAllRegisteredMeshNodes", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMeshNode" } + } + }, + "description": "The list of registered Mesh nodes." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + } + }, + "summary": "Get all registered Mesh nodes", + "tags": ["System Maintenance"] + }, + "post": { + "description": "Register a new Mesh node.\n\nThe authenticated user must have **SYS_ADMIN** permission.", + "operationId": "registerNewMeshNode", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMeshNode" } + } + }, + "description": "The request specifying the new Mesh node." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMeshNode" } + } + }, + "description": "The newly registered Mesh node." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + } + }, + "summary": "Register new Mesh node", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/git/mesh/nodes/{id}": { + "delete": { + "description": "Delete a Mesh node\n\nThe authenticated user must have **SYS_ADMIN** permission.", + "operationId": "delete_2", + "parameters": [ + { + "in": "query", + "name": "force", + "schema": { "type": "boolean", "default": false } + }, + { + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "integer", "format": "int64" } + } + ], + "responses": { + "default": { + "content": { "application/json;charset=UTF-8": {} }, + "description": "default response" + } + }, + "summary": "Delete Mesh node", + "tags": ["System Maintenance"] + }, + "get": { + "description": "Get the registered Mesh node that matches the supplied ID.\n\nThe authenticated user must have **SYS_ADMIN** permission.", + "operationId": "getRegisteredMeshNodeById", + "parameters": [ + { + "description": "The ID of the Mesh node.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMeshNode" } + } + }, + "description": "The Mesh node that matches the ID." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The Mesh node does not exist." + } + }, + "summary": "Get Mesh node", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Update a Mesh node.\n\nThe authenticated user must have **SYS_ADMIN** permission.", + "operationId": "updateMeshNode", + "parameters": [ + { + "description": "The ID of the Mesh node to update.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMeshNode" } + } + }, + "description": "The request specifying the updated Mesh node." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMeshNode" } + } + }, + "description": "The updated Mesh node." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + } + }, + "summary": "Update Mesh node", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/git/mesh/support-zips": { + "get": { + "description": "Get the support zips for all the Mesh nodes.\n\nThe authenticated user must have **SYS_ADMIN** permission.", + "operationId": "getSupportZips", + "responses": { + "200": { + "content": { "application/octet-stream": {} }, + "description": "The support zips for all the Mesh nodes." + }, + "401": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestErrors" } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + } + }, + "summary": "Get support zips for all Mesh nodes", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/git/mesh/support-zips/{id}": { + "get": { + "description": "Get the support zip for the Mesh node that matches the specified ID.\n\nThe authenticated user must have **SYS_ADMIN** permission.", + "operationId": "getSupportZip", + "parameters": [ + { + "description": "The ID of the Mesh node.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/octet-stream": {} }, + "description": "The support zip for the Mesh node that matches the ID." + }, + "401": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestErrors" } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + }, + "404": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestErrors" } + } + }, + "description": "The Mesh node does not exist." + } + }, + "summary": "Get support zip for node", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/groups": { + "delete": { + "description": "Deletes the specified group, removing them from the system. This also removes any permissions that may have been granted to the group.\n\nA user may not delete the last group that is granting them administrative permissions, or a group with greater permissions than themselves.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "deleteGroup", + "parameters": [ + { + "description": "The name identifying the group to delete.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDetailedGroup" } + } + }, + "description": "The deleted group." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as the authenticated user has a lower permission level than the group being deleted." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified group does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would lower the authenticated user's permission level." + } + }, + "summary": "Remove group", + "tags": ["Permission Management"] + }, + "get": { + "description": "Retrieve a page of groups. \n\nThe authenticated user must have LICENSED_USER permission or higher to call this resource.", + "operationId": "getGroups_1", + "parameters": [ + { + "description": "If specified only group names containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDetailedGroup" + } + } + } + } + } + }, + "description": "A page of groups." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a licensed user." + } + }, + "summary": "Get groups", + "tags": ["Permission Management"] + }, + "post": { + "description": "Create a new group. \n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "createGroup", + "parameters": [ + { + "description": "Name of the group.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDetailedGroup" } + } + }, + "description": "The newly created group." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "A group with this name already exists." + } + }, + "summary": "Create group", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/groups/add-user": { + "post": { + "deprecated": true, + "description": "Deprecated since 2.10. Use /rest/users/add-groups instead.\n\nAdd a user to a group.\n\nIn the request entity, the context attribute is the group and the itemName is the user.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "addUserToGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UserPickerContext" } + } + } + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The user was added to the group." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or group does not exist." + } + }, + "summary": "Add user to group", + "tags": ["Deprecated", "Permission Management"] + } + }, + "/api/latest/admin/groups/add-users": { + "post": { + "description": "Add multiple users to a group. \n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "addUsersToGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GroupAndUsers" } + } + } + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "All the users were added to the group" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or group does not exist." + } + }, + "summary": "Add multiple users to group", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/groups/more-members": { + "get": { + "description": "Retrieves a list of users that are members of a specified group.

The authenticated user must have the LICENSED_USER permission to call this resource.", + "operationId": "findUsersInGroup", + "parameters": [ + { + "description": "If specified only users with usernames, display names or email addresses containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The group which should be used to locate members.", + "in": "query", + "name": "context", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDetailedUser" + } + } + } + } + } + }, + "description": "A page of users." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a licensed user." + } + }, + "summary": "Get group members", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/groups/more-non-members": { + "get": { + "description": "Retrieves a list of users that are not members of a specified group.

The authenticated user must have the LICENSED_USER permission to call this resource.", + "operationId": "findUsersNotInGroup", + "parameters": [ + { + "description": "If specified only users with usernames, display names or email addresses containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The group which should be used to locate members.", + "in": "query", + "name": "context", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDetailedUser" + } + } + } + } + } + }, + "description": "A page of users." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a licensed user." + } + }, + "summary": "Get members not in group", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/groups/remove-user": { + "post": { + "deprecated": true, + "description": "Deprecated since 2.10. Use /rest/users/remove-groups instead.\n\nRemove a user from a group.\n\nThe authenticated user must have the ADMIN permission to call this resource.\n\nIn the request entity, the context attribute is the group and the itemName is the user.", + "operationId": "removeUserFromGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UserPickerContext" } + } + } + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The user was removed from the group." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as the group has a higher permission level than the context user." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or group does not exist." + } + }, + "summary": "Remove user from group", + "tags": ["Deprecated", "Permission Management"] + } + }, + "/api/latest/admin/license": { + "get": { + "description": "Retrieves details about the current license, as well as the current status of the system with regards to the installed license. The status includes the current number of users applied toward the license limit, as well as any status messages about the license (warnings about expiry or user counts exceeding license limits). \n\nThe authenticated user must have ADMIN permission. Unauthenticated users, and non-administrators, are not permitted to access license details.", + "operationId": "get_2", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestBitbucketLicense" + } + } + }, + "description": "The currently-installed license." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the license, or the request is anonymous." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No license has been installed." + } + }, + "summary": "Get license details", + "tags": ["System Maintenance"] + }, + "post": { + "description": "Decodes the provided encoded license and sets it as the active license. If no license was provided, a 400 is returned. If the license cannot be decoded, or cannot be applied, a 409 is returned. Some possible reasons a license may not be applied include: \n\n- It is for a different product\n- It is already expired\n\n\nOtherwise, if the license is updated successfully, details for the new license are returned with a 200 response.\n\nWarning: It is possible to downgrade the license during update, applying a license with a lower number of permitted users. If the number of currently-licensed users exceeds the limits of the new license, pushing will be disabled until the licensed user count is brought into compliance with the new license.\n\nThe authenticated user must have SYS_ADMIN permission. ADMIN users may view the current license details, but they may not update the license.", + "operationId": "updateLicense", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestBitbucketLicense" } + } + }, + "description": "a JSON payload containing the encoded license to apply" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestBitbucketLicense" + } + } + }, + "description": "The newly-installed license." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No encoded license was provided in the JSON body for the POST." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the license." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The encoded license could not be decoded, or it is not valid for use on this server. Some possible reasons a license may not be applied include: it may be for a different product, it may have already expired, or this Bitbucket version doesn't support Server licenses." + } + }, + "summary": "Update license", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/mail-server": { + "delete": { + "description": "Deletes the current mail configuration.\n\nThe authenticated user must have the SYS_ADMIN permission to call this resource.", + "operationId": "deleteMailConfig", + "responses": { + "204": { + "description": "The mail configuration was successfully deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the mail server configuration." + } + }, + "summary": "Delete mail configuration", + "tags": ["System Maintenance"] + }, + "get": { + "description": "Retrieves the current mail configuration. \n\nThe authenticated user must have the SYS_ADMIN permission to call this resource.", + "operationId": "getMailConfig", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMailConfiguration" + } + } + }, + "description": "The mail configuration" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the mail configuration." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The mail server hasn't been configured" + } + }, + "summary": "Get mail configuration", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Updates the mail configuration. \n\nThe authenticated user must have the SYS_ADMIN permission to call this resource.", + "operationId": "setMailConfig", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "hostname": { + "type": "string", + "example": "smtp.example.com" + }, + "password": { "type": "string", "example": "password" }, + "port": { + "type": "integer", + "format": "int32", + "example": 465 + }, + "protocol": { "type": "string", "enum": ["SMTP", "SMTPS"] }, + "requireStartTls": { "type": "boolean" }, + "senderAddress": { + "type": "string", + "example": "stash-no-reply@company.com" + }, + "useStartTls": { "type": "boolean" }, + "username": { "type": "string", "example": "user" } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMailConfiguration" + } + } + }, + "description": "The updated mail configuration." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The mail configuration was not updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update themail configuration." + } + }, + "summary": "Update mail configuration", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/mail-server/sender-address": { + "delete": { + "description": "Clears the server email address.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "clearSenderAddress", + "responses": { + "204": { + "description": "he server email address was successfully cleared." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions toclear the server email address." + } + }, + "summary": "Update mail configuration", + "tags": ["System Maintenance"] + }, + "get": { + "description": "Retrieves the server email address", + "operationId": "getSenderAddress", + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The server email address" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "he currently authenticated user has insufficient permissions to retrieve the server email address." + } + }, + "summary": "Get server mail address", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Updates the server email address \n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "setSenderAddress", + "requestBody": { + "content": { "application/json": { "schema": { "type": "string" } } } + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The from address used in notification emails" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The server email address was not updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the server email address." + } + }, + "summary": "Update server mail address", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/permissions/groups": { + "delete": { + "description": "Revoke all global permissions for a group.\n\n\n\nThe authenticated user must have:\n\n\n- ADMIN permission or higher; and\n- greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them)\n\n\nto call this resource. In addition, a user may not revoke a group's permissions if their own permission level\nwould be reduced as a result.", + "operationId": "revokePermissionsForGroup", + "parameters": [ + { + "description": "The name of the group", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "All global permissions were revoked from the group." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "TThe currently authenticated user is not an administrator." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified group does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user's\npermission level or the currently authenticated user has a lower permission\nlevel than the group they are attempting to modify." + } + }, + "summary": "Revoke all global permissions for group", + "tags": ["Permission Management"] + }, + "get": { + "description": "Retrieve a page of groups that have been granted at least one global permission.\n\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "getGroupsWithAnyPermission", + "parameters": [ + { + "description": "If specified only group names containing the supplied string will be returned", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPermittedGroup" + } + } + } + } + } + }, + "description": "A page of groups and their highest global permissions." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator." + } + }, + "summary": "Get groups with a global permission", + "tags": ["Permission Management"] + }, + "put": { + "description": "Promote or demote a group's global permission level. Available global permissions are:\n\n\n- LICENSED_USER\n- PROJECT_CREATE\n- ADMIN\n- SYS_ADMIN\n\nSee the Bitbucket Data Center documentation for a detailed explanation of what each permission entails.\n\n\nThe authenticated user must have:\n\n\n- ADMIN permission or higher; and\n- the permission they are attempting to grant or higher; and\n- greater or equal permissions than the current permission level of the group (a user may not demote the permission level of a group with higher permissions than them)\n\n\nto call this resource. In addition, a user may not demote a group's permission level if their own permission\nlevel would be reduced as a result.", + "operationId": "setPermissionForGroups", + "parameters": [ + { + "description": "The names of the groups", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "array", "items": { "type": "string" } } + }, + { + "description": "The permission to grant", + "in": "query", + "name": "permission", + "required": true, + "schema": { + "type": "string", + "enum": ["LICENSED_USER", "PROJECT_CREATE", "ADMIN", "SYS_ADMIN"] + } + } + ], + "responses": { + "204": { + "description": "The specified permission was granted to the specified user." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed or the specified permission does not exist." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator or doesn't have the\nspecified permission they are attempting to grant." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would exceed the server's license limits." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified group does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user's\npermission level or the currently authenticated user has a lower permission\nlevel than the group they are attempting to modify." + } + }, + "summary": "Update global permission for group", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/permissions/groups/none": { + "get": { + "description": "Retrieve a page of groups that have no granted global permissions.\n\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "getGroupsWithoutAnyPermission", + "parameters": [ + { + "description": "If specified only user names containing the supplied string will be returned", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDetailedGroup" + } + } + } + } + } + }, + "description": "A page of groups that have not been granted any global permissions." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator." + } + }, + "summary": "Get groups with no global permission", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/permissions/users": { + "delete": { + "description": "Revoke all global permissions for a user.\n\n\nThe authenticated user must have:\n\n\n- ADMIN permission or higher; and\n- greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them)\n\n\nto call this resource. In addition, a user may not demote their own permission level.", + "operationId": "revokePermissionsForUser", + "parameters": [ + { + "description": "The name of the user", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "All global permissions were revoked from the user." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user's\npermission level or the currently authenticated user has a lower permission\nlevel than the user they are attempting to modify." + } + }, + "summary": "Revoke all global permissions for user", + "tags": ["Permission Management"] + }, + "get": { + "description": "Retrieve a page of users that have been granted at least one global permission.\n\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "getUsersWithAnyPermission", + "parameters": [ + { + "description": "If specified only user names containing the supplied string will be returned", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPermittedGroup" + } + } + } + } + } + }, + "description": "A page of users and their highest global permissions." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator." + } + }, + "summary": "Get users with a global permission", + "tags": ["Permission Management"] + }, + "put": { + "description": "Promote or demote the global permission level of a user. Available global permissions are:\n\n\n- LICENSED_USER\n- PROJECT_CREATE\n- ADMIN\n- SYS_ADMIN\n\n\nSee the Bitbucket Data Center documentation for a detailed explanation of what each permission entails.\n\n\nThe authenticated user must have:\n\n\n- ADMIN permission or higher; and\n- the permission they are attempting to grant; and\n- greater or equal permissions than the current permission level of the user (a user may not demote the permission level of a user with higher permissions than them)\n\n\nto call this resource. In addition, a user may not demote their own permission level.", + "operationId": "setPermissionForUsers", + "parameters": [ + { + "description": "The names of the users", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "array", "items": { "type": "string" } } + }, + { + "description": "The permission to grant", + "in": "query", + "name": "permission", + "required": true, + "schema": { + "type": "string", + "enum": ["LICENSED_USER", "PROJECT_CREATE", "ADMIN", "SYS_ADMIN"] + } + } + ], + "responses": { + "204": { "description": "The requested permission was granted." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed or the specified permission does not exist." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator or doesn't have the\nspecified permission they are attempting to grant." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would exceed the server's license limits." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user's\npermission level or the currently authenticated user has a lower permission\nlevel than the user they are attempting to modify." + } + }, + "summary": "Update global permission for user", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/permissions/users/none": { + "get": { + "description": "Retrieve a page of users that have no granted global permissions.\n\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "getUsersWithoutAnyPermission", + "parameters": [ + { + "description": "If specified only user names containing the supplied string will be returned", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestApplicationUser" + } + } + } + } + } + }, + "description": "A page of users that have not been granted any global permissions." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator." + } + }, + "summary": "Get users with no global permission", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/pull-requests/{scmId}": { + "get": { + "description": "Retrieve the merge strategies available for this instance. \n\nThe user must be authenticated to call this resource.", + "operationId": "getMergeConfig", + "parameters": [ + { + "description": "the id of the scm to get strategies for", + "in": "path", + "name": "scmId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestMergeConfig" + } + } + }, + "description": "The merge configuration of this instance." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to see the request repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request repository does not exist" + } + }, + "summary": "Get merge strategies", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Update the pull request merge strategies for the context repository. \n\nThe authenticated user must have ADMIN permission to call this resource. \n\nOnly the strategies provided will be enabled, only one may be set to default \n\nThe commit message template will not be updated if not provided, and will be deleted if the `commitMessageTemplate` attribute is empty, i.e: `commitMessageTemplate: {}`.\n\nAn explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty `mergeConfig` attribute. i.e:\n```\n{ \n \"mergeConfig\": {} \n} \n```\n\nUpon completion of this request, the effective configuration will be the default configuration.", + "operationId": "setMergeConfig", + "parameters": [ + { + "description": "the id of the scm to get strategies for", + "in": "path", + "name": "scmId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestSettings" + } + } + }, + "description": "the settings" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestMergeConfig" + } + } + }, + "description": "The repository pull request merge strategies for the context repository." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository pull request merge strategies were not updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to administrate thespecified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Setting or deleting merge configurations isn't supported on archived repositories." + } + }, + "summary": "Update merge strategies", + "tags": ["Pull Requests"] + } + }, + "/api/latest/admin/rate-limit/history": { + "get": { + "description": "Retrieves the recent rate limit history for the instance.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "getHistory", + "parameters": [ + { + "description": "An optional sort category to arrange the results in descending order", + "in": "query", + "name": "order", + "schema": { "type": "string", "enum": ["NEWEST", "FREQUENCY"] } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestAggregateRejectCounter" + } + } + } + } + } + }, + "description": "A response containing a page of aggregated counters for users who have been recently rate limited." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The sort query parameter is invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve rate limit history." + } + }, + "summary": "Get rate limit history", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/rate-limit/settings": { + "get": { + "description": "Retrieves the rate limit settings for the instance.\n\nThe user must be authenticated to call this resource.", + "operationId": "getSettings_2", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRateLimitSettings" + } + } + }, + "description": "A response containing the rate limit plugin settings for the instance." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve rate limit settings." + } + }, + "summary": "Get rate limit settings", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Sets the rate limit settings for the instance.\n\nThe authenticated user must have ADMIN permission to call this resource.", + "operationId": "setSettings_2", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRateLimitSettings" } + } + }, + "description": "Sets the rate limit settings for the instance.\n\nThe authenticated user must have ADMIN permission to call this resource." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRateLimitSettings" + } + } + }, + "description": "A response containing the updated rate limit plugin settings for the instance." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details):\n\n- The request is empty\n- The enabled field of the request is not a boolean\n- The defaultSettings field of the request does not contain both capacity and fillRate\n- The capacity and fillRate are not positive integers\n\n\n" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to set rate limit settings." + } + }, + "summary": "Set rate limit", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/rate-limit/settings/users": { + "get": { + "description": "Retrieves the user-specific rate limit settings for the given user.\n\nThe authenticated user must have ADMIN permission to call this resource.", + "operationId": "getAllRateLimitSettings", + "parameters": [ + { + "description": "Optional filter", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestUserRateLimitSettings" + } + } + } + } + } + }, + "description": "A response containing all the user-specific rate limit settings filtered by the optional filter." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve rate limit settings." + } + }, + "summary": "Get rate limit settings for user", + "tags": ["System Maintenance"] + }, + "post": { + "description": "Sets the given rate limit settings for the given users.\n\nThe authenticated user must have ADMIN permission to call this resource.", + "operationId": "set_2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestBulkUserRateLimitSettingsUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestUserRateLimitSettings" + } + } + }, + "description": "A response containing the updated user settings." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following valid state error cases occurred (check the error message for more details):\n\n- The request is empty\n- No users are provided in the request\n- One or more of the users are invalid\n- Whitelisted is false or not provided, and no settings are provided either\n- Whitelisted is false or not provided, settings are provided, but do not contain both capacity and fillRate\n- Whitelisted is false or not provided, settings are provided, but capacity and fillRate are not positive integers\n- Whitelisted is true, and settings are provided (only one must be provided)\n" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to set user settings." + } + }, + "summary": "Set rate limit settings for users", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/rate-limit/settings/users/{userSlug}": { + "delete": { + "description": "Deletes the user-specific rate limit settings for the given user.\n\nThe authenticated user must have ADMIN permission to call this resource.", + "operationId": "delete_8", + "parameters": [ + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "An empty response indicating that the user settings have been deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve rate limit settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist, or has no settings." + } + }, + "summary": "Delete user specific rate limit settings", + "tags": ["System Maintenance"] + }, + "get": { + "description": "Retrieves the user-specific rate limit settings for the given user.\n\nTo call this resource, the user must be authenticated and either have ADMIN permission or be the same user as the one whose settings are requested. A user with ADMIN permission cannot get the settings of a user with SYS_ADMIN permission.", + "operationId": "get_6", + "parameters": [ + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestUserRateLimitSettings" + } + } + }, + "description": "A response containing the user-specific rate limit settings for the given user." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve rate limit settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist, or has no settings." + } + }, + "summary": "Get user specific rate limit settings", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Sets the given rate limit settings for the given user.\n\nThe authenticated user must have ADMIN permission to call this resource.", + "operationId": "set_3", + "parameters": [ + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestUserRateLimitSettingsUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestUserRateLimitSettings" + } + } + }, + "description": "A response containing the updated user settings" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following valid state error cases occurred (check the error message for more details):\n\n- The request is empty\n- Whitelisted is false or not provided, and no settings are provided either\n- Whitelisted is false or not provided, settings are provided, but do not contain both capacity and fillRate\n- Whitelisted is false or not provided, settings are provided, but capacity and fillRate are not positive integers\n- Whitelisted is true, and settings are provided (only one must be provided)\n\n\n" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to set user settings." + } + }, + "summary": "Set rate limit settings for user", + "tags": ["System Maintenance"] + } + }, + "/api/latest/admin/user-directories": { + "get": { + "description": "Retrieve a list of active directories. \n\n The authenticated user must have the ADMIN permission to call this resource.", + "operationId": "getUserDirectories", + "parameters": [ + { + "description": "Set true to include inactive directories; otherwise, false to only return active directories.", + "in": "query", + "name": "includeInactive", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestUserDirectory" } + } + }, + "description": "A list of directories" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator" + } + }, + "summary": "Get directories", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/users": { + "delete": { + "description": "Deletes the specified user, removing them from the system. This also removes any permissions that may have been granted to the user.\n\nA user may not delete themselves, and a user with ADMIN permissions may not delete a user with SYS_ADMINpermissions.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "deleteUser", + "parameters": [ + { + "description": "The username identifying the user to delete.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDetailedUser" } + } + }, + "description": "The deleted user." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as the authenticated user has a lower permission level than the user being deleted." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as a user can not delete themselves." + } + }, + "summary": "Remove user", + "tags": ["Permission Management"] + }, + "get": { + "description": "Retrieve a page of users. \n\n The authenticated user must have the LICENSED_USER permission to call this resource.", + "operationId": "getUsers_1", + "parameters": [ + { + "description": "If specified only users with usernames, display name or email addresses containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDetailedUser" + } + } + } + } + } + }, + "description": "A page of users." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a licensed user." + } + }, + "summary": "Get users", + "tags": ["Permission Management"] + }, + "post": { + "description": "Creates a new user from the assembled query parameters.\n\nThe default group can be used to control initial permissions for new users, such as granting users the ability to login or providing read access to certain projects or repositories. If the user is not added to the default group, they may not be able to login after their account is created until explicit permissions are configured.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "createUser", + "parameters": [ + { + "description": "The e-mail address for the new user.", + "in": "query", + "name": "emailAddress", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The password for the new user. Required if the notify parameter is not present or is set to false", + "in": "query", + "name": "password", + "schema": { "type": "string" } + }, + { + "description": "Set true to add the user to the default group, which can be used to grant them a set of initial permissions; otherwise, false to not add them to a group.", + "in": "query", + "name": "addToDefaultGroup", + "schema": { "type": "boolean", "default": true } + }, + { + "description": "The display name for the new user.", + "in": "query", + "name": "displayName", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The username for the new user.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "If present and not false instead of requiring a password, the create user will be notified via email their account has been created and requires a password to be reset. This option can only be used if a mail server has been configured.", + "in": "query", + "name": "notify", + "schema": { "type": "boolean" } + } + ], + "responses": { + "204": { "description": "The user was successfully created." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not an administrator." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Adding the user to the default group would exceed the server's license limit." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Another user with the same name already exists." + } + }, + "summary": "Create user", + "tags": ["Permission Management"] + }, + "put": { + "description": "Update a user's details. \n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "updateUserDetails", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UserUpdate" } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDetailedUser" } + } + }, + "description": "The updated user." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission or has a lower permission level than the user being updated." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + } + }, + "summary": "Update user details", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/users/add-group": { + "post": { + "deprecated": true, + "description": "Deprecated since 2.10. Use /rest/users/add-groups instead.\n\nAdd a user to a group. This is very similar to groups/add-user, but with the context and itemName attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in the application.\n\nIn the request entity, the context attribute is the user and the itemName is the group.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "addGroupToUser", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GroupPickerContext" } + } + } + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The user was added to the group" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or group does not exist." + } + }, + "summary": "Add user to group", + "tags": ["Deprecated", "Permission Management"] + } + }, + "/api/latest/admin/users/add-groups": { + "post": { + "description": "Add a user to one or more groups. \n\n The authenticated user must have the ADMIN permission to call this resource.", + "operationId": "addUserToGroups", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UserAndGroups" } + } + } + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The user was added to all the groups" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would exceed the server's licensing limit, or the groups permissions exceed the authenticated user's permission level." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or group does not exist." + } + }, + "summary": "Add user to groups", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/users/captcha": { + "delete": { + "description": "Clears any CAPTCHA challenge that may constrain the user with the supplied username when they authenticate. Additionally any counter or metric that contributed towards the user being issued the CAPTCHA challenge (for instance too many consecutive failed logins) will also be reset.\n\nThe authenticated user must have the ADMIN permission to call this resource, and may not clear the CAPTCHA of a user with greater permissions than themselves.", + "operationId": "clearUserCaptchaChallenge", + "parameters": [ + { + "description": "The username", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The CAPTCHA was successfully cleared." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as the authenticated user has a lower permission level than the user to clear captcha for." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + } + }, + "summary": "Clear CAPTCHA for user", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/users/credentials": { + "put": { + "description": "Update a user's password. \n\nThe authenticated user must have the ADMIN permission to call this resource, and may not update the password of a user with greater permissions than themselves.", + "operationId": "updateUserPassword", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/AdminPasswordUpdate" } + } + } + }, + "responses": { + "204": { + "description": "The user's password was successfully updated." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission or has a lower permission level than the user having their password updated." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + } + }, + "summary": "Set password for user", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/users/erasure": { + "get": { + "description": "Validate if a user can be erased.\n\nA username is only valid for erasure if it exists as the username of a deleted user. This endpoint will return an appropriate error response if the supplied username is invalid for erasure.\n\nThis endpoint does not perform the actual user erasure, and will not modify the application in any way.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "validateErasable", + "parameters": [ + { + "description": "The username of the user to validate erasability for.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "the user is erasable" }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed (e.g. if no username was supplied)." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission or has a lower permission level than the user being erased." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested username does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested username is the username of a not deleted user." + } + }, + "summary": "Check user removal", + "tags": ["Permission Management"] + }, + "post": { + "description": "Erases personally identifying user data for a deleted user.\n\nReferences in the application to the original username will be either removed or updated to a new non-identifying username. Refer to the support guide for details about what data is and isn't erased.\n\nUser erasure can only be performed on a deleted user. If the user has not been deleted first then this endpoint will return a bad request and no erasure will be performed.\n\nErasing user data is irreversible and may lead to a degraded user experience. This method should not be used as part of a standard user deletion and cleanup process.\n\nPlugins can participate in user erasure by defining a <user-erasure-handler> module. If one or more plugin modules fail, an error summary of the failing modules is returned.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "eraseUser", + "parameters": [ + { + "description": "The username identifying the user to erase.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestErasedUser" } + } + }, + "description": "The identifier of the erased user." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed (e.g. if no username was supplied)." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission or has a lower permission level than the user being erased." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested username does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested username is the username of a not deleted user." + } + }, + "summary": "Erase user information", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/users/more-members": { + "get": { + "description": "Retrieves a list of users that are not members of a specified group.

The authenticated user must have the LICENSED_USER permission to call this resource.", + "operationId": "findGroupsForUser", + "parameters": [ + { + "description": "If specified only users with usernames, display names or email addresses containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The group which should be used to locate members.", + "in": "query", + "name": "context", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDetailedUser" + } + } + } + } + } + }, + "description": "A page of users." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a licensed user." + } + }, + "summary": "Get groups for user", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/users/more-non-members": { + "get": { + "description": "Retrieves a list of groups the specified user is not a member of.

The authenticated user must have the LICENSED_USER permission to call this resource.", + "operationId": "findOtherGroupsForUser", + "parameters": [ + { + "description": "If specified only groups with names containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The user which should be used to locate groups.", + "in": "query", + "name": "context", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDetailedGroup" + } + } + } + } + } + }, + "description": "A page of groups." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a licensed user." + } + }, + "summary": "Find other groups for user", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/users/remove-group": { + "post": { + "description": "Remove a user from a group. This is very similar to groups/remove-user, but with the context and itemName attributes of the supplied request entity reversed. On the face of it this may appear redundant, but it facilitates a specific UI component in the application.\n\nIn the request entity, the context attribute is the user and the itemName is the group.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "removeGroupFromUser", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/GroupPickerContext" } + } + } + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The user was removed from the group." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as the group has a higher permission level than the context user." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user or group does not exist." + } + }, + "summary": "Remove user from group", + "tags": ["Permission Management"] + } + }, + "/api/latest/admin/users/rename": { + "post": { + "description": "Rename a user. \n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "renameUser", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UserRename" } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDetailedUser" } + } + }, + "description": "The renamed user." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user does not have the ADMIN permission or has a lower permission level than the user being renamed." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + } + }, + "summary": "Rename user", + "tags": ["Permission Management"] + } + }, + "/api/latest/application-properties": { + "get": { + "description": "Retrieve version information and other application properties.\n\nNo authentication is required to call this resource.", + "operationId": "getApplicationProperties", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestApplicationProperties" + } + } + }, + "description": "The application properties" + } + }, + "summary": "Get application properties", + "tags": ["System Maintenance"] + } + }, + "/api/latest/build/capabilities": { + "get": { + "description": "Returns the build capabilities of this instance", + "operationId": "getCapabilities", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestBuildCapabilities" + } + } + }, + "description": "capabilities" + } + }, + "summary": "Get build capabilities", + "tags": ["Capabilities"] + } + }, + "/api/latest/dashboard/pull-request-suggestions": { + "get": { + "description": "Retrieves a page of suggestions for pull requests that the currently authenticated user may wish to raise. Such suggestions are based on ref changes occurring and so contain the ref change that prompted the suggestion plus the time the change event occurred. Changes will be returned in descending order based on the time the change that prompted the suggestion occurred. \n\nNote that although the response is a page object, the interface does not support paging, however a limit can be applied to the size of the returned page.", + "operationId": "getPullRequestSuggestions", + "parameters": [ + { + "description": "restrict pull request suggestions to be based on events that occurred since some timein the past. This is expressed in seconds since \"now\". So to return suggestionsbased only on activity within the past 48 hours, pass a value of 172800.", + "in": "query", + "name": "changesSince", + "schema": { "type": "string" } + }, + { + "description": "restricts the result set to return at most this many suggestions.", + "in": "query", + "name": "limit", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestSuggestion" + } + } + } + } + } + }, + "description": "A page of pull requests that match the search criteria." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The current user is not authenticated" + } + }, + "summary": "Get pull request suggestions", + "tags": ["Dashboard"] + } + }, + "/api/latest/dashboard/pull-requests": { + "get": { + "description": "Retrieve a page of pull requests where a user is involved as either a reviewer, author or a participant. The request may be filtered by pull request state, role or participant status.", + "operationId": "getPullRequests_1", + "parameters": [ + { + "description": "(optional, defaults to returning pull requests regardless of closed since date). Permits returning only pull requests with a closed timestamp set more recently that (now - closedSince). Units are in seconds. So for example if closed since 86400 is set only pull requests closed in the previous 24 hours will be returned.", + "in": "query", + "name": "closedSince", + "schema": { "type": "string" } + }, + { + "description": "(optional, defaults to returning pull requests for any role). If a role is supplied only pull requests where the authenticated user is a participant in the given role will be returned. Either REVIEWER, AUTHOR or PARTICIPANT.", + "in": "query", + "name": "role", + "schema": { "type": "string" } + }, + { + "description": "(optional, defaults to returning pull requests with any participant status). A comma separated list of participant status. That is, one or more of UNAPPROVED, NEEDS_WORK, or APPROVED.", + "in": "query", + "name": "participantStatus", + "schema": { "type": "string" } + }, + { + "description": "(optional, defaults to returning pull requests in any state). If a state is supplied only pull requests in the specified state will be returned. Either OPEN, DECLINED or MERGED. Omit this parameter to return pull request in any state.", + "in": "query", + "name": "state", + "schema": { "type": "string" } + }, + { + "description": "The name of the involved user, defaults to the current user.", + "in": "query", + "name": "user", + "schema": { "type": "string" } + }, + { + "description": "(optional, defaults to NEWEST) the order/(s) to return pull requests in; can choose from OLDEST (as in: \"oldest first\"), NEWEST, DRAFT_STATUS, PARTICIPANT_STATUS, and/or CLOSED_DATE. Where CLOSED_DATE is specified and the result set includes pull requests that are not in the closed state, these pull requests will appear first in the result set, followed by most recently closed pull requests.", + "in": "query", + "name": "order", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequest" + } + } + } + } + } + }, + "description": "A page of pull requests that match the search criteria." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The current user is not authenticated" + } + }, + "summary": "Get pull requests for a user", + "tags": ["Dashboard"] + } + }, + "/api/latest/deployment/capabilities": { + "get": { + "description": "Returns the Deployment capabilities of this instance", + "operationId": "getCapabilities_1", + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "capabilities" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "This instance of Bitbucket Data Center does not support deployments (for example, it has been disabled using the property 'plugin.deployment.capability.disabled')." + } + }, + "summary": "Get deployment capabilities", + "tags": ["Capabilities"] + } + }, + "/api/latest/groups": { + "get": { + "description": "Retrieve a page of group names.\n\nThe authenticated user must have LICENSED_USER permission or higher to call this resource.", + "operationId": "getGroups", + "parameters": [ + { "in": "query", "name": "filter", "schema": { "type": "string" } }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { "type": "array", "items": { "type": "string" } } + } + } + } + }, + "description": "A page of group names." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a project administrator." + } + }, + "summary": "Get group names", + "tags": ["Permission Management"] + } + }, + "/api/latest/hook-scripts": { + "post": { + "description": "Create a new hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.", + "operationId": "createHookScript", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/ExamplePostMultipartFormData" + } + } + }, + "description": "The multipart form data containing the hook script" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestHookScript" } + } + }, + "description": "The newly created hook script." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The hook script was not created due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions." + } + }, + "summary": "Create a new hook script", + "tags": ["System Maintenance"] + } + }, + "/api/latest/hook-scripts/{scriptId}": { + "delete": { + "description": "Deletes a registered hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.", + "operationId": "deleteHookScript", + "parameters": [ + { + "description": "The ID of the hook script to delete", + "in": "path", + "name": "scriptId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The hook script was deleted." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied hook script ID." + } + }, + "summary": "Delete a hook script.", + "tags": ["System Maintenance"] + }, + "get": { + "description": "Retrieves a hook script by ID.", + "operationId": "getHookScript", + "parameters": [ + { + "description": "The ID of the hook script to retrieve", + "in": "path", + "name": "scriptId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestHookScript" } + } + }, + "description": "The hook script." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The hook script ID supplied does not exist." + } + }, + "summary": "Get a hook script", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Updates a hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.", + "operationId": "updateHookScript", + "parameters": [ + { + "description": "The ID of the hook script", + "in": "path", + "name": "scriptId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ExamplePutMultipartFormData" + } + } + }, + "description": "The multipart form data containing the hook script" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestHookScript" } + } + }, + "description": "The updated hook script." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The hook script ID supplied does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "A hook script with the same name already exists." + }, + "422": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One or more fields to update must be specified: content, description and/or name." + } + }, + "summary": "Update a hook script", + "tags": ["System Maintenance"] + } + }, + "/api/latest/hook-scripts/{scriptId}/content": { + "get": { + "description": "Retrieves the hook script content.\n\nThis endpoint requires **SYS_ADMIN** permission.", + "operationId": "read", + "parameters": [ + { + "description": "The ID of the hook script", + "in": "path", + "name": "scriptId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The hook script content." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The hook script ID supplied does not exist." + } + }, + "summary": "Get hook script content", + "tags": ["System Maintenance"] + } + }, + "/api/latest/hooks/{hookKey}/avatar": { + "get": { + "description": "Retrieve the avatar for the project matching the supplied moduleKey.", + "operationId": "getAvatar", + "parameters": [ + { + "description": "The complete module key of the hook module.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional) Version used for HTTP caching only - any non-blank version will result in a large max-age Cache-Control header. Note that this does not affect the Last-Modified header.", + "in": "query", + "name": "version", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The avatar of the project matching the supplied moduleKey." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get project avatar", + "tags": ["Project"] + } + }, + "/api/latest/inbox/pull-requests": { + "get": { + "description": "Returns a page of pull requests in the user's inbox.", + "operationId": "getPullRequests_2", + "parameters": [ + { + "in": "query", + "name": "role", + "schema": { "type": "string", "default": "reviewer" } + }, + { + "in": "query", + "name": "limit", + "schema": { "type": "integer", "format": "int32", "default": 25 } + }, + { + "in": "query", + "name": "start", + "schema": { "type": "integer", "format": "int32", "default": 0 } + } + ], + "responses": { + "default": { + "content": { "application/json;charset=UTF-8": {} }, + "description": "default response" + } + }, + "summary": "Get pull requests in inbox" + } + }, + "/api/latest/inbox/pull-requests/count": { + "get": { + "description": "Returns the total number of pull requests in the user's inbox", + "operationId": "getPullRequestCount", + "responses": { + "default": { + "content": { "application/json;charset=UTF-8": {} }, + "description": "default response" + } + }, + "summary": "Get total number of pull requests in inbox" + } + }, + "/api/latest/labels": { + "get": { + "description": "Returns a paged response of all the labels in the system.\n\nThe user needs to be authenticated to use this resource.", + "operationId": "getLabels", + "parameters": [ + { + "description": "(optional) prefix to filter the labels on.", + "in": "query", + "name": "prefix", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestLabel" } + } + } + } + } + }, + "description": "Page of returned labels." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user is currently not authenticated." + } + }, + "summary": "Get all labels", + "tags": ["System Maintenance"] + } + }, + "/api/latest/labels/{labelName}": { + "get": { + "description": "Returns a label.\n\nThe user needs to be authenticated to use this resource.", + "operationId": "getLabel", + "parameters": [ + { + "description": "the label name", + "in": "path", + "name": "labelName", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestLabel" } + } + }, + "description": "The label." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user is currently not authenticated." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified label does not exist." + } + }, + "summary": "Get label", + "tags": ["System Maintenance"] + } + }, + "/api/latest/labels/{labelName}/labeled": { + "get": { + "description": "Returns a page of labelables for a given label.\n\nOnly labelables that the authenticated user has view access to will be returned.", + "operationId": "getLabelables", + "parameters": [ + { + "description": " the type of labelables to be returned. Supported values: REPOSITORY", + "in": "query", + "name": "type", + "schema": { "type": "string" } + }, + { + "description": "The page of labelables.", + "in": "path", + "name": "labelName", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestLabelable" } + } + } + } + } + }, + "description": "The page of labelables." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The type of labelable is incorrect, correct values are REPOSITORY." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the labelables" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified label does not exist." + } + }, + "summary": "Get labelables for label", + "tags": ["System Maintenance"] + } + }, + "/api/latest/logs/logger/{loggerName}": { + "get": { + "description": "Retrieve the current log level for a given logger.\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "getLevel", + "parameters": [ + { + "description": "The name of the logger.", + "in": "path", + "name": "loggerName", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestLogLevel" } + } + }, + "description": "The log level of the logger." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the log level." + } + }, + "summary": "Get current log level", + "tags": ["System Maintenance"] + } + }, + "/api/latest/logs/logger/{loggerName}/{levelName}": { + "put": { + "description": "Set the current log level for a given logger.\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "setLevel", + "parameters": [ + { + "description": "The level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR", + "in": "path", + "name": "levelName", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The name of the logger.", + "in": "path", + "name": "loggerName", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The log level was successfully changed." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The log level was invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to set the log level." + } + }, + "summary": "Set log level", + "tags": ["System Maintenance"] + } + }, + "/api/latest/logs/rootLogger": { + "get": { + "description": " Retrieve the current log level for the root logger.\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "getRootLevel", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestLogLevel" } + } + }, + "description": "The log level of the logger." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the log level." + } + }, + "summary": "Get root log level", + "tags": ["System Maintenance"] + } + }, + "/api/latest/logs/rootLogger/{levelName}": { + "put": { + "description": "Set the current log level for the root logger.\n\nThe authenticated user must have ADMIN permission or higher to call this resource.", + "operationId": "setRootLevel", + "parameters": [ + { + "description": "the level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR", + "in": "path", + "name": "levelName", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The log level was successfully changed." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The log level was invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to set the log level." + } + }, + "summary": "Set root log level", + "tags": ["System Maintenance"] + } + }, + "/api/latest/markup/preview": { + "post": { + "description": "Preview generated HTML for the given markdown content.\n\nOnly authenticated users may call this resource.", + "operationId": "preview", + "parameters": [ + { + "description": "(Optional) true if HTML should be escaped in the input markup, false otherwise.", + "in": "query", + "name": "htmlEscape", + "schema": { "type": "string" } + }, + { + "description": "(Optional) The mode to use when building URLs. One of: ABSOLUTE, RELATIVE or, CONFIGURED. By default this is RELATIVE.", + "in": "query", + "name": "urlMode", + "schema": { "type": "string" } + }, + { + "description": "(Optional) true if headers should contain an ID based on the heading content.", + "in": "query", + "name": "includeHeadingId", + "schema": { "type": "string" } + }, + { + "description": "(Optional) Whether the markup implementation should convert newlines to breaks. By default this is false which reflects the standard markdown specification.", + "in": "query", + "name": "hardwrap", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { "type": "string", "example": "# Hello World!" } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestMarkup" } + } + }, + "description": "The rendered markdown." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The markdown was invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions preview rendered markdown." + } + }, + "summary": "Preview markdown render", + "tags": ["Markup"] + } + }, + "/api/latest/migration/exports": { + "post": { + "description": "Starts a background job that exports the selected repositories.\n\nOnly 2 concurrent exports are supported _per cluster node_. If a request ends up on a node that is already running that many export jobs, the request will be rejected and an error returned.\n\nThe response includes a description of the job that has been started, and its ID can be used to query these details again, including the current progress, warnings and errors that occurred while processing the job, and to interrupt and cancel the execution of this job.\n\nThe request to start an export is similar to the one for previewing an export. Additionally, it accepts an optional parameter, `exportLocation`, which can be used to specify a _relative_ path within `data/migration/export` in the shared home directory. No locations outside of that directory will be accepted for exports.\n\nThere are essentially three ways to select repositories for export. Regardless of which you use, a few general rules apply:\n\n- You can supply a list of selectors. The selection will be additive.\n- Repositories that are selected more than once due to overlapping selectors will be de-duplicated and effectively exported only once.\n- For every selected repository, its full fork hierarchy will be considered selected, even if parts of that hierarchy would otherwise not be matched by the provided selectors. For example, when you explicitly select a single repository only, but that repository is a fork, then its origin will be exported (and eventually imported), too.\n\nNow, a single repository can be selected like this:\n\n```\n\n\n\n{\n \"projectKey\": \"PRJ\",\n \"slug\": \"my-repo\"\n}\n\n```\n\nSecond, all repositories in a specific project can be selected like this:\n\n```\n\n\n\n{\n \"projectKey\": \"PRJ\",\n \"slug\": *\"\n}\n\n```\n\nAnd third, all projects and repositories in the system would be selected like this:\n\n```\n\n\n\n{\n \"projectKey\": \"*\",\n \"slug\": *\"\n}\n\n```\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", + "operationId": "startExport", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestExportRequest" } + } + }, + "description": "The request" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestJob" } + } + }, + "description": "Details about the export job." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to start anexport" + }, + "503": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The export could not be started because the limit of concurrent migration jobs has been reached." + } + }, + "summary": "Start export job", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/exports/preview": { + "post": { + "description": "Enumerates the projects and repositories that would be exported for a given export request.\n\nAll affected repositories will be enumerated explicitly, and while projects are listed as individual items in responses from this endpoint, their presence does not imply that all their repositories are included.\n\nWhile this endpoint can be used to verify that all selectors in the request apply as intended, it should be noted that a subsequent, actual export might contain a different set of repositories, as they might have been added or deleted in the meantime.\n\nNote that the overall response from this endpoint can become very large when a lot of repositories end up in the selection. This is why the server is streaming the response while it is being generated (as opposed to creating it in memory and then sending it all at once) and it can be consumed in a streaming way, too.\n\nAlso, due to the potential size of the response, projects and repositories are listed with fewer details than in other REST responses.\n\nFor a more detailed description of selectors, see the endpoint documentation for starting an export.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", + "operationId": "previewExport", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestExportRequest" } + } + }, + "description": "the export request" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestScopesExample" } + } + }, + "description": "The effectively selected projects and repositories." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to generate a preview." + } + }, + "summary": "Preview export", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/exports/{jobId}": { + "get": { + "description": "Gets the details, including the current status and progress, of the export job identified by the given ID.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", + "operationId": "getExportJob", + "parameters": [ + { + "description": "the ID of the job", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestJob" } + } + }, + "description": "The job, including status and progress information." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve information about this job." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job does not exist." + } + }, + "summary": "Get export job details", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/exports/{jobId}/cancel": { + "post": { + "description": "Requests the cancellation of an export job.\n\nThe request to cancel a job will be processed successfully if the job is actually still running. If it has already finished (successfully or with errors) or if it has already been canceled before, then an error will be returned.\n\nThere might be a small delay between accepting the request and actually cancelling the job. In most cases, the delay will be close to instantaneously. In the unlikely case of communication issues across a cluster, it can however take a few seconds to cancel a job.\n\nA client should always actively query the job status to confirm that a job has been successfully canceled.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", + "operationId": "cancelExportJob", + "parameters": [ + { + "description": "the ID of the job to cancel", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The job has successfully been marked for cancellation" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to cancel this job." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The job was in a state that does not allow cancellation, e.g. it has already finished." + } + }, + "summary": "Cancel export job", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/exports/{jobId}/messages": { + "get": { + "description": "Gets the messages generated by the job.\n\nWithout any filter, all messages will be returned, but the response can optionally be filtered for the following severities. The severity parameter can be repeated to include multiple severities in one response.\n\n- INFO\n- WARN\n- ERROR\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", + "operationId": "getExportJobMessages", + "parameters": [ + { + "description": "The severity to include in the results", + "in": "query", + "name": "severity", + "schema": { "type": "string" } + }, + { + "description": "The ID of the job", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The subject", + "in": "query", + "name": "subject", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestJobMessage" } + } + } + } + } + }, + "description": "The messages generated by this job." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve information about this job." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job does not exist." + } + }, + "summary": "Get job messages", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/imports": { + "post": { + "description": "Starts a background job that imports the specified archive.\n\nOnly 1 import at a time is supported _per cluster_. If another request is made while an import is already running, the request will be rejected and an error returned.\n\nThe path in the request must point to a valid archive file. The file must be located within the `data/migration/import` directory in the shared home directory.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", + "operationId": "startImport", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestImportRequest" } + } + }, + "description": "The request" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestJob" } + } + }, + "description": "Details about the export job." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to start an import." + }, + "503": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The import could not be started because the limit of concurrent migration jobs has been reached." + } + }, + "summary": "Start import job", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/imports/{jobId}": { + "get": { + "description": "Gets the details, including the current status and progress, of the import job identified by the given ID.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", + "operationId": "getImportJob", + "parameters": [ + { + "description": "The ID of the job", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestJob" } + } + }, + "description": "The job, including status and progress information." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve information about this job." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job does not exist." + } + }, + "summary": "Get import job status", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/imports/{jobId}/cancel": { + "post": { + "description": "Requests the cancellation of an import job.\n\nThe request to cancel a job will be processed successfully if the job is actually still running. If it has already finished (successfully or with errors) or if it has already been canceled before, then an error will be returned.\n\nNote that import jobs are not canceled as instantaneously as export jobs. Rather, once the request has been accepted, there are a number of checkpoints at which the job will actually apply it and stop. This is to keep the system in a reasonably consistent state:\n\n- After the current fork hierarchy has been imported and verified.\n- Before the next repository is imported.\n- Before the next pull request is imported.\n\nA client should always actively query the job status to confirm that a job has been successfully canceled.\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", + "operationId": "cancelImportJob", + "parameters": [ + { + "description": "the ID of the job to cancel", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The job has successfully been marked for cancellation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to cancel this job." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The job was in a state that does not allow cancellation, e.g. it has already finished." + } + }, + "summary": "Cancel import job", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/imports/{jobId}/messages": { + "get": { + "description": "Gets the messages generated by the job.\n\nWithout any filter, all messages will be returned, but the response can optionally be filtered for the following severities. The severity parameter can be repeated to include multiple severities in one response.\n\n- INFO\n- WARN\n- ERROR\n\nThe authenticated user must have **ADMIN** permission or higher to call this resource.", + "operationId": "getImportJobMessages", + "parameters": [ + { + "description": "The severity to include in the results", + "in": "query", + "name": "severity", + "schema": { "type": "string" } + }, + { + "description": "The ID of the job", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The subject", + "in": "query", + "name": "subject", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestJobMessage" } + } + } + } + } + }, + "description": "The messages generated by this job." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve information about this job." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job does not exist." + } + }, + "summary": "Get import job messages", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/mesh": { + "post": { + "description": "Starts a background job that migrates selected projects/repositories to Mesh. \n\nOnly 1 job is supported _per cluster_.\n\nThe response includes a description of the job that has been started, and its ID can be used to query these details again, including the current progress, and to interrupt and cancel the execution of this job. \n\nThe request to start a migration is similar to the one for previewing a migration. \n\nThere are essentially three ways to select repositories for migration. Regardless of which you use, a few general rules apply: \n\n - You can supply a list of repository IDs and project IDs. The selection will be additive. All repositories in the system are migrated if both lists are empty. - Repositories that are selected more than once due to overlapping IDs will be de-duplicated and effectively migrated only once. - For every selected repository, its full fork hierarchy will be considered selected, even if parts of that hierarchy would otherwise not be matched by the provided IDs. For example, when you explicitly select a single repository only, but that repository is a fork, then its origin will be migrated too. \n\nNow, a single repository can be selected like this: \n\n```\n\n {\n \"repositoryIds\": [1]\n }\n```\n\nMultiple repositories can be selected like this:\n\n\n\n```\n\n {\n \"repositoryIds\": [1, 2]\n }\n```\n\nSecond, all repositories in a specific project can be selected like this:\n\n\n\n```\n\n {\n \"projectIds\": [1]\n }\n```\n\nAnd third, all projects and repositories in the system would be selected like this:\n\n\n\n```\n\n {\n \"projectIds\": [],\n \"repositoryIds\": []\n }\n```\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", + "operationId": "startMeshMigration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "all": { "type": "boolean" }, + "maxBytesPerSecond": { + "type": "object", + "properties": { + "asLong": { "type": "integer", "format": "int64" }, + "present": { "type": "boolean" } + } + }, + "projectIds": { + "type": "array", + "items": { "type": "integer", "format": "int32" }, + "uniqueItems": true + }, + "repositoryIds": { + "type": "array", + "items": { "type": "integer", "format": "int32" }, + "uniqueItems": true + } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestJob" } + } + }, + "description": "The started job" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The migration request failed one/more validation checks." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + }, + "503": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "A migration job is already in progress" + } + }, + "summary": "Start Mesh migration job", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/mesh/preview": { + "post": { + "description": "Enumerates the projects and repositories that would be migrated for a given request.\n\nAll affected repositories will be enumerated explicitly, and while projects are listed as individual items in responses from this endpoint, their presence does not imply that all their repositories are included.\n\nWhile this endpoint can be used to verify that all selectors in the request apply as intended, it should be noted that a subsequent, actual export might contain a different set of repositories, as they might have been added or deleted in the meantime.\n\nNote that the overall response from this endpoint can become very large when a lot of repositories end up in the selection. This is why the server is streaming the response while it is being generated (as opposed to creating it in memory and then sending it all at once) and it can be consumed in a streaming way, too.\n\nAlso, due to the potential size of the response, projects and repositories are listed with fewer details than in other REST responses.\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", + "operationId": "previewMeshMigration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMeshMigrationRequest" + } + } + }, + "description": "The export request" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExamplePreviewMigration" + } + } + }, + "description": "Enumeration of projects and repositories that would be migrated for a given request." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was invalid or missing." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + } + }, + "summary": "Preview Mesh migration", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/mesh/repos": { + "get": { + "description": "Searches for repositories in the system matching the specified criteria and enriches their MeshMigrationQueueState migration state if a migration is currently in progress. \n\nThe currently active migration can optionally be specified by passing a migrationId, if known. If this isn't passed, an attempt is made to locate the active migration and its ID is used. \n\nIf a migration is currently active, only repositories that are a part of the migration are filtered and returned. Otherwise, all repositories in the systems are filtered and returned. \n\nFiltering by state is ignored when no migration is currently in progress. In such a case, results are not enriched with their MeshMigrationQueueState migration state. \n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", + "operationId": "searchMeshMigrationRepos", + "parameters": [ + { + "description": "(optional) The currently active migration job. If not passed, this is looked up internally.", + "in": "query", + "name": "migrationId", + "schema": { "type": "string" } + }, + { + "description": "(optional) The project key. Can be specified more than once to filter by more than one project.", + "in": "query", + "name": "projectKey", + "schema": { "type": "string" } + }, + { + "description": "(optional) The repository name", + "in": "query", + "name": "name", + "schema": { "type": "string" } + }, + { + "description": "(optional) If a migration is active, the MeshMigrationQueueState state to filter results by. Can be specified more than once to filter by more than one state.", + "in": "query", + "name": "state", + "schema": { "type": "string" } + }, + { + "description": "(optional) Whether the repository has been fully migrated to Mesh. If not present, all repositories are considered regardless of where they're located.", + "in": "query", + "name": "remote", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestMigrationRepository" + } + } + } + } + } + }, + "description": "A page of repositories matching the specified criteria." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No migration job with the given ID exists." + } + }, + "summary": "Find repositories by Mesh migration state", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/mesh/summaries": { + "get": { + "description": "Retrieve a page of Mesh migration job summaries. Jobs are ordered by when they were started, newest first. \n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", + "operationId": "getAllMeshMigrationSummaries", + "parameters": [ + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestMeshMigrationSummary" + } + } + } + } + } + }, + "description": "The summary of the migration job." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + } + }, + "summary": "Get all Mesh migration job summaries", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/mesh/summary": { + "get": { + "description": "Gets the summary, including the queue status and progress, of the currently active Mesh migration job.\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", + "operationId": "getActiveMeshMigrationSummary", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMeshMigrationSummary" + } + } + }, + "description": "The summary of the currently active migration job." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No active migration job found." + } + }, + "summary": "Get summary for Mesh migration job", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/mesh/{jobId}": { + "get": { + "description": "Gets the details, including the current status and progress, of the job identified by the given ID.\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", + "operationId": "getMeshMigrationJob", + "parameters": [ + { + "description": "The ID of the job", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The details of the migration job." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The job ID parameter was not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job ID does not exist." + } + }, + "summary": "Get Mesh migration job details", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/mesh/{jobId}/cancel": { + "post": { + "description": "Requests the cancellation of a migration job. \n\nThe request to cancel a job will be processed successfully if the job is actually still running. If it has already finished (successfully or with errors) or if it has already been canceled before, then an error will be returned. \n\nThere might be a small delay between accepting the request and actually cancelling the job. In most cases, the delay will be close to instantaneously. In the unlikely case of communication issues across a cluster, it can however take a few seconds to cancel a job.\n\nA client should always actively query the job status to confirm that a job has been successfully canceled.\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", + "operationId": "cancelMeshMigrationJob", + "parameters": [ + { + "description": "The ID of the job to cancel", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The migration job was successfully marked for cancellation." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job ID does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The migration job has already been canceled or finished." + } + }, + "summary": "Cancel Mesh migration job", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/mesh/{jobId}/messages": { + "get": { + "description": "Gets the messages generated by the job. \n\nWithout any filter, all messages will be returned, but the response can optionally be filtered for the following severities. The severity parameter can be repeated to include multiple severities in one response. \n\n - INFO\n - WARN\n - ERROR\n\n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", + "operationId": "getMeshMigrationJobMessages", + "parameters": [ + { + "description": "The severity to include in the results", + "in": "query", + "name": "severity", + "schema": { "type": "string" } + }, + { + "description": "The ID of the job", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The subject", + "in": "query", + "name": "subject", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestJobMessage" } + } + } + } + } + }, + "description": "The details of the migration job." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The job ID parameter was not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job ID does not exist." + } + }, + "summary": "Get Mesh migration job messages", + "tags": ["System Maintenance"] + } + }, + "/api/latest/migration/mesh/{jobId}/summary": { + "get": { + "description": "Gets the summary, including the queue status and progress, of a Mesh migration job. \n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.", + "operationId": "getMeshMigrationJobSummary", + "parameters": [ + { + "description": "The ID of the job", + "in": "path", + "name": "jobId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestMeshMigrationSummary" + } + } + }, + "description": "The summary of the migration job." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The job ID parameter was not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to call this resource." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified job ID does not exist." + } + }, + "summary": "Get Mesh migration job summary", + "tags": ["System Maintenance"] + } + }, + "/api/latest/profile/recent/repos": { + "get": { + "description": "Retrieve a page of recently accessed repositories for the currently authenticated user. \n\nRepositories are ordered from most recently to least recently accessed.

Only authenticated users may call this resource.", + "operationId": "getRepositoriesRecentlyAccessed", + "parameters": [ + { + "description": "(optional) If specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default REPO_READ permission level will be assumed.", + "in": "query", + "name": "permission", + "schema": { "type": "string", "default": "REPO_READ" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepository" } + } + } + } + } + }, + "description": "A page of recently accessed repositories." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The permission level is unknown or not related to repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request is unauthenticated." + } + }, + "summary": "Get recently accessed repositories", + "tags": ["Repository"] + } + }, + "/api/latest/projects": { + "get": { + "description": "Retrieve a page of projects. \n\nOnly projects for which the authenticated user has the PROJECT_VIEW permission will be returned.", + "operationId": "getProjects", + "parameters": [ + { + "description": "Name to filter by.", + "in": "query", + "name": "name", + "schema": { "type": "string" } + }, + { + "description": "Permission to filter by", + "in": "query", + "name": "permission", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestProject" } + } + } + } + } + }, + "description": "A page of projects." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The permission level is unknown or not related to projects." + } + }, + "summary": "Get projects", + "tags": ["Project"] + }, + "post": { + "description": "Create a new project. \n\nTo include a custom avatar for the project, the project definition should contain an additional attribute with the key avatar and the value a data URI containing Base64-encoded image data. The URI should be in the following format:

    data:(content type, e.g. image/png);base64,(data) 
If the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid, project creation will fail. \n\nThe authenticated user must have PROJECT_CREATE permission to call this resource.", + "operationId": "createProject", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestProject" } + } + }, + "description": "The project." + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestProject" } + } + }, + "description": "The newly created project." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the project." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a project." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project key or name is already in use." + } + }, + "summary": "Create a new project", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}": { + "delete": { + "description": "Delete the project matching the supplied projectKey. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "deleteProject", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The project matching the supplied projectKey was deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project can not be deleted as it contains repositories." + } + }, + "summary": "Delete project", + "tags": ["Project"] + }, + "get": { + "description": "Retrieve the project matching the supplied projectKey. \n\nThe authenticated user must have PROJECT_VIEW permission for the specified project to call this resource.", + "operationId": "getProject", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestProject" } + } + }, + "description": "The project matching the supplied projectKey." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get a project", + "tags": ["Project"] + }, + "put": { + "description": "Update the project matching the projectKey supplied in the resource path. \n\nTo include a custom avatar for the updated project, the project definition should contain an additional attribute with the key avatar and the value a data URI containing Base64-encoded image data. The URI should be in the following format: \n``` data:(content type, e.g. image/png);base64,(data)```\n\nIf the data is not Base64-encoded, or if a character set is defined in the URI, or the URI is otherwise invalid, project creation will fail. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "updateProject", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestProject" } + } + }, + "description": "Project parameters to update." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestProject" } + } + }, + "description": "The updated project. The project's key was not updated." + }, + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestProject" } + } + }, + "description": "The updated project. The project's key was updated." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project was not updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Update project", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/avatar.png": { + "get": { + "description": "Retrieve the avatar for the project matching the supplied projectKey. \n\nThe authenticated user must have PROJECT_VIEW permission for the specified project to call this resource.", + "operationId": "getProjectAvatar", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The desired size of the image. The server will return an image as close as possible to the specified size.", + "in": "query", + "name": "s", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The avatar of the project matching the supplied projectKey." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get avatar for project", + "tags": ["Project"] + }, + "post": { + "description": "Update the avatar for the project matching the supplied projectKey. \n\nThis resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'. \n\nThere are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded file size (1MB by default). Several different image formats are supported, but PNG and JPEG are preferred due to the file size limit. \n\nThis resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to pass the XSRF check the caller needs to send an X-Atlassian-Token HTTP header with the value no-check. \n\nAn example curl request to upload an image name 'avatar.png' would be: ```curl -X POST -u username:password -H \"X-Atlassian-Token: no-check\" http://example.com/rest/api/1.0/projects/STASH/avatar.png -F avatar=@avatar.png ```\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "uploadAvatar", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/ExampleAvatarMultipartFormData" + } + } + }, + "description": "The mutlipart form data containing the file." + }, + "responses": { + "201": { + "content": { "application/json": {} }, + "description": "The avatar was uploaded successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Update project avatar", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/hook-scripts": { + "get": { + "description": "Return a page of hook scripts configured for the specified project. \n\nThis endpoint requires **PROJECT_ADMIN** permission.", + "operationId": "getConfigurations", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestHookScriptConfig" + } + } + } + } + } + }, + "description": "A page of hook scripts." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get configured hook scripts", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/hook-scripts/{scriptId}": { + "delete": { + "description": "Removes the hook script from the set of hook scripts configured to run in all repositories under the project. \n\nThis endpoint requires **PROJECT_ADMIN** permission.", + "operationId": "removeConfiguration", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the hook script", + "in": "path", + "name": "scriptId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The hook script was successfully deleted." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project key or hook script ID supplied does not exist." + } + }, + "summary": "Remove a hook script", + "tags": ["Project"] + }, + "put": { + "description": "Creates/updates the hook script configuration for the provided hook script and project. \n\nThis endpoint requires **PROJECT_ADMIN** permission.", + "operationId": "setConfiguration", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the hook script", + "in": "path", + "name": "scriptId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestHookScriptTriggers" + } + } + }, + "description": "The hook triggers for which the hook script should be run" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestHookScriptConfig" + } + } + }, + "description": "The updated hook script." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The hook script was not created/updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project key supplied does not exist." + } + }, + "summary": "Create/update a hook script", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/permissions": { + "delete": { + "description": "Revoke all permissions for the specified project for the given groups and users.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.\n\nIn addition, a user may not revoke a group's permission if their own permission would be revoked as a result, nor may they revoke their own permission unless they have a global permission that already implies that permission.", + "operationId": "revokePermissions", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The names of the users", + "in": "query", + "name": "user", + "schema": { "type": "string" } + }, + { + "description": "The names of the groups", + "in": "query", + "name": "group", + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "All project permissions were revoked from the users and groups for the specified project." + }, + "400": { + "content": { "application/json": {} }, + "description": "No permissions were revoked because the request was invalid. No users or groups were provided." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator for the specifiedspecified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist, or one or more of the users or groups provided does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would revoke the currently authenticated user's permission on the project." + } + }, + "summary": "Revoke project permissions", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/permissions/groups": { + "delete": { + "description": " Revoke all permissions for the specified project for a group.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.\n\nIn addition, a user may not revoke a group's permissions if it will reduce their own permission level.", + "operationId": "revokePermissionsForGroup_1", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The name of the group", + "in": "query", + "name": "name", + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "All project permissions were revoked from the group for the specified project." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator for the specifiedspecified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": " The action was disallowed as it would reduce the currently authenticated user'spermission level." + } + }, + "summary": "Revoke group project permission", + "tags": ["Project"] + }, + "get": { + "description": "Retrieve a page of groups that have been granted at least one permission for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.", + "operationId": "getGroupsWithAnyPermission_1", + "parameters": [ + { + "description": "If specified only group names containing the supplied string will be returned", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPermittedGroup" + } + } + } + } + } + }, + "description": "A page of groups and their highest permissions for the specified project." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a project administrator for the specified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get groups with permission to project", + "tags": ["Project"] + }, + "put": { + "description": "Promote or demote a group's permission level for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. In addition, a user may not demote a group's permission level if theirown permission level would be reduced as a result.", + "operationId": "setPermissionForGroups_1", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The names of the groups", + "in": "query", + "name": "name", + "schema": { "type": "string" } + }, + { + "description": "The permission to grant.See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions)for a detailed explanation of what each permission entails. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n", + "in": "query", + "name": "permission", + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The requested permission was granted." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed or the specified permission does not exist." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator for the specifiedspecified project." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user'spermission level." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Update group project permission", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/permissions/groups/none": { + "get": { + "description": "Retrieve a page of groups that have no granted permissions for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher", + "operationId": "getGroupsWithoutAnyPermission_1", + "parameters": [ + { + "description": "If specified only group names containing the supplied string will be returned", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "202": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDetailedGroup" + } + } + } + } + } + }, + "description": "A page of groups that have not been granted any permissions for the specifiedproject." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a project administrator for thespecified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get groups without project permission", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/permissions/search": { + "get": { + "description": "Search direct and implied permissions of principals (users and groups). This endpoint returns a superset of the results returned by the /users and /groups endpoints because it allows filtering by global permissions too.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.", + "operationId": "searchPermissions", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Permissions to filter by. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions)for a detailed explanation of what each permission entails. This parameter can be specified multiple times to filter by more than one permission, and can contain global and project permissions.\n\n", + "in": "query", + "name": "permission", + "schema": { "type": "string" } + }, + { + "description": "Name of the user or group to filter the name of", + "in": "query", + "name": "filterText", + "schema": { "type": "string" } + }, + { + "description": "Type of entity (user or group)Valid entity types are:\n\n- USER- GROUP", + "in": "query", + "name": "type", + "schema": { "type": "string" } + } + ], + "responses": { + "default": { + "content": { "application/json;charset=UTF-8": {} }, + "description": "default response" + } + }, + "summary": "Search project permissions", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/permissions/users": { + "delete": { + "description": "Revoke all permissions for the specified project for a user.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.\n\nIn addition, a user may not revoke their own project permissions if they do not have a higher global permission.", + "operationId": "revokePermissionsForUser_1", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The name of the user", + "in": "query", + "name": "name", + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "All project permissions were revoked from the user for the specified project." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator for the specifiedspecified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": " The action was disallowed as it would reduce the currently authenticated user'spermission level." + } + }, + "summary": "Revoke user project permission", + "tags": ["Project"] + }, + "get": { + "description": "Retrieve a page of users that have been granted at least one permission for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.", + "operationId": "getUsersWithAnyPermission_1", + "parameters": [ + { + "description": "If specified only user names containing the supplied string will be returned", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPermittedUser" + } + } + } + } + } + }, + "description": "A page of users and their highest permissions for the specified project." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a project administrator for thespecified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get users with permission to project", + "tags": ["Project"] + }, + "put": { + "description": "Promote or demote a user's permission level for the specified project.\n\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a global permission that already implies that permission.", + "operationId": "setPermissionForUsers_1", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The names of the users", + "in": "query", + "name": "name", + "schema": { "type": "string" } + }, + { + "description": "The permission to grant.See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+project+permissions)for a detailed explanation of what each permission entails. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n", + "in": "query", + "name": "permission", + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The requested permission was granted." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed or the specified permission does not exist." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator for the specifiedspecified project." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user'spermission level." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Update user project permission", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/permissions/users/none": { + "get": { + "description": "Retrieve a page of licensed users that have no granted permissions for the specified project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.", + "operationId": "getUsersWithoutPermission", + "parameters": [ + { + "description": "If specified only user names containing the supplied string will be returned", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestApplicationUser" + } + } + } + } + } + }, + "description": "A page of users that have not been granted any permissions for the specified project" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a project administrator for thespecified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get users without project permission", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/permissions/{permission}/all": { + "get": { + "description": "Check whether the specified permission is the default permission (granted to all users) for a project.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher global permission to call this resource.", + "operationId": "hasAllUserPermission", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The permission to grant. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n", + "in": "path", + "name": "permission", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestPermitted" } + } + }, + "description": "A simple entity indicating whether the specified permission is the defaultpermission for this project." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed or the specified permission does not exist." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator for the specifiedspecified project." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user'spermission level." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Check default project permission", + "tags": ["Project"] + }, + "post": { + "description": "Grant or revoke a project permission to all users, i.e. set the default permission.\n\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project or a higher\nglobal permission to call this resource.", + "operationId": "modifyAllUserPermission", + "parameters": [ + { + "description": "true to grant the specified permission to all users, or false to revoke it", + "in": "query", + "name": "allow", + "schema": { "type": "string" } + }, + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The permission to grant. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n", + "in": "path", + "name": "permission", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The requested permission was successfully granted or revoked." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed or the specified permission does not exist." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator for the specified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Grant project permission", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/repos": { + "get": { + "description": "Retrieve repositories from the project corresponding to the supplied projectKey. \n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource.", + "operationId": "getRepositories", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepository" } + } + } + } + } + }, + "description": "The repositories matching the supplied projectKey." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to see the specified project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get repositories for project", + "tags": ["Project"] + }, + "post": { + "description": "Create a new repository. Requires an existing project in which this repository will be created. The only parameters which will be used are name and scmId. \n\nThe authenticated user must have REPO_CREATE permission or higher, for the context project to call this resource.", + "operationId": "createRepository", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "description": "The repository" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "description": "The newly created repository." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository was not created due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a repository." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "A repository with same name already exists." + } + }, + "summary": "Create repository", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}": { + "delete": { + "description": "Schedule the repository matching the supplied projectKey and repositorySlug to be deleted. \n\nThe authenticated user must have sufficient permissions specified by the repository delete policy to call this resource. The default permission required is REPO_ADMIN permission.", + "operationId": "deleteRepository", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "202": { + "content": { "application/json": {} }, + "description": "The repository has been scheduled for deletion." + }, + "204": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "No repository matching the supplied projectKey and repositorySlug was found." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the repository." + } + }, + "summary": "Delete repository", + "tags": ["Project"] + }, + "get": { + "description": "Retrieve the repository matching the supplied projectKey and repositorySlug. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getRepository", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "description": "The repository which matches the supplied projectKey and repositorySlug." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to see the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get repository", + "tags": ["Project"] + }, + "post": { + "description": "Create a new repository forked from an existing repository. \n\nThe JSON body for this POST is not required to contain any properties. Even the name may be omitted. The following properties will be used, if provided: \n\n- \"name\":\"Fork name\" - Specifies the forked repository's name \n - Defaults to the name of the origin repository if not specified\n- \"defaultBranch\":\"main\" - Specifies the forked repository's default branch\n - Defaults to the origin repository's default branch if not specified\n- \"project\":{\"key\":\"TARGET_KEY\"} - Specifies the forked repository's target project by key\n - Defaults to the current user's personal project if not specified\n\n\nThe authenticated user must have REPO_READ permission for the specified repository and PROJECT_ADMIN on the target project to call this resource. Note that users always have PROJECT_ADMIN permission on their personal projects.", + "operationId": "forkRepository", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "description": "The rest fork." + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "description": "The newly created fork." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "A validation error prevented the fork from being created. Possible validation errors include: The name or slug for the fork collides with another repository in the target project; an SCM type was specified in the JSON body; a project was specified in the JSON body without a \"key\" property." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a fork." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist, or, if a target project was specified, the target project does not exist." + } + }, + "summary": "Fork repository", + "tags": ["Project"] + }, + "put": { + "description": "Update the repository matching the repositorySlug supplied in the resource path. \n\nThe repository's slug is derived from its name. If the name changes the slug may also change. \n\nThis resource can be used to change the repository's default branch by specifying a new default branch in the request. For example: \"defaultBranch\":\"main\"\n\nThis resource can be used to move the repository to a different project by specifying a new project in the request. For example: \"project\":{\"key\":\"NEW_KEY\"}\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "updateRepository", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "description": "The updated repository." + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "description": "The updated repository." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository was not updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update a repository." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Cannot archive repository because it has open pull requests." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "A repository with the same name as the target already exists, or the repository is archived." + } + }, + "summary": "Update repository", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/archive": { + "get": { + "description": "Streams an archive of the repository's contents at the requested commit. If no `at=` commit is requested, an archive of the default branch is streamed.\n\nThe filename= query parameter may be used to specify the exact filename to include in the \"Content-Disposition\" header. If an explicit filename is not provided, one will be automatically generated based on what is being archived. Its format depends on the at= value: \n\n- No at= commit: <slug>-<default-branch-name>@<commit>.<format>; e.g. example-master@43c2f8a0fe8.zip\n- at=sha: <slug>-<at>.<format>; e.g. example-09bcbb00100cfbb5310fb6834a1d5ce6cac253e9.tar.gz\n- at=branchOrTag: <slug>-<branchOrTag>@<commit>.<format>; e.g. example-feature@bbb225f16e1.tar \n\n - If the branch or tag is qualified (e.g. refs/heads/master, the short name (master) will be included in the filename\n - If the branch or tag's short name includes slashes (e.g. release/4.6), they will be converted to hyphens in the filename (release-4.5)\n\n\n\n\nArchives may be requested in the following formats by adding the format= query parameter: \n\n- zip: A zip file using standard compression (Default)\n- tar: An uncompressed tarball\n- tar.gz or tgz: A GZip-compressed tarball\n\n\nThe contents of the archive may be filtered by using the path= query parameter to specify paths to include. path= may be specified multiple times to include multiple paths. \n\nThe prefix= query parameter may be used to define a directory (or multiple directories) where the archive's contents should be placed. If the prefix does not end with /, one will be added automatically. The prefix is always treated as a directory; it is not possible to use it to prepend characters to the entries in the archive. \n\nArchives of public repositories may be streamed by any authenticated or anonymous user. Streaming archives for non-public repositories requires an authenticated user with at least REPO_READ permission.", + "operationId": "getArchive", + "parameters": [ + { + "description": "Paths to include in the streamed archive; may be repeated to include multiple paths", + "in": "query", + "name": "path", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "A filename to include the \"Content-Disposition\" header", + "in": "query", + "name": "filename", + "schema": { "type": "string" } + }, + { + "description": "The commit to stream an archive of; if not supplied, an archive of the default branch is streamed", + "in": "query", + "name": "at", + "schema": { "type": "string" } + }, + { + "description": "A prefix to apply to all entries in the streamed archive; if the supplied prefix does not end with a trailing /, one will be added automatically", + "in": "query", + "name": "prefix", + "schema": { "type": "string" } + }, + { + "description": "The format to stream the archive in; must be one of: zip, tar, tar.gz or tgz", + "in": "query", + "name": "format", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "An archive or the requested commit, in zip, tar or gzipped-tar format." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested format is not supported." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist or does not contain the at commit." + } + }, + "summary": "Stream archive of repository", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/attachments/{attachmentId}": { + "delete": { + "description": "Delete an attachment.\n\nThe user must be authenticated and have REPO_ADMIN permission for the specified repository.", + "operationId": "deleteAttachment", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "the attachment ID", + "in": "path", + "name": "attachmentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "" }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the attachment" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The attachment does not exist" + } + }, + "summary": "Delete an attachment", + "tags": ["Repository"] + }, + "get": { + "description": "Retrieve the attachment.\n\nThe authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment.\n\nRange requests (see IETF RFC7233) are supported. However only a single range issupported. If multiple ranges are passed the ranges will be ignored and the entire content will be returned in the response.", + "operationId": "getAttachment", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "header", + "name": "User-Agent", + "schema": { "type": "string" } + }, + { + "description": "the attachment ID", + "in": "path", + "name": "attachmentId", + "required": true, + "schema": { "type": "string" } + }, + { "in": "header", "name": "Range", "schema": { "type": "string" } }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "the attachment" + }, + "206": { + "content": { "application/json": {} }, + "description": "the requested range of bytes from the attachment" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "the user is currently not authenticated" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The attachment does not exist" + } + }, + "summary": "Get an attachment", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/attachments/{attachmentId}/metadata": { + "delete": { + "description": "Delete attachment metadata.\n\nThe user must be authenticated and have REPO_ADMIN permission for the specified repository.", + "operationId": "deleteAttachmentMetadata", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "the attachment ID", + "in": "path", + "name": "attachmentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "" }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete theattachment metadata" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The attachment or the attachment metadata does not exist" + } + }, + "summary": "Delete attachment metadata", + "tags": ["Repository"] + }, + "get": { + "description": "Retrieve the attachment metadata.\n\nThe authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment that has the attachment metadata.", + "operationId": "getAttachmentMetadata", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "the attachment ID", + "in": "path", + "name": "attachmentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAttachmentMetadata" + } + } + }, + "description": "The attachment metadata" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the attachment metadata" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The attachment or the attachment metadata does not exist" + } + }, + "summary": "Get attachment metadata", + "tags": ["Repository"] + }, + "put": { + "description": "Save attachment metadata.\n\nThe authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment that has the attachment metadata.", + "operationId": "saveAttachmentMetadata", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "the attachment ID", + "in": "path", + "name": "attachmentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "any valid JSON content" + } + } + }, + "description": "The attachment metadata can be any valid JSON content" + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The attachment metadata" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The supplied content is not valid JSON" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to save theattachment metadata" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository or the attachment does not exist" + } + }, + "summary": "Save attachment metadata", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches": { + "get": { + "description": "Retrieve the branches matching the supplied filterText param. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getBranches", + "parameters": [ + { + "description": "Controls whether exact and prefix matches will be boosted to the top", + "in": "query", + "name": "boostMatches", + "schema": { "type": "boolean" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { "in": "query", "name": "context", "schema": { "type": "string" } }, + { + "description": "Ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated)", + "in": "query", + "name": "orderBy", + "schema": { + "type": "string", + "enum": ["ALPHABETICAL", "MODIFICATION"] + } + }, + { + "description": "Whether to retrieve plugin-provided metadata about each branch", + "in": "query", + "name": "details", + "schema": { "type": "boolean" } + }, + { + "description": "The text to match on", + "in": "query", + "name": "filterText", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Base branch or tag to compare each branch to (for the metadata providers that uses that information", + "in": "query", + "name": "base", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestBranch" } + } + } + } + } + }, + "description": "The branches matching the supplied filterText." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to read the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Find branches", + "tags": ["Repository"] + }, + "post": { + "description": "Creates a branch using the information provided in the RestCreateBranchRequest request \n\nThe authenticated user must have REPO_WRITE permission for the context repository to call this resource.", + "operationId": "createBranchForRepository", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestCreateBranchRequest" + } + } + }, + "description": "The request to create a branch containing a name, startPoint, and optionally a message" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestBranch" } + } + }, + "description": "The created branch." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to write to the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Create branch", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/default": { + "get": { + "deprecated": true, + "description": "Retrieves the repository's default branch, if it has been created. If the repository is empty, 204 No Content will be returned. For non-empty repositories, if the configured default branch has not yet been created a 404 Not Found will be returned. \n\nThis URL is deprecated. Callers should use GET /projects/{key}/repos/{slug}/default-branch instead, which allows retrieving the configured default branch even if the ref has not been created yet. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getDefaultBranch_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestBranch" } + } + }, + "description": "The configured default branch for the repository." + }, + "204": { + "description": "The repository is empty, and has no default branch." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to read the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist, or its configured default branch does not exist." + } + }, + "summary": "Get default branch", + "tags": ["Deprecated", "Repository"] + }, + "put": { + "deprecated": true, + "description": "Update the default branch of a repository. \n\nThis URL is deprecated. Callers should use PUT /projects/{key}/repos/{slug}/default-branch instead. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "setDefaultBranch_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestBranch" } + } + }, + "description": "The branch to set as default" + }, + "responses": { + "204": { "description": "The operation was successful." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Update default branch", + "tags": ["Deprecated", "Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/browse": { + "get": { + "description": "Retrieve a page of content for a file path at a specified revision. \n\nResponses from this endpoint vary widely depending on the query parameters. The example JSON is for a request that does not use size, type, blame or noContent. \n\n1. size will return a response like {\"size\":10000}\n2. type will return a response like {\"type\":\"FILE\"}, where possible values are \"DIRECTORY\", \"FILE\" and \"SUBMODULE\"\n3. blame without noContent will include blame for the lines of content returned on the page\n4. blame with noContent will omit file contents and only return blame for the requested lines\n5. noContent without blame is ignored and does nothing\n\n\nThe various parameters are \"processed\" in the above order. That means ?size=true&type=truewill return a size response, not a type one; the type parameter will be ignored. \n\nThe blame and noContent query parameters are handled differently from size and type. For blame and noContent, the presence of the parameter implies \"true\" if no value is specified; size and and type both require an explicit=true or they're treated as \"false\". \n\n- ?blame is the same as ?blame=true\n- ?blame&noContent is the same as ?blame=true&noContent=true\n- ?size is the same as ?size=false\n- ?type is the same as ?type=false\n\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getContent", + "parameters": [ + { + "description": "If blame&noContent only the blame is retrieved instead of the contents", + "in": "query", + "name": "noContent", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID or ref to retrieve the content for", + "in": "query", + "name": "at", + "schema": { "type": "string" } + }, + { + "description": "If true only the size will be returned for the file path instead of the contents", + "in": "query", + "name": "size", + "schema": { "type": "string" } + }, + { + "description": "If present and not equal to 'false', the blame will be returned for the file as well", + "in": "query", + "name": "blame", + "schema": { "type": "string" } + }, + { + "description": "If true only the type will be returned for the file path instead of the contents", + "in": "query", + "name": "type", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "A page of contents from a file." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The path parameter was not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist." + } + }, + "summary": "Get file content at revision", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/browse/{path}": { + "get": { + "description": "Retrieve a page of content for a file path at a specified revision. \n\nResponses from this endpoint vary widely depending on the query parameters. The example JSON is for a request that does not use size, type, blame or noContent. \n\n1. size will return a response like {\"size\":10000}\n2. type will return a response like {\"type\":\"FILE\"}, where possible values are \"DIRECTORY\", \"FILE\" and \"SUBMODULE\"\n3. blame without noContent will include blame for the lines of content returned on the page\n4. blame with noContent will omit file contents and only return blame for the requested lines\n5. noContent without blame is ignored and does nothing\n\n\nThe various parameters are \"processed\" in the above order. That means ?size=true&type=truewill return a size response, not a type one; the type parameter will be ignored. \n\nThe blame and noContent query parameters are handled differently from size and type. For blame and noContent, the presence of the parameter implies \"true\" if no value is specified; size and and type both require an explicit=true or they're treated as \"false\". \n\n- ?blame is the same as ?blame=true\n- ?blame&noContent is the same as ?blame=true&noContent=true\n- ?size is the same as ?size=false\n- ?type is the same as ?type=false\n\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getContent_1", + "parameters": [ + { + "description": "If blame&noContent only the blame is retrieved instead of the contents", + "in": "query", + "name": "noContent", + "schema": { "type": "string" } + }, + { + "description": "The file path to retrieve content from", + "in": "path", + "name": "path", + "required": true, + "schema": { "type": "string", "pattern": ".*" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID or ref to retrieve the content for", + "in": "query", + "name": "at", + "schema": { "type": "string" } + }, + { + "description": "If true only the size will be returned for the file path instead of the contents", + "in": "query", + "name": "size", + "schema": { "type": "string" } + }, + { + "description": "If present and not equal to 'false', the blame will be returned for the file as well", + "in": "query", + "name": "blame", + "schema": { "type": "string" } + }, + { + "description": "If true only the type will be returned for the file path instead of the contents", + "in": "query", + "name": "type", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "A page of contents from a file." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The path or until parameters were not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist." + } + }, + "summary": "Get file content", + "tags": ["Repository"] + }, + "put": { + "description": "Update the content of path, on the given repository and branch. \n\nThis resource accepts PUT multipart form data, containing the file in a form-field named content. \n\nAn example curl request to update 'README.md' would be:\n\n```curl -X PUT -u username:password -F content=@README.md -F 'message=Updated using file-edit REST API' -F branch=master -F sourceCommitId=5636641a50b http://example.com/rest/api/latest/projects/PROJECT_1/repos/repo_1/browse/README.md ```\n\n- branch: the branch on which the path should be modified or created\n- content: the full content of the file at path \n- message: the message associated with this change, to be used as the commit message. Or null if the default message should be used.\n- sourceCommitId: the commit ID of the file before it was edited, used to identify if content has changed. Or null if this is a new file\n\n\nThe file can be updated or created on a new branch. In this case, the sourceBranch parameter should be provided to identify the starting point for the new branch and the branch parameter identifies the branch to create the new commit on.", + "operationId": "editFile", + "parameters": [ + { + "description": "The path of the file that is to be modified or created", + "in": "path", + "name": "path", + "required": true, + "schema": { "type": "string", "pattern": ".*" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/ExampleMultipartFormData" + } + } + }, + "description": "The multipart form data containing the file" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestCommit" } + } + }, + "description": "The newly created commit." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "There are validation errors, e.g. The branch or content parameters were not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user does not have write permission for the given repository." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was authenticated using a project or repository access token, which does not have a valid user associated with it" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The file already exists when trying to create a file, or the given content does not modify the file, or the file has changed since the given sourceCommitId, or the repository is archived." + } + }, + "summary": "Edit file", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/changes": { + "get": { + "description": "Retrieve a page of changes made in a specified commit. \n\nNote: The implementation will apply a hard cap ({@code page.max.changes}) and it is not possible to request subsequent content when that cap is exceeded. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getChanges_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit to retrieve changes for", + "in": "query", + "name": "until", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit to which until should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists)", + "in": "query", + "name": "since", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestChange" } + } + } + } + } + }, + "description": "A page of changes" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The until parameter was not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository or the since or until parameters supplied does not exist." + } + }, + "summary": "Get changes made in commit", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits": { + "get": { + "description": "Retrieve a page of commits from a given starting commit or \"between\" two commits. If no explicit commit is specified, the tip of the repository's default branch is assumed. commits may be identified by branch or tag name or by ID. A path may be supplied to restrict the returned commits to only those which affect that path. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getCommits", + "parameters": [ + { + "description": "The desired scheme for the avatar URL. If the parameter is not present URLs will use the same scheme as this request", + "in": "query", + "name": "avatarScheme", + "schema": { "type": "string" } + }, + { + "description": "An optional path to filter commits by", + "in": "query", + "name": "path", + "schema": { "type": "string" } + }, + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Optionally include the total number of commits and total number of unique authors", + "in": "query", + "name": "withCounts", + "schema": { "type": "string" } + }, + { + "description": "If true, the commit history of the specified file will be followed past renames. Only valid for a path to a single file.", + "in": "query", + "name": "followRenames", + "schema": { "type": "string" } + }, + { + "description": "The commit ID (SHA1) or ref (inclusively) to retrieve commits before", + "in": "query", + "name": "until", + "schema": { "type": "string" } + }, + { + "description": "If present the service adds avatar URLs for commit authors. Should be an integer specifying the desired size in pixels. If the parameter is not present, avatar URLs will not be set", + "in": "query", + "name": "avatarSize", + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID or ref (exclusively) to retrieve commits after", + "in": "query", + "name": "since", + "schema": { "type": "string" } + }, + { + "description": "If present, controls how merge commits should be filtered. Can be either exclude, to exclude merge commits, include, to include both merge commits and non-merge commits or only, to only return merge commits.", + "in": "query", + "name": "merges", + "schema": { "type": "string" } + }, + { + "description": "true to ignore missing commits, false otherwise", + "in": "query", + "name": "ignoreMissing", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestCommit" } + } + } + } + } + }, + "description": "A page of commits" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the supplied commit IDs or refs was invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist." + } + }, + "summary": "Get commits", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}": { + "get": { + "description": "Retrieve a single commit identified by its ID. In general, that ID is a SHA1. From 2.11, ref names like \"refs/heads/master\" are no longer accepted by this resource.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getCommit", + "parameters": [ + { + "description": "An optional path to filter the commit by. If supplied the details returned may not be for the specified commit. Instead, starting from the specified commit, they will be the details for the first commit affecting the specified path.", + "in": "query", + "name": "path", + "schema": { "type": "string" } + }, + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit ID to retrieve", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestCommit" } + } + }, + "description": "A commit" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The supplied commit ID was invalid" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist." + } + }, + "summary": "Get commit by ID", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/builds": { + "delete": { + "description": "Delete a specific build status. \n\nThe authenticated user must have **REPO_ADMIN** permission for the provided repository.", + "operationId": "delete", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "the key of the build status", + "in": "query", + "name": "key", + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The build status associated with the provided commit and key has been deleted" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions this repository" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist" + } + }, + "summary": "Delete a specific build status", + "tags": ["Builds and Deployments"] + }, + "get": { + "description": "Get a specific build status.\n\n\nThe authenticated user must have **REPO_READ** permission for the provided repository.The request can also be made with anonymous 2-legged OAuth.
Since 7.14", + "operationId": "get", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "the key of the build status", + "in": "query", + "name": "key", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestBuildStatus" } + } + }, + "description": "The build status associated with the provided commit and key" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request has failed validation" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions this repository" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository, commit or build status does not exist" + } + }, + "summary": "Get a specific build status", + "tags": ["Builds and Deployments"] + }, + "post": { + "description": "Store a build status.\n\n\nThe authenticated user must have **REPO_READ** permission for the repository that this build status is for. The request can also be made with anonymous 2-legged OAuth.", + "operationId": "add", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit.", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestBuildStatusSetRequest" + } + } + }, + "description": "The contents of the build status request are:\nThese fields are **required**:\n\n\n- **key**: The string referring to this branch plan/job\n- **state**: The build status state, one of: \"SUCCESSFUL\", \"FAILED\", \"INPROGRESS\", \"CANCELLED\", \"UNKNOWN\"\n- **url**: URL referring to the build result page in the CI tool.\n\n\nThese fields are optional:\n\n\n- **buildNumber** (optional): A unique identifier for this particular run of a plan<\n- **dateAdded** (optional): milliseconds since epoch. If not provided current date is used.\n- **description** (optional): Describes the build result\n- **duration** (optional): Duration of a completed build in milliseconds.\n- **name** (optional): A short string that describes the build plan\n- **parent** (optional): The identifier for the plan or job that ran the branch plan that produced this build status.\n- **ref** (optional): The fully qualified git reference e.g. refs/heads/master.\n- **testResults** (optional): A summary of the passed, failed and skipped tests.\n" + }, + "responses": { + "204": { "description": "The build status was posted" }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The build status was not added as the request was invalid. This could be because of a number of things:\n\n\n- an invalid commit hash was provided\n- build key was blank or longer than 255 characters\n- invalid branch was provided\n- invalid state was provided\n- build status url was blank or longer than 450 characters\n\nThe specifics will be included in the error message." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to push a build status to this repository" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist" + } + }, + "summary": "Store a build status", + "tags": ["Builds and Deployments"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/changes": { + "get": { + "description": "Retrieve a page of changes made in a specified commit. \n\n Note: The implementation will apply a hard cap (page.max.changes) and it is not possible to request subsequent content when that cap is exceeded. \n\n The authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getChanges", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit to retrieve changes for", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "true to apply comment counts in the changes (the default); otherwise, false to stream changes without comment counts", + "in": "query", + "name": "withComments", + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The commit to which until should be compared to produce a page of changes. If not specified the commit's first parent is assumed (if one exists)", + "in": "query", + "name": "since", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestChange" } + } + } + } + } + }, + "description": "A page of changes" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The until parameter was not supplied" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository or the since or until parameters supplied does not exist." + } + }, + "summary": "Get changes in commit", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments": { + "get": { + "description": "Retrieves the commit discussion comments that match the specified search criteria.\n\nIt is possible to retrieve commit discussion comments that are anchored to a range of commits by providing the sinceId that the comments anchored from.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.", + "operationId": "getComments", + "parameters": [ + { + "description": "The path to the file on which comments were made", + "in": "query", + "name": "path", + "schema": { "type": "string" } + }, + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The full ID of the commit within the repository", + "in": "path", + "name": "commitId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "For a merge commit, a parent can be provided to specify which diff the comments are on. For a commit range, a sinceId can be provided to specify where the comments are anchored from.", + "in": "query", + "name": "since", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestComment" } + } + } + } + } + }, + "description": "A page of comments that match the search criteria" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the comment" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository, or commit. The missing entity will be specified in the error details." + } + }, + "summary": "Search for commit comments", + "tags": ["Repository"] + }, + "post": { + "description": "Add a new comment.\n\nComments can be added in a few places by setting different attributes:\n\nGeneral commit comment:\n\n```{\n \"text\": \"An insightful general comment on a commit.\"\n}\n\n
\nReply to a comment:\n
{\n      \"text\": \"A measured reply.\",\n      \"parent\": {\n          \"id\": 1\n      }\n}\n
\nGeneral file comment:\n
{\n      \"text\": \"An insightful general comment on a file.\",\n      \"anchor\": {\n          \"diffType\": \"COMMIT\",\n          \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\",\n          \"path\": \"path/to/file\",\n          \"srcPath\": \"path/to/file\",\n          \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\"\n      }\n}\n
\nFile line comment:\n
{\n      \"text\": \"A pithy comment on a particular line within a file.\",\n      \"anchor\": {\n          \"diffType\": \"COMMIT\",\n          \"line\": 1,\n          \"lineType\": \"CONTEXT\",\n          \"fileType\": \"FROM\",\n          \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\",\n          \"path\": \"path/to/file\",\n          \"srcPath\": \"path/to/file\",\n          \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\"\n      }\n}\n```\n\nNote: general file comments are an experimental feature and may change in the near future!\n\nFor file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on.\n\nFor line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be:- 'ADDED' - for an added line;- 'REMOVED' - for a removed line; or- 'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff.'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are:- 'FROM' - the source file of the diff- 'TO' - the destination file of the diffIf the current user is not a participant the user is added as one and updated to watch the commit.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.",
+				"operationId": "createComment",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The full ID of the commit within the repository",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "For a merge commit, a parent can be provided to specify which diff the comments should be on. For a commit range, a sinceId can be provided to specify where the comments should be anchored from.",
+						"in": "query",
+						"name": "since",
+						"schema": { "type": "string" }
+					}
+				],
+				"requestBody": {
+					"content": {
+						"application/json": {
+							"schema": { "$ref": "#/components/schemas/RestComment" }
+						}
+					},
+					"description": "the comment"
+				},
+				"responses": {
+					"201": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestComment" }
+							}
+						},
+						"description": "The newly created comment."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The comment was not created due to a validation error."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the commit, create a comment or watch the commit."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "Unable to find the supplied project, repository, commit or parent comment. The missing entity will be specified in the error details."
+					},
+					"409": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "Adding, deleting, or editing comments isn't supported on archived repositories."
+					}
+				},
+				"summary": "Add a new commit comment",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}": {
+			"delete": {
+				"description": "Delete a commit comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users. Comments which have replies may not be deleted, regardless of the user's granted permissions.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.",
+				"operationId": "deleteComment",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the comment",
+						"in": "path",
+						"name": "commentId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The full ID of the commit within the repository",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure.",
+						"in": "query",
+						"name": "version",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"204": { "description": "The operation was successful" },
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to delete the comment."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "Unable to find the supplied project, repository or commit. The missing entity will be specified in the error details."
+					},
+					"409": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The comment has replies, the version supplied does not match the comment's current version or the repository is archived."
+					}
+				},
+				"summary": "Delete a commit comment",
+				"tags": ["Repository"]
+			},
+			"get": {
+				"description": "Retrieves a commit discussion comment.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.",
+				"operationId": "getComment",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The ID of the comment to retrieve",
+						"in": "path",
+						"name": "commentId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The full ID of the commit within the repository",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestComment" }
+							}
+						},
+						"description": "The requested comment."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the comment"
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "Unable to find the supplied project, repository, commit or comment. The missing entity will be specified in the error details."
+					}
+				},
+				"summary": "Get a commit comment",
+				"tags": ["Repository"]
+			},
+			"put": {
+				"description": "Update a comment, with the following restrictions:\n\n- only the author of the comment may update the text of the comment\n- only the author of the comment or repository admins and above may update the other   fields of a comment\n\n\nNote: the supplied supplied JSON object must contain a version that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.",
+				"operationId": "updateComment",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The ID of the comment to retrieve",
+						"in": "path",
+						"name": "commentId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The full ID of the commit within the repository",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"requestBody": {
+					"content": {
+						"application/json": {
+							"schema": { "$ref": "#/components/schemas/RestComment" }
+						}
+					},
+					"description": "The comment to update"
+				},
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestComment" }
+							}
+						},
+						"description": "The newly updated comment."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The comment was not updated due to a validation error."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the commit, update the comment or watch the commit."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "Unable to find the supplied project, repository, commit or comment. The missing entity will be specified in the error details."
+					},
+					"409": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The comment version supplied does not match the current version or the repository is archived."
+					}
+				},
+				"summary": "Update a commit comment",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/deployments": {
+			"delete": {
+				"description": "Delete the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber. \n\nThe user must have REPO_ADMIN.",
+				"operationId": "delete_1",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the sequence number of the deployment, as detailed by the query parameter",
+						"in": "query",
+						"name": "deploymentSequenceNumber",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the commitId that was deployed as indicated by the path",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the key of the deployment, as detailed by the query parameter",
+						"in": "query",
+						"name": "key",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the key of the environment, as detailed by the query parameter",
+						"in": "query",
+						"name": "environmentKey",
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"204": { "description": "the request has been processed" },
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "the deployment was not deleted because the request was invalid"
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to delete a deployment"
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository does not exist"
+					}
+				},
+				"summary": "Delete a deployment",
+				"tags": ["Builds and Deployments"]
+			},
+			"get": {
+				"description": "Get the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber. \n\nThe user must have REPO_READ.",
+				"operationId": "get_1",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the sequence number of the deployment, as detailed by the query param",
+						"example": "deploymentSequenceNumber",
+						"in": "query",
+						"name": "deploymentSequenceNumber",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the commitId that was deployed as indicated by the query parameter",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the key of the deployment, as detailed by the query parameter",
+						"in": "query",
+						"name": "key",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the key of the environment, as detailed by the query parameter",
+						"in": "query",
+						"name": "environmentKey",
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestDeployment" }
+							}
+						},
+						"description": "The deployment"
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "could not get the deployment because the request was invalid"
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository"
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository or deployment does not exist"
+					}
+				},
+				"summary": "Get a deployment",
+				"tags": ["Builds and Deployments"]
+			},
+			"post": {
+				"description": "Create or update a deployment. \n\n The authenticated user must have REPO_READ permission for the repository.",
+				"operationId": "createOrUpdateDeployment",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the commitId that was deployed as indicated by the path",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"requestBody": {
+					"content": {
+						"*/*": {
+							"schema": {
+								"$ref": "#/components/schemas/RestDeploymentSetRequest"
+							}
+						}
+					},
+					"description": "the details of the deployment to create, as detailed by the request body"
+				},
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestDeployment" }
+							}
+						},
+						"description": "The deployment was created"
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "the deployment was not created because the request was invalid"
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository"
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository does not exist"
+					}
+				},
+				"summary": "Create or update a deployment",
+				"tags": ["Builds and Deployments"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/diff-stats-summary/{path}": {
+			"get": {
+				"description": "Retrieve the diff stats summary for a commit.\n\nThe stats summary include the total number of modified files, added lines, and deleted lines. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.",
+				"operationId": "getDiffStatsSummary",
+				"parameters": [
+					{
+						"description": "The path to the file which should be diffed (optional)",
+						"in": "path",
+						"name": "path",
+						"required": true,
+						"schema": { "type": "string", "pattern": ".*" }
+					},
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The source path for the file, if it was copied, moved or renamed",
+						"in": "query",
+						"name": "srcPath",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "true to automatically try to find the source path when it's not provided, false otherwise. Requires the path to be provided.",
+						"in": "query",
+						"name": "autoSrcPath",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The commit ID to diff to.",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Optional whitespace flag which can be set to ignore-all",
+						"in": "query",
+						"name": "whitespace",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The base revision to diff from. If omitted the parent revision of the commit ID is used",
+						"in": "query",
+						"name": "since",
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"$ref": "#/components/schemas/RestDiffStatsSummary"
+								}
+							}
+						},
+						"description": "The diff stats summary for a commit."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The until parameter was not supplied."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The repository does not exist."
+					}
+				},
+				"summary": "Get diff stats summary between revisions",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/diff/{path}": {
+			"get": {
+				"description": "Retrieve the diff between two provided revisions.\n\nTo stream a raw text representation of the diff, this endpoint can be called with the request header 'Accept: text/plain'. \n\nNote: This resource is currently not paged. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. In the event that the cap is reached, the diff will be cut short and one or more {@code truncated} flags will be set to true on the \"segments\", \"hunks\" and \"diffs\" properties, as well as the top-level object, in the returned JSON response.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.",
+				"operationId": "streamDiff",
+				"parameters": [
+					{
+						"description": "The source path for the file, if it was copied, moved or renamed",
+						"in": "query",
+						"name": "srcPath",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The full ID of the commit within the repository",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "If present the service adds avatar URLs for comment authors where the provided value specifies the desired avatar size in pixels. Not applicable if streaming raw diff",
+						"in": "query",
+						"name": "avatarSize",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Text used to filter files and lines (optional). Not applicable if streaming raw diff",
+						"in": "query",
+						"name": "filter",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The security scheme for avatar URLs. If the scheme is not present then it is inherited from the request. It can be set to \"https\" to force the use of secure URLs. Not applicable if streaming raw diff",
+						"in": "query",
+						"name": "avatarScheme",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The path to the file which should be diffed (optional)",
+						"in": "path",
+						"name": "path",
+						"required": true,
+						"schema": { "type": "string", "pattern": ".*" }
+					},
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The number of context lines to include around added/removed lines in the diff.Not applicable if streaming raw diff",
+						"in": "query",
+						"name": "contextLines",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "true to automatically try to find the source path when it's not provided, false otherwise. Requires the path to be provided.",
+						"in": "query",
+						"name": "autoSrcPath",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Optional whitespace flag which can be set to ignore-all",
+						"in": "query",
+						"name": "whitespace",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "true to embed comments in the diff (the default); otherwise false to stream the diff without comments. Not applicable if streaming raw diff",
+						"in": "query",
+						"name": "withComments",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The base revision to diff from. If omitted the parent revision of the until revision is used",
+						"in": "query",
+						"name": "since",
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestDiff" }
+							}
+						},
+						"description": "A diff between two revisions."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The until parameter was not supplied."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The repository does not exist."
+					}
+				},
+				"summary": "Get diff between revisions",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/merge-base": {
+			"get": {
+				"description": "Returns the best common ancestor between two commits.\n\nIf more than one best common ancestor exists, only one will be returned. It is unspecified which will be returned.",
+				"operationId": "getMergeBase",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The full ID of the commit within the repository",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The other commit id to calculate the merge-base on",
+						"in": "query",
+						"name": "otherCommitId",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestCommit" }
+							}
+						},
+						"description": "The common ancestor of the two given commits"
+					},
+					"204": {
+						"description": "No common parent between the two commits exist"
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The supplied commit ID(s) was/were invalid"
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The project, repository, or commit(s) does not exist"
+					}
+				},
+				"summary": "Get the common ancestor between two commits",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/pull-requests": {
+			"get": {
+				"description": "Retrieve a page of pull requests in the current repository that contain the given commit.\n\nThe user must be authenticated and have access to the specified repository to call this resource.",
+				"operationId": "getPullRequests",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the commit ID",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Start number for the page (inclusive). If not passed, first page is assumed.",
+						"example": 0,
+						"in": "query",
+						"name": "start",
+						"required": false,
+						"schema": { "type": "number", "example": 0 }
+					},
+					{
+						"description": "Number of items to return. If not passed, a page size of 25 is used.",
+						"example": 25,
+						"in": "query",
+						"name": "limit",
+						"required": false,
+						"schema": { "type": "number", "example": 25 }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"isLastPage": { "type": "boolean" },
+										"limit": { "type": "number", "example": 25 },
+										"nextPageStart": { "type": "integer", "format": "int32" },
+										"size": { "type": "number", "example": 1 },
+										"start": { "type": "integer", "format": "int32" },
+										"values": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestPullRequest"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "Return a page of pull requests in the current repository containing the given commit."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to see the request repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The request repository does not exist"
+					}
+				},
+				"summary": "Get repository pull requests containing commit",
+				"tags": ["Pull Requests"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/watch": {
+			"delete": {
+				"description": "Remove the authenticated user as a watcher for the specified commit.\n\nThe authenticated user must have REPO_READ permission for the repository containing the commit to call this resource.",
+				"operationId": "unwatch",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The full ID of the commit within the repository",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"204": {
+						"description": "The user is no longer watching the commit."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the pull request."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified project, repository or commit does not exist."
+					}
+				},
+				"summary": "Stop watching commit",
+				"tags": ["Repository"]
+			},
+			"post": {
+				"description": "Add the authenticated user as a watcher for the specified commit.\n\nThe authenticated user must have REPO_READ permission for the repository containing the commit to call this resource.",
+				"operationId": "watch",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The full ID of the commit within the repository",
+						"in": "path",
+						"name": "commitId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"204": { "description": "The user is now watching the commit." },
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the pull request"
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified project, repository or commit does not exist."
+					}
+				},
+				"summary": "Watch commit",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/changes": {
+			"get": {
+				"description": "Gets the file changes available in the  from commit but not in the  to commit.\n\n\nIf either the  from or  to commit are not specified, they will be replaced by the default branch of their containing repository.",
+				"operationId": "streamChanges",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug",
+						"in": "query",
+						"name": "fromRepo",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the source commit (can be a partial/full commit ID or qualified/unqualified ref name)",
+						"in": "query",
+						"name": "from",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the target commit (can be a partial/full commit ID or qualified/unqualified ref name)",
+						"in": "query",
+						"name": "to",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Start number for the page (inclusive). If not passed, first page is assumed.",
+						"example": 0,
+						"in": "query",
+						"name": "start",
+						"required": false,
+						"schema": { "type": "number", "example": 0 }
+					},
+					{
+						"description": "Number of items to return. If not passed, a page size of 25 is used.",
+						"example": 25,
+						"in": "query",
+						"name": "limit",
+						"required": false,
+						"schema": { "type": "number", "example": 25 }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"isLastPage": { "type": "boolean" },
+										"limit": { "type": "number", "example": 25 },
+										"nextPageStart": { "type": "integer", "format": "int32" },
+										"size": { "type": "number", "example": 1 },
+										"start": { "type": "integer", "format": "int32" },
+										"values": {
+											"type": "array",
+											"items": { "$ref": "#/components/schemas/RestChange" }
+										}
+									}
+								}
+							}
+						},
+						"description": "A page of changes."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The source repository,target repository, or commit does not exist."
+					}
+				},
+				"summary": "Compare commits",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/commits": {
+			"get": {
+				"description": "Gets the commits accessible from the from commit but not in the to commit.\n\nIf either the from or to commit are not specified, they will be replaced by the default branch of their containing repository.",
+				"operationId": "streamCommits",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug",
+						"in": "query",
+						"name": "fromRepo",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the source commit (can be a partial/full commit ID or qualified/unqualified ref name)",
+						"in": "query",
+						"name": "from",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the target commit (can be a partial/full commit ID or qualified/unqualified ref name)",
+						"in": "query",
+						"name": "to",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Start number for the page (inclusive). If not passed, first page is assumed.",
+						"example": 0,
+						"in": "query",
+						"name": "start",
+						"required": false,
+						"schema": { "type": "number", "example": 0 }
+					},
+					{
+						"description": "Number of items to return. If not passed, a page size of 25 is used.",
+						"example": 25,
+						"in": "query",
+						"name": "limit",
+						"required": false,
+						"schema": { "type": "number", "example": 25 }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"isLastPage": { "type": "boolean" },
+										"limit": { "type": "number", "example": 25 },
+										"nextPageStart": { "type": "integer", "format": "int32" },
+										"size": { "type": "number", "example": 1 },
+										"start": { "type": "integer", "format": "int32" },
+										"values": {
+											"type": "array",
+											"items": { "$ref": "#/components/schemas/RestCommit" }
+										}
+									}
+								}
+							}
+						},
+						"description": "A page of commits."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The source repository,target repository, or commit does not exist."
+					}
+				},
+				"summary": "Get accessible commits",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/diff-stats-summary{path}": {
+			"get": {
+				"description": "Retrieve the diff stats summary of the changes available in the from commit but not in the  to commit.\n\nIf either the  from or  to commit are not specified, they will be replaced by the default branch of their containing repository.",
+				"operationId": "getDiffStatsSummary_1",
+				"parameters": [
+					{
+						"description": "the path to the file to diff (optional)",
+						"in": "path",
+						"name": "path",
+						"required": true,
+						"schema": { "type": "string", "pattern": ".*" }
+					},
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug",
+						"in": "query",
+						"name": "fromRepo",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "source path",
+						"in": "query",
+						"name": "srcPath",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the source commit (can be a partial/full commit ID or qualified/unqualified ref name)",
+						"in": "query",
+						"name": "from",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the target commit (can be a partial/full commit ID or qualified/unqualified ref name)",
+						"in": "query",
+						"name": "to",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "an optional whitespace flag which can be set to ignore-all",
+						"in": "query",
+						"name": "whitespace",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestDiff" }
+							}
+						},
+						"description": "The diff stats summary for the changes."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The source repository,target repository, or commit does not exist."
+					}
+				},
+				"summary": "Retrieve the diff stats summary between commits",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/diff{path}": {
+			"get": {
+				"description": "Gets a diff of the changes available in the from commit but not in the  to commit.\n\nIf either the  from or  to commit are not specified, they will be replaced by the default branch of their containing repository.",
+				"operationId": "streamDiff_1",
+				"parameters": [
+					{
+						"description": "the path to the file to diff (optional)",
+						"in": "path",
+						"name": "path",
+						"required": true,
+						"schema": { "type": "string", "pattern": ".*" }
+					},
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "an optional number of context lines to include around each added or removed lines in the diff",
+						"in": "query",
+						"name": "contextLines",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "an optional parameter specifying the source repository containing the source commit if that commit is not present in the current repository; the repository can be specified by either its ID fromRepo=42 or by its project key plus its repo slug separated by a slash: fromRepo=projectKey/repoSlug",
+						"in": "query",
+						"name": "fromRepo",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "source path",
+						"in": "query",
+						"name": "srcPath",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the source commit (can be a partial/full commit ID or qualified/unqualified ref name)",
+						"in": "query",
+						"name": "from",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "the target commit (can be a partial/full commit ID or qualified/unqualified ref name)",
+						"in": "query",
+						"name": "to",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "an optional whitespace flag which can be set to ignore-all",
+						"in": "query",
+						"name": "whitespace",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestDiff" }
+							}
+						},
+						"description": "The diff of the changes."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The source repository,target repository, or commit does not exist."
+					}
+				},
+				"summary": "Get diff between commits",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/contributing": {
+			"get": {
+				"description": "Retrieves the contributing guidelines for the repository, if they've been defined. \n\nThis checks the repository for a CONTRIBUTING file, optionally with an md or txt extension, and, if found, streams it. By default, the raw content of the file is streamed. Appending ?markup to the URL will stream an HTML-rendered version instead. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.",
+				"operationId": "streamContributing",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "A specific commit or ref to retrieve the guidelines at, or the default branch if not specified",
+						"in": "query",
+						"name": "at",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "If present or \"true\", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than \"true\", the content is streamed without markup",
+						"in": "query",
+						"name": "markup",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "(Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used",
+						"in": "query",
+						"name": "htmlEscape",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "(Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used",
+						"in": "query",
+						"name": "includeHeadingId",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "(Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used",
+						"in": "query",
+						"name": "hardwrap",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": { "application/json": {} },
+						"description": "The contributing guidelines for the repository."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to read the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository does not exist."
+					}
+				},
+				"summary": "Get repository contributing guidelines",
+				"tags": ["Project"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/default-branch": {
+			"get": {
+				"description": "Retrieves the repository's configured default branch. \n\nEvery repository has a configured default branch, but that branch may not actually exist in the repository. For example, a newly-created repository will have a configured default branch even though no branches have been pushed yet. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.",
+				"operationId": "getDefaultBranch_2",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestMinimalRef" }
+							}
+						},
+						"description": "The configured default branch for the repository."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to read the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository does not exist, or its configured default branch does not exist."
+					}
+				},
+				"summary": "Get repository default branch",
+				"tags": ["Project"]
+			},
+			"put": {
+				"description": "Update the default branch of a repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.",
+				"operationId": "setDefaultBranch_2",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"requestBody": {
+					"content": {
+						"application/json": {
+							"schema": { "$ref": "#/components/schemas/RestBranch" }
+						}
+					},
+					"description": "The branch to set as default"
+				},
+				"responses": {
+					"204": { "description": "The default branch was updated." },
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The authenticated user does not have permission to modify the default branch."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository does not exist."
+					}
+				},
+				"summary": "Update default branch for repository",
+				"tags": ["Project"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/diff": {
+			"get": {
+				"description": "Stream the raw diff between two provided revisions. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.",
+				"operationId": "streamRawDiff",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The number of context lines to include around added/removed lines in the diff",
+						"in": "query",
+						"name": "contextLines",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The source path for the file, if it was copied, moved or renamed",
+						"in": "query",
+						"name": "srcPath",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The target revision to diff to (required)",
+						"in": "query",
+						"name": "until",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Optional whitespace flag which can be set to ignore-all",
+						"in": "query",
+						"name": "whitespace",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The base revision to diff from. If omitted the parent revision of the until revision is used",
+						"in": "query",
+						"name": "since",
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": { "application/json": {} },
+						"description": "A raw diff between two revisions."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The path parameter was not supplied."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The repository does not exist."
+					}
+				},
+				"summary": "Get raw diff for path",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/diff/{path}": {
+			"get": {
+				"description": "Stream the raw diff between two provided revisions. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.",
+				"operationId": "streamRawDiff_1",
+				"parameters": [
+					{
+						"description": "The path to the file which should be diffed (required)",
+						"in": "path",
+						"name": "path",
+						"required": true,
+						"schema": { "type": "string", "pattern": ".*" }
+					},
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The number of context lines to include around added/removed lines in the diff",
+						"in": "query",
+						"name": "contextLines",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The source path for the file, if it was copied, moved or renamed",
+						"in": "query",
+						"name": "srcPath",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The target revision to diff to (required)",
+						"in": "query",
+						"name": "until",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Optional whitespace flag which can be set to ignore-all",
+						"in": "query",
+						"name": "whitespace",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The base revision to diff from. If omitted the parent revision of the until revision is used",
+						"in": "query",
+						"name": "since",
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": { "application/json": {} },
+						"description": "A raw diff between two revisions."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The until parameter was not supplied."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The repository does not exist."
+					}
+				},
+				"summary": "Get raw diff for path",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/files": {
+			"get": {
+				"description": "Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.",
+				"operationId": "streamFiles",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead.",
+						"in": "query",
+						"name": "at",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Start number for the page (inclusive). If not passed, first page is assumed.",
+						"example": 0,
+						"in": "query",
+						"name": "start",
+						"required": false,
+						"schema": { "type": "number", "example": 0 }
+					},
+					{
+						"description": "Number of items to return. If not passed, a page size of 25 is used.",
+						"example": 25,
+						"in": "query",
+						"name": "limit",
+						"required": false,
+						"schema": { "type": "number", "example": 25 }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"isLastPage": { "type": "boolean" },
+										"limit": { "type": "number", "example": 25 },
+										"nextPageStart": { "type": "integer", "format": "int32" },
+										"size": { "type": "number", "example": 1 },
+										"start": { "type": "integer", "format": "int32" },
+										"values": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/FileListResource"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "A page of files."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The path parameter was not supplied."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The path requested does not exist at the supplied commit."
+					}
+				},
+				"summary": "Get files in directory",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/files/{path}": {
+			"get": {
+				"description": "Retrieve a page of files from particular directory of a repository. The search is done recursively, so all files from any sub-directory of the specified directory will be returned. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.",
+				"operationId": "streamFiles_1",
+				"parameters": [
+					{
+						"description": "The directory to list files for.",
+						"in": "path",
+						"name": "path",
+						"required": true,
+						"schema": { "type": "string", "pattern": ".*" }
+					},
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The commit ID or ref (e.g. a branch or tag) to list the files at. If not specified the default branch will be used instead.",
+						"in": "query",
+						"name": "at",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Start number for the page (inclusive). If not passed, first page is assumed.",
+						"example": 0,
+						"in": "query",
+						"name": "start",
+						"required": false,
+						"schema": { "type": "number", "example": 0 }
+					},
+					{
+						"description": "Number of items to return. If not passed, a page size of 25 is used.",
+						"example": 25,
+						"in": "query",
+						"name": "limit",
+						"required": false,
+						"schema": { "type": "number", "example": 25 }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"isLastPage": { "type": "boolean" },
+										"limit": { "type": "number", "example": 25 },
+										"nextPageStart": { "type": "integer", "format": "int32" },
+										"size": { "type": "number", "example": 1 },
+										"start": { "type": "integer", "format": "int32" },
+										"values": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/FileListResource"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "A page of files."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The path requested is not a directory at the supplied commit."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The path requested does not exist at the supplied commit."
+					}
+				},
+				"summary": "Get files in directory",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/forks": {
+			"get": {
+				"description": "Retrieve repositories which have been forked from this one. Unlike #getRelatedRepositories(Repository, PageRequest) related repositories, this only looks at a given repository's direct forks. If those forks have themselves been the origin of more forks, such \"grandchildren\" repositories will not be retrieved. \n\nOnly repositories to which the authenticated user has REPO_READ permission will be included, even if other repositories have been forked from this one.",
+				"operationId": "getForkedRepositories",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Start number for the page (inclusive). If not passed, first page is assumed.",
+						"example": 0,
+						"in": "query",
+						"name": "start",
+						"required": false,
+						"schema": { "type": "number", "example": 0 }
+					},
+					{
+						"description": "Number of items to return. If not passed, a page size of 25 is used.",
+						"example": 25,
+						"in": "query",
+						"name": "limit",
+						"required": false,
+						"schema": { "type": "number", "example": 25 }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"isLastPage": { "type": "boolean" },
+										"limit": { "type": "number", "example": 25 },
+										"nextPageStart": { "type": "integer", "format": "int32" },
+										"size": { "type": "number", "example": 1 },
+										"start": { "type": "integer", "format": "int32" },
+										"values": {
+											"type": "array",
+											"items": { "$ref": "#/components/schemas/RestRepository" }
+										}
+									}
+								}
+							}
+						},
+						"description": "A page of repositories related to the request repository."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to see the request repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The request repository does not exist."
+					}
+				},
+				"summary": "Get repository forks",
+				"tags": ["Project"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/hook-scripts": {
+			"get": {
+				"description": "Return a page of hook scripts configured for the specified repository. \n\nThis endpoint requires **REPO_ADMIN** permission.",
+				"operationId": "getConfigurations_1",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "Start number for the page (inclusive). If not passed, first page is assumed.",
+						"example": 0,
+						"in": "query",
+						"name": "start",
+						"required": false,
+						"schema": { "type": "number", "example": 0 }
+					},
+					{
+						"description": "Number of items to return. If not passed, a page size of 25 is used.",
+						"example": 25,
+						"in": "query",
+						"name": "limit",
+						"required": false,
+						"schema": { "type": "number", "example": 25 }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"isLastPage": { "type": "boolean" },
+										"limit": { "type": "number", "example": 25 },
+										"nextPageStart": { "type": "integer", "format": "int32" },
+										"size": { "type": "number", "example": 1 },
+										"start": { "type": "integer", "format": "int32" },
+										"values": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestHookScriptConfig"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "A page of hook scripts."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the specified repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository does not exist."
+					}
+				},
+				"summary": "Get hook scripts",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/hook-scripts/{scriptId}": {
+			"delete": {
+				"description": "Removes the hook script from the set of hook scripts configured to run in the repository. \n\nThis endpoint requires **REPO_ADMIN** permission.",
+				"operationId": "removeConfiguration_1",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The ID of the hook script",
+						"in": "path",
+						"name": "scriptId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"204": { "description": "The hook script was successfully deleted." },
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the specified repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The repository slug or hook script ID supplied does not exist."
+					}
+				},
+				"summary": "Remove a hook script",
+				"tags": ["Repository"]
+			},
+			"put": {
+				"description": "Creates/updates the hook script configuration for the provided hook script and repository. \n\nThis endpoint requires **REPO_ADMIN** permission.",
+				"operationId": "setConfiguration_1",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The ID of the hook script",
+						"in": "path",
+						"name": "scriptId",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"requestBody": {
+					"content": {
+						"application/json": {
+							"schema": {
+								"$ref": "#/components/schemas/RestHookScriptTriggers"
+							}
+						}
+					},
+					"description": "The hook triggers for which the hook script should be run"
+				},
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"$ref": "#/components/schemas/RestHookScriptConfig"
+								}
+							}
+						},
+						"description": "The updated hook script."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The hook script was not created/updated due to a validation error."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the specified repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The repository slug supplied does not exist."
+					}
+				},
+				"summary": "Create/update a hook script",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/labels": {
+			"get": {
+				"description": "Get all labels applied to the given repository. \n\nThe authenticated user must have REPO_READ permission for the specified repository.",
+				"operationId": "getAllLabelsForRepository",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestLabel" }
+							}
+						},
+						"description": "The applied label."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the labels."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository does not exist."
+					}
+				},
+				"summary": "Get repository labels",
+				"tags": ["Repository"]
+			},
+			"post": {
+				"description": "Applies a label to the repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository.",
+				"operationId": "addLabel",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"requestBody": {
+					"content": {
+						"application/json": {
+							"schema": { "$ref": "#/components/schemas/RestLabel" }
+						}
+					},
+					"description": "The label to apply"
+				},
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/RestLabel" }
+							}
+						},
+						"description": "The applied label."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "A validation error prevented the label from being created or applied. Possible validation errors include: The name of the label contains uppercase characters, the name is smaller than 3 characters or longer than 50 characters, the label contains other characters than a-z 0-9 and - or the label is already applied to the given repository."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to apply a label."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository does not exist."
+					}
+				},
+				"summary": "Add repository label",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/labels/{labelName}": {
+			"delete": {
+				"description": "Remove label that is applied to the given repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository.",
+				"operationId": "removeLabel",
+				"parameters": [
+					{
+						"description": "The project key.",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The label to remove",
+						"in": "path",
+						"name": "labelName",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug.",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"204": {
+						"description": "An empty response indicating that the label is no longer associated to the repository."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to remove the label."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The specified repository does not exist."
+					}
+				},
+				"summary": "Remove repository label",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/last-modified": {
+			"get": {
+				"description": "Streams files from the repository's root with the last commit to modify each file. Commit modifications are traversed starting from the at commit or, if not specified, from the tip of the default branch.\n\nUnless the repository is public, the authenticated user must have REPO_READ access to call this resource.",
+				"operationId": "stream",
+				"parameters": [
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The commit to use as the starting point when listing files and calculating modifications",
+						"in": "query",
+						"name": "at",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/ExampleFiles" }
+							}
+						},
+						"description": "A map of files to the last commit that modified them, and the latest commit to the repository (by nature, any commit to a repository modifies its root)."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "No at commit was specified. When streaming modifications, an explicit starting commit must be supplied."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The repository does not exist or does not contain the at commit."
+					}
+				},
+				"summary": "Stream files",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/last-modified/{path}": {
+			"get": {
+				"description": "Streams files in the requested path with the last commit to modify each file. Commit modifications are traversed starting from the at commit or, if not specified, from the tip of the default branch.\n\nUnless the repository is public, the authenticated user must have REPO_READ access to call this resource.",
+				"operationId": "stream_1",
+				"parameters": [
+					{
+						"description": "The path within the repository whose files should be streamed",
+						"in": "path",
+						"name": "path",
+						"required": true,
+						"schema": { "type": "string", "pattern": ".*" }
+					},
+					{
+						"description": "The project key",
+						"in": "path",
+						"name": "projectKey",
+						"required": true,
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The commit to use as the starting point when listing files and calculating modifications",
+						"in": "query",
+						"name": "at",
+						"schema": { "type": "string" }
+					},
+					{
+						"description": "The repository slug",
+						"in": "path",
+						"name": "repositorySlug",
+						"required": true,
+						"schema": { "type": "string" }
+					}
+				],
+				"responses": {
+					"200": {
+						"content": {
+							"application/json": {
+								"schema": { "$ref": "#/components/schemas/ExampleFiles" }
+							}
+						},
+						"description": "A map of files to the last commit that modified them, and the latest commit to update the requested path."
+					},
+					"400": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "No at commit was specified. When streaming modifications, an explicit starting commit must be supplied."
+					},
+					"401": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The currently authenticated user has insufficient permissions to view the repository."
+					},
+					"404": {
+						"content": {
+							"application/json": {
+								"schema": {
+									"type": "object",
+									"properties": {
+										"errors": {
+											"type": "array",
+											"items": {
+												"$ref": "#/components/schemas/RestErrorMessage"
+											}
+										}
+									}
+								}
+							}
+						},
+						"description": "The repository does not exist or does not contain the at commit, or the at commit does not contain the requested path."
+					}
+				},
+				"summary": "Stream files with last modified commit in path",
+				"tags": ["Repository"]
+			}
+		},
+		"/api/latest/projects/{projectKey}/repos/{repositorySlug}/license": {
+			"get": {
+				"description": "Retrieves the license for the repository, if it's been defined. \n\nThis checks the repository for a 
LICENSE
file, optionally with an
md
or
txt
extension, and, if found, streams it. By default, the raw content of the file is streamed. Appending
?markup
to the URL will stream an HTML-rendered version instead. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "streamLicense", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "A specific commit or ref to retrieve the guidelines at, or the default branch if not specified", + "in": "query", + "name": "at", + "schema": { "type": "string" } + }, + { + "description": "If present or \"true\", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than \"true\", the content is streamed without markup", + "in": "query", + "name": "markup", + "schema": { "type": "string" } + }, + { + "description": "(Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used", + "in": "query", + "name": "htmlEscape", + "schema": { "type": "string" } + }, + { + "description": "(Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used", + "in": "query", + "name": "includeHeadingId", + "schema": { "type": "string" } + }, + { + "description": "(Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used", + "in": "query", + "name": "hardwrap", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The license for the repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to read the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get repository license", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/participants": { + "get": { + "description": "Retrieve a page of participant users for all the pull requests to or from the specified repository. \n\nOptionally clients can specify following filters.", + "operationId": "search", + "parameters": [ + { + "description": "(optional) Return only users, whose username, name or email address contain the filter value", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional) The role associated with the pull request participant. This must be one of AUTHOR, REVIEWER, or PARTICIPANT", + "in": "query", + "name": "role", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional), Defaults to INCOMING) the direction relative to the specified repository. Either INCOMING or OUTGOING.", + "in": "query", + "name": "direction", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestApplicationUser" + } + } + } + } + } + }, + "description": "A page of users that match the search criteria." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Search pull request participants", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/patch": { + "get": { + "description": "Retrieve the patch content for a repository at a specified revision. \n\nCache headers are added to the response (only if full commit hashes are used, not in the case of short hashes). \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "streamPatch", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The target revision from which to generate the patch (required)", + "in": "query", + "name": "until", + "schema": { "type": "string" } + }, + { + "description": "indicates whether or not to generate a patch which includes all the ancestors of the 'until' revision. If true, the value provided by 'since' is ignored.", + "in": "query", + "name": "allAncestors", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The base revision from which to generate the patch. This is only applicable when 'allAncestors' is false. If omitted the patch will represent one single commit, the 'until'.", + "in": "query", + "name": "since", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The patch contents from a repository." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The until parameter was not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist." + } + }, + "summary": "Get patch content at revision", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions": { + "delete": { + "description": "Revoke all permissions for the specified repository for the given groups and users.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified repository or a higher global permission to call this resource.\n\nIn addition, a user may not revoke a group's permission if their own permission would be revoked as a result, nor may they revoke their own permission unless they have a global permission that already implies that permission.", + "operationId": "revokePermissions_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The names of the users", + "in": "query", + "name": "user", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The names of the groups", + "in": "query", + "name": "group", + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "All repository permissions were revoked from the users and groups for the specified repository." + }, + "400": { + "content": { "application/json": {} }, + "description": "No permissions were revoked because the request was invalid. No users or groups were provided." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not an administrator for the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist, or one or more of the users or groups provided does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would revoke the currently authenticated user's permission on the repository." + } + }, + "summary": "Revoke all repository permissions for users and groups", + "tags": ["Permission Management"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/groups": { + "delete": { + "description": "Revoke all permissions for the specified repository for a group.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource.\n\nIn addition, a user may not revoke a group's permissions if it will reduce their own permission level.", + "operationId": "revokePermissionsForGroup_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The name of the group.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "All repository permissions were revoked from the group for the specified repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a repository administrator for the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user's permission level." + } + }, + "summary": "Revoke group repository permission", + "tags": ["Permission Management"] + }, + "get": { + "description": "Retrieve a page of groups that have been granted at least one permission for the specified repository.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource.", + "operationId": "getGroupsWithAnyPermission_2", + "parameters": [ + { + "description": "If specified only group names containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPermittedGroup" + } + } + } + } + } + }, + "description": "A page of groups and their highest permissions for the specified repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a repository administrator for the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get groups with permission to repository", + "tags": ["Permission Management"] + }, + "put": { + "description": "Promote or demote a group's permission level for the specified repository. Available repository permissions are:\n\n- REPO_READ\n- REPO_WRITE\n- REPO_ADMIN\n\n\nSee the Bitbucket Data Center documentation for a detailed explanation of what each permission entails.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not demote a group's permission level if their own permission level would be reduced as a result.", + "operationId": "setPermissionForGroup", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The names of the groups.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "array", "items": { "type": "string" } } + }, + { + "description": "The permission to grant", + "in": "query", + "name": "permission", + "required": true, + "schema": { + "type": "string", + "enum": ["REPO_READ", "REPO_WRITE", "REPO_ADMIN"] + } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The requested permission was granted." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed or the specified permission does not exist." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a repository administrator for the specified repository." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user's permission level." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Update group repository permission", + "tags": ["Permission Management"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/groups/none": { + "get": { + "description": "Retrieve a page of groups that have no granted permissions for the specified repository.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource.", + "operationId": "getGroupsWithoutAnyPermission_2", + "parameters": [ + { + "description": "If specified only group names containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestDetailedGroup" + } + } + } + } + } + }, + "description": "A page of groups that have not been granted any permissions for the specified repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a repository administrator for the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get groups without repository permission", + "tags": ["Permission Management"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/search": { + "get": { + "description": "Search direct and implied permissions of users and groups. This endpoint returns a superset of the results returned by the /users and /groups endpoints because it allows filtering by project and global permissions too.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project/global permission to call this resource.", + "operationId": "searchPermissions_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Permissions to filter by. See the [permissions documentation](https://confluence.atlassian.com/display/BitbucketServer/Using+repository+permissions)for a detailed explanation of what each permission entails. This parameter can be specified multiple times to filter by more than one permission, and can contain repository, project, and global permissions.\n\n", + "in": "query", + "name": "permission", + "schema": { "type": "string" } + }, + { + "description": "Name of the user or group to filter the name of", + "in": "query", + "name": "filterText", + "schema": { "type": "string" } + }, + { + "description": "Type of entity (user or group)Valid entity types are:\n\n- USER- GROUP", + "in": "query", + "name": "type", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "default": { + "content": { "application/json;charset=UTF-8": {} }, + "description": "default response" + } + }, + "summary": "Search repository permissions", + "tags": ["Permission Management"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/users": { + "delete": { + "description": "Revoke all permissions for the specified repository for a user.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource.\n\nIn addition, a user may not revoke their own repository permissions if they do not have a higher project or global permission.", + "operationId": "revokePermissionsForUser_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The name of the user.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "All repository permissions were revoked from the user for the specified repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a repository administrator for the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user's permission level." + } + }, + "summary": "Revoke user repository permission", + "tags": ["Permission Management"] + }, + "get": { + "description": "Retrieve a page of users that have been granted at least one permission for the specified repository.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource.", + "operationId": "getUsersWithAnyPermission_2", + "parameters": [ + { + "description": "If specified only user names containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPermittedUser" + } + } + } + } + } + }, + "description": "A page of users and their highest permissions for the specified repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a repository administrator for the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get users with permission to repository", + "tags": ["Permission Management"] + }, + "put": { + "description": "Promote or demote a user's permission level for the specified repository. Available repository permissions are:\n\n- REPO_READ- REPO_WRITE- REPO_ADMINSee the Bitbucket Data Center documentation for a detailed explanation of what each permission entails.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource. In addition, a user may not reduce their own permission level unless they have a project or global permission that already implies that permission.", + "operationId": "setPermissionForUser", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The names of the users.", + "in": "query", + "name": "name", + "required": true, + "schema": { "type": "array", "items": { "type": "string" } } + }, + { + "description": "The permission to grant", + "in": "query", + "name": "permission", + "required": true, + "schema": { + "type": "string", + "enum": ["REPO_READ", "REPO_WRITE", "REPO_ADMIN"] + } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The requested permission was granted." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed or the specified permission does not exist." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a repository administrator for the specified repository." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The action was disallowed as it would reduce the currently authenticated user's permission level." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Update user repository permission", + "tags": ["Permission Management"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/users/none": { + "get": { + "description": "Retrieve a page of licensed users that have no granted permissions for the specified repository.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository or a higher project or global permission to call this resource.", + "operationId": "getUsersWithoutPermission_1", + "parameters": [ + { + "description": "If specified only user names containing the supplied string will be returned.", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestApplicationUser" + } + } + } + } + } + }, + "description": "A page of users that have not been granted any permissions for the specified repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a repository administrator for the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get users without repository permission", + "tags": ["Permission Management"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests": { + "get": { + "description": "Retrieve a page of pull requests to or from the specified repository. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource. Optionally clients can specify PR participant filters. Each filter has a mandatory username.N parameter, and the optional role.N and approved.N parameters. \n\n- username.N - the \"root\" of a single participant filter, where \"N\" is a natural number starting from 1. This allows clients to specify multiple participant filters, by providing consecutive filters as username.1, username.2 etc. Note that the filters numbering has to start with 1 and be continuous for all filters to be processed. The total allowed number of participant filters is 10 and all filters exceeding that limit will be dropped.\n- role.N(optional) the role associated with username.N. This must be one of AUTHOR, REVIEWER, or PARTICIPANT\n- approved.N (optional) the approved status associated with username.N. That is whether username.N has approved the PR. Either true, or false\n", + "operationId": "getPage", + "parameters": [ + { + "description": "(optional) defaults to true, whether to return additional pull request attributes", + "in": "query", + "name": "withAttributes", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional) a fully-qualified branch ID to find pull requests to or from, such as refs/heads/master", + "in": "query", + "name": "at", + "schema": { "type": "string" } + }, + { + "description": "(optional) defaults to true, whether to return additional pull request properties", + "in": "query", + "name": "withProperties", + "schema": { "type": "string" } + }, + { + "description": "(optional) If specified, only pull requests matching the supplied draft status will be returned.", + "in": "query", + "name": "draft", + "schema": { "type": "string" } + }, + { + "description": "(optional) If specified, only pull requests where the title or description contains the supplied string will be returned.", + "in": "query", + "name": "filterText", + "schema": { "type": "string" } + }, + { + "description": "(optional, defaults to OPEN). Supply ALL to return pull request in any state. If a state is supplied only pull requests in the specified state will be returned. Either OPEN, DECLINED or MERGED.", + "in": "query", + "name": "state", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional, defaults to NEWEST) the order to return pull requests in, either OLDEST (as in: \"oldest first\") or NEWEST.", + "in": "query", + "name": "order", + "schema": { "type": "string" } + }, + { + "description": "(optional, defaults to INCOMING) the direction relative to the specified repository. Either INCOMING or OUTGOING.", + "in": "query", + "name": "direction", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequest" + } + } + } + } + } + }, + "description": "A page of pull requests that match the search criteria." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Get pull requests for repository", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Create a new pull request from a source branch or tag to a target branch. The source and target may be in the same repository, or different ones. (Note that different repositories must belong to the same Repository#getHierarchyId() hierarchy.) \n\nThe fromRef may be a branch or a tag. The toRef is required to be a branch. Tags are not allowed as targets because tags are intended to be immutable and should not be changed after they are created. \n\nThe authenticated user must have REPO_READ permission for the fromRef and toRef repositories to call this resource.", + "operationId": "create", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestPullRequest" } + } + }, + "description": "The pull request data" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestPullRequest" } + } + }, + "description": "The newly created pull request." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The pull request entity supplied in the request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a pull request between the two specified repositories." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the specified repositories or branches does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details): \n\n- There was a problem resolving one or more reviewers.\n- The specified branches were the same.\n- The to branch is already up-to-date with all the commits on the from branch.\n- A pull request between the two branches already exists.\n- The to repository is archived.\n" + } + }, + "summary": "Create pull request", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}": { + "delete": { + "description": "Deletes a pull request. \n\nTo call this resource, users must be authenticated and have permission to view the pull request. Additionally, they must: \n\n- be the pull request author, if the system is configured to allow authors to delete their own pull requests (this is the default) OR \n- have repository administrator permission for the repository the pull request is targeting\n\n\nA body containing the version of the pull request must be provided with this request. \n\n`{ \"version\": 1 }`", + "operationId": "delete_3", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestDeleteRequest" + } + } + }, + "description": "A body containing the version of the pull request" + }, + "responses": { + "204": { "description": "The pull request was deleted." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Deleting pull requests isn't supported on archived repositories." + } + }, + "summary": "Delete pull request", + "tags": ["Pull Requests"] + }, + "get": { + "description": "Retrieve a pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "get_3", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestPullRequest" } + } + }, + "description": "The specified pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Get pull request", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Update the title, description, reviewers, destination branch or draft status of an existing pull request. \n\n**Note:** the reviewers list may be updated using this resource. However the author and participants list may not. \n\nThe authenticated user must either: \n\n- be the author of the pull request and have the REPO_READ permission for the repository that this pull request targets; or\n- have the REPO_WRITE permission for the repository that this pull request targets\n\n\nto call this resource.", + "operationId": "update", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestPullRequest" } + } + }, + "description": "The updated pull request" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestPullRequest" } + } + }, + "description": "The updated pull request." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details): \n\n- The request tried to modify the author or participants.\n- The pull request's version attribute was not specified.\n- A reviewer's username was not specified.\n- The toRef ID value was incorrectly left blank\n" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the specified repositories or branches does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details): \n\n- The specified version is out of date.\n- One of the reviewers could not be added to the pull request.\n- If updating the destination branch: - There is already an open pull request with an identical to branch\n - The from and new to branch are the same\n - The new destination branch up-to-date is up-to-date with all of changes from the from branch, resulting in a pull request with nothing to merge \n- The to repository is archived.\n" + } + }, + "summary": "Update pull request metadata", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.diff": { + "get": { + "description": "Streams the raw diff for a pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "streamRawDiff_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The number of context lines to include around added/removed lines in the diff", + "in": "query", + "name": "contextLines", + "schema": { "type": "string" } + }, + { + "description": "optional whitespace flag which can be set to ignore-all", + "in": "query", + "name": "whitespace", + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "text/plain": {} }, + "description": "A raw diff for the specified pull request." + }, + "400": { + "content": { "text/html": {} }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { "text/html": {} }, + "description": "The pull request does not exist." + } + }, + "summary": "Stream raw pull request diff", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.patch": { + "get": { + "description": "Streams a patch representing a pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "streamPatch_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "A patch representing the specified pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to access the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The pull request does not exist." + } + }, + "summary": "Stream pull request as patch", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/activities": { + "get": { + "description": "Retrieve a page of activity associated with a pull request. \n\nActivity items include comments, approvals, rescopes (i.e. adding and removing of commits), merges and more. \n\nDifferent types of activity items may be introduced in newer versions of Stash or by user installed plugins, so clients should be flexible enough to handle unexpected entity shapes in the returned page. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "getActivities", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(required if fromId is present) the type of the activity item specified by fromId (either COMMENT or ACTIVITY)", + "in": "query", + "name": "fromType", + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional) the ID of the activity item to use as the first item in the returned page", + "in": "query", + "name": "fromId", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestActivity" + } + } + } + } + } + }, + "description": "A page of activity relating to the specified pull request." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Get pull request activity", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve": { + "delete": { + "deprecated": true, + "description": "Remove approval from a pull request as the current user. This does not remove the user as a participant. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. \n\nDeprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead", + "operationId": "withdrawApproval", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + } + }, + "description": "Details of the updated participant." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist or the current user is not a participant on the pull request." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The pull request is not open." + } + }, + "summary": "Unapprove pull request", + "tags": ["Deprecated", "Pull Requests"] + }, + "post": { + "deprecated": true, + "description": "Approve a pull request as the current user. Implicitly adds the user as a participant if they are not already. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource. \n\nDeprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead", + "operationId": "approve", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + } + }, + "description": "Details of the new participant." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The pull request is not open." + } + }, + "summary": "Approve pull request", + "tags": ["Deprecated", "Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/auto-merge": { + "delete": { + "description": "Cancels a request to auto-merge the pull request, if the pull request was not merged yet.\n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.", + "operationId": "cancelAutoMerge", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The auto-merge request was cancelled." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to modify the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified pull request is not open." + } + }, + "summary": "Cancel auto-merge for pull request", + "tags": ["Pull Requests"] + }, + "get": { + "description": "Returns an auto-merge request for the pull request, if requested.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "getAutoMergeRequest", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoMergeRequest" + } + } + }, + "description": "The auto-merge request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Get auto-merge request for pull request", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Requests the system to try merging the pull request if auto-merge was requested on it.\n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.", + "operationId": "tryAutoMerge", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoMergeProcessingResult" + } + } + }, + "description": "The result of trying to auto-merge the pull request." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "An auto-merge request was not submitted for this pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to modify the pull request." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The auto-merge setting is not enabled for the repository that this pull request targets." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Auto-merge pull request", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments": { + "get": { + "description": "Gets comments matching the given set of field values for the specified pull request. (Note this does not perform any kind of searching for comments by their text). \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "getComments_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "If true only the count of the comments by state will be returned (and not the body of the comments).", + "in": "query", + "name": "count", + "schema": { "type": "string" } + }, + { + "in": "query", + "name": "state", + "schema": { "type": "array", "items": { "type": "string" } } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional). If supplied, only comments with a state in the given list will be returned. The state can be OPEN or RESOLVED.", + "in": "query", + "name": "states", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestComment" } + } + } + } + } + }, + "description": "A page of Comments from the supplied pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository or pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository or pull request does not exist." + } + }, + "summary": "Search pull request comments", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Add a new blocker comment. \n\nComments can be added in a few places by setting different attributes: \n\nGeneral pull request blocker comment: \n```\n\n{ \n \"text\": \"A task on a pull request.\" \n}\n```\n\nBlocker reply to a comment: \n\n```\n\n{\n \"text\": \"This reply is a task.\", \n \"parent\": { \n \"id\": 1 \n } \n} \n```\n\nGeneral blocker file comment:\n\n```\n\n{\n \"text\": \"A blocker comment on a file.\", \n \"anchor\": { \n \"diffType\": \"RANGE\", \n \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \n \"path\": \"path/to/file\", \n \"srcPath\": \"path/to/file\", \n \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" \n } \n } \n```\n\nBlocker file line comment: \n\n```\n\n{ \n \"text\": \"A task on a particular line within a file.\", \n \"anchor\": { \n \"diffType\": \"COMMIT\", \n \"line\": 1, \n \"lineType\": \"CONTEXT\", \n \"fileType\": \"FROM\", \n \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \n \"path\": \"path/to/file\", \n \"srcPath\": \"path/to/file\", \n \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" \n } \n } \n```\n\nFor file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. For backwards compatibility purposes if no diffType is provided and no fromHash/toHash pair is provided the diffType will be resolved to 'EFFECTIVE'. In any other cases the diffType is REQUIRED. \n\nFor line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be: \n\n- 'ADDED' - for an added line;\n- 'REMOVED' - for a removed line; or\n- 'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff.\n \n\n'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are: \n\n- 'FROM' - the source file of the diff\n - 'TO' - the destination file of the diff\n\n\nIf the current user is not a participant the user is added as a watcher of the pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "createComment_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The comment to add." + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The newly created comment." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The comment was not created due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request, create a comment or watch the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository, pull request or parent comment." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The new created name already exists or adding, deleting, or editing comments isn't supported on archived repositories." + } + }, + "summary": "Add new blocker comment", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments/{commentId}": { + "delete": { + "description": "Delete a pull request comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "deleteComment_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the comment to retrieve.", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure.", + "in": "query", + "name": "version", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The operation was successful." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the comment." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository or pull request." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The comment has replies, the version supplied does not match the current version or the repository is archived." + } + }, + "summary": "Delete pull request comment", + "tags": ["Pull Requests"] + }, + "get": { + "description": "Retrieves a pull request comment.\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "getComment_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the comment to retrieve", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The requested comment." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the comment." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository, pull request or comment." + } + }, + "summary": "Get pull request comment", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Update a comment, with the following restrictions: \n\n- only the author of the comment may update the text of the comment\n- only the author of the comment, the author of the pull request or repository admins and above may update the other fields of a comment\n\n\nConvert a comment to a task or vice versa. \n\nComments can be converted to tasks by setting the 'severity' attribute to 'BLOCKER': \n```\n\n{ \n\"severity\": \"BLOCKER\" \n}\n\n```\n\nTasks can be converted to comments by setting the 'severity' attribute to 'NORMAL': ```\n\n{ \n\"severity\": \"NORMAL\" \n}\n\n```\n\nResolve a blocker comment. \n\nBlocker comments can be resolved by setting the 'state' attribute to 'RESOLVED': ```\n\n{ \n\"state\": \"RESOLVED\" \n} \n```\n\nNote: the supplied JSON object must contain a version that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "updateComment_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the comment to retrieve.", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The comment to add." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The newly updated comment." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The comment was not updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request, update a comment or watch the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository, pull request or comment." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The comment version supplied does not match the current version or the repository is archived." + } + }, + "summary": "Update pull request comment", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/changes": { + "get": { + "description": "Gets changes for the specified PullRequest.\n\nIf the changeScope query parameter is set to 'UNREVIEWED', the application will attempt to stream unreviewed changes based on the lastReviewedCommit of the current user, which are the changes between the lastReviewedCommit and the latest commit of the source branch. The current user is considered to not have any unreviewed changes for the pull request when the lastReviewedCommit is either null (everything is unreviewed, so all changes are streamed), equal to the latest commit of the source branch (everything is reviewed), or no longer on the source branch (the source branch has been rebased). In these cases, the application will fall back to streaming all changes (the default), which is the effective diff for the pull request. The type of changes streamed can be determined by the changeScope parameter included in the properties map of the response. \n\nNote: This resource is currently not paged. The server will return at most one page. The server will truncate the number of changes to either the request's page limit or an internal maximum, whichever is smaller. The start parameter of the page request is also ignored. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "streamChanges_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The since commit hash to stream changes for a RANGE arbitrary change scope", + "in": "query", + "name": "sinceId", + "schema": { "type": "string" } + }, + { + "description": "UNREVIEWED to stream the unreviewed changes for the current user (if they exist); RANGE to stream changes between two arbitrary commits (requires 'sinceId' and 'untilId'); otherwise ALL to stream all changes (the default)", + "in": "query", + "name": "changeScope", + "schema": { "type": "string" } + }, + { + "description": "The until commit hash to stream changes for a RANGE arbitrary change scope", + "in": "query", + "name": "untilId", + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "true to apply comment counts in the changes (the default); otherwise, false to stream changes without comment counts", + "in": "query", + "name": "withComments", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestChange" } + } + }, + "description": "A page of unreviewed Changes for the current user from the supplied pull request, including the unreviewedCommits in the properties map." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository or pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository or pull request does not exist." + } + }, + "summary": "Gets pull request changes", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments": { + "get": { + "description": "Gets comments for the specified pull request and path. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "getComments_2", + "parameters": [ + { + "description": "The path to stream comments for a given path", + "in": "query", + "name": "path", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The from commit hash to stream comments for a RANGE or COMMIT arbitrary change scope", + "in": "query", + "name": "fromHash", + "schema": { "type": "string" } + }, + { + "description": "ACTIVE to stream the active comments; ORPHANED to stream the orphaned comments; ALL to stream both the active and the orphaned comments;", + "in": "query", + "name": "anchorState", + "schema": { "type": "string" } + }, + { + "in": "query", + "name": "diffType", + "schema": { "type": "array", "items": { "type": "string" } } + }, + { + "description": "The to commit hash to stream comments for a RANGE or COMMIT arbitrary change scope", + "in": "query", + "name": "toHash", + "schema": { "type": "string" } + }, + { + "in": "query", + "name": "state", + "schema": { "type": "array", "items": { "type": "string" } } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "EFFECTIVE to stream the comments related to the effective diff of the pull request; RANGE to stream comments related to a commit range between two arbitrary commits (requires 'fromHash' and 'toHash'); COMMIT to stream comments related to a commit between two arbitrary commits (requires 'fromHash' and 'toHash')", + "in": "query", + "name": "diffTypes", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional). If supplied, only comments with a state in the given list will be returned. The state can be OPEN or RESOLVED.", + "in": "query", + "name": "states", + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestComment" } + } + } + } + } + }, + "description": "A page of Comments from the supplied pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository or pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository or pull request does not exist." + } + }, + "summary": "Get pull request comments for path", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Add a new comment. \n\nComments can be added in a few places by setting different attributes:

General pull request comment: \n
 { \n   \"text\": \"An insightful general comment on a pull request.\" \n } \n 
Reply to a comment:
 { \n   \"text\": \"A measured reply.\", \n   \"parent\": { \n      \"id\": 1 \n    } \n } \n 
General file comment:
 { \n   \"text\": \"An insightful general comment on a file.\", \n   \"anchor\": { \n      \"diffType\": \"RANGE\", \n      \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \n      \"path\": \"path/to/file\", \n      \"srcPath\": \"path/to/file\", \n      \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" \n   } \n } \n 
File line comment:
 { \n   \"text\": \"A pithy comment on a particular line within a file.\", \n   \"anchor\": { \n      \"diffType\": \"COMMIT\", \n      \"line\": 1, \n      \"lineType\": \"CONTEXT\", \n      \"fileType\": \"FROM\", \n      \"fromHash\": \"6df3858eeb9a53a911cd17e66a9174d44ffb02cd\", \n      \"path\": \"path/to/file\", \n      \"srcPath\": \"path/to/file\", \n      \"toHash\": \"04c7c5c931b9418ca7b66f51fe934d0bd9b2ba4b\" \n    } \n } \n 
\n\n Add a new task. \n\nTasks are just comments with the attribute 'severity' set to 'BLOCKER': \n\nGeneral pull request task:
 { \n   \"text\": \"A task on a pull request.\", \n   \"severity\": \"BLOCKER\" \n } \n 
\n\n Add a pending comment. \n\nPending comments are just comments with the attribute 'state' set to 'PENDING': \n\nPending comment:
 { \n   \"text\": \"This is a pending comment\", \n   \"state\": \"PENDING\" \n } \n 
\n\nFor file and line comments, 'path' refers to the path of the file to which the comment should be applied and 'srcPath' refers to the path the that file used to have (only required for copies and moves). Also, fromHash and toHash refer to the sinceId / untilId (respectively) used to produce the diff on which the comment was added. Finally diffType refers to the type of diff the comment was added on. For backwards compatibility purposes if no diffType is provided and no fromHash/toHash pair is provided the diffType will be resolved to 'EFFECTIVE'. In any other cases the diffType is REQUIRED. \n\nFor line comments, 'line' refers to the line in the diff that the comment should apply to. 'lineType' refers to the type of diff hunk, which can be: \n\n- 'ADDED' - for an added line;\n- 'REMOVED' - for a removed line; or\n- 'CONTEXT' - for a line that was unmodified but is in the vicinity of the diff.\n'fileType' refers to the file of the diff to which the anchor should be attached - which is of relevance when displaying the diff in a side-by-side way. Currently the supported values are: \n\n- 'FROM' - the source file of the diff\n- 'TO' - the destination file of the diff\nIf the current user is not a participant the user is added as a watcher of the pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "createComment_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The comment to add" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The newly created comment." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The comment was not created due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request, create a comment or watch the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository, pull request or parent comment." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Adding, deleting, or editing comments isn't supported on archived repositories." + } + }, + "summary": "Add pull request comment", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}": { + "delete": { + "description": "Delete a pull request comment. Anyone can delete their own comment. Only users with REPO_ADMIN and above may delete comments created by other users. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "deleteComment_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the comment to retrieve.", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The expected version of the comment. This must match the server's version of the comment or the delete will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the delete. Look for the 'version' attribute in the returned JSON structure.", + "in": "query", + "name": "version", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The operation was successful." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the comment." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository or pull request." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The comment has replies, the version supplied does not match the current version or the repository is archived." + } + }, + "summary": "Delete a pull request comment", + "tags": ["Pull Requests"] + }, + "get": { + "description": "Retrieves a pull request comment. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "getComment_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the comment to retrieve.", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The requested comment." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the comment." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository, pull request or comment." + } + }, + "summary": "Get a pull request comment", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Update a comment, with the following restrictions: \n\n- only the author of the comment may update the text of the comment\n- only the author of the comment, the author of the pull request or repository admins and above may update the other fields of a comment\n \n\nConvert a comment to a task or vice versa. \n\nComments can be converted to tasks by setting the 'severity' attribute to 'BLOCKER': \n
 { \n \"severity\": \"BLOCKER\" \n } \n 
\n\nTasks can be converted to comments by setting the 'severity' attribute to 'NORMAL':
 { \n \"severity\": \"NORMAL\" \n } \n 
\n\nResolve a task. \n\nTasks can be resolved by setting the 'state' attribute to 'RESOLVED':
 { \n \"state\": \"RESOLVED\" \n } \n 
\n\nNote: the supplied JSON object must contain a version that must match the server's version of the comment or the update will fail. To determine the current version of the comment, the comment should be fetched from the server prior to the update. Look for the 'version' attribute in the returned JSON structure. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "updateComment_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the comment to retrieve.", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The updated comment" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestComment" } + } + }, + "description": "The newly updated comment." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The comment was not updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request, update a comment or watch the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository, pull request or comment." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The comment version supplied does not match the current version or the repository is archived." + } + }, + "summary": "Update pull request comment", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/apply-suggestion": { + "post": { + "description": "Apply a suggestion contained within a comment.", + "operationId": "applySuggestion", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the comment to retrieve.", + "in": "path", + "name": "commentId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestApplySuggestionRequest" + } + } + }, + "description": "A request containing other parameters required to apply a suggestion - The given versions/hashes must match the server's version/hashes or the suggestion application will fail (in order to avoid applying the suggestion to the wrong place" + }, + "responses": { + "204": { + "description": "An empty response indicating the suggestion has been applied." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The suggestion was not applied due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to apply the suggestion." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied project, repository, pull request or parent comment." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "There was an error applying the suggestion to the source branch. It must be applied manually." + } + }, + "summary": "Apply pull request suggestion", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commit-message-suggestion": { + "get": { + "description": "Retrieve a suggested commit message for the given Pull Request.", + "operationId": "getCommitMessageSuggestion", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request to generate the suggestion for", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestCommitMessageSuggestion" + } + } + }, + "description": "The suggested commit message" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Get commit message suggestion", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commits": { + "get": { + "description": "Retrieve commits for the specified pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "getCommits_1", + "parameters": [ + { + "description": "The desired scheme for the avatar URL. If the parameter is not present URLs will use the same scheme as this request", + "in": "query", + "name": "avatarScheme", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "If set to true, the service will add \"authorCount\" and \"totalCount\" at the end of the page. \"authorCount\" is the number of different authors and \"totalCount\" is the total number of commits.", + "in": "query", + "name": "withCounts", + "schema": { "type": "string" } + }, + { + "description": "ID of the pullrequest, part of the path", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "If present the service adds avatar URLs for commit authors. Should be an integer specifying the desired size in pixels. If the parameter is not present, avatar URLs will not be setCOMMIT to stream comments related to a commit between two arbitrary commits (requires 'fromHash' and 'toHash')", + "in": "query", + "name": "avatarSize", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestCommit" } + } + } + } + } + }, + "description": "A page of commits from the supplied pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository or pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository or pull request does not exist." + } + }, + "summary": "Get pull request commits", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/decline": { + "post": { + "description": "Decline a pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "decline", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pullrequest ID provided by the path", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure.", + "in": "query", + "name": "version", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestDeclineRequest" + } + } + }, + "description": "Optional body" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestPullRequest" } + } + }, + "description": "The pull request was declined." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The pull request is not OPEN or has been updated since the version specified by the request." + } + }, + "summary": "Decline pull request", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/diff-stats-summary/{path}": { + "get": { + "description": "Retrieve the diff stats summary for the given Pull Request. \n\nThe stats summary include the total number of modified files, added lines, and deleted lines. \n\nNote: The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "getDiffStatsSummary_2", + "parameters": [ + { + "description": "Optional path to the file which should be diffed", + "in": "path", + "name": "path", + "required": true, + "schema": { "type": "string", "pattern": ".*" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The since commit hash to stream a diff between two arbitrary hashes", + "in": "query", + "name": "sinceId", + "schema": { "type": "string" } + }, + { + "description": "The previous path to the file, if the file has been copied, moved or renamed", + "in": "query", + "name": "srcPath", + "schema": { "type": "string" } + }, + { + "description": "The until commit hash to stream a diff between two arbitrary hashes", + "in": "query", + "name": "untilId", + "schema": { "type": "string" } + }, + { + "description": "Optional whitespace flag which can be set to ignore-all", + "in": "query", + "name": "whitespace", + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDiffStatsSummary" + } + } + }, + "description": "The diff stats summary" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Get diff stats summary for pull request", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/diff/{path}": { + "get": { + "description": "Streams a diff within a pull request. \n\nIf the specified file has been copied, moved or renamed, the srcPath must also be specified to produce the correct diff. \n\nTo stream a raw text representation of the diff, this endpoint can be called with the request header 'Accept: text/plain'. \n\nNote: This RESTful endpoint is currently not paged. The server will internally apply a hard cap to the streamed lines, and it is not possible to request subsequent pages if that cap is exceeded. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "streamDiff_2", + "parameters": [ + { + "description": "The security scheme for avatar URLs. If the scheme is not present then it is inherited from the request. It can be set to \"https\" to force the use of secure URLs. Not applicable if streaming raw diff", + "in": "query", + "name": "avatarScheme", + "schema": { "type": "string" } + }, + { + "description": "The path to the file which should be diffed (optional)", + "in": "path", + "name": "path", + "required": true, + "schema": { "type": "string", "pattern": ".*" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The number of context lines to include around added/removed lines in the diff", + "in": "query", + "name": "contextLines", + "schema": { "type": "string" } + }, + { + "description": "The since commit hash to stream a diff between two arbitrary hashes", + "in": "query", + "name": "sinceId", + "schema": { "type": "string" } + }, + { + "description": "The previous path to the file, if the file has been copied, moved or renamed", + "in": "query", + "name": "srcPath", + "schema": { "type": "string" } + }, + { + "description": "The type of diff being requested. When withComments is true this works as a hint to the system to attach the correct set of comments to the diff. Not applicable if streaming raw diff", + "in": "query", + "name": "diffType", + "schema": { "type": "string" } + }, + { + "description": "The until commit hash to stream a diff between two arbitrary hashes", + "in": "query", + "name": "untilId", + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Optional whitespace flag which can be set to ignore-all", + "in": "query", + "name": "whitespace", + "schema": { "type": "string" } + }, + { + "description": "true to embed comments in the diff (the default); otherwise, false to stream the diff without comments. Not applicable if streaming raw diff", + "in": "query", + "name": "withComments", + "schema": { "type": "string" } + }, + { + "description": "If present the service adds avatar URLs for comment authors where the provided value specifies the desired avatar size in pixels. Not applicable if streaming raw diff", + "in": "query", + "name": "avatarSize", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestDiff" } + } + }, + "description": "A page of differences from a pull request." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "If the request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository or pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository or pull request does not exist." + } + }, + "summary": "Stream a diff within a pull request", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge": { + "get": { + "description": "Test whether a pull request can be merged. \n\nA pull request may not be merged if: \n\n- there are conflicts that need to be manually resolved before merging; and/or\n- one or more merge checks have vetoed the merge.\n\n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "canMerge", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestMergeability" + } + } + }, + "description": "The mergeability status of the pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified pull request is not open." + } + }, + "summary": "Test if pull request can be merged", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Merge the specified pull request immediately or set the pull request to auto-merge when all the merge checks pass by setting autoMerge field in the request body.\n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.", + "operationId": "merge", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure.", + "in": "query", + "name": "version", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestMergeRequest" + } + } + }, + "description": "The body holder" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestPullRequest" } + } + }, + "description": "The merged pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to merge the specified pull request" + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The auto-merge setting is not enabled for the repository that this pull request targets." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details): \n\n- The pull request has conflicts.\n- A merge check vetoed the merge.\n- The specified version is out of date.\n- The specified pull request is not open.\n- The to repository is archived.\n" + } + }, + "summary": "Merge pull request", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge-base": { + "get": { + "description": "Returns the best common ancestor between the latest commits of the source and target branches of the pull request.\n\nIf more than one best common ancestor exists, only one will be returned. It is unspecified which will be returned.", + "operationId": "getMergeBase_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestCommit" } + } + }, + "description": "The common ancestor of the latest commits in the source and target branches of this pull request" + }, + "204": { "description": "No common parent between exist" }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project, repository, or pull request does not exist" + } + }, + "summary": "Get the common ancestor between the latest commits of the source and target branches of the pull request", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants": { + "delete": { + "deprecated": true, + "description": "Unassigns a participant from the REVIEWER role they may have been given in a pull request. \n\nIf the participant has no explicit role this method has no effect. \n\nAfterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered. \n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource. \n\nDeprecated since 4.2. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug} instead.", + "operationId": "unassignParticipantRole_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { "in": "query", "name": "username", "schema": { "type": "string" } } + ], + "responses": { + "204": { "description": "The update completed." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Removing reviewers isn't supported on archived repositories." + } + }, + "summary": "Unassign pull request participant", + "tags": ["Deprecated", "Pull Requests"] + }, + "get": { + "description": "Retrieves a page of the participants for a given pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "listParticipants", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + } + } + } + } + }, + "description": "Details of the participants in this pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Get pull request participants", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Assigns a participant to an explicit role in pull request. Currently only the REVIEWER role may be assigned. \n\nIf the user is not yet a participant in the pull request, they are made one and assigned the supplied role. \n\nIf the user is already a participant in the pull request, their previous role is replaced with the supplied role unless they are already assigned the AUTHOR role which cannot be changed and will result in a Bad Request (400) response code. \n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.", + "operationId": "assignParticipantRole", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestAssignParticipantRoleRequest" + } + } + }, + "description": "The participant to be added to the pull request, includes the user and their role", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + } + }, + "description": "Details of the participants in this pull request." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request does not have the username and role, or is attempting an invalid assignment." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Adding reviewers isn't supported on archived repositories" + } + }, + "summary": "Assign pull request participant role", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}": { + "delete": { + "description": "Unassigns a participant from the REVIEWER role they may have been given in a pull request. \n\nIf the participant has no explicit role this method has no effect. \n\nAfterwards, the user will still remain a participant in the pull request but their role will be reduced to PARTICIPANT. This is because once made a participant of a pull request, a user will forever remain a participant. Only their role may be altered. \n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.", + "operationId": "unassignParticipantRole", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The slug for the user being unassigned", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The update completed." }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request does not have the username." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Removing reviewers isn't supported on archived repositories." + } + }, + "summary": "Unassign pull request participant", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Change the current user's status for a pull request. Implicitly adds the user as a participant if they are not already. If the current user is the author, this method will fail. \n\nThe possible values for {@code status} are UNAPPROVED, NEEDS_WORK (which is referred to as \"Requested changes\" in the frontend from 8.10 onward), or APPROVED. \n\nIf the new {@code status} is NEEDS_WORK or APPROVED then the {@code lastReviewedCommit} for the participant will be updated to the latest commit of the source branch of the pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "updateStatus", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The slug for the user changing their status", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "deprecated": true, + "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. Note: This parameter is deprecated. Use last reviewed commit in request body instead", + "in": "query", + "name": "version", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestAssignStatusRequest" + } + } + }, + "description": "The participant representing the status to set, includes the status of the participant and last reviewed commit. If last reviewed commit is provided, it will be used to update the participant status. The operation will fail if the latest commit of the pull request does not match the provided last reviewed commit. If last reviewed commit is not provided, the latest commit of the pull request will be used for the update by default.", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestParticipant" + } + } + }, + "description": "Details of the new participant." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified status was invalid or the currently authenticated user is the author of the PR and cannot have its status updated." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The pull request is not open, or has been updated since the last reviewed commit specified by the request." + } + }, + "summary": "Change pull request status", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/reopen": { + "post": { + "description": "Re-open a declined pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "reopen", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the pull request within the repository", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure.", + "in": "query", + "name": "version", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestReopenRequest" + } + } + }, + "description": "The body holder" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestPullRequest" } + } + }, + "description": "The merged pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to reopen the specified pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "One of the following error cases occurred (check the error message for more details): \n\n- The pull request is not in a declined state.\n- The specified version is out of date.\n- The to repository is archived.\n" + } + }, + "summary": "Re-open pull request", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/review": { + "delete": { + "description": "Discard a pull request review for the authenticated user. \n\nThe authenticated user must have REPO_READ permission for the repository to call this resource.", + "operationId": "discardReview", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The pull request review has been discarded." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to discard the the pull request review" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified pull request or repository does not exist." + } + }, + "summary": "Discard pull request review", + "tags": ["Pull Requests"] + }, + "get": { + "description": "Get the CommentThread threads which have Comment comments that have a CommentState#PENDING pending state and are part of the pull request review for the authenticated user.", + "operationId": "getReview", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestComment" } + } + } + } + } + }, + "description": "A page of Comments from the supplied pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository or pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository or pull request does not exist." + } + }, + "summary": "Get pull request comment thread", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Complete a review on a pull request.", + "operationId": "finishReview", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "deprecated": true, + "description": "The current version of the pull request. If the server's version isn't the same as the specified version the operation will fail. To determine the current version of the pull request it should be fetched from the server prior to this operation. Look for the 'version' attribute in the returned JSON structure. Note: This parameter is deprecated. Use last reviewed commit in request body instead", + "in": "query", + "name": "version", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestFinishReviewRequest" + } + } + }, + "description": "The REST request which contains comment text, last reviewed commit and participant status. If last reviewed commit is provided, it will be used to update the participant status. The operation will fail if the latest commit of the pull request does not match the provided last reviewed commit. If last reviewed commit is not provided, the latest commit of the pull request will be used for the update by default." + }, + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "Getting back the number of published comments and completing the review on a pull request." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request is invalid when there is no request body provided, or the participant status in the request is invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request, update a comment or watch the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "There is no pull request review for the user to finish." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The pull request has been updated since the last reviewed commit specified by the request, or reviews cannot be made on pull requests in archived repositories." + } + }, + "summary": "Complete pull request review", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/watch": { + "delete": { + "description": "Remove the authenticated user as a watcher for the specified pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "unwatch_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The user is no longer watching the pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Stop watching pull request", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Add the authenticated user as a watcher for the specified pull request. \n\nThe authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.", + "operationId": "watch_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The pull request ID.", + "in": "path", + "name": "pullRequestId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The user is now watching the pull request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the pull request." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or pull request does not exist." + } + }, + "summary": "Watch pull request", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/raw/{path}": { + "get": { + "description": "Retrieve the raw content for a file path at a specified revision. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "streamRaw", + "parameters": [ + { + "description": "The file path to retrieve content from", + "in": "path", + "name": "path", + "required": true, + "schema": { "type": "string", "pattern": ".*" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "A specific commit or ref to retrieve the raw content at, or the default branch if not specified", + "in": "query", + "name": "at", + "schema": { "type": "string" } + }, + { + "description": "If present or \"true\", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than \"true\", the content is streamed without markup", + "in": "query", + "name": "markup", + "schema": { "type": "string" } + }, + { + "description": "(Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used", + "in": "query", + "name": "htmlEscape", + "schema": { "type": "string" } + }, + { + "description": "(Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used", + "in": "query", + "name": "includeHeadingId", + "schema": { "type": "string" } + }, + { + "description": "(Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used", + "in": "query", + "name": "hardwrap", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The raw contents from a file." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The path parameter was not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist." + } + }, + "summary": "Get raw content of a file at revision", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/readme": { + "get": { + "description": "Retrieves the README for the repository, if it's been defined. \n\nThis checks the repository for a
README
file, optionally with an
md
or
txt
extension, and, if found, streams it. By default, the raw content of the file is streamed. Appending
?markup
to the URL will stream an HTML-rendered version instead. Note that, when streaming HTML, relative URLs in the README will not work if applied relative to this URL. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "streamReadme", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "A specific commit or ref to retrieve the guidelines at, or the default branch if not specified", + "in": "query", + "name": "at", + "schema": { "type": "string" } + }, + { + "description": "If present or \"true\", triggers the raw content to be markup-rendered and returned as HTML; otherwise, if not specified, or any value other than \"true\", the content is streamed without markup", + "in": "query", + "name": "markup", + "schema": { "type": "string" } + }, + { + "description": "(Optional) true if HTML should be escaped in the input markup, false otherwise. If not specified, the value of the markup.render.html.escape property, which is true by default, will be used", + "in": "query", + "name": "htmlEscape", + "schema": { "type": "string" } + }, + { + "description": "(Optional) true if headings should contain an ID based on the heading content. If not specified, the value of the markup.render.headerids property, which is false by default, will be used", + "in": "query", + "name": "includeHeadingId", + "schema": { "type": "string" } + }, + { + "description": "(Optional) Whether the markup implementation should convert newlines to breaks. If not specified, the value of the markup.render.hardwrap property, which is true by default, will be used", + "in": "query", + "name": "hardwrap", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "The README for the repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to read the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get repository readme", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/recreate": { + "post": { + "description": "If a create or fork operation fails, calling this method will clean up the broken repository and try again. The repository must be in an INITIALISATION_FAILED state. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "retryCreateRepository", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "description": "The newly created repository." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository was not created due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Retry repository creation", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/ref-change-activities": { + "get": { + "description": "Retrieve a page of repository ref change activity. \n\nThe authenticated user must have REPO_ADMIN permission to call this resource.", + "operationId": "getRefChangeActivity", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional) exact match for a ref ID to filter ref change activity for", + "in": "query", + "name": "ref", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRepositoryRefChangeActivity" + } + } + } + } + } + }, + "description": "A page of ref change activity." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user is currently not authenticated or the user does not have REPO_ADMIN permission." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get ref change activity", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/ref-change-activities/branches": { + "get": { + "description": "Retrieve a page of branches with ref change activities for a specific repository. \n\nThe authenticated user must have REPO_ADMIN permission to call this resource.", + "operationId": "findBranches", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "(optional) Partial match for a ref ID to filter minimal refs for", + "in": "query", + "name": "filterText", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestMinimalRef" } + } + } + } + } + }, + "description": "A page of branches with ref change activities." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The user is currently not authenticated or the user does not have REPO_ADMIN permission." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get branches with ref change activities for repository", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/related": { + "get": { + "description": "Retrieve repositories which are related to this one. Related repositories are from the same Repository#getHierarchyId() hierarchy as this repository. \n\nOnly repositories to which the authenticated user has REPO_READ permission will be included, even if more repositories are part of this repository's hierarchy.", + "operationId": "getRelatedRepositories", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepository" } + } + } + } + } + }, + "description": "A page of repositories related to the request repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to see the request repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request repository does not exist." + } + }, + "summary": "Get related repository", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist": { + "get": { + "description": "Find repository secret scanning allowlist rules by filtering.\n\nRepository **Admin** is required", + "operationId": "search_2", + "parameters": [ + { + "description": "Filter names by the provided text", + "example": "Access", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Order by", + "in": "query", + "name": "order", + "schema": { "type": "string", "enum": ["NAME_ASC", "NAME_DESC"] } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRule" + } + } + } + } + } + }, + "description": "Page of allowlist rules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was not a correctly formed allowlist rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to view repository rules" + } + }, + "summary": "Find repository secret scanning allowlist rules", + "tags": ["Security"] + }, + "post": { + "description": "Create a new repository secret scanning allowlist rule. Repository allowlist rules are used when scanning the given repository.\n\nRepository **Admin** is required", + "operationId": "createAllowlistRule_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRuleSetRequest" + } + } + }, + "description": "Allowlist rule to create, either the line regular expression or the path regular expression must be present", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRule" + } + } + }, + "description": "The created rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed allowlist rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to create repository rules" + } + }, + "summary": "Create repository secret scanning allowlist rule", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist/{id}": { + "delete": { + "description": "Delete a repository secret scanning allowlist rule with the provided ID.\n\nRepository **Admin** is required", + "operationId": "deleteAllowlistRule_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The allowlist rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "Empty response indicating that the allowlist rule was deleted" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to delete repository allowlist rules" + } + }, + "summary": "Delete a repository secret scanning allowlist rule", + "tags": ["Security"] + }, + "get": { + "description": "Get a repository secret scanning allowlist rule by ID.\n\nRepository **Admin** is required", + "operationId": "getAllowlistRule_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The allowlist rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRule" + } + } + }, + "description": "The requested allowlist rule" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to view repository allowlist rules" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested allowlist rule was not found" + } + }, + "summary": "Get a repository secret scanning allowlist rule", + "tags": ["Security"] + }, + "put": { + "description": "Edit a repository secret scanning allowlist rule.\n\nRepository **Admin** is required", + "operationId": "editAllowlistRule_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The allowlist rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRuleSetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRule" + } + } + }, + "description": "The updated allowlist rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed allowlist rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to edit repository allowlist rules" + } + }, + "summary": "Edit an existing repository secret scanning allowlist rule", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt": { + "delete": { + "description": "Remove a repository from being exempt from secret scanning", + "operationId": "deleteExemptRepo", + "responses": { + "204": { + "description": "Empty response indicating that the exempt repository was deleted" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to delete an exempt repository" + } + }, + "summary": "Delete an exempt repository", + "tags": ["Security"] + }, + "get": { + "description": "Check whether a repository is exempt from secret scanning", + "operationId": "isRepoExempt", + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "True if the repository is exempt from secret scanning, false otherwise" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to check whether a repository is exempt from secret scanning" + } + }, + "summary": "Get whether a repository is exempt", + "tags": ["Security"] + }, + "put": { + "deprecated": true, + "description": "Exempt a repository from being scanned for secrets \n\nDeprecated since 8.6. Exemptions are now managed by scope. \nUse POST /rest/api/1.0/secret-scanning/exempt for global scope \nUse POST /rest/api/1.0/projects/{projectKey}/secret-scanning/exempt for the project scope", + "operationId": "addExemptRepo", + "responses": { + "204": { "description": "An exempt repo was added" }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to exempt a repository from secret scanning" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "At least one of specified repositories have already been previously made exempt." + } + }, + "summary": "Exempt a repo from secret scanning", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules": { + "get": { + "description": "Find repository secret scanning rules by filtering.\n\nRepository **Admin** is required", + "operationId": "search_3", + "parameters": [ + { + "description": "Filter names by the provided text", + "example": "Access", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Order by", + "in": "query", + "name": "order", + "schema": { "type": "string", "enum": ["NAME_ASC", "NAME_DESC"] } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + } + } + } + }, + "description": "Page of rules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was not correctly formed rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to view repository rules" + } + }, + "summary": "Find repository secret scanning rules", + "tags": ["Security"] + }, + "post": { + "description": "Create a new repository secret scanning rule. Repository rules are used when scanning the given repository.\n\nRepository **Admin** is required", + "operationId": "createRule_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRuleSetRequest" + } + } + }, + "description": "Rule to create, either the line regular expression or the path regular expression must be present", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + }, + "description": "The created rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to create repository rules" + } + }, + "summary": "Create repository secret scanning rule", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules/{id}": { + "delete": { + "description": "Delete a repository secret scanning rule with the provided ID.\n\nRepository **Admin** is required", + "operationId": "deleteRule_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "Empty response indicating that the rule was deleted" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to delete repository rules" + } + }, + "summary": "Delete a repository secret scanning rule", + "tags": ["Security"] + }, + "get": { + "description": "Get a repository secret scanning rule by ID.\n\nRepository **Admin** is required", + "operationId": "getRule_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + }, + "description": "The requested rule" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to view repository rules" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested rule was not found" + } + }, + "summary": "Get a repository secret scanning rule", + "tags": ["Security"] + }, + "put": { + "description": "Edit a repository secret scanning rule.\n\nRepository **Admin** is required", + "operationId": "editRule_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRuleSetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + }, + "description": "The updated rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to edit repository rules" + } + }, + "summary": "Edit an existing repository secret scanning rule", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/auto-decline": { + "delete": { + "description": "Delete auto decline settings for the supplied repository.\n\nThe authenticated user must have REPO_ADMIN permission for this repository to call the resource.", + "operationId": "deleteAutoDeclineSettings_1", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The auto decline settings have been deleted successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the auto decline settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Delete auto decline settings", + "tags": ["Repository"] + }, + "get": { + "description": "Retrieves the auto decline settings for the supplied repository. Project settings will be returned if no explicit settings have been set for the repository. In the case that there are no project settings, the default settings will be returned.\n\nThe authenticated user must have REPO_READ permission for this repository to call the resource.", + "operationId": "getAutoDeclineSettings_1", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoDeclineSettings" + } + } + }, + "description": "The auto decline settings" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the auto decline settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get auto decline settings", + "tags": ["Repository"] + }, + "put": { + "description": "Creates or updates the auto decline settings for the supplied repository.\n\nThe authenticated user must have REPO_ADMIN permission for this repository to call the resource", + "operationId": "setAutoDeclineSettings_1", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoDeclineSettingsRequest" + } + } + }, + "description": "The settings to create or update" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoDeclineSettings" + } + } + }, + "description": "The auto decline settings" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "inactivityWeeks was not one of 1, 2, 4, 8, or, 12, or the enabled parameter was not included in the request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create or update the auto decline settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Create auto decline settings", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/auto-merge": { + "delete": { + "description": "Deletes pull request auto-merge settings for the supplied repository.\n\nThe authenticated user must have REPO_ADMIN permission for this repository to call the resource.", + "operationId": "delete_5", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The pull request auto-merge settings" }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the pull request auto-merge settings." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The pull request auto-merge settings cannot be modified due to a restriction enforced by the supplied repository's project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Delete pull request auto-merge settings", + "tags": ["Repository"] + }, + "get": { + "description": "Retrieves the pull request auto-merge settings for the supplied repository. Project settings will be returned if no explicit settings have been set for the repository. In the case that there are no project settings, the default settings will be returned. If the repository's project has restricted its auto-merge settings, then the settings of the project will be returned.\n\nThe authenticated user must have REPO_READ permission for this repository to call the resource.", + "operationId": "get_5", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoMergeRestrictedSettings" + } + } + }, + "description": "The pull request auto-merge settings" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the pull request auto-merge settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get pull request auto-merge settings", + "tags": ["Repository"] + }, + "put": { + "description": "Creates or updates the pull request auto-merge settings for the supplied repository.\n\nThe authenticated user must have REPO_ADMIN permission for this repository to call the resource.", + "operationId": "set_1", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoMergeSettingsRequest" + } + } + }, + "description": "The settings to create or update" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoMergeRestrictedSettings" + } + } + }, + "description": "The pull request auto-merge settings" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The 'enabled' field was not provided correctly." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create or update the pull request auto-merge settings." + }, + "403": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The pull request auto-merge settings cannot be modified due to a restriction enforced by the supplied repository's project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Create or update the pull request auto-merge settings", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks": { + "get": { + "description": "Retrieve a page of repository hooks for this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "getRepositoryHooks_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The optional type to filter by.", + "in": "query", + "name": "type", + "schema": { + "type": "string", + "enum": ["PRE_RECEIVE", "POST_RECEIVE"] + } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRepositoryHook" + } + } + } + } + } + }, + "description": "A page of repository hooks with their associated enabled state." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the hooks." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get repository hooks", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks/{hookKey}": { + "delete": { + "description": "Delete repository hook configuration for the supplied hookKey and repositorySlug\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "deleteRepositoryHook", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The hook configuration matching the supplied hookKey and repositorySlug was deleted" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The settings specified are invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the hook." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or hook does not exist." + } + }, + "summary": "Delete repository hook", + "tags": ["Repository"] + }, + "get": { + "description": "Retrieve a repository hook for this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "getRepositoryHook_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepositoryHook" } + } + }, + "description": "The repository hooks with their associated enabled state for the supplied hookKey." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the hook." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository hook does not exist for the given repository, or the repository does not exist." + } + }, + "summary": "Get repository hook", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks/{hookKey}/enabled": { + "delete": { + "description": "Disable a repository hook for this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "disableHook_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepositoryHook" } + } + }, + "description": "The repository hooks with their associated enabled state for the supplied hookKey." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to disable the hook." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or hook does not exist." + } + }, + "summary": "Disable repository hook", + "tags": ["Repository"] + }, + "put": { + "description": "Enable a repository hook for this repository and optionally apply new configuration. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. \n\nA JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook.", + "operationId": "enableHook_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The content length.", + "in": "header", + "name": "Content-Length", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepositoryHook" } + } + }, + "description": "The repository hooks with their associated enabled state for the supplied hookKey." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to enable the hook." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or hook does not exist." + } + }, + "summary": "Enable repository hook", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks/{hookKey}/settings": { + "get": { + "description": "Retrieve the settings for a repository hook for this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "getSettings_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ExampleSettings" } + } + }, + "description": "The settings for the hook." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the hook settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or hook does not exist." + } + }, + "summary": "Get repository hook settings", + "tags": ["Repository"] + }, + "put": { + "description": "Modify the settings for a repository hook for this repository. \n\nThe service will reject any settings which are too large, the current limit is 32KB once serialized. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource. \n\nA JSON document can be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook.", + "operationId": "setSettings_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ExampleSettings" } + } + }, + "description": "The raw settings." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ExampleSettings" } + } + }, + "description": "The settings for the hook." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The settings specified are invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to modify the hook settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository or hook does not exist." + } + }, + "summary": "Update repository hook settings", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/pull-requests": { + "get": { + "description": "Retrieve the pull request settings for the context repository. \n\nThe authenticated user must have REPO_READ permission for the context repository to call this resource. \n\nThis resource will call all RestFragments that are registered with the key bitbucket.repository.settings.pullRequests. If any fragment fails validations by returning a non-empty Map of errors, then no fragments will execute. \n\nThe property keys for the settings that are bundled with the application are \n\n- mergeConfig - the merge strategy configuration for pull requests\n- requiredApprovers - (Deprecated, please use com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook instead) the number of approvals required on a pull request for it to be mergeable, or 0 if the merge check is disabled\n- com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook - the merge check configuration for required approvers\n- requiredAllApprovers - whether or not all approvers must approve a pull request for it to be mergeable\n- requiredAllTasksComplete - whether or not all tasks on a pull request need to be completed for it to be mergeable\n- requiredSuccessfulBuilds - (Deprecated, please use com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck instead) the number of successful builds on a pull request for it to be mergeable, or 0 if the merge check is disabled\n- com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck - the merge check configuration for required builds\n\n\n", + "operationId": "getPullRequestSettings_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRepositoryPullRequestSettings" + } + } + }, + "description": "The repository pull request settings for the context repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to see the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Get pull request settings", + "tags": ["Repository"] + }, + "post": { + "description": "Update the pull request settings for the context repository. \n\nThe authenticated user must have REPO_ADMIN permission for the context repository to call this resource. \n\nThis resource will call all RestFragments that are registered with the key bitbucket.repository.settings.pullRequests. If any fragment fails validations by returning a non-empty Map of errors, then no fragments will execute. \n\nOnly the settings that should be updated need to be included in the request. \n\nThe property keys for the settings that are bundled with the application are \n\n- mergeConfig - the merge strategy configuration for pull requests\n- requiredApprovers - (Deprecated, please use com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook instead) the number of approvals required on a pull request for it to be mergeable, or 0 to disable the merge check\n- com.atlassian.bitbucket.server.bundled-hooks.requiredApproversMergeHook - a json map containing the keys 'enabled' (a boolean to enable or disable this merge check) and 'count' (an integer to set the number of required approvals)\n- requiredAllApprovers - whether or not all approvers must approve a pull request for it to be mergeable\n- requiredAllTasksComplete - whether or not all tasks on a pull request need to be completed for it to be mergeable\n- requiredSuccessfulBuilds - (Deprecated, please use com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck instead) the number of successful builds on a pull request for it to be mergeable, or 0 to disable the merge check\n- com.atlassian.bitbucket.server.bitbucket-build.requiredBuildsMergeCheck - a json map containing the keys 'enabled' (a boolean to enable or disable this merge check) and 'count' (an integer to set the number of required builds)\n\n\nMerge strategy configuration deletion:\n\nAn explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty \"mergeConfig\" attribute. i.e: \n\n\n```{ \n \"mergeConfig\": { \n } \n} \n```\n\nUpon completion of this request, the effective configuration will be: \n\n- The configuration set for this repository's SCM type as set at the project level, if present, otherwise\n- the configuration set for this repository's SCM type as set at the instance level, if present, otherwise\n- the default configuration for this repository's SCM type\n\n\n", + "operationId": "updatePullRequestSettings_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRepositoryPullRequestSettings" + } + } + }, + "description": "The updated settings." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestRepositoryPullRequestSettings" + } + } + }, + "description": "The repository pull request settings for the context repository." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository pull request settings were not updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to see the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Update pull request settings", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups": { + "get": { + "description": "Retrieve a page of reviewer groups of a given scope.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getReviewerGroups_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestReviewerGroup" + } + } + } + } + } + }, + "description": "A `page` of reviewer group(s) of the provided scope and its inherited scope." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository scope supplied does not exist." + } + }, + "summary": "Get all reviewer groups", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Create a reviewer group.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "create_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "The request containing the details of the reviewer group." + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "The newly created reviewer group." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request is missing a reviewer group name." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository scope supplied does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The new created name already exists." + } + }, + "summary": "Create reviewer group", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}": { + "delete": { + "description": "Deletes a reviewer group.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "delete_7", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the reviewer group to be deleted", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The operation was successful" }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the reviewer group in this repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied reviewer group ID." + } + }, + "summary": "Delete reviewer group", + "tags": ["Pull Requests"] + }, + "get": { + "description": "Retrieve a reviewer group.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getReviewerGroup_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the reviewer group to be retrieved", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "The reviewer group." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The ID supplied does not exist." + } + }, + "summary": "Get reviewer group", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Update the attributes of a reviewer group.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "update_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the reviewer group to be updated", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "The request containing the attributes of the reviewer group to be updated. Only the attributes to be updated need to be present in this object." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "The updated reviewer group." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The updated attribute does not meet the requirements. E.g. the name exceeds 50 characters, setting name to blank." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository scope supplied does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The new updated name already exists." + } + }, + "summary": "Update reviewer group attributes", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}/users": { + "get": { + "description": "Retrieve a list of the users of a reviewer group.\n\nThis does not return all the users of the group, only the users who are licensed and have REPO_READ permission for the specified repository.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.", + "operationId": "getUsers", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the reviewer group to be retrieved", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json;charset=UTF-8": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestApplicationUser" + } + } + } + }, + "description": "The list of users of a reviewer group." + }, + "401": { + "content": { + "application/json;charset=UTF-8": { + "schema": { "$ref": "#/components/schemas/RestErrors" } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json;charset=UTF-8": { + "schema": { "$ref": "#/components/schemas/RestErrors" } + } + }, + "description": "The ID supplied does not exist.d" + } + }, + "summary": "Get reviewer group users", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/tags": { + "get": { + "description": "Retrieve the tags matching the supplied filterText param. \n\nThe authenticated user must have REPO_READ permission for the context repository to call this resource.", + "operationId": "getTags", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated)", + "in": "query", + "name": "orderBy", + "schema": { "type": "string" } + }, + { + "description": "The text to match on.", + "in": "query", + "name": "filterText", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestTag" } + } + } + } + } + }, + "description": "The tags matching the supplied filterText." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to read the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Find tag", + "tags": ["Repository"] + }, + "post": { + "description": "Creates a tag using the information provided in the RestCreateTagRequest request \n\nThe authenticated user must have REPO_WRITE permission for the context repository to call this resource.", + "operationId": "createTagForRepository", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestCreateTagRequest" } + } + }, + "description": "The request to create a tag containing a name, startPoint, and optionally a message" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestTag" } + } + }, + "description": "The created tag." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to write to the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Create tag", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/tags/{name}": { + "get": { + "description": "Retrieve a tag in the specified repository. \n\nThe authenticated user must have REPO_READ permission for the context repository to call this resource.", + "operationId": "getTag", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The name of the tag to be retrieved.", + "in": "path", + "name": "name", + "required": true, + "schema": { "type": "string", "pattern": ".*" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestTag" } + } + }, + "description": "The tag which matches the supplied name." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to read the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified tag does not exist." + } + }, + "summary": "Get tag", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/watch": { + "delete": { + "description": "Remove the authenticated user as a watcher for the specified repository. \n\nThe authenticated user must have REPO_READ permission for the repository to call this resource.", + "operationId": "unwatch_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The user is no longer watching the repository." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Stop watching repository", + "tags": ["Repository"] + }, + "post": { + "description": "Add the authenticated user as a watcher for the specified repository. \n\nThe authenticated user must have REPO_READ permission for the repository to call this resource.", + "operationId": "watch_2", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepository" } + } + }, + "description": "The repository to watch." + }, + "responses": { + "204": { "description": "The user is now watching the repository." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Watch repository", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks": { + "get": { + "description": "Find webhooks in this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "findWebhooks_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "List of com.atlassian.webhooks.WebhookEvent IDs to filter for", + "in": "query", + "name": "event", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "true if statistics should be provided for all found webhooks", + "in": "query", + "name": "statistics", + "schema": { "type": "boolean" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "A page of webhooks." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to find webhooks in the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Find webhooks", + "tags": ["Repository"] + }, + "post": { + "description": "Create a webhook for the repository specified via the URL. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "createWebhook_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "The webhook to be created for this repository." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "A created webhook." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The webhook parameters were invalid or not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create webhooks in the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist." + } + }, + "summary": "Create webhook", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/search": { + "get": { + "description": "Search webhooks in this repository and parent project. This endpoint returns a superset of the results returned by the /webhooks endpoint because it allows filtering by project scope too, not just repository webhooks.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "searchWebhooks", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Scopes to filter by. This parameter can be specified once e.g. \"scopeType=repository\", or twice e.g. \"scopeType=repository&scopeType=project\", to filter by more than one scope level. ", + "in": "query", + "name": "scopeType", + "schema": { "type": "string" } + }, + { + "description": "List of com.atlassian.webhooks.WebhookEvent ids to filter for", + "in": "query", + "name": "event", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "true if statistics should be provided for all found webhooks", + "in": "query", + "name": "statistics", + "schema": { "type": "boolean" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "A page of webhooks." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to find webhooks in the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Search webhooks", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/test": { + "post": { + "description": "Test connectivity to a specific endpoint. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "testWebhook_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "query", + "name": "webhookId", + "schema": { "type": "integer", "format": "int32" } + }, + { + "description": "Whether SSL verification is required for the specified webhook URL. Default value is true.", + "in": "query", + "name": "sslVerificationRequired", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The url in which to connect to", + "in": "query", + "name": "url", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestWebhookCredentials" + } + } + }, + "description": "Basic authentication credentials, if required." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestWebhookRequestResponse" + } + } + }, + "description": "A webhook." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to test a connection." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Test webhook", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}": { + "delete": { + "description": "Delete a webhook for the repository specified via the URL. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "deleteWebhook_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the webhook to be deleted.", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The webhook for the repository has been deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete webhooks in the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist, or webhook does not exist in this repository." + } + }, + "summary": "Delete webhook", + "tags": ["Repository"] + }, + "get": { + "description": "Get a webhook by ID. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "getWebhook_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "ID of the webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "true if statistics should be provided for the webhook", + "in": "query", + "name": "statistics", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "A webhook." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to get a webhook in the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist, or the webhook does not exist in the repository." + } + }, + "summary": "Get webhook", + "tags": ["Repository"] + }, + "put": { + "description": "Update an existing webhook. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "updateWebhook_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Id of the existing webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "The representation of the updated values for the webhook" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "A webhook." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update a webhook in this repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist, or the webhook does not exist in the repository." + } + }, + "summary": "Update webhook", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}/latest": { + "get": { + "description": "Get the latest invocations for a specific webhook. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "getLatestInvocation_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "ID of the webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The string ID of a specific event to retrieve the last invocation for.", + "in": "query", + "name": "event", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered", + "in": "query", + "name": "outcome", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDetailedInvocation" + } + } + }, + "description": "A webhook invocation dataset." + }, + "204": { "description": "No webhook invocations exist." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to get webhook invocations in the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist, or the webhook does not exist in the repository." + } + }, + "summary": "Get last webhook invocation details", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}/statistics": { + "get": { + "description": "Get the statistics for a specific webhook. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "getStatistics_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "ID of the webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The string ID of a specific event to retrieve the last invocation for. May be empty, in which case all events are considered", + "in": "query", + "name": "event", + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestInvocationHistory" + } + } + }, + "description": "A webhook invocation dataset." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to get webhook statistics in the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist, or the webhook does not exist in the repository." + } + }, + "summary": "Get webhook statistics", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}/statistics/summary": { + "get": { + "description": "Get the statistics summary for a specific webhook. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.", + "operationId": "getStatisticsSummary_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "ID of the webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The repository slug.", + "in": "path", + "name": "repositorySlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestInvocationHistory" + } + } + }, + "description": "A webhook invocation dataset." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to get webhook statistics summary in the repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository does not exist, or the webhook does not exist in the repository." + } + }, + "summary": "Get webhook statistics summary", + "tags": ["Repository"] + } + }, + "/api/latest/projects/{projectKey}/secret-scanning/allowlist": { + "get": { + "description": "Find project secret scanning allowlist rules by filtering.\n\nProject **Admin** is required", + "operationId": "searchAllowlistRule", + "parameters": [ + { + "description": "Filter names by the provided text", + "example": "Access", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Order by", + "in": "query", + "name": "order", + "schema": { "type": "string", "enum": ["NAME_ASC", "NAME_DESC"] } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRule" + } + } + } + } + } + }, + "description": "Page of allowlist rules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was not correctly formed allowlist rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to view project allowlist rules" + } + }, + "summary": "Find project secret scanning allowlist rules", + "tags": ["Security"] + }, + "post": { + "description": "Create a new project level secret scanning allowlist rule. Project allowlist rules are used when scanning all non exempt repositories in the provided project.\n\nProject **Admin** is required", + "operationId": "createAllowlistRule", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRuleSetRequest" + } + } + }, + "description": "Allowlist rule to create, either the line regular expression or the path regular expression must be present", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRule" + } + } + }, + "description": "The created allowlist rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed allowlist rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to create project allowlist rules." + } + }, + "summary": "Create project secret scanning allowlist rule", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/secret-scanning/allowlist/{id}": { + "delete": { + "description": "Delete a project secret scanning allowlist rule with the provided ID.\n\nProject **Admin** is required", + "operationId": "deleteAllowlistRule", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The allowlist rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "Empty response indicating that the rule was deleted, or not found at this location" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to delete project rules" + } + }, + "summary": "Delete a project secret scanning allowlist rule", + "tags": ["Security"] + }, + "get": { + "description": "Get a project secret scanning allowlist rule by ID.\n\nProject **Admin** is required", + "operationId": "getAllowlistRule", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The allowlist rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRule" + } + } + }, + "description": "The requested allowlist rule" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to view project allowlist rules" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested allowlist rules was not found" + } + }, + "summary": "Get a project secret scanning allowlist rule", + "tags": ["Security"] + }, + "put": { + "description": "Edit a project secret scanning allowlist rule.\n\nProject **Admin** is required", + "operationId": "editAllowlistRule", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The allowlist rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRuleSetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningAllowlistRule" + } + } + }, + "description": "The updated allowlist rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed allowlist rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to modify project allowlist rules" + } + }, + "summary": "Edit an existing project secret scanning allowlist rule", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/secret-scanning/exempt": { + "get": { + "description": "Find repositories exempt from secret scanning in a project", + "operationId": "findExemptReposByProject", + "parameters": [ + { + "description": "Order by project name followed by repository name either ascending or descending, defaults to ascending.", + "in": "query", + "name": "order", + "schema": { "type": "string", "enum": ["NAME_ASC", "NAME_DESC"] } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepository" } + } + } + } + } + }, + "description": "Page of repositories" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to search exempt repositories for this project" + } + }, + "summary": "Find repos exempt from secret scanning for a project", + "tags": ["Security"] + }, + "post": { + "description": "Bulk exempt a list of repositories from being scanned for secrets. User must be have **PROJECT ADMIN** permissions.", + "operationId": "bulkAddExemptRepositories_1", + "requestBody": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRepositorySelector" + }, + "uniqueItems": true + } + } + } + }, + "responses": { + "204": { + "description": "All requested repositories were made exempt" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to exempt a repository from secret scanning. No repositories were made exempt." + } + }, + "summary": "Bulk exempt repos from secret scanning", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/secret-scanning/rules": { + "get": { + "description": "Find project secret scanning rules by filtering.\n\nProject **Admin** is required", + "operationId": "search_1", + "parameters": [ + { + "description": "Filter names by the provided text", + "example": "Access", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Order by", + "in": "query", + "name": "order", + "schema": { "type": "string", "enum": ["NAME_ASC", "NAME_DESC"] } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + } + } + } + }, + "description": "Page of rules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was not correctly formed rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to view project rules" + } + }, + "summary": "Find project secret scanning rules", + "tags": ["Security"] + }, + "post": { + "description": "Create a new project level secret scanning rule. Project rules are used when scanning all non exempt repositories in the provided project.\n\nProject **Admin** is required", + "operationId": "createRule", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRuleSetRequest" + } + } + }, + "description": "Rule to create, either the line regular expression or the path regular expression must be present", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + }, + "description": "The created rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to create project rules." + } + }, + "summary": "Create project secret scanning rule", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/secret-scanning/rules/{id}": { + "delete": { + "description": "Delete a project secret scanning rule with the provided ID.\n\nProject **Admin** is required", + "operationId": "deleteRule", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "Empty response indicating that the rule was deleted, or not found at this location" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to delete project rules" + } + }, + "summary": "Delete a project secret scanning rule", + "tags": ["Security"] + }, + "get": { + "description": "Get a project secret scanning rule by ID.\n\nProject **Admin** is required", + "operationId": "getRule", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + }, + "description": "The requested rule" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to view project rules" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested rules was not found" + } + }, + "summary": "Get a project secret scanning rule", + "tags": ["Security"] + }, + "put": { + "description": "Edit a project secret scanning rule.\n\nProject **Admin** is required", + "operationId": "editRule", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRuleSetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + }, + "description": "The updated rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to modify project rules" + } + }, + "summary": "Edit an existing project secret scanning rule", + "tags": ["Security"] + } + }, + "/api/latest/projects/{projectKey}/settings-restriction": { + "delete": { + "description": "Delete a specified project settings restriction.\n\nIf a restriction does not exist for the specified project, namespace, featureKey, and componentKey, the request will be ignored and a 204 response will be returned.\n\nThe authenticated user must have **PROJECT_ADMIN** permission for the target project to delete a settings restriction.", + "operationId": "delete_9", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "A namespace used to identify the provider of the feature", + "in": "query", + "name": "namespace", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "A key to uniquely identify individually restrictable subcomponents of a feature within the provided feature key and namespace", + "in": "query", + "name": "componentKey", + "schema": { "type": "string" } + }, + { + "description": "A key to uniquely identify the feature within the provided namespace", + "in": "query", + "name": "featureKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The specified settings restriction was successfully deleted or there were no existing restrictions that match the specified criteria." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The settings restriction was not deleted because the request was invalid. Possible issues include:\n\n- The namespace was not provided, or longer than 255 characters\n- The featureKey was not provided, or longer than 255 characters\n- The provided componentKey was fewer than 2 characters, or longer than 255 characters" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete a settings restriction" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist" + } + }, + "summary": "Stop enforcing project restriction", + "tags": ["Project"] + }, + "get": { + "description": "Get a specified project settings restriction for the given namespace, feature key and component key.\nNote that not providing the component key will **not** return restrictions for the namespace and feature key with a component key set.\n\nThe authenticated user must have **PROJECT_VIEW** permission for the target project to retrieve a settings restriction.", + "operationId": "get_7", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The namespace used to identify the provider of the feature", + "in": "query", + "name": "namespace", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The component key to uniquely identify individually restrictable subcomponents of a feature within the provided feature key and namespace", + "in": "query", + "name": "componentKey", + "schema": { "type": "string" } + }, + { + "description": "The feature key to uniquely identify the feature within the provided namespace", + "in": "query", + "name": "featureKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestProjectSettingsRestriction" + } + } + }, + "description": "The settings restriction associated with the provided namespace and feature key" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The settings restriction could not be retrieved because the provided parameters were invalid. Possible issues include:\n\n- The namespace was not provided, or longer than 255 characters\n- The featureKey was not provided, or longer than 255 characters\n- The provided componentKey was fewer than 2 characters, or longer than 255 characters" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve a settings restriction" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, or settings restriction does not exist" + } + }, + "summary": "Get enforcing project setting", + "tags": ["Project"] + }, + "post": { + "description": "Create a new project settings restriction for the given project.\n\nThe authenticated user must have **PROJECT_ADMIN** permission for the target project to create a settings restriction.", + "operationId": "create_3", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestProjectSettingsRestrictionRequest" + } + } + }, + "description": "The project settings restriction to create", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestProjectSettingsRestriction" + } + } + }, + "description": "The settings restriction was successfully created" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The settings restriction was not created because the request was invalid. Possible issues include:\n\n- The namespace was not provided, or longer than 255 characters\n- The featureKey was not provided, or longer than 255 characters\n- The provided componentKey was fewer than 2 characters, or longer than 255 characters" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create a settings restriction" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist" + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "A settings restriction with the same namespace, featureKey and componentKey already exists on this project" + } + }, + "summary": "Enforce project restriction", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/settings-restriction/all": { + "get": { + "description": "Get all project settings restrictions for the given namespace and feature key, including those with a component key set.\n\nThe authenticated user must have **PROJECT_VIEW** permission for the target project to retrieve a settings restrictions.", + "operationId": "getAll", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "A namespace used to identify the provider of the feature", + "in": "query", + "name": "namespace", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "A key to uniquely identify the feature within the provided namespace", + "in": "query", + "name": "featureKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestProjectSettingsRestriction" + } + } + } + } + } + }, + "description": "A page of settings restrictions associated with the provided namespace and feature key" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The settings restrictions could not be retrieved because the provided parameters were invalid. Possible issues include:\n\n- The namespace was not provided, or longer than 255 characters\n- The featureKey was not provided, or longer than 255 characters" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve project settings restrictions" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist" + } + }, + "summary": "Get all enforcing project settings", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/settings/auto-decline": { + "delete": { + "description": "Delete auto decline settings for the supplied project.\n\nThe authenticated user must have PROJECT_ADMIN permission for this project to call the resource.", + "operationId": "deleteAutoDeclineSettings", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The auto decline settings have been deleted successfully." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the auto decline settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Delete auto decline settings", + "tags": ["Project"] + }, + "get": { + "description": "Retrieves the auto decline settings for the supplied project. Default settings are returned if no explicit settings have been set for the project.", + "operationId": "getAutoDeclineSettings", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoDeclineSettings" + } + } + }, + "description": "The auto decline settings" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the auto decline settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get auto decline settings", + "tags": ["Project"] + }, + "put": { + "description": "Creates or updates the auto decline settings for the supplied project.\n\nThe authenticated user must have PROJECT_ADMIN permission for this project to call the resource.", + "operationId": "setAutoDeclineSettings", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoDeclineSettingsRequest" + } + } + }, + "description": "The settings to create or update" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoDeclineSettings" + } + } + }, + "description": "The auto decline settings" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "inactivityWeeks was not one of 1, 2, 4, 8, or, 12, or the enabled parameter was not included in the request." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create or update the auto decline settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Create/Update auto decline settings", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/settings/auto-merge": { + "delete": { + "description": "Deletes pull request auto-merge settings for the supplied project.\n\nThe authenticated user must have PROJECT_ADMIN permission for this project to call the resource.", + "operationId": "delete_4", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The pull request auto-merge settings" }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the pull request auto-merge settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Delete pull request auto-merge settings", + "tags": ["Project"] + }, + "get": { + "description": "Retrieves the pull request auto-merge settings for the supplied project. Default settings will be returned if no explicit settings have been set for the project\n\nThe authenticated user must have PROJECT_VIEW permission for this project to call the resource.", + "operationId": "get_4", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoMergeRestrictedSettings" + } + } + }, + "description": "The pull request auto-merge settings" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the pull request auto-merge settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get pull request auto-merge settings", + "tags": ["Project"] + }, + "put": { + "description": "Creates or updates the pull request auto-merge settings for the supplied project, and applies the restriction action specified in the request.\n\nThe authenticated user must have PROJECT_ADMIN permission for this project to call the resource.", + "operationId": "set", + "parameters": [ + { + "description": "The project key", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoMergeProjectSettingsRequest" + } + } + }, + "description": "The settings to create or update" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestAutoMergeRestrictedSettings" + } + } + }, + "description": "The pull request auto-merge settings" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The 'enabled' and 'restrictionAction' fields were not provided correctly." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create or update the pull request auto-merge settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Create or update the pull request auto-merge settings", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/settings/hooks": { + "get": { + "description": "Retrieve a page of repository hooks for this project. \n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource.", + "operationId": "getRepositoryHooks", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The optional type to filter by.", + "in": "query", + "name": "type", + "schema": { + "type": "string", + "enum": ["PRE_RECEIVE", "POST_RECEIVE"] + } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRepositoryHook" + } + } + } + } + } + }, + "description": "A page of repository hooks with their associated enabled state." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the hooks." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Get repository hooks", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/settings/hooks/{hookKey}": { + "get": { + "description": "Retrieve a repository hook for this project. \n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource.", + "operationId": "getRepositoryHook", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepositoryHook" } + } + }, + "description": "Returns the repository hooks with their associated enabled state for the supplied hookKey." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to enable the hook." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository hook does not exist for the given project, or the project does not exist." + } + }, + "summary": "Get a repository hook", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/settings/hooks/{hookKey}/enabled": { + "delete": { + "description": "Disable a repository hook for this project. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "disableHook", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepositoryHook" } + } + }, + "description": "The repository hooks with their associated enabled state for the supplied hookKey." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to disable the hook." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project or hook does not exist." + } + }, + "summary": "Disable repository hook", + "tags": ["Project"] + }, + "put": { + "description": "Enable a repository hook for this project and optionally apply new configuration. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. \n\nA JSON document may be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook.", + "operationId": "enableHook", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The content length.", + "in": "header", + "name": "Content-Length", + "schema": { "type": "integer", "format": "int64" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestRepositoryHook" } + } + }, + "description": "The repository hooks with their associated enabled state for the supplied hookKey." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The settings specified are invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to enable the hook." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project or hook does not exist." + } + }, + "summary": "Enable repository hook", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/settings/hooks/{hookKey}/settings": { + "get": { + "description": "Retrieve the settings for a repository hook for this project. \n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource.", + "operationId": "getSettings", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The hook key.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ExampleSettings" } + } + }, + "description": "The settings for the hook." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the hook settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project or hook does not exist." + } + }, + "summary": "Get repository hook settings", + "tags": ["Project"] + }, + "put": { + "description": "Modify the settings for a repository hook for this project. \n\nThe service will reject any settings which are too large, the current limit is 32KB once serialized. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource. \n\nA JSON document can be provided to use as the settings for the hook. These structure and validity of the document is decided by the plugin providing the hook.", + "operationId": "setSettings", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The complete module key of the hook module.", + "in": "path", + "name": "hookKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ExampleSettings" } + } + }, + "description": "The raw settings." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ExampleSettings" } + } + }, + "description": "The settings for the hook." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The settings specified are invalid." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to modify the hook settings." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project or hook does not exist." + } + }, + "summary": "Update repository hook settings", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/settings/pull-requests/{scmId}": { + "get": { + "description": "Retrieve the merge strategy configuration for this project and SCM. \n\nThe authenticated user must have PROJECT_READ permission for the context repository to call this resource.", + "operationId": "getPullRequestSettings", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The SCM to get strategies for.", + "in": "path", + "name": "scmId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestSettings" + } + } + }, + "description": "The merge configuration of the request project." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to see the request repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request repository does not exist." + } + }, + "summary": "Get merge strategy", + "tags": ["Project"] + }, + "post": { + "description": "Update the pull request merge strategy configuration for this project and SCM. \n\nThe authenticated user must have PROJECT_ADMIN permission for the context repository to call this resource. \n\nOnly the strategies provided will be enabled, the default must be set and included in the set of strategies. \n\nAn explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty \"mergeConfig\" attribute. i.e: \n
{ \n    \"mergeConfig\": {} \n} \n
\n\nUpon completion of this request, the effective configuration will be the configuration explicitly set for the SCM, or if no such explicit configuration is set then the default configuration will be used.", + "operationId": "updatePullRequestSettings", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The SCM to get strategies for.", + "in": "path", + "name": "scmId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestSettings" + } + } + }, + "description": "The settings." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestPullRequestSettings" + } + } + }, + "description": "The merge configuration of the request project." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The repository pull request merge strategies were not updated due to a validation error." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to administrate the specified repository." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified repository does not exist." + } + }, + "summary": "Update merge strategy", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/settings/reviewer-groups": { + "get": { + "description": "Retrieve a page of reviewer groups of a given scope.\n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource.", + "operationId": "getReviewerGroups", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestReviewerGroup" + } + } + } + } + } + }, + "description": "A page of reviewer group(s) of the provided scope." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project scope supplied does not exist." + } + }, + "summary": "Get all reviewer groups", + "tags": ["Pull Requests"] + }, + "post": { + "description": "Create a reviewer group.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "create_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "The reviewer group to be create" + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "The newly created reviewer group." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request is missing a reviewer group name." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project scope supplied does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The new created name already exists." + } + }, + "summary": "Create reviewer group", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/settings/reviewer-groups/{id}": { + "delete": { + "description": "Deletes a reviewer group.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "delete_6", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the reviewer group to be deleted", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { "description": "The operation was successful." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete the reviewer group in this project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Unable to find the supplied reviewer group ID." + } + }, + "summary": "Delete reviewer group", + "tags": ["Pull Requests"] + }, + "get": { + "description": "Retrieve a reviewer group.\n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource.", + "operationId": "getReviewerGroup", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the reviewer group to be retrieved", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "The reviewer group." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The ID supplied does not exist." + } + }, + "summary": "Get reviewer group", + "tags": ["Pull Requests"] + }, + "put": { + "description": "Update the attributes of a reviewer group.\n\nThe authenticated user must have PROJECT_READ permission for the specified project to call this resource.", + "operationId": "update_1", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the reviewer group to be updated", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "The request containing the attributes of the reviewer group to be updated. Only the attributes to be updated need to be present in this object." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestReviewerGroup" } + } + }, + "description": "A page of changes." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The updated attribute does not meet the requirements. E.g. the name exceeds 50 characters, setting name to blank." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project scope supplied does not exist." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The new updated name already exists." + } + }, + "summary": "Update reviewer group attributes", + "tags": ["Pull Requests"] + } + }, + "/api/latest/projects/{projectKey}/webhooks": { + "get": { + "description": "Find webhooks in this project. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "findWebhooks", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "List of com.atlassian.webhooks.WebhookEvent IDs to filter for", + "in": "query", + "name": "event", + "schema": { "type": "string" } + }, + { + "description": "true if statistics should be provided for all found webhooks", + "in": "query", + "name": "statistics", + "schema": { "type": "boolean" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "A page of webhooks." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to find webhooks in the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Find webhooks", + "tags": ["Project"] + }, + "post": { + "description": "Create a webhook for the project specified via the URL. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "createWebhook", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "The webhook to be created for this project." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "A created webhook." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The webhook parameters were invalid or not supplied." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to create webhooks in the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project does not exist." + } + }, + "summary": "Create webhook", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/webhooks/test": { + "post": { + "description": "Test connectivity to a specific endpoint. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "testWebhook", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "in": "query", + "name": "webhookId", + "schema": { "type": "integer", "format": "int32" } + }, + { + "in": "query", + "name": "sslVerificationRequired", + "schema": { "type": "boolean", "default": true } + }, + { + "description": "The url in which to connect to", + "in": "query", + "name": "url", + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestWebhookCredentials" + } + } + }, + "description": "Basic authentication credentials, if required." + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestWebhookRequestResponse" + } + } + }, + "description": "A webhook." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to test a connection." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist." + } + }, + "summary": "Test webhook", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/webhooks/{webhookId}": { + "delete": { + "description": "Delete a webhook for the project specified via the URL. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "deleteWebhook", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The ID of the webhook to be deleted.", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "The webhook for the project has been deleted." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to delete webhooks in the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist, or webhook does not exist in this project." + } + }, + "summary": "Delete webhook", + "tags": ["Project"] + }, + "get": { + "description": "Get a webhook by ID. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "getWebhook", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "ID of the webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "true if statistics should be provided for the webhook", + "in": "query", + "name": "statistics", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "A webhook." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to get a webhook in the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project does not exist, or the webhook does not exist in the project." + } + }, + "summary": "Get webhook", + "tags": ["Project"] + }, + "put": { + "description": "Update an existing webhook. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "updateWebhook", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "Id of the existing webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "The representation of the updated values for the webhook" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestWebhook" } + } + }, + "description": "A webhook." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update a webhook in this project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project does not exist, or the webhook does not exist in the project." + } + }, + "summary": "Update webhook", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/webhooks/{webhookId}/latest": { + "get": { + "description": "Get the latest invocations for a specific webhook. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "getLatestInvocation", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "ID of the webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The string ID of a specific event to retrieve the last invocation for.", + "in": "query", + "name": "event", + "schema": { "type": "string" } + }, + { + "description": "The outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered", + "in": "query", + "name": "outcome", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestDetailedInvocation" + } + } + }, + "description": "A webhook invocation dataset." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to get webhook invocations in the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist, or the webhook does not exist in the project." + } + }, + "summary": "Get last webhook invocation details", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/webhooks/{webhookId}/statistics": { + "get": { + "description": "Get the statistics for a specific webhook. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "getStatistics", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "ID of the webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "The string ID of a specific event to retrieve the last invocation for. May be empty, in which case all events are considered", + "in": "query", + "name": "event", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestInvocationHistory" + } + } + }, + "description": "A webhook invocation dataset." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to get webhook statistics in the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project does not exist, or the webhook does not exist in the project." + } + }, + "summary": "Get webhook statistics", + "tags": ["Project"] + } + }, + "/api/latest/projects/{projectKey}/webhooks/{webhookId}/statistics/summary": { + "get": { + "description": "Get the statistics summary for a specific webhook. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.", + "operationId": "getStatisticsSummary", + "parameters": [ + { + "description": "The project key.", + "in": "path", + "name": "projectKey", + "required": true, + "schema": { "type": "string" } + }, + { + "description": "ID of the webhook", + "in": "path", + "name": "webhookId", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestInvocationHistory" + } + } + }, + "description": "A webhook invocation dataset." + }, + "204": { "description": "No webhook invocations exist." }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to get webhook statistics summary in the project." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The project does not exist, or the webhook does not exist in the project." + } + }, + "summary": "Get webhook statistics summary", + "tags": ["Project"] + } + }, + "/api/latest/repos": { + "get": { + "description": "Retrieve a page of repositories based on query parameters that control the search. See the documentation of the parameters for more details. \n\nThis resource is anonymously accessible. \n\nNote on permissions. In absence of the permission query parameter the implicit 'read' permission is assumed. Please note that this permission is lower than the REPO_READ permission rather than being equal to it. The implicit 'read' permission for a given repository is assigned to any user that has any of the higher permissions, such as REPO_READ, as well as to anonymous users if the repository is marked as public. The important implication of the above is that an anonymous request to this resource with a permission level REPO_READ is guaranteed to receive an empty list of repositories as a result. For anonymous requests it is therefore recommended to not specify the permission parameter at all.", + "operationId": "getRepositories_1", + "parameters": [ + { + "description": "(optional) if specified, this will limit the resulting repository list to ones whose are ACTIVE, ARCHIVED or ALL for both. The match performed is case-insensitive. This filter defaults to ACTIVE when not set. Available since 8.0", + "in": "query", + "name": "archived", + "schema": { "type": "string" } + }, + { + "description": "(optional) if specified, this will limit the resulting repository list to ones whose project's name matches this parameter's value. The match performed is case-insensitive and any leading and/or trailing whitespace characters on the projectname parameter will be stripped.", + "in": "query", + "name": "projectname", + "schema": { "type": "string" } + }, + { + "description": "(optional) if specified, this will limit the resulting repository list to ones whose project's key matches this parameter's value. The match performed is case-insensitive and any leading and/or trailing whitespace characters on the projectKey parameter will be stripped. Available since 8.0", + "in": "query", + "name": "projectkey", + "schema": { "type": "string" } + }, + { + "description": "(optional) if specified, this will limit the resulting repository list based on the repositories visibility. Valid values are public or private.", + "in": "query", + "name": "visibility", + "schema": { "type": "string", "enum": ["public", "private"] } + }, + { + "description": "(optional) if specified, this will limit the resulting repository list to ones whose name matches this parameter's value. The match performed is case-insensitive and any leading and/or trailing whitespace characters on the name parameter will be stripped.", + "in": "query", + "name": "name", + "schema": { "type": "string" } + }, + { + "description": "(optional) if specified, it must be a valid repository permission level name and will limit the resulting repository list to ones that the requesting user has the specified permission level to. If not specified, the default implicit 'read' permission level will be assumed. The currently supported explicit permission values are REPO_READ, REPO_WRITE and REPO_ADMIN.", + "in": "query", + "name": "permission", + "schema": { + "type": "string", + "enum": ["REPO_READ", "REPO_WRITE", "REPO_ADMIN"] + } + }, + { + "description": "(optional) if specified, it must be a valid repository state name and will limit the resulting repository list to ones that are in the specified state. The currently supported explicit state values are AVAILABLE, INITIALISING and INITIALISATION_FAILED.
Available since 5.13", + "in": "query", + "name": "state", + "schema": { + "type": "string", + "enum": ["AVAILABLE", "INITIALISING", "INITIALISATION_FAILED"] + } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepository" } + } + } + } + } + }, + "description": "A page of repositories." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The visibility parameter contains an invalid value." + } + }, + "summary": "Search for repositories", + "tags": ["Repository"] + } + }, + "/api/latest/secret-scanning/exempt": { + "get": { + "description": "Find all repositories exempt from secret scanning", + "operationId": "findExemptReposByScope", + "parameters": [ + { + "description": "Order by project name followed by repository name either ascending or descending, defaults to ascending.", + "in": "query", + "name": "order", + "schema": { "type": "string", "enum": ["NAME_ASC", "NAME_DESC"] } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { "$ref": "#/components/schemas/RestRepository" } + } + } + } + } + }, + "description": "Page of repositories" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to search exempt repositories globally" + } + }, + "summary": "Find all repos exempt from secret scan", + "tags": ["Security"] + }, + "post": { + "description": "Bulk exempt a list of repositories from being scanned for secrets. User must be have global **ADMIN** permissions.", + "operationId": "bulkAddExemptRepositories", + "requestBody": { + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestRepositorySelector" + }, + "uniqueItems": true + } + } + } + }, + "responses": { + "204": { + "description": "All requested repositories were made exempt" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to exempt a repository from secret scanning. No repositories were made exempt." + }, + "409": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "At least one of specified repositories have already been previously made exempt." + } + }, + "summary": "Bulk exempt repos from secret scanning", + "tags": ["Security"] + } + }, + "/api/latest/secret-scanning/rules": { + "get": { + "description": "Find global secret scanning rules by filtering.", + "operationId": "search_4", + "parameters": [ + { + "description": "Filter by rule name", + "example": "Access", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "Order by", + "in": "query", + "name": "order", + "schema": { "type": "string", "enum": ["NAME_ASC", "NAME_DESC"] } + }, + { + "description": "Start number for the page (inclusive). If not passed, first page is assumed.", + "example": 0, + "in": "query", + "name": "start", + "required": false, + "schema": { "type": "number", "example": 0 } + }, + { + "description": "Number of items to return. If not passed, a page size of 25 is used.", + "example": 25, + "in": "query", + "name": "limit", + "required": false, + "schema": { "type": "number", "example": 25 } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "isLastPage": { "type": "boolean" }, + "limit": { "type": "number", "example": 25 }, + "nextPageStart": { "type": "integer", "format": "int32" }, + "size": { "type": "number", "example": 1 }, + "start": { "type": "integer", "format": "int32" }, + "values": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + } + } + } + }, + "description": "Page of rules" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed search request, see returned error for more details." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to search global rules" + } + }, + "summary": "Find global secret scanning rules", + "tags": ["Security"] + }, + "post": { + "description": "Create a new global secret scanning rule. Global rules are used when scanning all non exempt repositories.", + "operationId": "createRule_2", + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRuleSetRequest" + } + } + }, + "description": "Rule to create, either the line regular expression or the path regular expression must be present", + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + }, + "description": "The created rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to create global rules" + } + }, + "summary": "Create global secret scanning rule", + "tags": ["Security"] + } + }, + "/api/latest/secret-scanning/rules/{id}": { + "delete": { + "description": "Delete a global secret scanning rule with the provided ID", + "operationId": "deleteRule_2", + "parameters": [ + { + "description": "The rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "description": "Empty response indicating that the rule was deleted" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to delete global rules" + } + }, + "summary": "Delete a global secret scanning rule", + "tags": ["Security"] + }, + "get": { + "description": "Get a global secret scanning rule by ID.", + "operationId": "getRule_2", + "parameters": [ + { + "description": "The rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + }, + "description": "The requested rule" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to get global rules" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The requested rule was not found" + } + }, + "summary": "Get a global secret scanning rule", + "tags": ["Security"] + }, + "put": { + "description": "Edit an existing global secret scanning rule", + "operationId": "editRule_2", + "parameters": [ + { + "description": "The rule id.", + "example": 7, + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRuleSetRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSecretScanningRule" + } + } + }, + "description": "The updated rule" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a correctly formed rule. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to update global rules" + } + }, + "summary": "Edit a global secret scanning rule.", + "tags": ["Security"] + } + }, + "/api/latest/signing/x509-certificates": { + "get": { + "description": "Get all X.509 certificates that have been added to the system.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "getAllCertificates", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestX509Certificate" } + } + }, + "description": "A page of X.509 certificates" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to get X.509 certificates" + } + }, + "summary": "Get all X.509 certificates", + "tags": ["Security"] + }, + "post": { + "description": "Create an X.509 certificate. This will add the given X.509 certificate to the system. Existing entries will not be overridden if an X.509 certificate already exists. Once added, an X.509 certificate cannot be updated.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "createCertificate", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/ExampleCertificateMultipartFormData" + } + } + }, + "description": "The multipart form data containing the certificate in a form-field named 'certificate'", + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestX509Certificate" } + } + }, + "description": "The newly created X.509 certificate" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request did not contain a valid X.509 certificate request. See returned error for more details" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to create X.509 certificates" + } + }, + "summary": "Create an X.509 certificate", + "tags": ["Security"] + } + }, + "/api/latest/signing/x509-certificates/crl/{id}": { + "put": { + "description": "Update the certificate revocation list (CRL) entries for an issuer X.509 certificate in the system, identified by id. This will add any new revoked X.509 certificates that were issued by the given issuer X.509 certificate.\n\nThis endpoint will schedule a request to asynchronously perform the task. Please allow time for the task to complete as it will vary depending on how many CRLs there are to retrieve and process.\n\nNote: CRL updates are scheduled to run every 24 hours. You may wish to trigger a refresh manually using this endpoint, otherwise, entries will be updated daily.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "updateCertificateRevocationListEntries", + "parameters": [ + { + "description": "The ID of the issuer certificate.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { "application/json": {} }, + "description": "Successfully started processing CRLs." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to update X.509 CRL entries" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "There is no X.509 certificate with the given ID" + } + }, + "summary": "Update X.509 CRL entries", + "tags": ["Security"] + } + }, + "/api/latest/signing/x509-certificates/{id}": { + "delete": { + "description": "Delete an X.509 certificate specified by the given ID.\n\nThe authenticated user must have the ADMIN permission to call this resource.", + "operationId": "deleteCertificate", + "parameters": [ + { + "description": "The ID of the X.509 certificate.", + "in": "path", + "name": "id", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "204": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestX509Certificate" } + } + }, + "description": "An empty response if the X.509 certificate was successfully deleted" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user is not permitted to delete X.509 certificates" + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "There is no X.509 certificate with the given ID" + } + }, + "summary": "Delete an X.509 certificate", + "tags": ["Security"] + } + }, + "/api/latest/system-signing/configuration": { + "get": { + "description": "Gets the configuration details for system signing Git objects.", + "operationId": "getSystemSigningConfiguration", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSystemSigningConfiguration" + } + } + }, + "description": "The configuration details for system signing Git objects" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the configuration details for system signing Git objects." + } + }, + "summary": "Get system signing configuration", + "tags": ["System Signing"] + }, + "post": { + "description": "Updates the configuration for system signing Git objects.", + "operationId": "updateSystemSigningConfiguration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { "type": "boolean", "example": false } + } + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RestSystemSigningConfiguration" + } + } + }, + "description": "The updated configuration details for system signing Git objects" + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The configuration details could not be updated because the provided request was invalid" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to retrieve the configuration details for system signing Git objects." + } + }, + "summary": "Update system signing configuration", + "tags": ["System Signing"] + } + }, + "/api/latest/users": { + "get": { + "description": "Retrieve a page of users, optionally run through provided filters.\n\n\nOnly authenticated users may call this resource.\n### Permission Filters\n\n\nThe following three sub-sections list parameters supported for permission filters (where [root] is\nthe root permission filter name, e.g. permission, permission.1 etc.) depending on the\npermission resource. The system determines which filter to apply (Global, Project or Repository permission)\nbased on the `[root]` permission value. E.g. ADMIN is a global permission,\nPROJECT_ADMIN is a project permission and REPO_ADMIN is a repository permission. Note\nthat the parameters for a given resource will be looked up in the order as they are listed below, that is e.g.\nfor a project resource, if both projectId and projectKey are provided, the system will\nuse projectId for the lookup.\n

Global permissions

\n\n\nThe permission value under [root] is the only required and recognized parameter, as global\npermissions do not apply to a specific resource.\n\n\nExample valid filter: permission=ADMIN.\n

Project permissions

\n\n\n- [root]- specifies the project permission\n- [root].projectId - specifies the project ID to lookup the project by\n- [root].projectKey - specifies the project key to lookup the project by\n\n\nExample valid filter: permission.1=PROJECT_ADMIN&permission.1.projectKey=TEST_PROJECT.\n#### Repository permissions\n\n\n- [root]- specifies the repository permission\n- [root].projectId - specifies the repository ID to lookup the repository by\n- [root].projectKey and [root].repositorySlug- specifies the project key and repository slug to lookup the repository by; both values need to be provided for this look up to be triggered\n\n\nExample valid filter: permission.2=REPO_ADMIN&permission.2.projectKey=TEST_PROJECT&permission.2.repositorySlug=test_repo.", + "operationId": "getUsers_2", + "parameters": [ + { + "description": "Return only users, whose username, name or email address contain the filter value", + "in": "query", + "name": "filter", + "schema": { "type": "string" } + }, + { + "description": "The \"root\" of a single permission filter, similar to the permission parameter, where \"N\" is a natural number starting from 1. This allows clients to specify multiple permission filters, by providing consecutive filters as permission.1, permission.2 etc. Note that the filters numbering has to start with 1 and be continuous for all filters to be processed. The total allowed number of permission filters is 50 and all filters exceeding that limit will be dropped. See the section \"Permission Filters\" above for more details on how the permission filters are processed.", + "in": "query", + "name": "permission.N", + "schema": { "type": "string" } + }, + { + "description": "The \"root\" of a permission filter, whose value must be a valid global, project, or repository permission. Additional filter parameters referring to this filter that specify the resource (project or repository) to apply the filter to must be prefixed with permission.. See the section \"Permission Filters\" above for more details.", + "in": "query", + "name": "permission", + "schema": { "type": "string" } + }, + { + "description": "return only users who are members of the given group", + "in": "query", + "name": "group", + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestApplicationUser" } + } + }, + "description": "A page of users." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The search request was invalid, which may happen for multiple reasons, among\nothers:\n\n\n- permission filter for project/repository permission with no parameters specifying the project or repository to apply the filter to\n- invalid permission name\n- permission filter for a project/repository permission pointing to a non-existent project or repository\n\n\nThe exact reason for the error and - in most cases - the request parameter name that had invalid value - will be\nprovided in the error message." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Authentication failed or was not attempted." + } + }, + "summary": "Get all users", + "tags": ["System Maintenance"] + }, + "put": { + "description": "Update the currently authenticated user's details. The update will always be applied to the currently authenticated user.", + "operationId": "updateUserDetails_1", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UserUpdate" } + } + }, + "description": "The user update details" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestApplicationUser" } + } + }, + "description": "The updated user." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Authentication failed or was not attempted." + } + }, + "summary": "Update user details", + "tags": ["System Maintenance"] + } + }, + "/api/latest/users/credentials": { + "put": { + "description": "Update the currently authenticated user's password.", + "operationId": "updateUserPassword_1", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/UserPasswordUpdate" } + } + }, + "description": "The password update details" + }, + "responses": { + "204": { + "description": "The user's password was successfully updated." + }, + "400": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The request was malformed or the old password was incorrect." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "Authentication failed or was not attempted." + } + }, + "summary": "Set password", + "tags": ["System Maintenance"] + } + }, + "/api/latest/users/{userSlug}": { + "get": { + "description": "Retrieve the user matching the supplied userSlug.", + "operationId": "getUser", + "parameters": [ + { + "description": "The user slug", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestApplicationUser" } + } + }, + "description": "The user matching the supplied userSlug. Note, this may\nnot be the user's username, always use the user.slug property." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to view the user." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + } + }, + "summary": "Get user", + "tags": ["System Maintenance"] + } + }, + "/api/latest/users/{userSlug}/avatar.png": { + "delete": { + "description": "Delete the avatar associated to a user.\n\n\nUsers are always allowed to delete their own avatar. To delete someone else's avatar the authenticated user must\nhave global ADMIN permission, or global SYS_ADMIN permission to update a\nSYS_ADMIN user's avatar.", + "operationId": "deleteAvatar", + "parameters": [ + { + "description": "The user slug", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/RestNamedLink" } + } + }, + "description": "The new avatar URL if the local avatar was successfully deleted or did not exist" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The authenticated user has insufficient permissions to delete the specified avatar." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + } + }, + "summary": "Delete user avatar", + "tags": ["System Maintenance"] + }, + "post": { + "description": "Update the avatar for the user with the supplied slug.\n\n\nThis resource accepts POST multipart form data, containing a single image in a form-field named 'avatar'.\n\n\nThere are configurable server limits on both the dimensions (1024x1024 pixels by default) and uploaded\nfile size (1MB by default). Several different image formats are supported, but PNG and\nJPEG are preferred due to the file size limit.\n\n\nThis resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to\npass the XSRF check the caller needs to send an X-Atlassian-Token HTTP header with the\nvalue no-check.\n\n\nAn example curl request to upload an image name 'avatar.png' would be:\n```\ncurl -X POST -u username:password -H \"X-Atlassian-Token: no-check\" http://example.com/rest/api/latest/users/jdoe/avatar.png -F avatar=@avatar.png\n```\n\n\nUsers are always allowed to update their own avatar. To update someone else's avatar the authenticated user must\nhave global ADMIN permission, or global SYS_ADMIN permission to update a\nSYS_ADMIN user's avatar.", + "operationId": "uploadAvatar_1", + "parameters": [ + { + "description": "This resource has Cross-Site Request Forgery (XSRF) protection. To allow the request to pass the XSRF check the caller needs to send an X-Atlassian-Token HTTP header with the value no-check.", + "example": "no-check", + "in": "header", + "name": "X-Atlassian-Token", + "schema": { "type": "string" } + }, + { + "description": "The user slug", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/ExampleAvatarMultipartFormData" + } + } + }, + "description": "Multipart form data containing a single image in a form-field named 'avatar'." + }, + "responses": { + "201": { + "description": "The avatar was uploaded successfully.", + "headers": { + "Location": { + "description": "The Location response header which indicates the URL of the avatar.", + "schema": { "type": "string" }, + "style": "simple" + } + } + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user has insufficient permissions to update the avatar." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified user does not exist." + } + }, + "summary": "Update user avatar", + "tags": ["System Maintenance"] + } + }, + "/api/latest/users/{userSlug}/settings": { + "get": { + "description": "Retrieve a map of user setting key values for a specific user identified by the user slug.", + "operationId": "getUserSettings", + "parameters": [ + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ExampleSettingsMap" } + } + }, + "description": "The user settings for the specified user slug." + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user does not have permission to view the settings of this user." + }, + "404": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The specified project, repository, commit, or report does not exist." + } + }, + "summary": "Get user settings", + "tags": ["System Maintenance"] + }, + "post": { + "description": "Update the entries of a map of user setting key/values for a specific user identified by the user slug.", + "operationId": "updateSettings", + "parameters": [ + { + "description": "The user slug.", + "in": "path", + "name": "userSlug", + "required": true, + "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ExampleSettingsMap" } + } + }, + "description": "A map with the UserSettings entries which must be updated." + }, + "responses": { + "204": { + "description": "The UserSettings were updated successfully" + }, + "401": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RestErrorMessage" + } + } + } + } + } + }, + "description": "The currently authenticated user is not a project administrator." + } + }, + "summary": "Update user settings", + "tags": ["System Maintenance"] + } + } + } +} diff --git a/tests/cloud/client.ts b/tests/cloud/client.ts new file mode 100644 index 0000000..baffd3b --- /dev/null +++ b/tests/cloud/client.ts @@ -0,0 +1,15 @@ +import { createBitbucketCloudClient, toBase64 } from "../../src/index.js" +import { + BITBUCKET_CLOUD_APP_PASSWORD, + BITBUCKET_CLOUD_URL, + BITBUCKET_CLOUD_USERNAME, +} from "../env.js" + +const basic = toBase64( + BITBUCKET_CLOUD_USERNAME + ":" + BITBUCKET_CLOUD_APP_PASSWORD, +) + +export const cloud = createBitbucketCloudClient({ + baseUrl: BITBUCKET_CLOUD_URL.toString(), + headers: { Accept: "application/json", Authorization: `Basic ${basic}` }, +}) diff --git a/tests/cloud/repositories.test.ts b/tests/cloud/repositories.test.ts new file mode 100644 index 0000000..ee6df59 --- /dev/null +++ b/tests/cloud/repositories.test.ts @@ -0,0 +1,10 @@ +import { test } from "vitest" +import { cloud } from "./client.js" + +test("GET /repositories", async ({ expect }) => { + const got = await cloud.GET("/repositories") + + expect(got.data?.next).toBeTypeOf("string") + expect(got.data?.pagelen).toBeTypeOf("number") + expect(got.data?.values).toBeDefined() +}) diff --git a/tests/env.ts b/tests/env.ts index bf2b1c0..3dd6ab6 100644 --- a/tests/env.ts +++ b/tests/env.ts @@ -8,27 +8,27 @@ import path from "path" export type NodeEnv = (typeof nodeEnvs)[keyof typeof nodeEnvs] export type ProcessEnv = typeof process.env -export function isNodeEnv(value: unknown): value is NodeEnv { - return Object.values(nodeEnvs).includes(value) +interface LoadedEnv extends ProcessEnv { + readonly NODE_ENV: NodeEnv } -export function toNodeEnv(value: unknown): NodeEnv { - if (isNodeEnv(value)) return value - return nodeEnvs.development +function envString(key: string) { + const value = parsed[key] + if (!value) throw new Error(`$${key} is missing`) + return value } -const nodeEnvs = { - development: "development", - production: "production", - /** - * Vitest sets `NODE_ENV` to `test` if it wasn't set before. - * @see https://vitest.dev/guide/migration.html#envs - */ - test: "test", -} as const +function envUrl(key: string) { + const str = envString(key) + try { + return new URL(str) + } catch (error) { + throw new Error(`$${key} is not a URL: ${str}`, { cause: error }) + } +} -interface LoadedEnv extends ProcessEnv { - readonly NODE_ENV: NodeEnv +export function isNodeEnv(value: unknown): value is NodeEnv { + return Object.values(nodeEnvs).includes(value) } /** Loads environment variables from the `.env` files. `NODE_ENV` has to be @@ -66,13 +66,25 @@ function loadEnv(): LoadedEnv { return merged } -const parsed = loadEnv() - -function envString(key: string) { - const value = parsed[key] - if (!value) throw new Error(`$${key} is missing`) - return value +export function toNodeEnv(value: unknown): NodeEnv { + if (isNodeEnv(value)) return value + return nodeEnvs.development } -export const BITBUCKET_CLOUD_URL = envString("BITBUCKET_CLOUD_URL") -export const BITBUCKET_CLOUD_TOKEN = envString("BITBUCKET_CLOUD_TOKEN") +const nodeEnvs = { + development: "development", + production: "production", + /** + * Vitest sets `NODE_ENV` to `test` if it wasn't set before. + * @see https://vitest.dev/guide/migration.html#envs + */ + test: "test", +} as const +const parsed = loadEnv() +export const BITBUCKET_CLOUD_URL = envUrl("BITBUCKET_CLOUD_URL") +export const BITBUCKET_CLOUD_USERNAME = envString("BITBUCKET_CLOUD_USERNAME") +export const BITBUCKET_CLOUD_APP_PASSWORD = envString( + "BITBUCKET_CLOUD_APP_PASSWORD", +) +export const BITBUCKET_SERVER_URL = envUrl("BITBUCKET_SERVER_URL") +export const BITBUCKET_SERVER_TOKEN = envString("BITBUCKET_SERVER_TOKEN") diff --git a/tests/server/client.ts b/tests/server/client.ts new file mode 100644 index 0000000..def3086 --- /dev/null +++ b/tests/server/client.ts @@ -0,0 +1,10 @@ +import { createBitbucketServerClient } from "../../src/index.js" +import { BITBUCKET_SERVER_TOKEN, BITBUCKET_SERVER_URL } from "../env.js" + +export const server = createBitbucketServerClient({ + baseUrl: BITBUCKET_SERVER_URL.toString(), + headers: { + Accept: "application/json", + Authorization: `Bearer ${BITBUCKET_SERVER_TOKEN}`, + }, +}) diff --git a/tests/server/repositories.test.ts b/tests/server/repositories.test.ts new file mode 100644 index 0000000..b16dfdc --- /dev/null +++ b/tests/server/repositories.test.ts @@ -0,0 +1,8 @@ +import { test } from "vitest" +import { server } from "./client.js" + +test("GET /api/latest/repos", async ({ expect }) => { + const got = await server.GET("/api/latest/repos") + + expect(got.data?.size).toBeTypeOf("number") +}) diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index ff575e4..1fddd34 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,6 +1,62 @@ { - "extends": "./tsconfig.json", - "compilerOptions": { "checkJs": true }, - "include": ["src", "tests"], - "files": ["eslint.config.js", "./tests/env.ts"] + "compilerOptions": { + /* Projects */ + "incremental": true, + "composite": true, + + /* Language and Environment */ + "target": "ESNext", + "lib": ["DOM", "ESNext"], + "useDefineForClassFields": true, + "moduleDetection": "force", + + /* Modules */ + "module": "NodeNext", + "moduleResolution": "NodeNext", + "typeRoots": ["./node_modules/@types", "./src/types"], + "resolvePackageJsonExports": true, + "resolvePackageJsonImports": true, + "resolveJsonModule": true, + + /* JavaScript Support */ + "checkJs": true, + + /* Emit */ + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": "./dist", + + /* Interop Constraints */ + "isolatedModules": true, + "verbatimModuleSyntax": true, + "isolatedDeclarations": true, + "forceConsistentCasingInFileNames": true, + + /* Type Checking */ + "strict": true, + "noImplicitAny": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "strictBindCallApply": true, + "strictPropertyInitialization": true, + "noImplicitThis": true, + "useUnknownInCatchVariables": true, + "alwaysStrict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "exactOptionalPropertyTypes": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + + /* Completeness */ + "skipDefaultLibCheck": true, + "skipLibCheck": true + }, + "include": ["eslint.config.js", "src", "tests"] } diff --git a/tsconfig.json b/tsconfig.json index d720be6..ed504f4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -59,5 +59,5 @@ "skipLibCheck": true }, "include": ["src"], - "exclude": ["tests", "eslint.config.js"] + "exclude": ["eslint.config.js", "tests"] }