"},"unlimitedNumberOfUsers":{"type":"boolean","readOnly":true}}},"RestBuildCapabilities":{"properties":{"buildStatus":{"type":"array","items":{"type":"string","example":"richBuildStatus"}}}},"RestBuildStatusSetRequest":{"required":["key","state","url"],"type":"object","properties":{"buildNumber":{"maxLength":255,"minLength":0,"type":"string","example":"3"},"description":{"type":"string","example":"Unit test build"},"duration":{"type":"integer","format":"int64","example":1500000},"key":{"maxLength":255,"minLength":0,"type":"string","example":"TEST-REP123"},"lastUpdated":{"type":"integer","format":"int64","example":1359075920},"name":{"maxLength":255,"minLength":0,"type":"string","example":"Database Matrix Tests"},"parent":{"maxLength":1024,"minLength":0,"type":"string","example":"TEST-REP"},"ref":{"maxLength":1024,"minLength":0,"pattern":"^refs\\/.*","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}}},"url":{"maxLength":450,"minLength":0,"type":"string","example":"https://bamboo.example.com/browse/TEST-REP1-3"}}},"RestBulkUserRateLimitSettingsUpdateRequest":{"type":"object","properties":{"settings":{"type":"object","properties":{"capacity":{"type":"integer","format":"int32","example":60},"fillRate":{"type":"integer","format":"int32","example":5}}},"usernames":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"whitelisted":{"type":"boolean"}}},"RestChange":{"properties":{"executable":{"type":"boolean"},"nodeType":{"type":"string","enum":["DIRECTORY","FILE","SUBMODULE"]},"srcPath":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}},"conflict":{"type":"object","properties":{"ourChange":{"type":"object","properties":{"srcPath":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}}}},"theirChange":{"type":"object","properties":{"srcPath":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}}}}}},"contentId":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"},"fromContentId":{"type":"string","example":"bcdef0123abcdef4567abcdef8987abcdef6543a"},"percentUnchanged":{"type":"integer","format":"int32","example":98},"srcExecutable":{"type":"boolean"},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestClusterInformation":{"properties":{"running":{"type":"boolean"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/RestClusterNode"}},"localNode":{"type":"object","properties":{"local":{"type":"boolean"},"buildVersion":{"type":"string","example":"7.0.0"},"address":{"type":"object","properties":{"address":{"type":"string","example":"node.example.com"},"port":{"type":"integer","format":"int32","example":8230}}},"name":{"type":"string","example":"foo"},"id":{"type":"string","example":"d4fde8b1-2504-4998-a0ba-14fbe98edd4d"}}}}},"RestCommitMessageSuggestion":{"properties":{"title":{"type":"string","example":"Pull request #2: add new feature"},"body":{"type":"string","example":"Merge in PROJECT_1/repo_1 from feature/feature-2 to main"}}},"RestConflict":{"properties":{"ourChange":{"type":"object","properties":{"srcPath":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}}}},"theirChange":{"type":"object","properties":{"srcPath":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}}}}}},"RestConflictChange":{"properties":{"srcPath":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}}}},"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":{"repository":{"type":"object","properties":{"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","example":"Production and mirror environments"},"lastUpdated":{"type":"integer","format":"int64","example":1449075920},"url":{"type":"string","example":"http://example.ci.org/projects/PROJ/deploy/mirror-deploy/100"},"environment":{"required":["displayName","key"],"type":"object","properties":{"url":{"maxLength":1024,"minLength":0,"type":"string","example":"https://foo-bar.production/us-east"},"key":{"maxLength":255,"minLength":0,"type":"string","example":"us-east-mirror"},"type":{"pattern":"DEVELOPMENT|TESTING|STAGING|PRODUCTION","type":"string","example":"production"},"displayName":{"maxLength":255,"minLength":0,"type":"string","example":"US East Mirror"}}},"fromCommit":{"type":"object","properties":{"displayId":{"type":"string","example":"abcdef0"},"id":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"}}},"toCommit":{"type":"object","properties":{"displayId":{"type":"string","example":"abcdef0"},"id":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"}}},"deploymentSequenceNumber":{"type":"integer","format":"int64","example":5},"key":{"type":"string","example":"PROD-MIR"},"state":{"type":"string","enum":["PENDING","IN_PROGRESS","CANCELLED","FAILED","ROLLED_BACK","SUCCESSFUL","UNKNOWN"]},"displayName":{"type":"string","example":"US East Mirror"}}},"RestDeploymentEnvironment":{"properties":{"url":{"maxLength":1024,"minLength":0,"type":"string","example":"https://foo-bar.production/us-east"},"key":{"maxLength":255,"minLength":0,"type":"string","example":"us-east-mirror"},"type":{"pattern":"DEVELOPMENT|TESTING|STAGING|PRODUCTION","type":"string","example":"production"},"displayName":{"maxLength":255,"minLength":0,"type":"string","example":"US East Mirror"}}},"RestDeploymentSetRequest":{"required":["deploymentSequenceNumber","description","displayName","environment","key","state","url"],"type":"object","properties":{"deploymentSequenceNumber":{"type":"integer","format":"int64","example":2},"description":{"maxLength":255,"minLength":0,"type":"string","example":"2nd deployment of commit 44bca31f4be to US East production"},"displayName":{"maxLength":255,"minLength":0,"type":"string","example":"US East marketing website production"},"environment":{"$ref":"#/components/schemas/RestDeploymentEnvironment"},"key":{"maxLength":255,"minLength":0,"type":"string","example":"marketing-us-prod"},"lastUpdated":{"minimum":0,"type":"integer","format":"int64","example":1359075920},"state":{"type":"string","example":"SUCCESSFUL","enum":["PENDING","IN_PROGRESS","CANCELLED","FAILED","ROLLED_BACK","SUCCESSFUL","UNKNOWN"]},"url":{"maxLength":1024,"minLength":0,"type":"string","example":"https://my-dep-tool/marketing-us-prod/2"}}},"RestDetailedGroup":{"properties":{"deletable":{"type":"boolean"},"name":{"type":"string","example":"group-a"}}},"RestDetailedInvocation":{"properties":{"request":{"type":"object","properties":{}},"duration":{"type":"integer","format":"int32"},"event":{"type":"string"},"eventScope":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}}},"finish":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32"},"result":{"type":"object","properties":{}}}},"RestDetailedUser":{"properties":{"mutableDetails":{"type":"boolean"},"deletable":{"type":"boolean"},"mutableGroups":{"type":"boolean"},"directoryName":{"type":"string","example":"Bitbucket Internal Directory"},"lastAuthenticationTimestamp":{"type":"number","example":1368145580548},"emailAddress":{"type":"string","example":"jane@example.com"},"slug":{"type":"string","example":"jcitizen"},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"displayName":{"type":"string","example":"Jane Citizen"},"avatarUrl":{"type":"string","writeOnly":true}}},"RestDiff":{"properties":{"destination":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}},"source":{"type":"object","properties":{"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"extension":{"type":"string","example":"txt"}}},"truncated":{"type":"boolean"},"hunks":{"type":"array","items":{"$ref":"#/components/schemas/RestDiffHunk"}},"binary":{"type":"boolean"},"lineComments":{"type":"array","items":{"$ref":"#/components/schemas/RestComment"}},"properties":{"type":"object"}}},"RestDiffHunk":{"properties":{"truncated":{"type":"boolean"},"sourceLine":{"type":"integer","format":"int32"},"sourceSpan":{"type":"integer","format":"int32"},"destinationLine":{"type":"integer","format":"int32"},"destinationSpan":{"type":"integer","format":"int32"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/RestDiffSegment"}},"context":{"type":"string"}}},"RestDiffLine":{"properties":{"destination":{"type":"integer","format":"int32"},"source":{"type":"integer","format":"int32"},"truncated":{"type":"boolean"},"line":{"type":"string"},"conflictMarker":{"type":"string","enum":["MARKER","OURS","THEIRS"]},"commentIds":{"type":"array","items":{"type":"integer","format":"int64"}}}},"RestDiffSegment":{"properties":{"truncated":{"type":"boolean"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/RestDiffLine"}},"type":{"type":"string","enum":["ADDED","CONTEXT","REMOVED"]}}},"RestErasedUser":{"properties":{"newIdentifier":{"type":"string","example":"user-123ab"}}},"RestExportRequest":{"required":["repositoriesRequest"],"type":"object","properties":{"exportLocation":{"type":"string","example":"example/sub/directory"},"repositoriesRequest":{"required":["includes"],"type":"object","properties":{"includes":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/RestRepositorySelector"}}}}}},"RestHookScript":{"properties":{"updatedDate":{"type":"string","format":"date-time"},"description":{"type":"string"},"pluginKey":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"version":{"type":"integer","format":"int32"},"name":{"type":"string"},"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["POST","PRE"]}}},"RestHookScriptConfig":{"properties":{"scope":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY"]}}},"script":{"type":"object","properties":{"updatedDate":{"type":"string","format":"date-time"},"description":{"type":"string"},"pluginKey":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"version":{"type":"integer","format":"int32"},"name":{"type":"string"},"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["POST","PRE"]}}},"triggerIds":{"uniqueItems":true,"type":"array","items":{"type":"string"}}}},"RestHookScriptTriggers":{"type":"object","properties":{"triggerIds":{"uniqueItems":true,"type":"array","items":{"type":"string"}}}},"RestImportRequest":{"type":"object","properties":{"archivePath":{"type":"string","example":"Bitbucket_export_1.tar"}}},"RestInvocationHistory":{"properties":{}},"RestInvocationRequest":{"properties":{}},"RestInvocationResult":{"properties":{}},"RestJob":{"properties":{"updatedDate":{"type":"integer","format":"int64","example":1497657603000},"endDate":{"type":"integer","format":"int64","example":1497657603000},"startDate":{"type":"integer","format":"int64","example":1497657601000},"nodeId":{"type":"string","example":"1bec7499-077a-4b58-b27c-996a9c2187a4"},"initiator":{"type":"object","properties":{"emailAddress":{"type":"string","example":"jane@example.com"},"slug":{"type":"string","example":"jcitizen"},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"displayName":{"type":"string","example":"Jane Citizen"},"avatarUrl":{"type":"string","writeOnly":true}}},"progress":{"type":"object","properties":{"percentage":{"type":"integer","format":"int32","example":42},"message":{"type":"string","example":"Working on it..."}}},"id":{"type":"integer","format":"int64","example":1},"state":{"type":"string","enum":["INITIALISING","READY","RUNNING","FINALISING","COMPLETED","FAILED","CANCELING","CANCELED","TIMED_OUT","ABORTED"]},"type":{"type":"string","example":"com.atlassian.bitbucket.migration.export"}}},"RestJobMessage":{"properties":{"severity":{"type":"string","enum":["INFO","WARN","ERROR"]},"createdDate":{"type":"string","format":"date-time"},"text":{"type":"string","example":"Something of interest happened"},"subject":{"type":"string","example":"job"},"id":{"type":"string","example":"617"}}},"RestLabel":{"properties":{"name":{"type":"string","example":"labelName"}}},"RestLabelable":{"properties":{"labelableType":{"type":"string","enum":["REPOSITORY"]},"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestLogLevel":{"properties":{"logLevel":{"type":"string","example":"DEBUG"}}},"RestMailConfiguration":{"properties":{"username":{"type":"string","example":"user"},"password":{"type":"string","example":"password"},"senderAddress":{"type":"string","example":"stash-no-reply@company.com"},"useStartTls":{"type":"boolean"},"requireStartTls":{"type":"boolean"},"hostname":{"type":"string","example":"smtp.example.com"},"protocol":{"type":"string","enum":["SMTP","SMTPS"]},"port":{"type":"integer","format":"int32","example":465}}},"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":{"uniqueItems":true,"type":"array","items":{"type":"integer","format":"int32"}},"repositoryIds":{"uniqueItems":true,"type":"array","items":{"type":"integer","format":"int32"}}}},"RestMeshMigrationSummary":{"properties":{"startTime":{"type":"integer","format":"int64","example":1331038800000},"jobId":{"type":"integer","format":"int64"},"endTime":{"type":"integer","format":"int64","example":1331038800000},"maxBandwidth":{"type":"integer","format":"int64"},"progress":{"type":"integer","format":"int32","example":53},"queue":{"type":"object","properties":{}},"state":{"type":"string","example":"RUNNING"}}},"RestMeshNode":{"properties":{"offline":{"type":"boolean","example":false},"rpcUrl":{"type":"string","example":"http://127.0.0.1:7999"},"rpcId":{"type":"string","example":"1"},"lastSeenDate":{"type":"number","example":1630041546433},"name":{"type":"string","example":"My node"},"id":{"type":"string","example":"1"},"state":{"type":"string","example":"AVAILABLE","enum":["AVAILABLE","DELETING","DISABLED","DRAINING","OFFLINE"]}}},"RestMigrationRepository":{"properties":{"repository":{"type":"object","properties":{"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"migrationState":{"type":"string","enum":["QUEUED","STAGING","STAGED","MIGRATED","FAILED","CANCELED","SKIPPED"]}}},"RestNode":{"properties":{"name":{"type":"string","example":"My Node"},"id":{"type":"string","example":"1"},"type":{"type":"string","enum":["BITBUCKET","MESH"]}}},"RestNodeConnectivityReport":{"properties":{"summaries":{"type":"array","items":{"$ref":"#/components/schemas/RestNodeConnectivitySummary"}},"node":{"type":"object","properties":{"name":{"type":"string","example":"My Node"},"id":{"type":"string","example":"1"},"type":{"type":"string","enum":["BITBUCKET","MESH"]}}}}},"RestNodeConnectivitySummary":{"properties":{"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}}},"node":{"type":"object","properties":{"name":{"type":"string","example":"My Node"},"id":{"type":"string","example":"1"},"type":{"type":"string","enum":["BITBUCKET","MESH"]}}}}},"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":{"user":{"type":"object","properties":{"emailAddress":{"type":"string","example":"jane@example.com"},"slug":{"type":"string","example":"jcitizen"},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"displayName":{"type":"string","example":"Jane Citizen"},"avatarUrl":{"type":"string","writeOnly":true}}},"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"]}}},"RestProgress":{"properties":{"percentage":{"type":"integer","format":"int32","example":42},"message":{"type":"string","example":"Working on it..."}}},"RestProjectSettingsRestriction":{"properties":{"namespace":{"type":"string","example":"org.featuredeveloper"},"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"featureKey":{"type":"string","example":"my-admin-feature"},"componentKey":{"type":"string","example":"my-admin-component"},"processedState":{"type":"string","example":"PROCESSED","enum":["UNPROCESSED","PROCESSED","FAILED","IN_PROGRESS"]}}},"RestProjectSettingsRestrictionRequest":{"required":["featureKey","namespace"],"type":"object","properties":{"componentKey":{"type":"string","example":"my-admin-component"},"featureKey":{"type":"string","example":"my-admin-feature"},"namespace":{"type":"string","example":"org.featuredeveloper"}}},"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},"user":{"type":"object","properties":{"emailAddress":{"type":"string","example":"jane@example.com"},"slug":{"type":"string","example":"jcitizen"},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"displayName":{"type":"string","example":"Jane Citizen"},"avatarUrl":{"type":"string","writeOnly":true}}},"id":{"type":"integer","format":"int64","example":1}}},"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","readOnly":true,"example":101},"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":{"status":{"type":"string","enum":["UNAPPROVED","NEEDS_WORK","APPROVED"]}}},"RestPullRequestCommitMessageTemplate":{"properties":{"title":{"type":"string","example":"Pull request #${id}: ${title}"},"body":{"type":"string","example":"Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName}"}}},"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"},"participantStatus":{"type":"string","example":"approved"}}},"RestPullRequestMergeConfig":{"properties":{"strategies":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestMergeStrategy"}},"commitMessageTemplate":{"type":"object","properties":{"title":{"type":"string","example":"Pull request #${id}: ${title}"},"body":{"type":"string","example":"Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName}"}}},"commitSummaries":{"type":"integer","format":"int32"},"defaultStrategy":{"type":"object","properties":{"enabled":{"type":"boolean","readOnly":true},"description":{"type":"string","readOnly":true,"example":"Always create a merge commit"},"flag":{"type":"string","readOnly":true,"example":"--no-ff"},"name":{"type":"string","readOnly":true,"example":"Merge commit"},"id":{"type":"string","example":"no-ff"},"links":{"type":"object","properties":{},"writeOnly":true}}},"type":{"type":"string","readOnly":true,"example":"repository"}}},"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":{"enabled":{"type":"boolean","readOnly":true},"description":{"type":"string","readOnly":true,"example":"Always create a merge commit"},"flag":{"type":"string","readOnly":true,"example":"--no-ff"},"name":{"type":"string","readOnly":true,"example":"Merge commit"},"id":{"type":"string","example":"no-ff"},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestPullRequestMergeability":{"properties":{"conflicted":{"type":"boolean"},"vetoes":{"type":"array","items":{"$ref":"#/components/schemas/RestRepositoryHookVeto"}},"outcome":{"type":"string","enum":["CLEAN","CONFLICTED","UNKNOWN"]}}},"RestPullRequestReopenRequest":{"type":"object","properties":{"version":{"type":"integer","format":"int32"}}},"RestPullRequestSettings":{"properties":{"mergeConfig":{"type":"object","properties":{"strategies":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestMergeStrategy"}},"commitMessageTemplate":{"type":"object","properties":{"title":{"type":"string","example":"Pull request #${id}: ${title}"},"body":{"type":"string","example":"Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName}"}}},"commitSummaries":{"type":"integer","format":"int32"},"defaultStrategy":{"type":"object","properties":{"enabled":{"type":"boolean","readOnly":true},"description":{"type":"string","readOnly":true,"example":"Always create a merge commit"},"flag":{"type":"string","readOnly":true,"example":"--no-ff"},"name":{"type":"string","readOnly":true,"example":"Merge commit"},"id":{"type":"string","example":"no-ff"},"links":{"type":"object","properties":{},"writeOnly":true}}},"type":{"type":"string","readOnly":true,"example":"repository"}}}}},"RestPullRequestSuggestion":{"properties":{"repository":{"type":"object","properties":{"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"fromRef":{"type":"object","properties":{"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}}},"toRef":{"type":"object","properties":{"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}}},"changeTme":{"type":"integer","format":"int64","example":1359075920},"refChange":{"type":"object","properties":{"fromHash":{"type":"string","example":"6053a1eaa1c009dd11092d09a72f3c41af1b59ad"},"toHash":{"type":"string","example":"d6edcbf924697ab811a867421dab60d954ccad99"},"refId":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["ADD","DELETE","UPDATE"]},"ref":{"type":"object","properties":{"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}}}}}}},"RestPushRefChange":{"properties":{"updatedType":{"type":"string","enum":["UNKNOWN","UNRESOLVED","NOT_FORCED","FORCED"]},"fromHash":{"type":"string","example":"6053a1eaa1c009dd11092d09a72f3c41af1b59ad"},"toHash":{"type":"string","example":"d6edcbf924697ab811a867421dab60d954ccad99"},"refId":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["ADD","DELETE","UPDATE"]},"ref":{"type":"object","properties":{"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}}}}},"RestRateLimitSettings":{"properties":{"enabled":{"type":"boolean"},"defaultSettings":{"type":"object","properties":{"capacity":{"type":"integer","format":"int32","example":60},"fillRate":{"type":"integer","format":"int32","example":5}}}}},"RestRepositoriesExportRequest":{"required":["includes"],"type":"object","properties":{"includes":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/RestRepositorySelector"}}}},"RestRepositoryHook":{"properties":{"enabled":{"type":"boolean"},"details":{"$ref":"#/components/schemas/RepositoryHookDetails"},"configured":{"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":{"strategies":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestMergeStrategy"}},"commitMessageTemplate":{"type":"object","properties":{"title":{"type":"string","example":"Pull request #${id}: ${title}"},"body":{"type":"string","example":"Merge in ${toProjectKey}/${toRepoSlug} from ${crossRepoProjectRepo}${fromRefName} to ${toRefName}"}}},"commitSummaries":{"type":"integer","format":"int32"},"defaultStrategy":{"type":"object","properties":{"enabled":{"type":"boolean","readOnly":true},"description":{"type":"string","readOnly":true,"example":"Always create a merge commit"},"flag":{"type":"string","readOnly":true,"example":"--no-ff"},"name":{"type":"string","readOnly":true,"example":"Merge commit"},"id":{"type":"string","example":"no-ff"},"links":{"type":"object","properties":{},"writeOnly":true}}},"type":{"type":"string","readOnly":true,"example":"repository"}}},"requiredAllApprovers":{"type":"boolean"},"requiredApprovers":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"count":{"type":"string","example":"3"}}},"requiredAllTasksComplete":{"type":"boolean"},"requiredApproversDeprecated":{"type":"integer","format":"int32"},"requiredSuccessfulBuilds":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"count":{"type":"string","example":"3"}}},"requiredSuccessfulBuildsDeprecated":{"type":"integer","format":"int32"}}},"RestRepositoryRefChangeActivity":{"properties":{"repository":{"type":"object","properties":{"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"project":{"required":["key"],"type":"object","properties":{"namespace":{"type":"string","readOnly":true,"deprecated":true},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"description":{"type":"string","readOnly":true,"example":"My repo description"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"partition":{"type":"integer","format":"int32","readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"scmId":{"type":"string","example":"git"},"slug":{"type":"string","example":"my-repo"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"name":{"type":"string","example":"My repo"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"public":{"type":"boolean","readOnly":true},"links":{"type":"object","properties":{},"writeOnly":true}}},"refChange":{"type":"object","properties":{"updatedType":{"type":"string","enum":["UNKNOWN","UNRESOLVED","NOT_FORCED","FORCED"]},"fromHash":{"type":"string","example":"6053a1eaa1c009dd11092d09a72f3c41af1b59ad"},"toHash":{"type":"string","example":"d6edcbf924697ab811a867421dab60d954ccad99"},"refId":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["ADD","DELETE","UPDATE"]},"ref":{"type":"object","properties":{"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}}}}},"trigger":{"type":"string","example":"push"},"createdDate":{"type":"integer","format":"int64","example":19990759200},"user":{"type":"object","properties":{"emailAddress":{"type":"string","example":"jane@example.com"},"slug":{"type":"string","example":"jcitizen"},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"displayName":{"type":"string","example":"Jane Citizen"},"avatarUrl":{"type":"string","writeOnly":true}}},"id":{"type":"integer","format":"int64","example":1}}},"RestRepositorySelector":{"type":"object","properties":{"projectKey":{"type":"string","example":"PRJ"},"slug":{"type":"string","example":"my-repo"}}},"RestReviewerGroup":{"properties":{"description":{"type":"string","example":"null"},"avatarUrl":{"type":"string","writeOnly":true},"users":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationUser"}},"scope":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY"]}}},"name":{"type":"string","example":"name"},"id":{"type":"integer","format":"int64"}}},"RestScopesExample":{"properties":{"scopes":{"type":"array","items":{"type":"object"}},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestSecretScanningAllowlistRule":{"properties":{"lineRegex":{"type":"string","description":"If present, regular expression for matching a secret on a code line","example":"(BBDC-[a-zA-Z0-9+]{44})"},"pathRegex":{"type":"string","description":"If present, regular expression matching file names","example":"*.pem"},"name":{"type":"string","description":"Human readable name for the rule","example":"Bitbucket DC HTTP access token"},"id":{"type":"integer","description":"The ID of the rule","format":"int64","example":7}}},"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":{"lineRegex":{"type":"string","description":"If present, regular expression for matching a secret on a code line","example":"(BBDC-[a-zA-Z0-9+]{44})"},"pathRegex":{"type":"string","description":"If present, regular expression matching file names","example":"*.pem"},"scope":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY"]}},"description":"The scope in which this rule was configured for."},"name":{"type":"string","description":"Human readable name for the rule","example":"Bitbucket DC HTTP access token"},"id":{"type":"integer","description":"The ID of the rule","format":"int64","example":7}}},"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"}}},"RestTestResults":{"properties":{"successful":{"type":"integer","format":"int32","example":134},"failed":{"type":"integer","format":"int32","example":1},"skipped":{"type":"integer","format":"int32","example":5}}},"RestTokenBucketSettings":{"properties":{"capacity":{"type":"integer","format":"int32","example":60},"fillRate":{"type":"integer","format":"int32","example":5}}},"RestUserDirectory":{"properties":{"description":{"type":"string","example":"This directory has users that are able to access Bitbucket DC"},"active":{"type":"boolean","example":true},"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}}},"whitelisted":{"type":"boolean"},"user":{"type":"object","properties":{"emailAddress":{"type":"string","example":"jane@example.com"},"slug":{"type":"string","example":"jcitizen"},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"displayName":{"type":"string","example":"Jane Citizen"},"avatarUrl":{"type":"string","writeOnly":true}}}}},"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":{"configuration":{"type":"object"},"credentials":{"$ref":"#/components/schemas/RestWebhookCredentials"},"events":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"url":{"type":"string"},"active":{"type":"boolean"},"statistics":{"type":"object","properties":{},"writeOnly":true},"scopeType":{"type":"string"},"sslVerificationRequired":{"type":"boolean"},"name":{"type":"string"}}},"RestWebhookCredentials":{"properties":{"username":{"type":"string"},"password":{"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","description":"The ID of the X.509 certificate","format":"int64","example":7}}},"UserAndGroups":{"required":["groups"],"type":"object","properties":{"groups":{"uniqueItems":true,"type":"array","example":["group_a","group_b"],"items":{"type":"string"}},"user":{"type":"string","example":"user"}}},"UserPasswordUpdate":{"type":"object","properties":{"oldPassword":{"type":"string","example":"my-old-secret-password"},"password":{"type":"string","writeOnly":true,"example":"my-secret-password"},"passwordConfirm":{"type":"string","writeOnly":true,"example":"my-secret-password"}}},"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 URL | \n Description | \n
\n
\n \n \n /rest/zdu | \n The ZDU REST resource for the server | \n
\n \n
\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 Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n state | \n \n string\n | \n The current state of the Cluster. | \n STABLE , READY_TO_UPGRADE , MIXED , READY_TO_RUN_UPGRADE_TASKS , RUNNING_UPGRADE_TASKS , UPGRADE_TASKS_FAILED | \n
\n \n buildInfo | \n \n object\n | \n Represents a Cluster Node and its current state. | \n Any | \n
\n \n buildInfo.id | \n \n string\n | \n The id of the Node in cluster. | \n Any | \n
\n \n buildInfo.name | \n \n string\n | \n The name of the Node. | \n Any | \n
\n \n buildInfo.ipAddress | \n \n string\n | \n The IP address of the Node. | \n Any | \n
\n \n buildInfo.state | \n \n string\n | \n The current state of the Node. | \n STARTING , ACTIVE , DRAINING , TERMINATING , OFFLINE , ERROR | \n
\n \n buildInfo.tasksTotal | \n \n integer\n | \n The total number of active tasks on the Node. | \n Any | \n
\n \n buildInfo.activeUserCount | \n \n integer\n | \n The total number of active users on the Node. | \n Any | \n
\n \n buildInfo.buildNumber | \n \n string\n | \n The build number (DB schema version) of the Node's installed Product. | \n Any | \n
\n \n buildInfo.version | \n \n string\n | \n The version of the Node's installed Product. | \n Any | \n
\n \n buildInfo.local | \n \n boolean\n | \n True if this is the local node for the current session; otherwise false for remote nodes. | \n Any | \n
\n \n buildInfo.portNumber | \n \n integer\n | \n | \n Any | \n
\n \n buildInfo.links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n buildInfo.links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n buildInfo.links.href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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### `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 Name | \n Type | \n In | \n Description | \n Accepted values | \n
\n \n \n \n nodeId (required) | \n \n string\n | \n path | \n | \n Any | \n
\n \n
\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 Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n id | \n \n string\n | \n The id of the Node in cluster. | \n Any | \n
\n \n name | \n \n string\n | \n The name of the Node. | \n Any | \n
\n \n ipAddress | \n \n string\n | \n The IP address of the Node. | \n Any | \n
\n \n state | \n \n string\n | \n The current state of the Node. | \n STARTING , ACTIVE , DRAINING , TERMINATING , OFFLINE , ERROR | \n
\n \n tasksTotal | \n \n integer\n | \n The total number of active tasks on the Node. | \n Any | \n
\n \n activeUserCount | \n \n integer\n | \n The total number of active users on the Node. | \n Any | \n
\n \n buildNumber | \n \n string\n | \n The build number (DB schema version) of the Node's installed Product. | \n Any | \n
\n \n version | \n \n string\n | \n The version of the Node's installed Product. | \n Any | \n
\n \n local | \n \n boolean\n | \n True if this is the local node for the current session; otherwise false for remote nodes. | \n Any | \n
\n \n portNumber | \n \n integer\n | \n | \n Any | \n
\n \n links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n links.href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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### `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 Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n upgradeModeEnabled | \n \n boolean\n | \n If true, it's safe to upgrade the nodes of the cluster | \n Any | \n
\n \n state | \n \n string\n | \n The current state of the Cluster. | \n STABLE , READY_TO_UPGRADE , MIXED , READY_TO_RUN_UPGRADE_TASKS , RUNNING_UPGRADE_TASKS , UPGRADE_TASKS_FAILED | \n
\n \n originalVersion | \n \n string\n | \n The original product version when ZDU was enabled | \n Any | \n
\n \n nodes | \n \n array(object)\n | \n The nodes which form the Cluster. | \n Any | \n
\n \n nodes.id | \n \n string\n | \n The id of the Node in cluster. | \n Any | \n
\n \n nodes.name | \n \n string\n | \n The name of the Node. | \n Any | \n
\n \n nodes.ipAddress | \n \n string\n | \n The IP address of the Node. | \n Any | \n
\n \n nodes.state | \n \n string\n | \n The current state of the Node. | \n STARTING , ACTIVE , DRAINING , TERMINATING , OFFLINE , ERROR | \n
\n \n nodes.tasksTotal | \n \n integer\n | \n The total number of active tasks on the Node. | \n Any | \n
\n \n nodes.activeUserCount | \n \n integer\n | \n The total number of active users on the Node. | \n Any | \n
\n \n nodes.buildNumber | \n \n string\n | \n The build number (DB schema version) of the Node's installed Product. | \n Any | \n
\n \n nodes.version | \n \n string\n | \n The version of the Node's installed Product. | \n Any | \n
\n \n nodes.local | \n \n boolean\n | \n True if this is the local node for the current session; otherwise false for remote nodes. | \n Any | \n
\n \n nodes.portNumber | \n \n integer\n | \n | \n Any | \n
\n \n nodes.links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n nodes.links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n nodes.links.href | \n \n string\n | \n uri | \n Any | \n
\n \n links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n links.href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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### `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 Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n upgradeModeEnabled | \n \n boolean\n | \n If true, it's safe to upgrade the nodes of the cluster | \n Any | \n
\n \n state | \n \n string\n | \n The current state of the Cluster. | \n STABLE , READY_TO_UPGRADE , MIXED , READY_TO_RUN_UPGRADE_TASKS , RUNNING_UPGRADE_TASKS , UPGRADE_TASKS_FAILED | \n
\n \n originalVersion | \n \n string\n | \n The original product version when ZDU was enabled | \n Any | \n
\n \n nodes | \n \n array(object)\n | \n The nodes which form the Cluster. | \n Any | \n
\n \n nodes.id | \n \n string\n | \n The id of the Node in cluster. | \n Any | \n
\n \n nodes.name | \n \n string\n | \n The name of the Node. | \n Any | \n
\n \n nodes.ipAddress | \n \n string\n | \n The IP address of the Node. | \n Any | \n
\n \n nodes.state | \n \n string\n | \n The current state of the Node. | \n STARTING , ACTIVE , DRAINING , TERMINATING , OFFLINE , ERROR | \n
\n \n nodes.tasksTotal | \n \n integer\n | \n The total number of active tasks on the Node. | \n Any | \n
\n \n nodes.activeUserCount | \n \n integer\n | \n The total number of active users on the Node. | \n Any | \n
\n \n nodes.buildNumber | \n \n string\n | \n The build number (DB schema version) of the Node's installed Product. | \n Any | \n
\n \n nodes.version | \n \n string\n | \n The version of the Node's installed Product. | \n Any | \n
\n \n nodes.local | \n \n boolean\n | \n True if this is the local node for the current session; otherwise false for remote nodes. | \n Any | \n
\n \n nodes.portNumber | \n \n integer\n | \n | \n Any | \n
\n \n nodes.links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n nodes.links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n nodes.links.href | \n \n string\n | \n uri | \n Any | \n
\n \n links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n links.href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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### `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 Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n upgradeModeEnabled | \n \n boolean\n | \n If true, it's safe to upgrade the nodes of the cluster | \n Any | \n
\n \n state | \n \n string\n | \n The current state of the Cluster. | \n STABLE , READY_TO_UPGRADE , MIXED , READY_TO_RUN_UPGRADE_TASKS , RUNNING_UPGRADE_TASKS , UPGRADE_TASKS_FAILED | \n
\n \n originalVersion | \n \n string\n | \n The original product version when ZDU was enabled | \n Any | \n
\n \n nodes | \n \n array(object)\n | \n The nodes which form the Cluster. | \n Any | \n
\n \n nodes.id | \n \n string\n | \n The id of the Node in cluster. | \n Any | \n
\n \n nodes.name | \n \n string\n | \n The name of the Node. | \n Any | \n
\n \n nodes.ipAddress | \n \n string\n | \n The IP address of the Node. | \n Any | \n
\n \n nodes.state | \n \n string\n | \n The current state of the Node. | \n STARTING , ACTIVE , DRAINING , TERMINATING , OFFLINE , ERROR | \n
\n \n nodes.tasksTotal | \n \n integer\n | \n The total number of active tasks on the Node. | \n Any | \n
\n \n nodes.activeUserCount | \n \n integer\n | \n The total number of active users on the Node. | \n Any | \n
\n \n nodes.buildNumber | \n \n string\n | \n The build number (DB schema version) of the Node's installed Product. | \n Any | \n
\n \n nodes.version | \n \n string\n | \n The version of the Node's installed Product. | \n Any | \n
\n \n nodes.local | \n \n boolean\n | \n True if this is the local node for the current session; otherwise false for remote nodes. | \n Any | \n
\n \n nodes.portNumber | \n \n integer\n | \n | \n Any | \n
\n \n nodes.links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n nodes.links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n nodes.links.href | \n \n string\n | \n uri | \n Any | \n
\n \n links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n links.href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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### `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 Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n upgradeModeEnabled | \n \n boolean\n | \n If true, it's safe to upgrade the nodes of the cluster | \n Any | \n
\n \n state | \n \n string\n | \n The current state of the Cluster. | \n STABLE , READY_TO_UPGRADE , MIXED , READY_TO_RUN_UPGRADE_TASKS , RUNNING_UPGRADE_TASKS , UPGRADE_TASKS_FAILED | \n
\n \n originalVersion | \n \n string\n | \n The original product version when ZDU was enabled | \n Any | \n
\n \n nodes | \n \n array(object)\n | \n The nodes which form the Cluster. | \n Any | \n
\n \n nodes.id | \n \n string\n | \n The id of the Node in cluster. | \n Any | \n
\n \n nodes.name | \n \n string\n | \n The name of the Node. | \n Any | \n
\n \n nodes.ipAddress | \n \n string\n | \n The IP address of the Node. | \n Any | \n
\n \n nodes.state | \n \n string\n | \n The current state of the Node. | \n STARTING , ACTIVE , DRAINING , TERMINATING , OFFLINE , ERROR | \n
\n \n nodes.tasksTotal | \n \n integer\n | \n The total number of active tasks on the Node. | \n Any | \n
\n \n nodes.activeUserCount | \n \n integer\n | \n The total number of active users on the Node. | \n Any | \n
\n \n nodes.buildNumber | \n \n string\n | \n The build number (DB schema version) of the Node's installed Product. | \n Any | \n
\n \n nodes.version | \n \n string\n | \n The version of the Node's installed Product. | \n Any | \n
\n \n nodes.local | \n \n boolean\n | \n True if this is the local node for the current session; otherwise false for remote nodes. | \n Any | \n
\n \n nodes.portNumber | \n \n integer\n | \n | \n Any | \n
\n \n nodes.links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n nodes.links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n nodes.links.href | \n \n string\n | \n uri | \n Any | \n
\n \n links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n links.href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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### Schemas\n\n#### ClusterStateResponse\n\n\n \n \n Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n state | \n \n string\n | \n The current state of the Cluster. | \n STABLE , READY_TO_UPGRADE , MIXED , READY_TO_RUN_UPGRADE_TASKS , RUNNING_UPGRADE_TASKS , UPGRADE_TASKS_FAILED | \n
\n \n buildInfo | \n \n object\n | \n Represents a Cluster Node and its current state. | \n Any | \n
\n \n buildInfo.id | \n \n string\n | \n The id of the Node in cluster. | \n Any | \n
\n \n buildInfo.name | \n \n string\n | \n The name of the Node. | \n Any | \n
\n \n buildInfo.ipAddress | \n \n string\n | \n The IP address of the Node. | \n Any | \n
\n \n buildInfo.state | \n \n string\n | \n The current state of the Node. | \n STARTING , ACTIVE , DRAINING , TERMINATING , OFFLINE , ERROR | \n
\n \n buildInfo.tasksTotal | \n \n integer\n | \n The total number of active tasks on the Node. | \n Any | \n
\n \n buildInfo.activeUserCount | \n \n integer\n | \n The total number of active users on the Node. | \n Any | \n
\n \n buildInfo.buildNumber | \n \n string\n | \n The build number (DB schema version) of the Node's installed Product. | \n Any | \n
\n \n buildInfo.version | \n \n string\n | \n The version of the Node's installed Product. | \n Any | \n
\n \n buildInfo.local | \n \n boolean\n | \n True if this is the local node for the current session; otherwise false for remote nodes. | \n Any | \n
\n \n buildInfo.portNumber | \n \n integer\n | \n | \n Any | \n
\n \n buildInfo.links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n buildInfo.links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n buildInfo.links.href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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 Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n rel | \n \n string\n | \n rel | \n Any | \n
\n \n href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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 Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n id | \n \n string\n | \n The id of the Node in cluster. | \n Any | \n
\n \n name | \n \n string\n | \n The name of the Node. | \n Any | \n
\n \n ipAddress | \n \n string\n | \n The IP address of the Node. | \n Any | \n
\n \n state | \n \n string\n | \n The current state of the Node. | \n STARTING , ACTIVE , DRAINING , TERMINATING , OFFLINE , ERROR | \n
\n \n tasksTotal | \n \n integer\n | \n The total number of active tasks on the Node. | \n Any | \n
\n \n activeUserCount | \n \n integer\n | \n The total number of active users on the Node. | \n Any | \n
\n \n buildNumber | \n \n string\n | \n The build number (DB schema version) of the Node's installed Product. | \n Any | \n
\n \n version | \n \n string\n | \n The version of the Node's installed Product. | \n Any | \n
\n \n local | \n \n boolean\n | \n True if this is the local node for the current session; otherwise false for remote nodes. | \n Any | \n
\n \n portNumber | \n \n integer\n | \n | \n Any | \n
\n \n links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n links.href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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 Name | \n Type | \n Description | \n Accepted values | \n
\n \n \n \n upgradeModeEnabled | \n \n boolean\n | \n If true, it's safe to upgrade the nodes of the cluster | \n Any | \n
\n \n state | \n \n string\n | \n The current state of the Cluster. | \n STABLE , READY_TO_UPGRADE , MIXED , READY_TO_RUN_UPGRADE_TASKS , RUNNING_UPGRADE_TASKS , UPGRADE_TASKS_FAILED | \n
\n \n originalVersion | \n \n string\n | \n The original product version when ZDU was enabled | \n Any | \n
\n \n nodes | \n \n array(object)\n | \n The nodes which form the Cluster. | \n Any | \n
\n \n nodes.id | \n \n string\n | \n The id of the Node in cluster. | \n Any | \n
\n \n nodes.name | \n \n string\n | \n The name of the Node. | \n Any | \n
\n \n nodes.ipAddress | \n \n string\n | \n The IP address of the Node. | \n Any | \n
\n \n nodes.state | \n \n string\n | \n The current state of the Node. | \n STARTING , ACTIVE , DRAINING , TERMINATING , OFFLINE , ERROR | \n
\n \n nodes.tasksTotal | \n \n integer\n | \n The total number of active tasks on the Node. | \n Any | \n
\n \n nodes.activeUserCount | \n \n integer\n | \n The total number of active users on the Node. | \n Any | \n
\n \n nodes.buildNumber | \n \n string\n | \n The build number (DB schema version) of the Node's installed Product. | \n Any | \n
\n \n nodes.version | \n \n string\n | \n The version of the Node's installed Product. | \n Any | \n
\n \n nodes.local | \n \n boolean\n | \n True if this is the local node for the current session; otherwise false for remote nodes. | \n Any | \n
\n \n nodes.portNumber | \n \n integer\n | \n | \n Any | \n
\n \n nodes.links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n nodes.links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n nodes.links.href | \n \n string\n | \n uri | \n Any | \n
\n \n links | \n \n array(object)\n | \n Hypermedia links | \n Any | \n
\n \n links.rel | \n \n string\n | \n rel | \n Any | \n
\n \n links.href | \n \n string\n | \n uri | \n Any | \n
\n \n
\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":"Signing"},{"name":"System Maintenance"}],"paths":{"/audit/latest/notification-settings/retention-config-review":{"delete":{"tags":["System Maintenance"],"summary":"Dismiss retention config notification","description":"Dismisses the retention config review notification displayed by the audit plugin for the user that's currently logged in.","operationId":"dismissRetentionConfigReviewNotification","responses":{"200":{"description":"A blank response","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to dismiss the notification.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/access-tokens/latest/projects/{projectKey}":{"get":{"tags":["Authentication"],"summary":"Get project HTTP tokens","description":"Get all access tokens associated with the given project.","operationId":"getAllAccessTokens","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A response containing a page of access tokens and associated details.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestAccessToken"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not permitted to get access tokens for this project or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Authentication"],"summary":"Create project HTTP token","description":"Create an access token for the project according to the given request.","operationId":"createAccessToken_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request containing the details of the access token to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessTokenRequest"}}}},"responses":{"200":{"description":"A response containing the raw access token and associated details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRawAccessToken"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to create an access token for this project or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}":{"get":{"tags":["Authentication"],"summary":"Get repository HTTP tokens","description":"Get all access tokens associated with the given repository.","operationId":"getAllAccessTokens_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A response containing a page of access tokens and associated details.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestAccessToken"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not permitted to get access tokens for this repository or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Authentication"],"summary":"Create repository HTTP token","description":"Create an access token for the repository according to the given request.","operationId":"createAccessToken_2","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request containing the details of the access token to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessTokenRequest"}}}},"responses":{"200":{"description":"A response containing the raw access token and associated details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRawAccessToken"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to create an access token for this repository or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/access-tokens/latest/projects/{projectKey}/repos/{repositorySlug}/{tokenId}":{"get":{"tags":["Authentication"],"summary":"Get HTTP token by ID","description":"Get the access token identified by the given ID.","operationId":"getById_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","description":"The token id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A response containing the access token and associated details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessToken"}}}},"401":{"description":"The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or token does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Authentication"],"summary":"Update HTTP token","description":"Modify an access token according to the given request. Any fields not specified will not be altered.","operationId":"updateAccessToken_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","description":"The token id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request containing the details of the access token to modify","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessTokenRequest"}}}},"responses":{"200":{"description":"A response containing the updated access token and associated details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessToken"}}}},"400":{"description":"One of the provided permission levels are unknown.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Authentication"],"summary":"Delete a HTTP token","description":"Delete the access token identified by the given ID.","operationId":"deleteById_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","description":"The token id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the token has been deleted."},"401":{"description":"The currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or token does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/access-tokens/latest/projects/{projectKey}/{tokenId}":{"get":{"tags":["Authentication"],"summary":"Get HTTP token by ID","description":"Get the access token identified by the given ID.","operationId":"getById","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","description":"The token id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A response containing the access token and associated details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessToken"}}}},"401":{"description":"The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or token does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Authentication"],"summary":"Update HTTP token","description":"Modify an access token according to the given request. Any fields not specified will not be altered.","operationId":"updateAccessToken","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","description":"The token id.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request containing the details of the access token to modify","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessTokenRequest"}}}},"responses":{"200":{"description":"A response containing the updated access token and associated details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessToken"}}}},"400":{"description":"One of the provided permission levels are unknown.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Authentication"],"summary":"Delete a HTTP token","description":"Delete the access token identified by the given ID.","operationId":"deleteById","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"tokenId","in":"path","description":"The token id.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the token has been deleted."},"401":{"description":"The currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or token does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/access-tokens/latest/users/{userSlug}":{"get":{"tags":["Authentication"],"summary":"Get personal HTTP tokens","description":"Get all access tokens associated with the given user.","operationId":"getAllAccessTokens_2","parameters":[{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A response containing a page of access tokens and associated details.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestAccessToken"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Authentication"],"summary":"Create personal HTTP token","description":"Create an access token for the user according to the given request.","operationId":"createAccessToken_3","parameters":[{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request containing the details of the access token to create.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessTokenRequest"}}}},"responses":{"200":{"description":"A response containing the raw access token and associated details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRawAccessToken"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to create an access token on behalf of this user or authentication failed","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/access-tokens/latest/users/{userSlug}/{tokenId}":{"get":{"tags":["Authentication"],"summary":"Get HTTP token by ID","description":"Get the access token identified by the given ID.","operationId":"getById_2","parameters":[{"name":"tokenId","in":"path","description":"The token id.","required":true,"schema":{"type":"string"}},{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A response containing the access token and associated details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessToken"}}}},"401":{"description":"The currently authenticated user is not permitted to get access tokens on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or token does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Authentication"],"summary":"Update HTTP token","description":"Modify an access token according to the given request. Any fields not specified will not be altered.","operationId":"updateAccessToken_2","parameters":[{"name":"tokenId","in":"path","description":"The token id.","required":true,"schema":{"type":"string"}},{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request containing the details of the access token to modify","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessTokenRequest"}}}},"responses":{"200":{"description":"A response containing the updated access token and associated details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAccessToken"}}}},"400":{"description":"One of the provided permission levels are unknown.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to update an access token on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Authentication"],"summary":"Delete a HTTP token","description":"Delete the access token identified by the given ID.","operationId":"deleteById_2","parameters":[{"name":"tokenId","in":"path","description":"The token id.","required":true,"schema":{"type":"string"}},{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the token has been deleted."},"401":{"description":"The currently authenticated user is not permitted to delete an access token on behalf of this user or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or token does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches":{"post":{"tags":["Repository"],"summary":"Create branch","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBranchCreateRequest"}}},"required":true},"responses":{"201":{"description":"JSON representation of the newly created branch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBranch"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The branch name overlapped with an existing branch","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Delete branch","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Branch delete request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBranchDeleteRequest"}}}},"responses":{"204":{"description":"An empty response indicating that the branch no longer exists in the repository"},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches/info/{commitId}":{"get":{"tags":["Repository"],"summary":"Get branch","description":"Gets the branch information associated with a single commit from a given repository.","operationId":"findByCommit","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","required":true,"content":{"application/json":{"schema":{"maxLength":40,"type":"string"}}}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of branch refs associated with the commit","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestMinimalRef"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"500":{"description":"The request has timed out processing the branch request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition":{"post":{"tags":["Builds and Deployments"],"summary":"Create a required builds merge check","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":[{"name":"projectKey","in":"path","description":"The project that the repository belongs to","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository being used","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request specifying the required build parent keys, ref matcher and exemption matcher","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestRequiredBuildConditionSetRequest"}}}},"responses":{"200":{"description":"A response containing the newly created required build merge check.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRequiredBuildCondition"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a required build merge check in this repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}":{"put":{"tags":["Builds and Deployments"],"summary":"Update a required builds merge check","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":[{"name":"projectKey","in":"path","description":"The project that the repository belongs to","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"repositorySlug","in":"path","description":"The repository being used","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request specifying the required build parent keys, ref matcher and exemption matcher","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestRequiredBuildConditionSetRequest"}}}},"responses":{"200":{"description":"The details needed to update a required build merge check.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRequiredBuildCondition"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a required build merge check in this repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Builds and Deployments"],"summary":"Delete a required builds merge check","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":[{"name":"projectKey","in":"path","description":"The project that the repository belongs to","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"repositorySlug","in":"path","description":"The repository being used","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating the merge check was successfully deleted, or was never present."},"401":{"description":"The currently authenticated user has insufficient permissions to delete a required build merge check in this repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/conditions":{"get":{"tags":["Builds and Deployments"],"summary":"Get required builds merge checks","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":[{"name":"projectKey","in":"path","description":"The project that the repository belongs to","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository being used","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The required build merge checks associated with the provided repository.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRequiredBuildCondition"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to request a page of required build merge checks in this repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/build-status/latest/commits/{commitId}":{"get":{"tags":["Deprecated"],"summary":"Get build statuses for commit","description":"Gets build statuses associated with a commit.\n\nDeprecated in 7.14, please use the repository based builds resource instead.","operationId":"getBuildStatus","parameters":[{"name":"orderBy","in":"query","description":"How the results should be ordered. Options are NEWEST, OLDEST, STATUS","schema":{"type":"string"},"example":"newest, oldest, or status"},{"name":"commitId","in":"path","description":"Full SHA1 of the commit (ex: e00cf62997a027bbf785614a93e2e55bb331d268
)","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A Page of build statuses associated with the commit
(limited to the most recent 100 build statuses associated with the commit)","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestBuildStatus"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The user is not authenticated or does not have the LICENSED permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"post":{"tags":["Deprecated"],"summary":"Create build status for commit","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
, FAILED
and 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":[{"name":"commitId","in":"path","description":"full SHA1 of the commit","required":true,"schema":{"type":"string"},"example":"e00cf62997a027bbf785614a93e2e55bb331d268"}],"requestBody":{"description":"build status to associate with the commit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBuildStatus"}}}},"responses":{"204":{"description":"An empty response if the build status was successfully stored"},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The user is not authenticated or does not have the LICENSED permission","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/build-status/latest/commits/stats/{commitId}":{"get":{"tags":["Builds and Deployments","Deprecated"],"summary":"Get build status statistics for commit","description":"Gets statistics regarding the builds associated with a commit","operationId":"getBuildStatusStats","parameters":[{"name":"includeUnique","in":"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","schema":{"type":"boolean"}},{"name":"commitId","in":"path","description":"full SHA1 of the commit","required":true,"schema":{"type":"string"},"example":"e00cf62997a027bbf785614a93e2e55bb331d268"}],"responses":{"200":{"description":"The number of successful/failed/in-progress builds for the commit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBuildStats"}}}},"401":{"description":"The user is not authenticated or does not have the LICENSED permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/build-status/latest/commits/stats":{"post":{"tags":["Builds and Deployments","Deprecated"],"summary":"Get build status 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.","operationId":"getMultipleBuildStatusStats","requestBody":{"description":"full SHA1 of each commit","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"db0dd118fa6ccdf1d593fef00df839dd27702df7"}}}}},"responses":{"200":{"description":"The number of successful/failed/in-progress builds for each commit (with the caveat that the commits without any builds associated with them will not be present in the response)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMultipleBuildStats"}}}},"401":{"description":"The user is not authenticated or does not have the LICENSED permission","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/default-reviewers/latest/projects/{projectKey}/condition":{"post":{"tags":["Pull Requests"],"summary":"Create default reviewer","description":"Create a default reviewer pull request condition for the given project.","operationId":"createPullRequestCondition","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The details needed to create a default reviewer pull request condition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDefaultReviewersRequest"}}}},"responses":{"200":{"description":"The default reviewer pull request condition that was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestCondition"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/default-reviewers/latest/projects/{projectKey}/condition/{id}":{"put":{"tags":["Pull Requests"],"summary":"Update the default reviewer","description":"Update the default reviewer pull request condition for the given ID.","operationId":"updatePullRequestCondition","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the pull request condition.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The new details for the default reviewer pull request condition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDefaultReviewersRequest"}}}},"responses":{"200":{"description":"The updated default reviewer pull request condition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestCondition"}}}},"400":{"description":"The request was malformed","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Remove default reviewer","description":"Delete the default reviewer pull request condition associated with the given ID.","operationId":"deletePullRequestCondition","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the pull request condition.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the pull request condition was deleted."},"404":{"description":"An empty response indicating a pull request condition with the given ID could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/default-reviewers/latest/projects/{projectKey}/conditions":{"get":{"tags":["Pull Requests"],"summary":"Get default reviewers","description":"Return a page of default reviewer pull request conditions that have been configured for this project.","operationId":"getPullRequestConditions","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The default reviewer pull request conditions associated with the given project.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestCondition"}}}}}}}},"/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/condition":{"post":{"tags":["Pull Requests"],"summary":"Create default reviewers condition","description":"Create a default reviewer pull request condition for the given repository.","operationId":"createPullRequestCondition_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The details needed to create a default reviewer pull request condition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDefaultReviewersRequest"}}}},"responses":{"200":{"description":"The default reviewer pull request condition that was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestCondition"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}":{"put":{"tags":["Pull Requests"],"summary":"Update a default reviewer condition","description":"Update the default reviewer pull request condition for the given ID.","operationId":"updatePullRequestCondition_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the pull request condition","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","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":{"description":"The updated default reviewer pull request condition.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestCondition"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Delete a default reviewer condition","description":"Delete the default reviewer pull request condition associated with the given ID.","operationId":"deletePullRequestCondition_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the pull request condition was deleted"},"404":{"description":"An empty response indicating a pull request condition with the given ID could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/conditions":{"get":{"tags":["Pull Requests"],"summary":"Get configured default reviewers","description":"Return a page of default reviewer pull request conditions that have been configured for this repository.","operationId":"getPullRequestConditions_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The default reviewer pull request conditions associated with the given repository.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestCondition"}}}}}}}},"/default-reviewers/latest/projects/{projectKey}/repos/{repositorySlug}/reviewers":{"get":{"tags":["Pull Requests"],"summary":"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.","operationId":"getReviewers","parameters":[{"name":"targetRepoId","in":"query","description":"The ID of the repository in which the target ref exists","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"sourceRepoId","in":"query","description":"The ID of the repository in which the source ref exists","schema":{"type":"string"}},{"name":"sourceRefId","in":"query","description":"The ID of the source ref","schema":{"type":"string"}},{"name":"targetRefId","in":"query","description":"The ID of the target ref","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The default reviewer pull request conditions associated with the given repository.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestCondition"}}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}}}}},"/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes":{"get":{"tags":["Deprecated"],"summary":"Get comment likes","description":"Get a page of users who liked a commit comment in the specified repository, identified by commitId
and commentId
.\n\nThe authenticated user must have the **REPO_READ** (or higher) permission for the specified repository to access this resource.\n\nDeprecated in 8.0 to be removed in 9.0.","operationId":"getLikers","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"commitId","in":"path","description":"The commit id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of users who liked the specified comment","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestApplicationUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user does not have sufficient permission (REPO_READ
) to query the comment likes","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository, commit or comment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"post":{"tags":["Deprecated"],"summary":"Like a commit comment","description":"Like a commit comment in the specified repository, identified by commitId
and commentId
.\n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\nDeprecated in 8.0 to be removed in 9.0. Likes have been replaced with reactions. For backwards compatibility, the thumbsup
reaction is treated as a like.","operationId":"like","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"commitId","in":"path","description":"The commit id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content response indicating that the request succeeded"},"400":{"description":"The currently authenticated user is the comment author","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user does not have sufficient permission","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository, commit or comment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"delete":{"tags":["Deprecated"],"summary":"Unlike a commit comment","description":"Unlike a commit comment in the specified repository, identified by commitId
and commentId
.\n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\nDeprecated in 8.0 to be removed in 9.0. Likes have been replaced with reactions. For backwards compatibility, the thumbsup
reaction is treated as a like.","operationId":"unlike","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"commitId","in":"path","description":"The commit id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content response indicating that the request succeeded"},"400":{"description":"The currently authenticated user is the comment author","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user does not have sufficient permission","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository, commit or comment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/reactions/{emoticon}":{"put":{"tags":["Repository"],"summary":"React to a comment","description":"Add an emoticon reaction to a comment","operationId":"react","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The comment id","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit id","required":true,"schema":{"type":"string"}},{"name":"emoticon","in":"path","description":"The emoticon to add","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The added reaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUserReaction"}}}}}},"delete":{"tags":["Repository"],"summary":"Remove a reaction from comment","description":"Remove an emoticon reaction from a comment","operationId":"unReact","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The comment id","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit id","required":true,"schema":{"type":"string"}},{"name":"emoticon","in":"path","description":"The emoticon to remove","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The added reaction"}}}},"/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes":{"get":{"tags":["Deprecated"],"summary":"Get pull request comment likes","description":"Get a page of users who liked a pull request comment in the specified repository, identified by pullRequestId
and commentId
. \n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\n**Deprecated in 8.0 to be removed in 9.0.**","operationId":"getLikers_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The comment id.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of users who liked the specified comment","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestApplicationUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user does not have sufficient permission (REPO_READ
) to query the comment likes","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository, pull request or comment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"post":{"tags":["Deprecated"],"summary":"Like a pull request comment","description":"Like a pull request comment in the specified repository, identified by pullRequestId
and commentId
. The like will be recorded against the requesting user.\n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\n**Deprecated in 8.0 to be removed in 9.0.** Likes have been replaced with reactions. For backwards compatibility, the thumbsup
reaction is treated as a like.","operationId":"like_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The comment id.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content response indicating that the request succeeded"},"401":{"description":"he currently authenticated user does not have sufficient permission (REPO_READ
)","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository, pull request or comment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"delete":{"tags":["Deprecated"],"summary":"Unlike a pull request comment","description":"Unlike a pull request comment in the specified repository, identified by pullRequestId
and commentId
.\n\nThe authenticated user must have the REPO_READ (or higher) permission for the specified repository to access this resource.\n\n**Deprecated in 8.0 to be removed in 9.0.** Likes have been replaced with reactions. For backwards compatibility, the thumbsup
reaction is treated as a like.","operationId":"unlike_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The comment id.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content response indicating that the request succeeded"},"400":{"description":"The currently authenticated user is the comment author","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user does not have sufficient permission (REPO_READ
)","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository, pull request or comment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/reactions/{emoticon}":{"put":{"tags":["Pull Requests"],"summary":"React to a PR comment","description":"Add an emoticon reaction to a pull request comment","operationId":"react_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The comment id.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request id.","required":true,"schema":{"type":"string"}},{"name":"emoticon","in":"path","description":"The emoticon to add","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The added reaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUserReaction"}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Remove a reaction from a PR comment","description":"Remove an emoticon reaction from a pull request comment","operationId":"unReact_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The comment id.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request id.","required":true,"schema":{"type":"string"}},{"name":"emoticon","in":"path","description":"The emoticon to remove","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The added reaction"}}}},"/gpg/latest/keys":{"get":{"tags":["Security"],"summary":"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.\n\nOnly authenticated users may call this endpoint.","operationId":"getKeysForUser","parameters":[{"name":"user","in":"query","description":"The name of the user to get keys for (optional; requires ADMIN permission or higher).","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Returns a paged response of of keys for the user.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestGpgKey"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to perform this operation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Security"],"summary":"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.\n\nOnly authenticated users may call this endpoint.","operationId":"addKey","parameters":[{"name":"user","in":"query","description":"The name of the user to add a key for (optional; requires ADMIN permission or higher).","schema":{"type":"string"}}],"requestBody":{"description":"The request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestGpgKey"}}}},"responses":{"200":{"description":"Response contains the GPG key that was just created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestGpgKey"}}}},"400":{"description":"The request has failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to perform this operation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Security"],"summary":"Delete all GPG keys for user","description":"Delete all GPG keys for a supplied user.","operationId":"deleteForUser","parameters":[{"name":"user","in":"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.","schema":{"type":"string"}}],"responses":{"204":{"description":"The GPG keys matching the supplied user were deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to delete the GPG keys. This is only possible when a user is explicitly supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No user matches the supplied user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/gpg/latest/keys/{fingerprintOrId}":{"delete":{"tags":["Security"],"summary":"Delete a GPG key","description":"Delete the GPG key with the specified ID or Key Fingerprint.","operationId":"deleteKey","parameters":[{"name":"fingerprintOrId","in":"path","description":"The GPG fingerprint or ID.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The key has been deleted successfully."},"401":{"description":"The currently authenticated user has insufficient permissions to perform this operation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/annotations":{"get":{"tags":["Builds and Deployments"],"summary":"Get Code Insights annotations for a commit","description":"Get annotations for the given commit ID, filtered by any query parameters given.","operationId":"getAnnotations_1","parameters":[{"name":"severity","in":"query","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
.","schema":{"type":"string"}},{"name":"path","in":"query","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.","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"externalId","in":"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.","schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID on which to record the annotation. This must be a full 40 character commit hash.","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","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
.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","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","schema":{"type":"string"}}],"responses":{"200":{"description":"The requested annotations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInsightAnnotationsResponse"}}}},"401":{"description":"The currently authenticated user has insufficient permissions (REPO_READ
) to get insight annotations.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository, commit, or report does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports":{"get":{"tags":["Builds and Deployments"],"summary":"Get all Code Insights reports for a commit","description":"Retrieve all reports for the given commit.","operationId":"getReports","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID on which to record the annotation. This must be a full 40 character commit hash.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of reports","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestInsightReport"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions (REPO_READ
) to get insight reports.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository or commit does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}":{"get":{"tags":["Builds and Deployments"],"summary":"Get a Code Insights report","description":"Retrieve the specified report.","operationId":"getACodeInsightsReport","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID on which to record the annotation. This must be a full 40 character commit hash.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"The report key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The specified report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInsightReport"}}}},"401":{"description":"The currently authenticated user has insufficient permissions (REPO_READ needed
) to get insight reports.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository, commit, or report does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Builds and Deployments"],"summary":"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.\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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID on which to record the annotation. This must be a full 40 character commit hash.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","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","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request object containing the details of the report to create (see example).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSetInsightReportRequest"}}}},"responses":{"200":{"description":"The created report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInsightReport"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to create an insight report or authentication failed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Builds and Deployments"],"summary":"Delete a Code Insights report","description":"Delete a report for the given commit. Also deletes any annotations associated with this report.","operationId":"deleteACodeInsightsReport","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID on which to record the annotation. This must be a full 40 character commit hash.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"The key of the report to which this annotation belongs.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The report and associated annotations were successfully deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to delete insight reports or was not the author (REPO_READ
for author otherwise REPO_ADMIN
).","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository, commit or report does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}/annotations":{"get":{"tags":["Builds and Deployments"],"summary":"Get Code Insights annotations for a report","description":"Retrieve the specified report's annotations.","operationId":"getAnnotations","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID on which to record the annotation. This must be a full 40 character commit hash.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"The report key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The specified annotations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInsightAnnotationsResponse"}}}},"401":{"description":"The currently authenticated user has insufficient permissions (REPO_READ needed
) to get insight reports.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository, commit, or report does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Builds and Deployments"],"summary":"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.\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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID on which to record the annotation. This must be a full 40 character commit hash.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"The key of the report to which this annotation belongs.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The annotations to add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBulkAddInsightAnnotationRequest"}}}},"responses":{"204":{"description":"An empty response indicating that the request succeeded."},"401":{"description":"The currently authenticated user is not the author of the report, or the author no longer has sufficient permissions (REPO_READ
).","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository, commit, or report does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Builds and Deployments"],"summary":"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.","operationId":"deleteAnnotations","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"externalId","in":"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.","schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID on which to record the annotation. This must be a full 40 character commit hash.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"The key of the report to which this annotation belongs.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The annotations were successfully deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to delete insight reports or was not the author (REPO_READ
for author otherwise REPO_ADMIN
).","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository, commit or report does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/reports/{key}/annotations/{externalId}":{"put":{"tags":["Builds and Deployments"],"summary":"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.","operationId":"setAnnotation","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"externalId","in":"path","description":"The external ID of the annotation that is to be updated or created","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID on which to record the annotation. This must be a full 40 character commit hash.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","description":"The key of the report to which this annotation belongs","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The new annotation that is to replace the existing one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSingleAddInsightAnnotationRequest"}}}},"responses":{"204":{"description":"No content, indicating that the request succeeded."},"401":{"description":"The currently authenticated user is not the author of the report, or the author no longer has sufficient permissions (REPO_READ
).","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository, commit, report or annotation does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/git/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase":{"get":{"tags":["Pull Requests"],"summary":"Check PR rebase precondition","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The rebaseability status of the pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestRebaseability"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"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.\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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The pull request rebase request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestRebaseRequest"}}}},"responses":{"200":{"description":"The merged pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestRebaseResult"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request and/or to update its source branch.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/git/latest/projects/{projectKey}/repos/{repositorySlug}/tags":{"post":{"tags":["Repository"],"summary":"Create tag","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The create git tag request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestGitTagCreateRequest"}}}},"responses":{"201":{"description":"A JSON representation of the newly created tag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestTag"}}}},"400":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a tag. This could be due to insufficient repository permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/git/latest/projects/{projectKey}/repos/{repositorySlug}/tags/{name}":{"delete":{"tags":["Repository"],"summary":"Delete tag","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","description":"The name of the tag to be deleted.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the tag no longer exists in the repository."},"400":{"description":"The tag was not deleted because repository is either empty, or is not a git repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to delete a tag. This could be due to insufficient repository permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"If the tag doesn't exist in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/jira/latest/comments/{commentId}/issues":{"post":{"tags":["Jira Integration"],"summary":"Create Jira Issue","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":[{"name":"commentId","in":"path","description":"the comment to associate the created Jira issue to","required":true,"schema":{"type":"string"}},{"name":"applicationId","in":"query","description":"id of the Jira server","schema":{"type":"string"}}],"requestBody":{"description":"A String representation of the JSON format Jira create issue request see: Jira REST API","content":{"application/json":{"schema":{"type":"string","description":"application/json"}}}},"responses":{"200":{"description":"The created Jira issue key and the associated comment ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestCommentJiraIssue"}}}},"400":{"description":"The specified application link ID does not match any linked Jira instance.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"Authentication with the Jira instance is required.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/jira/latest/issues/{issueKey}/commits":{"get":{"tags":["Jira Integration"],"summary":"Get changesets for issue key","description":"Retrieve a page of changesets associated with the given issue key.","operationId":"getCommitsByIssueKey","parameters":[{"name":"issueKey","in":"path","description":"The issue key to search by","required":true,"schema":{"type":"string"}},{"name":"maxChanges","in":"query","description":"The maximum number of changes to retrieve for each changeset","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of detailed changesets","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestChangeset"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}}}}},"/jira/latest/projects/{projectKey}/primary-enhanced-entitylink":{"get":{"tags":["Jira Integration"],"summary":"Get entity link","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The primary enhanced entitylink.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestEnhancedEntityLink"}}}}}}},"/jira/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/issues":{"get":{"tags":["Jira Integration"],"summary":"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.","operationId":"getIssueKeysForPullRequest","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request id","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of Jira issues keys for the pull request","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RestJiraIssue"}}}}}}}},"/policies/latest/admin/repos/archive":{"get":{"tags":["System Maintenance"],"summary":"Get repository archive policy","description":"Retrieves the repository archive policy for the instance.\n\nThe user must be authenticated to access this resource.","operationId":"getRepositoryArchivePolicy","responses":{"200":{"description":"A response containing the repository archive policy for the instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryPolicy"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the repository archive policy","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Update repository archive policy","description":"Sets the repository archive policy for the instance.\n\nThe authenticated user must have SYS_ADMIN permission.","operationId":"setRepositoryArchivePolicy","requestBody":{"description":"The request containing the details of the policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryPolicy"}}}},"responses":{"200":{"description":"A response containing the repository archive policy for the instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryPolicy"}}}},"400":{"description":"The permission was invalid or does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to set the repository archive policy","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/policies/latest/admin/repos/delete":{"get":{"tags":["System Maintenance"],"summary":"Get repository delete policy","description":"Retrieves the repository delete policy for the instance.\n\nThe user must be authenticated to access this resource.","operationId":"getRepositoryDeletePolicy","responses":{"200":{"description":"A response containing the repository delete policy for the instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryPolicy"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the repository delete policy","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Update the repository delete policy","description":"Sets the repository delete policy for the instance.\n\nThe authenticated user must have SYS_ADMIN permission.","operationId":"setRepositoryDeletePolicy","requestBody":{"description":"The request containing the details of the policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryPolicy"}}}},"responses":{"200":{"description":"A response containing the repository delete policy for the instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryPolicy"}}}},"400":{"description":"The permission was invalid or does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to set the repository delete policy","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/supportInfo/refChangesQueue":{"get":{"tags":["Mirroring (Mirror)"],"summary":"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.","operationId":"getRefChangesQueue","responses":{"200":{"description":"The contents of the ref changes queue","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/RestRefSyncQueue"}}}}}}},"/mirroring/latest/supportInfo/refChangesQueue/count":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get total number of items in ref changes queue","description":"Retrieves the total number of items currently in the ref changes queue","operationId":"getRefChangesQueueCount","responses":{"200":{"description":"The total number of items currently in the ref changes queue","content":{"application/json":{}}}}}},"/mirroring/latest/supportInfo/repoSyncStatus":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get sync status of repositories","description":"Retrieves a page of sync statuses of the repositories on this mirror node","operationId":"getRepoSyncStatus","parameters":[{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The sync status of the repositories on this node","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestMirrorRepositorySynchronizationStatus"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}}}}},"/mirroring/latest/upstreamServers":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get upstream servers","description":"Retrieves a page of upstream servers","operationId":"listUpstreamServers","parameters":[{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of upstream servers","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestUpstreamServer"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}}}}},"/mirroring/latest/upstreamServers/{upstreamId}":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get upstream server by ID","description":"Retrieves upstream server details by ID.","operationId":"getUpstreamServer","parameters":[{"name":"upstreamId","in":"path","description":"The upstream server ID to retrieve settings for.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The upstream server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUpstreamServer"}}}},"404":{"description":"The upstream server could not be found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/upstreamServers/{upstreamId}/addon/disabled":{"post":{"tags":["Deprecated","Mirroring (Mirror)"],"summary":"On disable of mirror addon","description":"This REST endpoint is retained for backwards compatibility only. It is a no-op. Starting from 4.6.0, mirrors no longer specify a disabled lifecycle callback in their addon descriptor. Prior to 4.6.0, this was the callback method that was called when the mirroring atlassian-connect add-on has been disabled in the upstream server identified by upstreamId
.","operationId":"onAddonDisabled","parameters":[{"name":"upstreamId","in":"path","description":"the upstream server ID to retrieve settings for","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that callback has been processed"}},"deprecated":true}},"/mirroring/latest/upstreamServers/{upstreamId}/addon/enabled":{"post":{"tags":["Deprecated","Mirroring (Mirror)"],"summary":"On enabled of mirror addon","description":"This REST endpoint is retained for backwards compatibility only. It is a no-op. Starting from 4.6.0, mirrors no longer specify an enabled lifecycle callback in their addon descriptor. Prior\nto 4.6.0, this was the callback method that was called when the mirroring atlassian-connect add-on has been\nenabled in the upstream server identified by upstreamId
.","operationId":"onAddonEnabled","parameters":[{"name":"upstreamId","in":"path","description":"the upstream server ID to retrieve settings for","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that callback has been processed"}},"deprecated":true}},"/mirroring/latest/upstreamServers/{upstreamId}/farmNodes":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get farm nodes","description":"Retrieves the list of farm nodes in this cluster","operationId":"getFarmNodes","parameters":[{"name":"upstreamId","in":"path","description":"the upstream server ID to retrieve settings for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The list of farm nodes","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RestClusterNode"}}}}},"404":{"description":"The upstream server could not be found","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}}}}},"/mirroring/latest/upstreamServers/{upstreamId}/progress":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get synchronization progress state","description":" Retrieves synchronization progress state for the specified upstream server.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","parameters":[{"name":"upstreamId","in":"path","description":"the upstream server ID to retrieve settings for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the synchronization progress state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSyncProgress"}}}},"404":{"description":"The upstream server could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/upstreamServers/{upstreamId}/repos/{upstreamRepoId}":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get clone URLs","description":"Retrieves all available clone urls for the specified repository.","operationId":"getMirroredRepository","parameters":[{"name":"upstreamRepoId","in":"path","description":"the repository ID","required":true,"schema":{"type":"string"}},{"name":"upstreamId","in":"path","description":"the upstream server ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The mirrored repository's information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirroredRepository"}}}},"404":{"description":"The upstream server or the repository could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/upstreamServers/{upstreamId}/repos/{upstreamRepoId}/synchronization":{"post":{"tags":["Deprecated","Mirroring (Mirror)"],"summary":"Get upstream settings","description":"This method is no longer supported","operationId":"synchronizeRepositoryWithUpstream","parameters":[{"name":"upstreamRepoId","in":"path","required":true,"schema":{"type":"string"}},{"name":"level","in":"query","description":"the level of synchronization to perform","schema":{"type":"string"}},{"name":"upstreamId","in":"path","description":"the upstream server ID to retrieve settings for","required":true,"schema":{"type":"string"}}],"responses":{"410":{"description":"this operation is no longer supported","content":{"application/json":{}}}},"deprecated":true}},"/mirroring/latest/upstreamServers/{upstreamId}/settings":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get upstream settings","description":"Retrieves upstream settings","operationId":"getMirrorSettings","parameters":[{"name":"upstreamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the mirror settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUpstreamSettings"}}}},"404":{"description":"The upstream server could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Mirroring (Mirror)"],"summary":"Update upstream settings","description":"Sets the settings for the specified upstream","operationId":"setMirrorSettings","parameters":[{"name":"upstreamId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"the mirror settings to update to","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUpstreamSettings"}}}},"responses":{"200":{"description":"the updated mirror settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUpstreamSettings"}}}},"404":{"description":"The upstream server could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/upstreamServers/{upstreamId}/settings/mode":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get mirror mode","description":"Gets the current mirror mode for the specified upstream","operationId":"getMirrorMode","parameters":[{"name":"upstreamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the current mirror mode","content":{"application/json":{}}},"404":{"description":"The upstream server could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Mirroring (Mirror)"],"summary":"Update mirror mode","description":"Sets the mirror mode for the specified upstream","operationId":"setMirrorMode","parameters":[{"name":"upstreamId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"the mode to set","content":{"application/json":{}}},"400":{"description":"The provided mode is invalid","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/upstreamServers/{upstreamId}/settings/projects":{"get":{"tags":["Mirroring (Mirror)"],"summary":"Get mirrored project IDs","description":"Returns the IDs of the projects that the mirror is configured to mirror","operationId":"getMirroredProjects","parameters":[{"name":"upstreamId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the currently mirrored project IDs","content":{"application/json":{}}}}},"post":{"tags":["Mirroring (Mirror)"],"summary":"Add multiple projects to be mirrored","description":"Configures the mirror to mirror the provided projects","operationId":"startMirroringProjects","parameters":[{"name":"upstreamId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"responses":{"200":{"description":"the currently mirrored project IDs","content":{"application/json":{}}}}},"delete":{"tags":["Mirroring (Mirror)"],"summary":"Stop mirroring projects","description":"Configures the mirror to no longer mirror the provided projects","operationId":"stopMirroringProjects","parameters":[{"name":"upstreamId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"responses":{"204":{"description":"the request has been processed"}}}},"/mirroring/latest/upstreamServers/{upstreamId}/settings/projects/{projectId}":{"post":{"tags":["Mirroring (Mirror)"],"summary":"Add project to be mirrored","description":"Configures the mirror to mirror the provided project","operationId":"startMirroringProject","parameters":[{"name":"upstreamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"projectId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the currently mirrored project IDs","content":{"application/json":{}}}}},"delete":{"tags":["Mirroring (Mirror)"],"summary":"Stop mirroring project","description":"Configures the mirror to no longer mirror the provided project","operationId":"stopMirroringProject","parameters":[{"name":"upstreamId","in":"path","required":true,"schema":{"type":"string"}},{"name":"projectId","in":"path","description":"the project ID to stop mirroring","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"the request has been processed"}}}},"/mirroring/latest/upstreamServers/{upstreamId}/synchronization":{"post":{"tags":["Deprecated","Mirroring (Mirror)"],"summary":"Change upstream settings","description":"This method is no longer supported","operationId":"synchronizeWithUpstream","parameters":[{"name":"level","in":"query","schema":{"type":"string","default":"DEFAULT"}},{"name":"upstreamId","in":"path","description":"the upstream server ID to retrieve settings for","required":true,"schema":{"type":"string"}}],"responses":{"410":{"description":"this operation is no longer supported","content":{"application/json":{}}}},"deprecated":true}},"/mirroring/latest/account/settings/preferred-mirror":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get preferred mirror","description":"Retrieves the current user's preferred mirror server","operationId":"getPreferredMirrorId","responses":{"200":{"description":"the preferred mirror server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirrorServer"}}}},"404":{"description":"The user's preferred mirror server could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Mirroring (Upstream)"],"summary":"Set preferred mirror","description":"Sets the mirror specified by a mirror ID as the current user's preferred mirror","operationId":"setPreferredMirrorId","requestBody":{"description":"the mirror ID","content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"204":{"description":"an empty response indicating that the user setting has been updated"},"404":{"description":"The mirror could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Mirroring (Upstream)"],"summary":"Remove preferred mirror","description":"Removes the current user's preferred mirror","operationId":"deletePreferredMirrorId","responses":{"204":{"description":"an empty response indicating that the user setting has been updated"}}}},"/mirroring/latest/analyticsSettings":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get analytics settings from upstream","description":"Gets the analytics settings from the mirroring upstream","operationId":"analyticsSettings","responses":{"200":{"description":"The analytics settings from upstream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAnalyticsSettings"}}}}}}},"/mirroring/latest/authenticate":{"post":{"tags":["Mirroring (Upstream)"],"summary":"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 -\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":{"description":"The user for the supplied credentials and their effective permissions}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestApplicationUserWithPermissions"}}}},"400":{"description":"If the supplied credentials are incomplete or not understood.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/mirrorServers":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get all mirrors","description":"Returns a list of mirrors","operationId":"listMirrors","parameters":[{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"a page of mirrors","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestMirrorServer"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}}}}},"/mirroring/latest/mirrorServers/{mirrorId}":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get mirror by ID","description":"Returns the mirror specified by a mirror ID","operationId":"getMirror","parameters":[{"name":"mirrorId","in":"path","description":"the mirror ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the mirror","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirrorServer"}}}},"404":{"description":"The mirror could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Mirroring (Upstream)"],"summary":"Upgrade add-on for a mirror","description":"Upgrades the add-on for the mirror server in question This endpoint can only be called by the mirror instance or system administrators
Since 5.8","operationId":"upgrade","parameters":[{"name":"mirrorId","in":"path","description":"the ID of the mirror to upgrade","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirrorUpgradeRequest"}}}},"responses":{"200":{"description":"the mirror","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirrorServer"}}}}}},"delete":{"tags":["Mirroring (Upstream)"],"summary":"Delete mirror by ID","description":"Removes a mirror, disabling all access and notifications for the mirror server in question","operationId":"remove","parameters":[{"name":"mirrorId","in":"path","description":"the ID of the mirror to remove","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"an empty response indicating that the mirror has been removed"}}}},"/mirroring/latest/mirrorServers/{mirrorId}/events":{"post":{"tags":["Mirroring (Upstream)"],"summary":"Publish RepositoryMirrorEvent","description":"Publishes a RepositoryMirrorEvent on the event queue.","operationId":"publishEvent","parameters":[{"name":"mirrorId","in":"path","description":"the server id of the mirror that raised this event","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":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/mirrorServers/{mirrorId}/token":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get mirror auth token","description":"Returns an authentication token for the mirror server in question","operationId":"getAuthToken","parameters":[{"name":"mirrorId","in":"path","description":"the mirror ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the mirror auth token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirrorAuthToken"}}}},"404":{"description":"The mirror could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/mirrorServers/{mirrorId}/webPanels/config":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get HTML for remote-connect web-panel on mirror","description":"Gets the rendered HTML that is needed to get the remote connect web-panel on the mirror.","operationId":"getPanelHtml","parameters":[{"name":"mirrorId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"text/html":{}}}}}},"/mirroring/latest/projects/{projectId}":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get project","description":"Returns the requested project using its primary key ID.
Since 6.7","operationId":"getProjectById","parameters":[{"name":"projectId","in":"path","description":"the ID of the requested project","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The project with the specified ID","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProject"}}}},"404":{"description":"Project not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/projects/{projectId}/repos":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get hashes for repositories in project","description":"Returns a page of repositories for a given project, enriched with a content hash","operationId":"getAllReposForProject","parameters":[{"name":"includeDefaultBranch","in":"query","description":"includes defaultBranchId in the response, if true
. Default value is false
","schema":{"type":"string","enum":["true","false"],"default":"false"}},{"name":"projectId","in":"path","description":"the id of the requested project","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of repositories with content hashes","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/EnrichedRepository"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"409":{"description":"Mirroring is not available","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/repos":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get content hashes for repositories","description":"Returns a page of repositories enriched with a content hash and default branch","operationId":"getAllContentHashes","parameters":[{"name":"includeDefaultBranch","in":"query","description":"includes defaultBranchId for each repository in the response, if true
. Default value is false
.","schema":{"type":"string","enum":["true","false"],"default":"false"}}],"responses":{"200":{"description":"A page of repositories with content hashes and default branch","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichedRepository"}}}},"409":{"description":"Mirroring is not available","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/repos/{repoId}":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get content hash for a repository","description":"Returns a repository enriched with a content hash and default branch","operationId":"getContentHashById","parameters":[{"name":"repoId","in":"path","description":"the ID of the requested repository","required":true,"schema":{"type":"string"}},{"name":"includeDefaultBranch","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The repository with the specified repoId","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichedRepository"}}}},"404":{"description":"Repository not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/repos/{repoId}/mirrors":{"get":{"tags":["Mirroring (Upstream)"],"summary":"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.","operationId":"getRepositoryMirrors","parameters":[{"name":"repoId","in":"path","description":"the ID of the requested repository","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The mirrored repository descriptor","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirroredRepositoryDescriptor"}}}},"409":{"description":"Mirroring is not available","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/requests":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get mirroring requests","description":"Retrieves a mirroring request","operationId":"listRequests","parameters":[{"name":"state","in":"query","description":"(optional) the request state to filter on","schema":{"type":"string","enum":["PENDING","ACCEPTED","REJECTED"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of mirroring requests","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestMirroringRequest"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}}}},"post":{"tags":["Mirroring (Upstream)"],"summary":"Create a mirroring request","description":"Creates a new mirroring request","operationId":"register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirroringRequest"}}}},"responses":{"200":{"description":"The created mirroring request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirroringRequest"}}}},"409":{"description":"The request was invalid or missing","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/requests/{mirroringRequestId}":{"get":{"tags":["Mirroring (Upstream)"],"summary":"Get a mirroring request","description":"Retrieves a mirroring request","operationId":"getMirroringRequest","parameters":[{"name":"mirroringRequestId","in":"path","description":"the ID of the mirroring request to retrieve","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The mirroring request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirroringRequest"}}}},"409":{"description":"The request could not be found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Mirroring (Upstream)"],"summary":"Delete a mirroring request","description":"Deletes a mirroring request","operationId":"deleteMirroringRequest","parameters":[{"name":"mirroringRequestId","in":"path","description":"the ID of the mirroring request to delete","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The request was deleted"},"409":{"description":"The request could not be found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/requests/{mirroringRequestId}/accept":{"post":{"tags":["Mirroring (Upstream)"],"summary":"Accept a mirroring request","description":"Accepts a mirroring request","operationId":"accept","parameters":[{"name":"mirroringRequestId","in":"path","description":"the ID of the request to accept","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The accepted mirror server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirrorServer"}}}},"409":{"description":"The request could not be found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/mirroring/latest/requests/{mirroringRequestId}/reject":{"post":{"tags":["Mirroring (Upstream)"],"summary":"Reject a mirroring request","description":"Rejects a mirroring request","operationId":"reject","parameters":[{"name":"mirroringRequestId","in":"path","description":"the ID of the request to reject","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The rejected mirror server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMirrorServer"}}}},"409":{"description":"The request could not be found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/branch-permissions/latest/projects/{projectKey}/repos/{repositorySlug}/restrictions":{"get":{"tags":["Repository"],"summary":"Search for ref restrictions","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"matcherType","in":"query","description":"Matcher type to filter on","schema":{"type":"string","enum":["BRANCH","PATTERN","MODEL_CATEGORY","MODEL_BRANCH"]}},{"name":"matcherId","in":"query","description":"Matcher id to filter on. Requires the matcherType parameter to be specified also.","schema":{"type":"string"}},{"name":"type","in":"query","description":"Types of restrictions to filter on.","schema":{"type":"string","enum":["read-only","no-deletes","fast-forward-only","pull-request-only"]}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A response containing a page of restrictions.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRefRestriction"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request has failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to get restrictions on the provided project","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No restriction exists for the provided ID.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Repository"],"summary":"Create multiple ref restrictions","description":"Allows creating multiple restrictions at once.","operationId":"createRestrictions_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request containing a list of the details of the restrictions to create.","content":{"application/vnd.atl.bitbucket.bulk+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RestRestrictionRequest"}}}}},"responses":{"200":{"description":"Response contains the ref restriction that was just created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRefRestriction"}}}},"400":{"description":"The request has failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to perform this operation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/branch-permissions/latest/projects/{projectKey}/repos/{repositorySlug}/restrictions/{id}":{"get":{"tags":["Repository"],"summary":"Get a ref restriction","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The restriction id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A response containing the restriction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRefRestriction"}}}},"400":{"description":"The request has failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to get restrictions on the provided project","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No restriction exists for the provided ID.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Delete a ref restriction","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The restriction id.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the operation was successful"},"400":{"description":"The request has failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to delete restrictions on the provided project","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/branch-permissions/latest/projects/{projectKey}/restrictions":{"get":{"tags":["Project"],"summary":"Search for ref restrictions","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"matcherType","in":"query","description":"Matcher type to filter on","schema":{"type":"string","enum":["BRANCH","PATTERN","MODEL_CATEGORY","MODEL_BRANCH"]}},{"name":"matcherId","in":"query","description":"Matcher id to filter on. Requires the matcherType parameter to be specified also.","schema":{"type":"string"}},{"name":"type","in":"query","description":"Types of restrictions to filter on.","schema":{"type":"string","enum":["read-only","no-deletes","fast-forward-only","pull-request-only"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A response containing a page of restrictions.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRefRestriction"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request has failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to get restrictions on the provided project","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No restriction exists for the provided ID.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Project"],"summary":"Create multiple ref restrictions","description":"Allows creating multiple restrictions at once.","operationId":"createRestrictions","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request containing a list of the details of the restrictions to create.","content":{"application/vnd.atl.bitbucket.bulk+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RestRestrictionRequest"}}}}},"responses":{"200":{"description":"Response contains the ref restriction that was just created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRefRestriction"}}}},"400":{"description":"The request has failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to perform this operation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/branch-permissions/latest/projects/{projectKey}/restrictions/{id}":{"get":{"tags":["Project"],"summary":"Get a ref restriction","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The restriction id.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A response containing the restriction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRefRestriction"}}}},"400":{"description":"The request has failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to get restrictions on the provided project","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No restriction exists for the provided ID.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Delete a ref restriction","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The restriction id.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the operation was successful"},"400":{"description":"The request has failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not permitted to delete restrictions on the provided project","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/sync/latest/projects/{projectKey}/repos/{repositorySlug}":{"get":{"tags":["Repository"],"summary":"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.\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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"Retrieves the synchronization status for the specified ref within the repository, rather than for the entire repository","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Synchronization status for the specified repository, or specific ref within that repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRefSyncStatus"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository, or the repository is not public if the request is anonymous.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Repository"],"summary":"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.\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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRefSyncStatus"}}}},"responses":{"200":{"description":"The updated synchronization status for the repository, after enabling synchronization. 204 NO CONTENT is returned instead after disabling synchronization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRefSyncStatus"}}}},"204":{"description":"Synchronization has successfully been disabled. 200 OK, with updated status information, is returned instead after enabling synchronization."},"400":{"description":"The JSON payload for the request did not define the \"enabled\" property.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to manage synchronization in the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/sync/latest/projects/{projectKey}/repos/{repositorySlug}/synchronize":{"post":{"tags":["Repository"],"summary":"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:\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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRefSyncRequest"}}}},"responses":{"200":{"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRejectedRef"}}}},"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":{"description":"The requested synchronization action was not understood.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update refs within the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"Synchronization is not available or enabled for the specified repository, or the ref is already in sync with upstream.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"501":{"description":"The requested synchronization action was understood by the server, but the mechanism to apply it has not been implemented.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/admin":{"get":{"tags":["System Maintenance"],"summary":"Get global SSH key settings","description":"Gets the global settings that enforce the maximum expiry of SSH keys and restrictions on SSH key types.","operationId":"getGlobalSettings","responses":{"200":{"description":"The global ssh key settings configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshKeySettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the ssh keys global settings configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Update global SSH key settings","description":"Updates the global settings that enforces the maximum expiry of SSH keys and restrictions on SSH key types.","operationId":"updateGlobalSettings","requestBody":{"description":"A request containing expiry length to be set for SSH keys and a list of SSH key type restrictions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshKeySettings"}}}},"responses":{"204":{"description":"The ssh key global settings were updated."},"400":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update these settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/admin/supported-key-types":{"get":{"tags":["System Maintenance"],"summary":"Get supported SSH key algorithms and lengths","description":"Retrieves a list of all supported SSH key algorithms and lengths.","operationId":"getSupportedKeyTypes","responses":{"200":{"description":"A list of supported SSH key algorithms and lengths.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve this list.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/ssh/latest/keys":{"get":{"tags":["Authentication"],"summary":"Get SSH keys for user","description":"Retrieve a page of SSH keys.","operationId":"getSshKeys","parameters":[{"name":"userName","in":"query","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.","schema":{"type":"string"}},{"name":"user","in":"query","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of SSH keys.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestSshKey"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissionsto retrieve the SSH keys. This is only possible when auser is explicitly supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No user matches the supplied user","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Authentication"],"summary":"Add SSH key for user","description":"Add a new SSH key to a supplied user.","operationId":"addSshKey","parameters":[{"name":"user","in":"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshKey"}}}}],"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","readOnly":true,"example":"Cbg38r+gDCiNHqBk6Y1BKO+EvufFBqhFWIEXh8oq9MI"},"id":{"type":"integer","format":"int32","readOnly":true,"example":1},"label":{"type":"string","example":"me@127.0.0.1"},"lastAuthenticated":{"type":"string","readOnly":true,"example":"1630041546434"},"text":{"type":"string","example":"ssh-rsa AAAAB3... me@127.0.0.1"}}}}}},"responses":{"201":{"description":"The newly created SSH key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshKey"}}}},"400":{"description":"The SSH key was not created because the key was not a valid RSA/DSA/ECDSA/Ed25519 key of a supported length.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No user matches the supplied user","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The SSH key already exists on the system.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Authentication"],"summary":"Delete all user SSH key","description":"Delete all SSH keys for a supplied user.","operationId":"deleteSshKeys","parameters":[{"name":"userName","in":"query","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.","schema":{"type":"string"}},{"name":"user","in":"query","schema":{"type":"string"}}],"responses":{"204":{"description":"The SSH keys matching the supplied user were deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to delete the SSH keys. This is only possible when a user is explicitly supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No user matches the supplied user","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/ssh/latest/keys/{keyId}":{"get":{"tags":["Authentication"],"summary":"Get SSH key for user by keyId","description":"Retrieve an SSH key by keyId","operationId":"getSshKey","parameters":[{"name":"keyId","in":"path","description":"the ID of the key to retrieve.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"An SSH key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshKey"}}}},"401":{"description":"The currently authenticated user has insufficient permissionsto retrieve the SSH key. This is only possible when akeyId is explicitly supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No SSH key matches the supplied keyId","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Authentication"],"summary":"Remove SSH key","description":"Delete an SSH key.","operationId":"deleteSshKey","parameters":[{"name":"keyId","in":"path","description":"the id of the key to delete.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The SSH key matching the supplied id was deleted or did not exist."},"401":{"description":"The currently authenticated user has insufficient permissions to delete the SSH key.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/ssh/latest/settings":{"get":{"tags":["Authentication"],"summary":"Get SSH settings","description":"Gets the SSH settings from the upstream.","operationId":"sshSettings","responses":{"200":{"description":"The ssh settings from upstream","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshSettings"}}}},"401":{"description":"The request was not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/keys/latest/projects/{projectKey}/ssh/{keyId}/permission/{permission}":{"put":{"tags":["Authentication"],"summary":"Update project SSH key permission","description":"Updates the permission granted to the specified SSH key to the project identified in the URL.","operationId":"updatePermission","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","description":"The newly created access key","required":true,"schema":{"type":"string"}},{"name":"permission","in":"path","description":"The new permission to be granted to the SSH key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The newly created access key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshAccessKey"}}}},"401":{"description":"The currently authenticated user has insufficient permissions on the project to edit its access keys.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/keys/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}/permission/{permission}":{"put":{"tags":["Authentication"],"summary":"Update repository SSH key permission","description":"Updates the permission granted to the specified SSH key to the repository identified in the URL.","operationId":"updatePermission_1","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","description":"The newly created access key","required":true,"schema":{"type":"string"}},{"name":"permission","in":"path","description":"The new permission to be granted to the SSH key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The newly created access key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshAccessKey"}}}},"401":{"description":"The currently authenticated user has insufficient permissions on the repository to edit its access keys.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/keys/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}":{"get":{"tags":["Authentication"],"summary":"Get repository SSH key","description":"Retrieves the access key for the SSH key with id keyId
on the repository identified in the URL.","operationId":"getForRepository_1","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","description":"The key id","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The access key for the repository and SSH key with ID keyId
.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshAccessKey"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the access keys for this repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or key does not exist or the key does not have access on the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Authentication"],"summary":"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.","operationId":"revokeForRepository","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","description":"The key id","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The access key was deleted (or none was found matching the given id)."},"401":{"description":"The currently authenticated user has insufficient permissions to remove access keys for this repository","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/keys/latest/projects/{projectKey}/ssh/{keyId}":{"get":{"tags":["Authentication"],"summary":"Get project SSH key","description":"Retrieves the access key for the SSH key with id keyId
on the project identified in the URL.","operationId":"getForProject","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","description":"The key id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The access key for the repository and SSH key with ID keyId
.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshAccessKey"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the access keys for this repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or key does not exist or the key does not have access on the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Authentication"],"summary":"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.","operationId":"revokeForProject","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","description":"The key id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The access key was deleted (or none was found matching the given id)."},"401":{"description":"The currently authenticated user has insufficient permissions to remove access keys for this project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/keys/latest/ssh/{keyId}/repos":{"get":{"tags":["Authentication"],"summary":"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.","operationId":"getForRepositories","parameters":[{"name":"keyId","in":"path","description":"The key id","required":true,"schema":{"type":"string"}},{"name":"withRestrictions","in":"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.","schema":{"type":"string"}}],"responses":{"200":{"description":"The SSH key with ID keyId
.","content":{"application/json":{}}},"404":{"description":"The specified key does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/keys/latest/projects/{projectKey}/ssh":{"get":{"tags":["Authentication"],"summary":"Get SSH key","description":"Retrieves the access keys for the project identified in the URL.","operationId":"getSshKeysForProject","parameters":[{"name":"filter","in":"query","description":"If specified only SSH access keys with a label prefixed with the supplied string will be returned.","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"permission","in":"query","description":"If specified only SSH access keys with at least the supplied permission will be returned Default is PROJECT_READ.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A single page of access keys associated with the project.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestSshAccessKey"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the access keys for this project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Authentication"],"summary":"Add project SSH key","description":"Register a new SSH key and grants access to the project identified in the URL.","operationId":"addForProject","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshAccessKey"}}}},"responses":{"201":{"description":"The newly created access key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshAccessKey"}}}},"400":{"description":"The current request contains invalid or missing values.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to add an access key to the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/keys/latest/projects/{projectKey}/repos/{repositorySlug}/ssh":{"get":{"tags":["Authentication"],"summary":"Get repository SSH keys","description":"Retrieves the access keys for the repository identified in the URL.","operationId":"getForRepository","parameters":[{"name":"filter","in":"query","description":"If specified only SSH access keys with a label prefixed with the supplied string will be returned","schema":{"type":"string"}},{"name":"effective","in":"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
.","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"minimumPermission","in":"query","description":"If specified only SSH access keys with at least the supplied permission will be returned. Default is Permission.REPO_READ
.","schema":{"type":"string"}},{"name":"permission","in":"query","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A single page of access keys for the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestSshAccessKey"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the access keys for this repository","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Authentication"],"summary":"Add repository SSH key","description":"Register a new SSH key and grants access to the repository identified in the URL.","operationId":"addForRepository","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshAccessKey"}}}},"responses":{"201":{"description":"The newly created access key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSshAccessKey"}}}},"400":{"description":"The current request contains invalid or missing values.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to add an access key to the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/keys/latest/ssh/{keyId}":{"delete":{"tags":["Authentication"],"summary":"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.","operationId":"revokeMany","parameters":[{"name":"keyId","in":"path","description":"The identifier of the SSH key","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":{"description":"The currently authenticated user has insufficient permissions to remove access keys for one or more of the specified projects or repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"On or more of the specified repositories or projects does not exist or the key itself does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/keys/latest/ssh/{keyId}/projects":{"get":{"tags":["Authentication"],"summary":"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.","operationId":"getForProjects","parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"The SSH key with ID keyId
.","content":{"application/json":{}}},"404":{"description":"The specified key does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/banner":{"get":{"tags":["System Maintenance"],"summary":"Get announcement banner","description":"Gets the announcement banner, if one exists and is available to the user","operationId":"getBanner","responses":{"200":{"description":"The requested banner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAnnouncementBanner"}}}},"204":{"description":"There is no banner to display"},"401":{"description":"The user does not have permission to access the banner service through this endpoint","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Update/Set announcement banner","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":{"required":["audience"],"type":"object","properties":{"audience":{"type":"string","enum":["AUTHENTICATED","ALL"]},"enabled":{"type":"boolean"},"message":{"type":"string"}}}}}},"responses":{"204":{"description":"The banner was set successfully"},"400":{"description":"There was malformed or incorrect data in the provided JSON","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The user does not have permission to access the banner service through this endpoint","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["System Maintenance"],"summary":"Delete announcement banner","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":{"description":"The user does not have permission to access the banner service through this endpoint","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/cluster":{"get":{"tags":["System Maintenance"],"summary":"Get cluster node information","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":{"description":"A response containing information about the cluster","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestClusterInformation"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the cluster information.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/default-branch":{"get":{"tags":["System Maintenance"],"summary":"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.\n\nThe user must be authenticated to call this resource.","operationId":"getDefaultBranch","responses":{"200":{"description":"The configured global default branch.","content":{"application/json":{}}},"404":{"description":"No global default branch has been configured.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"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.\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":{"description":"The current user does not have sufficient permissions to configure the global default branch.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["System Maintenance"],"summary":"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.\n\nThe authenticated user must have ADMIN permission to call this resource.","operationId":"clearDefaultBranch","responses":{"204":{"description":"The default branch has been cleared."},"401":{"description":"The current user does not have sufficient permissions to clear the global default branch.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/git/mesh/config/control-plane.pem":{"get":{"tags":["System Maintenance"],"summary":"Get the control plane PEM","description":"Obtain the control plane PEM.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"getControlPlanePublicKey","responses":{"200":{"description":"The control plane PEM.","content":{"text/plain":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}}}}},"/api/latest/admin/git/mesh/diagnostics/connectivity":{"get":{"tags":["System Maintenance"],"summary":"Generate Mesh connectivity report","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":{"description":"The connectivity report between the Bitbucket node(s) and Mesh node(s).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshConnectivityReport"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/git/mesh/nodes":{"get":{"tags":["System Maintenance"],"summary":"Get all registered Mesh nodes","description":"Get all the registered Mesh nodes.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"getAllRegisteredMeshNodes","responses":{"200":{"description":"The list of registered Mesh nodes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshNode"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["System Maintenance"],"summary":"Register new Mesh node","description":"Register a new Mesh node.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"registerNewMeshNode","requestBody":{"description":"The request specifying the new Mesh node.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshNode"}}}},"responses":{"200":{"description":"The newly registered Mesh node.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshNode"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/git/mesh/nodes/{id}":{"get":{"tags":["System Maintenance"],"summary":"Get Mesh node","description":"Get the registered Mesh node that matches the supplied ID.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"getRegisteredMeshNodeById","parameters":[{"name":"id","in":"path","description":"The ID of the Mesh node.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The Mesh node that matches the ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshNode"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The Mesh node does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Update Mesh node","description":"Update a Mesh node.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"updateMeshNode","parameters":[{"name":"id","in":"path","description":"The ID of the Mesh node to update.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request specifying the updated Mesh node.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshNode"}}}},"responses":{"200":{"description":"The updated Mesh node.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshNode"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["System Maintenance"],"summary":"Delete Mesh node","description":"Delete a Mesh node\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"delete_2","parameters":[{"name":"force","in":"query","schema":{"type":"boolean","default":false}},{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/api/latest/admin/git/mesh/support-zips":{"get":{"tags":["System Maintenance"],"summary":"Get support zips for all Mesh nodes","description":"Get the support zips for all the Mesh nodes.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"getSupportZips","responses":{"200":{"description":"The support zips for all the Mesh nodes.","content":{"application/octet-stream":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}}}}},"/api/latest/admin/git/mesh/support-zips/{id}":{"get":{"tags":["System Maintenance"],"summary":"Get support zip for node","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":[{"name":"id","in":"path","description":"The ID of the Mesh node.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The support zip for the Mesh node that matches the ID.","content":{"application/octet-stream":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}},"404":{"description":"The Mesh node does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}}}}},"/api/latest/admin/groups":{"get":{"tags":["Permission Management"],"summary":"Get groups","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":[{"name":"filter","in":"query","description":"If specified only group names containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of groups.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDetailedGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a licensed user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Permission Management"],"summary":"Create group","description":"Create a new group. \n\nThe authenticated user must have ADMIN permission or higher to call this resource.","operationId":"createGroup","parameters":[{"name":"name","in":"query","description":"Name of the group.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The newly created group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDetailedGroup"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not an administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"A group with this name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Permission Management"],"summary":"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.\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":[{"name":"name","in":"query","description":"The name identifying the group to delete.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The deleted group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDetailedGroup"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user does not have the ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as the authenticated user has a lower permission level than the group being deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified group does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The action was disallowed as it would lower the authenticated user's permission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/groups/add-user":{"post":{"tags":["Deprecated","Permission Management"],"summary":"Add user to group","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":{"description":"The user was added to the group.","content":{"application/json":{}}},"401":{"description":"The authenticated user does not have the ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or group does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/admin/groups/add-users":{"post":{"tags":["Permission Management"],"summary":"Add multiple users to group","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":{"description":"All the users were added to the group","content":{"application/json":{}}},"401":{"description":"The authenticated user does not have the ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or group does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/groups/more-members":{"get":{"tags":["Permission Management"],"summary":"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.","operationId":"findUsersInGroup","parameters":[{"name":"filter","in":"query","description":"If specified only users with usernames, display names or email addresses containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"context","in":"query","description":"The group which should be used to locate members.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDetailedUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a licensed user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/groups/more-non-members":{"get":{"tags":["Permission Management"],"summary":"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.","operationId":"findUsersNotInGroup","parameters":[{"name":"filter","in":"query","description":"If specified only users with usernames, display names or email addresses containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"context","in":"query","description":"The group which should be used to locate members.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDetailedUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a licensed user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/groups/remove-user":{"post":{"tags":["Deprecated","Permission Management"],"summary":"Remove user from group","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":{"description":"The user was removed from the group.","content":{"application/json":{}}},"401":{"description":"The authenticated user does not have the ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as the group has a higher permission level than the context user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or group does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/admin/license":{"get":{"tags":["System Maintenance"],"summary":"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). \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":{"description":"The currently-installed license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBitbucketLicense"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the license, or the request is anonymous.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No license has been installed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["System Maintenance"],"summary":"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: \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":{"description":"a JSON payload containing the encoded license to apply","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBitbucketLicense"}}}},"responses":{"200":{"description":"The newly-installed license.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBitbucketLicense"}}}},"400":{"description":"No encoded license was provided in the JSON body for the POST.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update the license.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/mail-server":{"get":{"tags":["System Maintenance"],"summary":"Get mail configuration","description":"Retrieves the current mail configuration. \n\nThe authenticated user must have the SYS_ADMIN permission to call this resource.","operationId":"getMailConfig","responses":{"200":{"description":"The mail configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMailConfiguration"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the mail configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The mail server hasn't been configured","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Update mail configuration","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":{"description":"The updated mail configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMailConfiguration"}}}},"400":{"description":"The mail configuration was not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update themail configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["System Maintenance"],"summary":"Delete mail configuration","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":{"description":"The currently authenticated user has insufficient permissions to delete the mail server configuration.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/mail-server/sender-address":{"get":{"tags":["System Maintenance"],"summary":"Get server mail address","description":"Retrieves the server email address","operationId":"getSenderAddress","responses":{"200":{"description":"The server email address","content":{"application/json":{}}},"401":{"description":"he currently authenticated user has insufficient permissions to retrieve the server email address.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Update server mail address","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":{"description":"The from address used in notification emails","content":{"application/json":{}}},"400":{"description":"The server email address was not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update the server email address.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["System Maintenance"],"summary":"Update mail configuration","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":{"description":"The currently authenticated user has insufficient permissions toclear the server email address.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/permissions/groups":{"get":{"tags":["Permission Management"],"summary":"Get groups with a global permission","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":[{"name":"filter","in":"query","description":"If specified only group names containing the supplied string will be returned","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of groups and their highest global permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPermittedGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not an administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Permission Management"],"summary":"Update global permission for group","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":[{"name":"name","in":"query","description":"The names of the groups","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"permission","in":"query","description":"The permission to grant","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":{"description":"The request was malformed or the specified permission does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not an administrator or doesn't have the\nspecified permission they are attempting to grant.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as it would exceed the server's license limits.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified group does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Permission Management"],"summary":"Revoke all global permissions for group","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":[{"name":"name","in":"query","description":"The name of the group","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"All global permissions were revoked from the group."},"401":{"description":"TThe currently authenticated user is not an administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified group does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/permissions/groups/none":{"get":{"tags":["Permission Management"],"summary":"Get groups with no global permission","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":[{"name":"filter","in":"query","description":"If specified only user names containing the supplied string will be returned","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of groups that have not been granted any global permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDetailedGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not an administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/permissions/users":{"get":{"tags":["Permission Management"],"summary":"Get users with a global permission","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":[{"name":"filter","in":"query","description":"If specified only user names containing the supplied string will be returned","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users and their highest global permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPermittedGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not an administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Permission Management"],"summary":"Update global permission for user","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":[{"name":"name","in":"query","description":"The names of the users","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"permission","in":"query","description":"The permission to grant","required":true,"schema":{"type":"string","enum":["LICENSED_USER","PROJECT_CREATE","ADMIN","SYS_ADMIN"]}}],"responses":{"204":{"description":"The requested permission was granted."},"400":{"description":"The request was malformed or the specified permission does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not an administrator or doesn't have the\nspecified permission they are attempting to grant.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as it would exceed the server's license limits.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Permission Management"],"summary":"Revoke all global permissions for user","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":[{"name":"name","in":"query","description":"The name of the user","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"All global permissions were revoked from the user."},"401":{"description":"The currently authenticated user is not an administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/permissions/users/none":{"get":{"tags":["Permission Management"],"summary":"Get users with no global permission","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":[{"name":"filter","in":"query","description":"If specified only user names containing the supplied string will be returned","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users that have not been granted any global permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestApplicationUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not an administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/pull-requests/{scmId}":{"get":{"tags":["Pull Requests"],"summary":"Get merge strategies","description":"Retrieve the merge strategies available for this instance. \n\nThe user must be authenticated to call this resource.","operationId":"getMergeConfig","parameters":[{"name":"scmId","in":"path","description":"the id of the scm to get strategies for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The merge configuration of this instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestMergeConfig"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to see the request repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The request repository does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"Update merge strategies","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":[{"name":"scmId","in":"path","description":"the id of the scm to get strategies for","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"the settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestSettings"}}}},"responses":{"200":{"description":"The repository pull request merge strategies for the context repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestMergeConfig"}}}},"400":{"description":"The repository pull request merge strategies were not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to administrate thespecified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"Setting or deleting merge configurations isn't supported on archived repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/rate-limit/history":{"get":{"tags":["System Maintenance"],"summary":"Get rate limit history","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":[{"name":"order","in":"query","description":"An optional sort category to arrange the results in descending order","schema":{"type":"string","enum":["NEWEST","FREQUENCY"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A response containing a page of aggregated counters for users who have been recently rate limited.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestAggregateRejectCounter"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The sort query parameter is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve rate limit history.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/rate-limit/settings":{"get":{"tags":["System Maintenance"],"summary":"Get rate limit settings","description":"Retrieves the rate limit settings for the instance.\n\nThe user must be authenticated to call this resource.","operationId":"getSettings_2","responses":{"200":{"description":"A response containing the rate limit plugin settings for the instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRateLimitSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve rate limit settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Set rate limit","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":{"description":"Sets the rate limit settings for the instance.\n\nThe authenticated user must have ADMIN permission to call this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRateLimitSettings"}}}},"responses":{"200":{"description":"A response containing the updated rate limit plugin settings for the instance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRateLimitSettings"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to set rate limit settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/rate-limit/settings/users":{"get":{"tags":["System Maintenance"],"summary":"Get rate limit settings for user","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":[{"name":"filter","in":"query","description":"Optional filter","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A response containing all the user-specific rate limit settings filtered by the optional filter.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestUserRateLimitSettings"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve rate limit settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["System Maintenance"],"summary":"Set rate limit settings for users","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_3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBulkUserRateLimitSettingsUpdateRequest"}}}},"responses":{"200":{"description":"A response containing the updated user settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUserRateLimitSettings"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to set user settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/rate-limit/settings/users/{userSlug}":{"get":{"tags":["System Maintenance"],"summary":"Get user specific rate limit settings","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":[{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A response containing the user-specific rate limit settings for the given user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUserRateLimitSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve rate limit settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist, or has no settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Set rate limit settings for user","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_2","parameters":[{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUserRateLimitSettingsUpdateRequest"}}}},"responses":{"200":{"description":"A response containing the updated user settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUserRateLimitSettings"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to set user settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["System Maintenance"],"summary":"Delete user specific rate limit settings","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":[{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the user settings have been deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve rate limit settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist, or has no settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/user-directories":{"get":{"tags":["Permission Management"],"summary":"Get directories","description":"Retrieve a list of active directories. \n\n The authenticated user must have the ADMIN permission to call this resource.","operationId":"getUserDirectories","parameters":[{"name":"includeInactive","in":"query","description":"Set true
to include inactive directories; otherwise, false
to only return active directories.","schema":{"type":"string"}}],"responses":{"200":{"description":"A list of directories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUserDirectory"}}}},"401":{"description":"The currently authenticated user is not an administrator","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/users":{"get":{"tags":["Permission Management"],"summary":"Get users","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":[{"name":"filter","in":"query","description":"If specified only users with usernames, display name or email addresses containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDetailedUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a licensed user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Permission Management"],"summary":"Update user details","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":{"description":"The updated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDetailedUser"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user does not have the ADMIN permission or has a lower permission level than the user being updated.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Permission Management"],"summary":"Create user","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":[{"name":"emailAddress","in":"query","description":"The e-mail address for the new user.","required":true,"schema":{"type":"string"}},{"name":"password","in":"query","description":"The password for the new user. Required if the notify
parameter is not present or is set to false","schema":{"type":"string"}},{"name":"addToDefaultGroup","in":"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.","schema":{"type":"boolean","default":true}},{"name":"displayName","in":"query","description":"The display name for the new user.","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"The username for the new user.","required":true,"schema":{"type":"string"}},{"name":"notify","in":"query","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.","schema":{"type":"boolean"}}],"responses":{"204":{"description":"The user was successfully created."},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not an administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"Adding the user to the default group would exceed the server's license limit.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"Another user with the same name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Permission Management"],"summary":"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.\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":[{"name":"name","in":"query","description":"The username identifying the user to delete.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The deleted user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDetailedUser"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user does not have the ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as the authenticated user has a lower permission level than the user being deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The action was disallowed as a user can not delete themselves.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/users/add-group":{"post":{"tags":["Deprecated","Permission Management"],"summary":"Add user to group","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":{"description":"The user was added to the group","content":{"application/json":{}}},"401":{"description":"The authenticated user does not have the ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or group does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/admin/users/add-groups":{"post":{"tags":["Permission Management"],"summary":"Add user to groups","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":{"description":"The user was added to all the groups","content":{"application/json":{}}},"401":{"description":"The authenticated user does not have the ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or group does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/users/captcha":{"delete":{"tags":["Permission Management"],"summary":"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.\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":[{"name":"name","in":"query","description":"The username","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The CAPTCHA was successfully cleared."},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user does not have the ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as the authenticated user has a lower permission level than the user to clear captcha for.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/users/credentials":{"put":{"tags":["Permission Management"],"summary":"Set password for user","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":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user does not have the ADMIN permission or has a lower permission level than the user having their password updated.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/users/erasure":{"get":{"tags":["Permission Management"],"summary":"Check user removal","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":[{"name":"name","in":"query","description":"The username of the user to validate erasability for.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"the user is erasable"},"400":{"description":"The request was malformed (e.g. if no username was supplied).","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user does not have the ADMIN permission or has a lower permission level than the user being erased.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The requested username does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The requested username is the username of a not deleted user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Permission Management"],"summary":"Erase user information","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":[{"name":"name","in":"query","description":"The username identifying the user to erase.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The identifier of the erased user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestErasedUser"}}}},"400":{"description":"The request was malformed (e.g. if no username was supplied).","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user does not have the ADMIN permission or has a lower permission level than the user being erased.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The requested username does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The requested username is the username of a not deleted user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/users/more-members":{"get":{"tags":["Permission Management"],"summary":"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.","operationId":"findGroupsForUser","parameters":[{"name":"filter","in":"query","description":"If specified only users with usernames, display names or email addresses containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"context","in":"query","description":"The group which should be used to locate members.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDetailedUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a licensed user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/users/more-non-members":{"get":{"tags":["Permission Management"],"summary":"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.","operationId":"findOtherGroupsForUser","parameters":[{"name":"filter","in":"query","description":"If specified only groups with names containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"context","in":"query","description":"The user which should be used to locate groups.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of groups.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDetailedGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a licensed user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/users/remove-group":{"post":{"tags":["Permission Management"],"summary":"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.\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":{"description":"The user was removed from the group.","content":{"application/json":{}}},"401":{"description":"The authenticated user does not have the ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as the group has a higher permission level than the context user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user or group does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/users/rename":{"post":{"tags":["Permission Management"],"summary":"Rename user","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":{"description":"The renamed user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDetailedUser"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user does not have the ADMIN permission or has a lower permission level than the user being renamed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/application-properties":{"get":{"tags":["System Maintenance"],"summary":"Get application properties","description":"Retrieve version information and other application properties.\n\nNo authentication is required to call this resource.","operationId":"getApplicationProperties","responses":{"200":{"description":"The application properties","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestApplicationProperties"}}}}}}},"/api/latest/build/capabilities":{"get":{"tags":["Capabilities"],"summary":"Get build capabilities","description":"Returns the build capabilities of this instance","operationId":"getCapabilities","responses":{"200":{"description":"capabilities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBuildCapabilities"}}}}}}},"/api/latest/dashboard/pull-request-suggestions":{"get":{"tags":["Dashboard"],"summary":"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. \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":[{"name":"changesSince","in":"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.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"restricts the result set to return at most this many suggestions.","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of pull requests that match the search criteria.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestSuggestion"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The current user is not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/dashboard/pull-requests":{"get":{"tags":["Dashboard"],"summary":"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.","operationId":"getPullRequests_1","parameters":[{"name":"closedSince","in":"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.","schema":{"type":"string"}},{"name":"role","in":"query","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.","schema":{"type":"string"}},{"name":"participantStatus","in":"query","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.","schema":{"type":"string"}},{"name":"state","in":"query","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.","schema":{"type":"string"}},{"name":"user","in":"query","description":"The name of the involved user, defaults to the current user.","schema":{"type":"string"}},{"name":"order","in":"query","description":"(optional, defaults to NEWEST) the order to return pull requests in, either OLDEST (as in: \"oldest first\"), NEWEST, PARTICIPANT_STATUS, 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.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of pull requests that match the search criteria.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequest"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The current user is not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/deployment/capabilities":{"get":{"tags":["Capabilities"],"summary":"Get deployment capabilities","description":"Returns the Deployment capabilities of this instance","operationId":"getCapabilities_1","responses":{"200":{"description":"capabilities","content":{"application/json":{}}},"404":{"description":"This instance of Bitbucket Data Center does not support deployments (for example, it has been disabled using the property 'plugin.deployment.capability.disabled').","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/groups":{"get":{"tags":["Permission Management"],"summary":"Get group names","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":[{"name":"filter","in":"query","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of group names.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a project administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/hook-scripts":{"post":{"tags":["System Maintenance"],"summary":"Create a new hook script","description":"Create a new hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.","operationId":"createHookScript","requestBody":{"description":"The multipart form data containing the hook script","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExamplePostMultipartFormData"}}}},"responses":{"200":{"description":"The newly created hook script.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestHookScript"}}}},"400":{"description":"The hook script was not created due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/hook-scripts/{scriptId}":{"get":{"tags":["System Maintenance"],"summary":"Get a hook script","description":"Retrieves a hook script by ID.","operationId":"getHookScript","parameters":[{"name":"scriptId","in":"path","description":"The ID of the hook script to retrieve","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The hook script.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestHookScript"}}}},"401":{"description":"The currently authenticated user has insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The hook script ID supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Update a hook script","description":"Updates a hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.","operationId":"updateHookScript","parameters":[{"name":"scriptId","in":"path","description":"The ID of the hook script","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The multipart form data containing the hook script","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExamplePutMultipartFormData"}}}},"responses":{"200":{"description":"The updated hook script.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestHookScript"}}}},"401":{"description":"The currently authenticated user has insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The hook script ID supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"A hook script with the same name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"422":{"description":"One or more fields to update must be specified: content, description and/or name.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["System Maintenance"],"summary":"Delete a hook script.","description":"Deletes a registered hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.","operationId":"deleteHookScript","parameters":[{"name":"scriptId","in":"path","description":"The ID of the hook script to delete","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The hook script was deleted."},"401":{"description":"The currently authenticated user has insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied hook script ID.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/hook-scripts/{scriptId}/content":{"get":{"tags":["System Maintenance"],"summary":"Get hook script content","description":"Retrieves the hook script content.\n\nThis endpoint requires **SYS_ADMIN** permission.","operationId":"read","parameters":[{"name":"scriptId","in":"path","description":"The ID of the hook script","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The hook script content.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The hook script ID supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/hooks/{hookKey}/avatar":{"get":{"tags":["Project"],"summary":"Get project avatar","description":"Retrieve the avatar for the project matching the supplied moduleKey.","operationId":"getAvatar","parameters":[{"name":"hookKey","in":"path","description":"The complete module key of the hook module.","required":true,"schema":{"type":"string"}},{"name":"version","in":"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.","schema":{"type":"string"}}],"responses":{"200":{"description":"The avatar of the project matching the supplied moduleKey.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/inbox/pull-requests":{"get":{"summary":"Get pull requests in inbox","description":"Returns a page of pull requests in the user's inbox.","operationId":"getPullRequests_2","parameters":[{"name":"role","in":"query","schema":{"type":"string","default":"reviewer"}},{"name":"limit","in":"query","schema":{"type":"integer","format":"int32","default":25}},{"name":"start","in":"query","schema":{"type":"integer","format":"int32","default":0}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/api/latest/inbox/pull-requests/count":{"get":{"summary":"Get total number of pull requests in inbox","description":"Returns the total number of pull requests in the user's inbox","operationId":"getPullRequestCount","responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/api/latest/labels":{"get":{"tags":["System Maintenance"],"summary":"Get all labels","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":[{"name":"prefix","in":"query","description":"(optional) prefix to filter the labels on.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of returned labels.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestLabel"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The user is currently not authenticated.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/labels/{labelName}":{"get":{"tags":["System Maintenance"],"summary":"Get label","description":"Returns a label.\n\nThe user needs to be authenticated to use this resource.","operationId":"getLabel","parameters":[{"name":"labelName","in":"path","description":"the label name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The label.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestLabel"}}}},"401":{"description":"The user is currently not authenticated.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified label does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/labels/{labelName}/labeled":{"get":{"tags":["System Maintenance"],"summary":"Get labelables for label","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":[{"name":"type","in":"query","description":" the type of labelables to be returned. Supported values: REPOSITORY","schema":{"type":"string"}},{"name":"labelName","in":"path","description":"The page of labelables.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The page of labelables.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestLabelable"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The type of labelable is incorrect, correct values are REPOSITORY.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the labelables","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified label does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/logs/logger/{loggerName}":{"get":{"tags":["System Maintenance"],"summary":"Get current log level","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":[{"name":"loggerName","in":"path","description":"The name of the logger.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The log level of the logger.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestLogLevel"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the log level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/logs/logger/{loggerName}/{levelName}":{"put":{"tags":["System Maintenance"],"summary":"Set log level","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":[{"name":"levelName","in":"path","description":"The level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR","required":true,"schema":{"type":"string"}},{"name":"loggerName","in":"path","description":"The name of the logger.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The log level was successfully changed."},"400":{"description":"The log level was invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to set the log level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/logs/rootLogger":{"get":{"tags":["System Maintenance"],"summary":"Get root log level","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":{"description":"The log level of the logger.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestLogLevel"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the log level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/logs/rootLogger/{levelName}":{"put":{"tags":["System Maintenance"],"summary":"Set root log level","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":[{"name":"levelName","in":"path","description":"the level to set the logger to. Either TRACE, DEBUG, INFO, WARN or ERROR","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The log level was successfully changed."},"400":{"description":"The log level was invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to set the log level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/markup/preview":{"post":{"tags":["Markup"],"summary":"Preview markdown render","description":"Preview generated HTML for the given markdown content.\n\nOnly authenticated users may call this resource.","operationId":"preview","parameters":[{"name":"htmlEscape","in":"query","description":"(Optional) true if HTML should be escaped in the input markup, false otherwise.","schema":{"type":"string"}},{"name":"urlMode","in":"query","description":"(Optional) The mode to use when building URLs. One of: ABSOLUTE, RELATIVE or, CONFIGURED. By default this is RELATIVE.","schema":{"type":"string"}},{"name":"includeHeadingId","in":"query","description":"(Optional) true if headers should contain an ID based on the heading content.","schema":{"type":"string"}},{"name":"hardwrap","in":"query","description":"(Optional) Whether the markup implementation should convert newlines to breaks. By default this is false which reflects the standard markdown specification.","schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"type":"string","example":"# Hello World!"}}}},"responses":{"200":{"description":"The rendered markdown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMarkup"}}}},"400":{"description":"The markdown was invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions preview rendered markdown.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/exports":{"post":{"tags":["System Maintenance"],"summary":"Start export job","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":{"description":"The request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestExportRequest"}}}},"responses":{"200":{"description":"Details about the export job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestJob"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to start anexport","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"503":{"description":"The export could not be started because the limit of concurrent migration jobs has been reached.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/exports/preview":{"post":{"tags":["System Maintenance"],"summary":"Preview export","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":{"description":"the export request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestExportRequest"}}}},"responses":{"200":{"description":"The effectively selected projects and repositories.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestScopesExample"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to generate a preview.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/exports/{jobId}":{"get":{"tags":["System Maintenance"],"summary":"Get export job details","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":[{"name":"jobId","in":"path","description":"the ID of the job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The job, including status and progress information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestJob"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve information about this job.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/exports/{jobId}/cancel":{"post":{"tags":["System Maintenance"],"summary":"Cancel export job","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":[{"name":"jobId","in":"path","description":"the ID of the job to cancel","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The job has successfully been marked for cancellation"},"401":{"description":"The currently authenticated user has insufficient permissions to cancel this job.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The job was in a state that does not allow cancellation, e.g. it has already finished.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/exports/{jobId}/messages":{"get":{"tags":["System Maintenance"],"summary":"Get job messages","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":[{"name":"severity","in":"query","description":"The severity to include in the results","schema":{"type":"string"}},{"name":"jobId","in":"path","description":"The ID of the job","required":true,"schema":{"type":"string"}},{"name":"subject","in":"query","description":"The subject","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The messages generated by this job.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestJobMessage"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve information about this job.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/imports":{"post":{"tags":["System Maintenance"],"summary":"Start import job","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":{"description":"The request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestImportRequest"}}}},"responses":{"200":{"description":"Details about the export job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestJob"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to start an import.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"503":{"description":"The import could not be started because the limit of concurrent migration jobs has been reached.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/imports/{jobId}":{"get":{"tags":["System Maintenance"],"summary":"Get import job status","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":[{"name":"jobId","in":"path","description":"The ID of the job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The job, including status and progress information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestJob"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve information about this job.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/imports/{jobId}/cancel":{"post":{"tags":["System Maintenance"],"summary":"Cancel import job","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":[{"name":"jobId","in":"path","description":"the ID of the job to cancel","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The job has successfully been marked for cancellation."},"401":{"description":"The currently authenticated user has insufficient permissions to cancel this job.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The job was in a state that does not allow cancellation, e.g. it has already finished.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/imports/{jobId}/messages":{"get":{"tags":["System Maintenance"],"summary":"Get import job messages","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":[{"name":"severity","in":"query","description":"The severity to include in the results","schema":{"type":"string"}},{"name":"jobId","in":"path","description":"The ID of the job","required":true,"schema":{"type":"string"}},{"name":"subject","in":"query","description":"The subject","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The messages generated by this job.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestJobMessage"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve information about this job.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/mesh":{"post":{"tags":["System Maintenance"],"summary":"Start Mesh migration job","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":{"uniqueItems":true,"type":"array","items":{"type":"integer","format":"int32"}},"repositoryIds":{"uniqueItems":true,"type":"array","items":{"type":"integer","format":"int32"}}}}}}},"responses":{"200":{"description":"The started job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestJob"}}}},"400":{"description":"The migration request failed one/more validation checks.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"503":{"description":"A migration job is already in progress","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/mesh/preview":{"post":{"tags":["System Maintenance"],"summary":"Preview Mesh migration","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":{"description":"The export request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshMigrationRequest"}}}},"responses":{"200":{"description":"Enumeration of projects and repositories that would be migrated for a given request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExamplePreviewMigration"}}}},"400":{"description":"The request was invalid or missing.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/mesh/repos":{"get":{"tags":["System Maintenance"],"summary":"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. \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":[{"name":"migrationId","in":"query","description":"(optional) The currently active migration job. If not passed, this is looked up internally.","schema":{"type":"string"}},{"name":"projectKey","in":"query","description":"(optional) The project key. Can be specified more than once to filter by more than one project.","schema":{"type":"string"}},{"name":"name","in":"query","description":"(optional) The repository name","schema":{"type":"string"}},{"name":"state","in":"query","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.","schema":{"type":"string"}},{"name":"remote","in":"query","description":"(optional) Whether the repository has been fully migrated to Mesh. If not present, all repositories are considered regardless of where they're located.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of repositories matching the specified criteria.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestMigrationRepository"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No migration job with the given ID exists.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/mesh/summaries":{"get":{"tags":["System Maintenance"],"summary":"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. \n\nThe authenticated user must have **SYS_ADMIN** permission to call this resource.","operationId":"getAllMeshMigrationSummaries","parameters":[{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The summary of the migration job.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestMeshMigrationSummary"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/mesh/summary":{"get":{"tags":["System Maintenance"],"summary":"Get summary for Mesh migration job","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":{"description":"The summary of the currently active migration job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshMigrationSummary"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"No active migration job found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/mesh/{jobId}":{"get":{"tags":["System Maintenance"],"summary":"Get Mesh migration job details","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":[{"name":"jobId","in":"path","description":"The ID of the job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The details of the migration job.","content":{"application/json":{}}},"400":{"description":"The job ID parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job ID does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/mesh/{jobId}/cancel":{"post":{"tags":["System Maintenance"],"summary":"Cancel Mesh migration job","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":[{"name":"jobId","in":"path","description":"The ID of the job to cancel","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The migration job was successfully marked for cancellation."},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job ID does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The migration job has already been canceled or finished.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/mesh/{jobId}/messages":{"get":{"tags":["System Maintenance"],"summary":"Get Mesh migration job messages","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":[{"name":"severity","in":"query","description":"The severity to include in the results","schema":{"type":"string"}},{"name":"jobId","in":"path","description":"The ID of the job","required":true,"schema":{"type":"string"}},{"name":"subject","in":"query","description":"The subject","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The details of the migration job.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestJobMessage"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The job ID parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job ID does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/migration/mesh/{jobId}/summary":{"get":{"tags":["System Maintenance"],"summary":"Get Mesh migration job summary","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":[{"name":"jobId","in":"path","description":"The ID of the job","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The summary of the migration job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMeshMigrationSummary"}}}},"400":{"description":"The job ID parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to call this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified job ID does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/profile/recent/repos":{"get":{"tags":["Repository"],"summary":"Get recently accessed repositories","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":[{"name":"permission","in":"query","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.","schema":{"type":"string","default":"REPO_READ"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of recently accessed repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepository"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The permission level is unknown or not related to repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The request is unauthenticated.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects":{"get":{"tags":["Project"],"summary":"Get projects","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":[{"name":"name","in":"query","description":"Name to filter by.","schema":{"type":"string"}},{"name":"permission","in":"query","description":"Permission to filter by","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of projects.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestProject"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The permission level is unknown or not related to projects.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Project"],"summary":"Create a new project","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":{"description":"The project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProject"}}}},"responses":{"201":{"description":"The newly created project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProject"}}}},"400":{"description":"The currently authenticated user has insufficient permissions to update the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The project key or name is already in use.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}":{"get":{"tags":["Project"],"summary":"Get a project","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The project matching the supplied projectKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProject"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Project"],"summary":"Update project","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Project parameters to update.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProject"}}}},"responses":{"200":{"description":"The updated project. The project's key was not updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProject"}}}},"201":{"description":"The updated project. The project's key was updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProject"}}}},"400":{"description":"The project was not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Delete project","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The project matching the supplied projectKey was deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to delete the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The project can not be deleted as it contains repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/avatar.png":{"get":{"tags":["Project"],"summary":"Get avatar for project","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"s","in":"query","description":"The desired size of the image. The server will return an image as close as possible to the specified size.","schema":{"type":"string"}}],"responses":{"200":{"description":"The avatar of the project matching the supplied projectKey.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Project"],"summary":"Update project avatar","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The mutlipart form data containing the file.","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExampleAvatarMultipartFormData"}}}},"responses":{"201":{"description":"The avatar was uploaded successfully.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to update the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/hook-scripts":{"get":{"tags":["Project"],"summary":"Get configured hook scripts","description":"Return a page of hook scripts configured for the specified project. \n\nThis endpoint requires **PROJECT_ADMIN** permission.","operationId":"getConfigurations","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of hook scripts.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestHookScriptConfig"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/hook-scripts/{scriptId}":{"put":{"tags":["Project"],"summary":"Create/update a hook script","description":"Creates/updates the hook script configuration for the provided hook script and project. \n\nThis endpoint requires **PROJECT_ADMIN** permission.","operationId":"setConfiguration","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"scriptId","in":"path","description":"The ID of the hook script","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The hook triggers for which the hook script should be run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestHookScriptTriggers"}}}},"responses":{"200":{"description":"The updated hook script.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestHookScriptConfig"}}}},"400":{"description":"The hook script was not created/updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The project key supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Remove a hook script","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"scriptId","in":"path","description":"The ID of the hook script","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The hook script was successfully deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The project key or hook script ID supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/permissions":{"delete":{"tags":["Project"],"summary":"Revoke project permissions","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"user","in":"query","description":"The names of the users","schema":{"type":"string"}},{"name":"group","in":"query","description":"The names of the groups","schema":{"type":"string"}}],"responses":{"204":{"description":"All project permissions were revoked from the users and groups for the specified project."},"400":{"description":"No permissions were revoked because the request was invalid. No users or groups were provided.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user is not an administrator for the specifiedspecified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist, or one or more of the users or groups provided does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The action was disallowed as it would revoke the currently authenticated user's permission on the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/permissions/groups":{"get":{"tags":["Project"],"summary":"Get groups with permission to project","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":[{"name":"filter","in":"query","description":"If specified only group names containing the supplied string will be returned","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of groups and their highest permissions for the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPermittedGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a project administrator for the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Project"],"summary":"Update group project permission","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"The names of the groups","schema":{"type":"string"}},{"name":"permission","in":"query","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","schema":{"type":"string"}}],"responses":{"204":{"description":"The requested permission was granted."},"400":{"description":"The request was malformed or the specified permission does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not an administrator for the specifiedspecified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as it would reduce the currently authenticated user'spermission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Revoke group project permission","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"The name of the group","schema":{"type":"string"}}],"responses":{"204":{"description":"All project permissions were revoked from the group for the specified project."},"401":{"description":"The currently authenticated user is not an administrator for the specifiedspecified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":" The action was disallowed as it would reduce the currently authenticated user'spermission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/permissions/groups/none":{"get":{"tags":["Project"],"summary":"Get groups without project permission","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":[{"name":"filter","in":"query","description":"If specified only group names containing the supplied string will be returned","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"202":{"description":"A page of groups that have not been granted any permissions for the specifiedproject.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDetailedGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a project administrator for thespecified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/permissions/search":{"get":{"tags":["Project"],"summary":"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.\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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"permission","in":"query","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","schema":{"type":"string"}},{"name":"filterText","in":"query","description":"Name of the user or group to filter the name of","schema":{"type":"string"}},{"name":"type","in":"query","description":"Type of entity (user or group)Valid entity types are:\n\n- USER- GROUP","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/api/latest/projects/{projectKey}/permissions/users":{"get":{"tags":["Project"],"summary":"Get users with permission to project","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":[{"name":"filter","in":"query","description":"If specified only user names containing the supplied string will be returned","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users and their highest permissions for the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPermittedUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a project administrator for thespecified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Project"],"summary":"Update user project permission","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"The names of the users","schema":{"type":"string"}},{"name":"permission","in":"query","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","schema":{"type":"string"}}],"responses":{"204":{"description":"The requested permission was granted."},"400":{"description":"The request was malformed or the specified permission does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not an administrator for the specifiedspecified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as it would reduce the currently authenticated user'spermission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Revoke user project permission","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"The name of the user","schema":{"type":"string"}}],"responses":{"204":{"description":"All project permissions were revoked from the user for the specified project."},"401":{"description":"The currently authenticated user is not an administrator for the specifiedspecified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":" The action was disallowed as it would reduce the currently authenticated user'spermission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/permissions/users/none":{"get":{"tags":["Project"],"summary":"Get users without project permission","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":[{"name":"filter","in":"query","description":"If specified only user names containing the supplied string will be returned","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users that have not been granted any permissions for the specified project","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestApplicationUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a project administrator for thespecified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/permissions/{permission}/all":{"get":{"tags":["Project"],"summary":"Check default project permission","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"permission","in":"path","description":"The permission to grant. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A simple entity indicating whether the specified permission is the defaultpermission for this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPermitted"}}}},"400":{"description":"The request was malformed or the specified permission does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not an administrator for the specifiedspecified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as it would reduce the currently authenticated user'spermission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Project"],"summary":"Grant project permission","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":[{"name":"allow","in":"query","description":"true to grant the specified permission to all users, or false to revoke it","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"permission","in":"path","description":"The permission to grant. Available project permissions are:\n\n- PROJECT_READ\n- PROJECT_WRITE\n- PROJECT_ADMIN\n\n\n","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The requested permission was successfully granted or revoked."},"400":{"description":"The request was malformed or the specified permission does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not an administrator for the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos":{"get":{"tags":["Project"],"summary":"Get repositories for project","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The repositories matching the supplied projectKey.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepository"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to see the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Project"],"summary":"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. \n\nThe authenticated user must have REPO_CREATE permission or higher, for the context project to call this resource.","operationId":"createRepository","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The repository","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepository"}}}},"responses":{"201":{"description":"The newly created repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepository"}}}},"400":{"description":"The repository was not created due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"A repository with same name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}":{"get":{"tags":["Project"],"summary":"Get repository","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The repository which matches the supplied projectKey and repositorySlug.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepository"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to see the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Project"],"summary":"Update repository","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The updated repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepository"}}}},"responses":{"201":{"description":"The updated repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepository"}}}},"400":{"description":"The repository was not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update a repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"Cannot archive repository because it has open pull requests.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"A repository with the same name as the target already exists, or the repository is archived.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Project"],"summary":"Fork repository","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The rest fork.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepository"}}}},"responses":{"201":{"description":"The newly created fork.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepository"}}}},"400":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a fork.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist, or, if a target project was specified, the target project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Delete repository","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"The repository has been scheduled for deletion.","content":{"application/json":{}}},"204":{"description":"No repository matching the supplied projectKey and repositorySlug was found.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to delete the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/archive":{"get":{"tags":["Repository"],"summary":"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.\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":[{"name":"path","in":"query","description":"Paths to include in the streamed archive; may be repeated to include multiple paths","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"filename","in":"query","description":"A filename to include the \"Content-Disposition\" header","schema":{"type":"string"}},{"name":"at","in":"query","description":"The commit to stream an archive of; if not supplied, an archive of the default branch is streamed","schema":{"type":"string"}},{"name":"prefix","in":"query","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","schema":{"type":"string"}},{"name":"format","in":"query","description":"The format to stream the archive in; must be one of: zip, tar, tar.gz or tgz","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"An archive or the requested commit, in zip, tar or gzipped-tar format.","content":{"application/json":{}}},"400":{"description":"The requested format is not supported.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist or does not contain the at commit.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/attachments/{attachmentId}":{"get":{"tags":["Repository"],"summary":"Get an attachment","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"User-Agent","in":"header","schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"the attachment ID","required":true,"schema":{"type":"string"}},{"name":"Range","in":"header","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"the attachment","content":{"application/json":{}}},"206":{"description":"the requested range of bytes from the attachment","content":{"application/json":{}}},"401":{"description":"the user is currently not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The attachment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Delete an attachment","description":"Delete an attachment.\n\nThe user must be authenticated and have REPO_ADMIN permission for the specified repository.","operationId":"deleteAttachment","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"the attachment ID","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"401":{"description":"The currently authenticated user has insufficient permissions to delete the attachment","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The attachment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/attachments/{attachmentId}/metadata":{"get":{"tags":["Repository"],"summary":"Get attachment metadata","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"the attachment ID","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The attachment metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAttachmentMetadata"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the attachment metadata","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The attachment or the attachment metadata does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Repository"],"summary":"Save attachment metadata","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"the attachment ID","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The attachment metadata can be any valid JSON content","content":{"application/json":{"schema":{"type":"string","description":"any valid JSON content"}}}},"responses":{"200":{"description":"The attachment metadata","content":{"application/json":{}}},"400":{"description":"The supplied content is not valid JSON","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to save theattachment metadata","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository or the attachment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Delete attachment metadata","description":"Delete attachment metadata.\n\nThe user must be authenticated and have REPO_ADMIN permission for the specified repository.","operationId":"deleteAttachmentMetadata","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"attachmentId","in":"path","description":"the attachment ID","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":""},"401":{"description":"The currently authenticated user has insufficient permissions to delete theattachment metadata","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The attachment or the attachment metadata does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches":{"get":{"tags":["Repository"],"summary":"Find branches","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":[{"name":"boostMatches","in":"query","description":"Controls whether exact and prefix matches will be boosted to the top","schema":{"type":"boolean"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"orderBy","in":"query","description":"Ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated)","schema":{"type":"string","enum":["ALPHABETICAL","MODIFICATION"]}},{"name":"details","in":"query","description":"Whether to retrieve plugin-provided metadata about each branch","schema":{"type":"boolean"}},{"name":"filterText","in":"query","description":"The text to match on","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"base","in":"query","description":"Base branch or tag to compare each branch to (for the metadata providers that uses that information","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The branches matching the supplied filterText.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestBranch"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to read the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Repository"],"summary":"Create branch","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request to create a branch containing a name, startPoint, and optionally a message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestCreateBranchRequest"}}}},"responses":{"200":{"description":"The created branch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBranch"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to write to the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/branches/default":{"get":{"tags":["Deprecated","Repository"],"summary":"Get default branch","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The configured default branch for the repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBranch"}}}},"204":{"description":"The repository is empty, and has no default branch."},"401":{"description":"The currently authenticated user has insufficient permissions to read the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist, or its configured default branch does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"put":{"tags":["Deprecated","Repository"],"summary":"Update default branch","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The branch to set as default","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBranch"}}}},"responses":{"204":{"description":"The operation was successful."},"401":{"description":"The currently authenticated user has insufficient permissions to update the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/browse":{"get":{"tags":["Repository"],"summary":"Get file content at revision","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":[{"name":"noContent","in":"query","description":"If blame&noContent only the blame is retrieved instead of the contents","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"The commit ID or ref to retrieve the content for","schema":{"type":"string"}},{"name":"size","in":"query","description":"If true only the size will be returned for the file path instead of the contents","schema":{"type":"string"}},{"name":"blame","in":"query","description":"If present and not equal to 'false', the blame will be returned for the file as well","schema":{"type":"string"}},{"name":"type","in":"query","description":"If true only the type will be returned for the file path instead of the contents","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A page of contents from a file.","content":{"application/json":{}}},"400":{"description":"The path parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/browse/{path}":{"get":{"tags":["Repository"],"summary":"Get file content","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":[{"name":"noContent","in":"query","description":"If blame&noContent only the blame is retrieved instead of the contents","schema":{"type":"string"}},{"name":"path","in":"path","description":"The file path to retrieve content from","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"The commit ID or ref to retrieve the content for","schema":{"type":"string"}},{"name":"size","in":"query","description":"If true only the size will be returned for the file path instead of the contents","schema":{"type":"string"}},{"name":"blame","in":"query","description":"If present and not equal to 'false', the blame will be returned for the file as well","schema":{"type":"string"}},{"name":"type","in":"query","description":"If true only the type will be returned for the file path instead of the contents","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A page of contents from a file.","content":{"application/json":{}}},"400":{"description":"The path or until parameters were not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Repository"],"summary":"Edit file","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":[{"name":"path","in":"path","description":"The path of the file that is to be modified or created","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The multipart form data containing the file","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExampleMultipartFormData"}}}},"responses":{"200":{"description":"The newly created commit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestCommit"}}}},"400":{"description":"The branch or content parameters were not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user does not have write permission for the given repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/changes":{"get":{"tags":["Repository"],"summary":"Get changes made in commit","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"until","in":"query","description":"The commit to retrieve changes for","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","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)","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of changes","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestChange"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The until parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository or the since or until parameters supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits":{"get":{"tags":["Repository"],"summary":"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. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.","operationId":"getCommits","parameters":[{"name":"avatarScheme","in":"query","description":"The desired scheme for the avatar URL. If the parameter is not present URLs will use the same scheme as this request","schema":{"type":"string"}},{"name":"path","in":"query","description":"An optional path to filter commits by","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"withCounts","in":"query","description":"Optionally include the total number of commits and total number of unique authors","schema":{"type":"string"}},{"name":"followRenames","in":"query","description":"If true
, the commit history of the specified file will be followed past renames. Only valid for a path to a single file.","schema":{"type":"string"}},{"name":"until","in":"query","description":"The commit ID (SHA1) or ref (inclusively) to retrieve commits before","schema":{"type":"string"}},{"name":"avatarSize","in":"query","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","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","description":"The commit ID or ref (exclusively) to retrieve commits after","schema":{"type":"string"}},{"name":"merges","in":"query","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.","schema":{"type":"string"}},{"name":"ignoreMissing","in":"query","description":"true
to ignore missing commits, false
otherwise","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of commits","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestCommit"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"One of the supplied commit IDs or refs was invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}":{"get":{"tags":["Repository"],"summary":"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.\n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.","operationId":"getCommit","parameters":[{"name":"path","in":"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.","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit ID to retrieve","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A commit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestCommit"}}}},"400":{"description":"The supplied commit ID was invalid","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/builds":{"get":{"tags":["Builds and Deployments"],"summary":"Get a specific build status","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","description":"the key of the build status","schema":{"type":"string"}}],"responses":{"200":{"description":"The build status associated with the provided commit and key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBuildStatus"}}}},"400":{"description":"The request has failed validation","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions this repository","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository, commit or build status does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Builds and Deployments"],"summary":"Store a build status","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"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\"\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","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestBuildStatusSetRequest"}}}},"responses":{"204":{"description":"The build status was posted"},"400":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to push a build status to this repository","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Builds and Deployments"],"summary":"Delete a specific build status","description":"Delete a specific build status. \n\nThe authenticated user must have **REPO_ADMIN** permission for the provided repository.","operationId":"delete","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","description":"the key of the build status","schema":{"type":"string"}}],"responses":{"204":{"description":"The build status associated with the provided commit and key has been deleted"},"400":{"description":"The request has failed validation","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions this repository","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/changes":{"get":{"tags":["Repository"],"summary":"Get changes in commit","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The commit to retrieve changes for","required":true,"schema":{"type":"string"}},{"name":"withComments","in":"query","description":"true
to apply comment counts in the changes (the default); otherwise, false
to stream changes without comment counts","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","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)","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of changes","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestChange"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The until parameter was not supplied","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository or the since or until parameters supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments":{"get":{"tags":["Repository"],"summary":"Search for commit comments","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":[{"name":"path","in":"query","description":"The path to the file on which comments were made","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","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.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of comments that match the search criteria","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestComment"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the comment","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, or commit. The missing entity will be specified in the error details.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Repository"],"summary":"Add a new commit comment","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}},{"name":"since","in":"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.","schema":{"type":"string"}}],"requestBody":{"description":"the comment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"responses":{"201":{"description":"The newly created comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"400":{"description":"The comment was not created due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the commit, create a comment or watch the commit.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, commit or parent comment. The missing entity will be specified in the error details.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"Adding, deleting, or editing comments isn't supported on archived repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}":{"get":{"tags":["Repository"],"summary":"Get a commit comment","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The ID of the comment to retrieve","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the comment","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, commit or comment. The missing entity will be specified in the error details.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Repository"],"summary":"Update a commit comment","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The ID of the comment to retrieve","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The comment to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"responses":{"200":{"description":"The newly updated comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"400":{"description":"The comment was not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the commit, update the comment or watch the commit.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, commit or comment. The missing entity will be specified in the error details.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The comment version supplied does not match the current version or the repository is archived.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"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.\n\nThe authenticated user must have REPO_READ permission for the repository that the commit is in to call this resource.","operationId":"deleteComment","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"the comment","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"schema":{"type":"string"}},{"name":"version","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The operation was successful"},"401":{"description":"The currently authenticated user has insufficient permissions to delete the comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository or commit. The missing entity will be specified in the error details.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The comment has replies, the version supplied does not match the comment's current version or the repository is archived.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/deployments":{"get":{"tags":["Builds and Deployments"],"summary":"Get a deployment","description":"Get the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber. \n\nThe user must have REPO_READ.","operationId":"get_1","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"deploymentSequenceNumber","in":"query","description":"the sequence number of the deployment, as detailed by the query param","schema":{"type":"string"},"example":"deploymentSequenceNumber"},{"name":"commitId","in":"path","description":"the commitId that was deployed as indicated by the query parameter","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","description":"the key of the deployment, as detailed by the query parameter","schema":{"type":"string"}},{"name":"environmentKey","in":"query","description":"the key of the environment, as detailed by the query parameter","schema":{"type":"string"}}],"responses":{"200":{"description":"The deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDeployment"}}}},"400":{"description":"could not get the deployment because the request was invalid","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or deployment does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Builds and Deployments"],"summary":"Create or update a deployment","description":"Create or update a deployment. \n\n The authenticated user must have REPO_READ permission for the repository.","operationId":"createOrUpdateDeployment","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"the commitId that was deployed as indicated by the path","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"the details of the deployment to create, as detailed by the request body","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestDeploymentSetRequest"}}}},"responses":{"200":{"description":"The deployment was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDeployment"}}}},"400":{"description":"the deployment was not created because the request was invalid","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Builds and Deployments"],"summary":"Delete a deployment","description":"Delete the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber. \n\nThe user must have REPO_ADMIN.","operationId":"delete_1","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"deploymentSequenceNumber","in":"query","description":"the sequence number of the deployment, as detailed by the query parameter","schema":{"type":"string"}},{"name":"commitId","in":"path","description":"the commitId that was deployed as indicated by the path","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}},{"name":"key","in":"query","description":"the key of the deployment, as detailed by the query parameter","schema":{"type":"string"}},{"name":"environmentKey","in":"query","description":"the key of the environment, as detailed by the query parameter","schema":{"type":"string"}}],"responses":{"204":{"description":"the request has been processed"},"400":{"description":"the deployment was not deleted because the request was invalid","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to delete a deployment","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/diff/{path}":{"get":{"tags":["Repository"],"summary":"Get diff between revisions","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":[{"name":"srcPath","in":"query","description":"The source path for the file, if it was copied, moved or renamed","schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"schema":{"type":"string"}},{"name":"avatarSize","in":"query","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","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Text used to filter files and lines (optional). Not applicable if streaming raw diff","schema":{"type":"string"}},{"name":"avatarScheme","in":"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","schema":{"type":"string"}},{"name":"path","in":"path","description":"The path to the file which should be diffed (optional)","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"contextLines","in":"query","description":"The number of context lines to include around added/removed lines in the diff.Not applicable if streaming raw diff","schema":{"type":"string"}},{"name":"autoSrcPath","in":"query","description":"true
to automatically try to find the source path when it's not provided, false
otherwise. Requires the path to be provided.","schema":{"type":"string"}},{"name":"whitespace","in":"query","description":"Optional whitespace flag which can be set to ignore-all","schema":{"type":"string"}},{"name":"withComments","in":"query","description":"true
to embed comments in the diff (the default); otherwise false
to stream the diff without comments. Not applicable if streaming raw diff","schema":{"type":"string"}},{"name":"since","in":"query","description":"The base revision to diff from. If omitted the parent revision of the until revision is used","schema":{"type":"string"}}],"responses":{"200":{"description":"A diff between two revisions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDiff"}}}},"400":{"description":"The until parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/pull-requests":{"get":{"tags":["Pull Requests"],"summary":"Get repository pull requests containing commit","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"the commit ID","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Return a page of pull requests in the current repository containing the given commit.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequest"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to see the request repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The request repository does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/watch":{"post":{"tags":["Repository"],"summary":"Watch commit","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The user is now watching the commit."},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository or commit does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Stop watching commit","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The user is no longer watching the commit."},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository or commit does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/changes":{"get":{"tags":["Repository"],"summary":"Compare commits","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"fromRepo","in":"query","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","schema":{"type":"string"}},{"name":"from","in":"query","description":"the source commit (can be a partial/full commit ID or qualified/unqualified ref name)","schema":{"type":"string"}},{"name":"to","in":"query","description":"the target commit (can be a partial/full commit ID or qualified/unqualified ref name)","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of changes.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestChange"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"404":{"description":"The source repository,target repository, or commit does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/commits":{"get":{"tags":["Repository"],"summary":"Get accessible commits","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"fromRepo","in":"query","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","schema":{"type":"string"}},{"name":"from","in":"query","description":"the source commit (can be a partial/full commit ID or qualified/unqualified ref name)","schema":{"type":"string"}},{"name":"to","in":"query","description":"the target commit (can be a partial/full commit ID or qualified/unqualified ref name)","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of commits.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestCommit"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"404":{"description":"The source repository,target repository, or commit does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/compare/diff{path}":{"get":{"tags":["Repository"],"summary":"Get diff between commits","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":[{"name":"path","in":"path","description":"the path to the file to diff (optional)","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"contextLines","in":"query","description":"an optional number of context lines to include around each added or removed lines in the diff","schema":{"type":"string"}},{"name":"fromRepo","in":"query","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","schema":{"type":"string"}},{"name":"srcPath","in":"query","description":"source path","schema":{"type":"string"}},{"name":"from","in":"query","description":"the source commit (can be a partial/full commit ID or qualified/unqualified ref name)","schema":{"type":"string"}},{"name":"to","in":"query","description":"the target commit (can be a partial/full commit ID or qualified/unqualified ref name)","schema":{"type":"string"}},{"name":"whitespace","in":"query","description":"an optional whitespace flag which can be set to ignore-all
","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The diff of the changes.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDiff"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"404":{"description":"The source repository,target repository, or commit does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/contributing":{"get":{"tags":["Project"],"summary":"Get repository contributing guidelines","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"A specific commit or ref to retrieve the guidelines at, or the default branch if not specified","schema":{"type":"string"}},{"name":"markup","in":"query","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","schema":{"type":"string"}},{"name":"htmlEscape","in":"query","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","schema":{"type":"string"}},{"name":"includeHeadingId","in":"query","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","schema":{"type":"string"}},{"name":"hardwrap","in":"query","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","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The contributing guidelines for the repository.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to read the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/default-branch":{"get":{"tags":["Project"],"summary":"Get repository default branch","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The configured default branch for the repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestMinimalRef"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to read the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist, or its configured default branch does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Project"],"summary":"Update default branch for repository","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The branch to set as default","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBranch"}}}},"responses":{"204":{"description":"The default branch was updated."},"401":{"description":"The authenticated user does not have permission to modify the default branch.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/diff":{"get":{"tags":["Repository"],"summary":"Get raw diff for path","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"contextLines","in":"query","description":"The number of context lines to include around added/removed lines in the diff","schema":{"type":"string"}},{"name":"srcPath","in":"query","description":"The source path for the file, if it was copied, moved or renamed","schema":{"type":"string"}},{"name":"until","in":"query","description":"The target revision to diff to (required)","schema":{"type":"string"}},{"name":"whitespace","in":"query","description":"Optional whitespace flag which can be set to ignore-all
","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","description":"The base revision to diff from. If omitted the parent revision of the until revision is used","schema":{"type":"string"}}],"responses":{"200":{"description":"A raw diff between two revisions.","content":{"application/json":{}}},"400":{"description":"The path parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/diff/{path}":{"get":{"tags":["Repository"],"summary":"Get raw diff for path","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":[{"name":"path","in":"path","description":"The path to the file which should be diffed (required)","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"contextLines","in":"query","description":"The number of context lines to include around added/removed lines in the diff","schema":{"type":"string"}},{"name":"srcPath","in":"query","description":"The source path for the file, if it was copied, moved or renamed","schema":{"type":"string"}},{"name":"until","in":"query","description":"The target revision to diff to (required)","schema":{"type":"string"}},{"name":"whitespace","in":"query","description":"Optional whitespace flag which can be set to ignore-all
","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","description":"The base revision to diff from. If omitted the parent revision of the until revision is used","schema":{"type":"string"}}],"responses":{"200":{"description":"A raw diff between two revisions.","content":{"application/json":{}}},"400":{"description":"The until parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/files":{"get":{"tags":["Repository"],"summary":"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. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.","operationId":"streamFiles","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of files.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/FileListResource"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The path parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The path requested does not exist at the supplied commit.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/files/{path}":{"get":{"tags":["Repository"],"summary":"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. \n\nThe authenticated user must have REPO_READ permission for the specified repository to call this resource.","operationId":"streamFiles_1","parameters":[{"name":"path","in":"path","description":"The directory to list files for.","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of files.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/FileListResource"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The path requested is not a directory at the supplied commit.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The path requested does not exist at the supplied commit.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/forks":{"get":{"tags":["Project"],"summary":"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. \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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of repositories related to the request repository.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepository"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to see the request repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The request repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/hook-scripts":{"get":{"tags":["Repository"],"summary":"Get hook scripts","description":"Return a page of hook scripts configured for the specified repository. \n\nThis endpoint requires **REPO_ADMIN** permission.","operationId":"getConfigurations_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of hook scripts.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestHookScriptConfig"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/hook-scripts/{scriptId}":{"put":{"tags":["Repository"],"summary":"Create/update a hook script","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"scriptId","in":"path","description":"The ID of the hook script","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The hook triggers for which the hook script should be run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestHookScriptTriggers"}}}},"responses":{"200":{"description":"The updated hook script.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestHookScriptConfig"}}}},"400":{"description":"The hook script was not created/updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository slug supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Remove a hook script","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"scriptId","in":"path","description":"The ID of the hook script","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The hook script was successfully deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository slug or hook script ID supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/labels":{"get":{"tags":["Repository"],"summary":"Get repository labels","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The applied label.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestLabel"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the labels.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Repository"],"summary":"Add repository label","description":"Applies a label to the repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository.","operationId":"addLabel","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The label to apply","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestLabel"}}}},"responses":{"200":{"description":"The applied label.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestLabel"}}}},"400":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to apply a label.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/labels/{labelName}":{"delete":{"tags":["Repository"],"summary":"Remove repository label","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"labelName","in":"path","description":"The label to remove","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response indicating that the label is no longer associated to the repository."},"401":{"description":"The currently authenticated user has insufficient permissions to remove the label.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/last-modified":{"get":{"tags":["Repository"],"summary":"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.\n\nUnless the repository is public, the authenticated user must have REPO_READ access to call this resource.","operationId":"stream","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"The commit to use as the starting point when listing files and calculating modifications","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"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).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleFiles"}}}},"400":{"description":"No at
commit was specified. When streaming modifications, an explicit starting commit must be supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist or does not contain the at
commit.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/last-modified/{path}":{"get":{"tags":["Repository"],"summary":"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.\n\nUnless the repository is public, the authenticated user must have REPO_READ access to call this resource.","operationId":"stream_1","parameters":[{"name":"path","in":"path","description":"The path within the repository whose files should be streamed","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"The commit to use as the starting point when listing files and calculating modifications","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A map of files to the last commit that modified them, and the latest commit to update the requested path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleFiles"}}}},"400":{"description":"No at
commit was specified. When streaming modifications, an explicit starting commit must be supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist or does not contain the at
commit, or the at
commit does not contain the requested path.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/license":{"get":{"tags":["Project"],"summary":"Get repository license","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"A specific commit or ref to retrieve the guidelines at, or the default branch if not specified","schema":{"type":"string"}},{"name":"markup","in":"query","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","schema":{"type":"string"}},{"name":"htmlEscape","in":"query","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","schema":{"type":"string"}},{"name":"includeHeadingId","in":"query","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","schema":{"type":"string"}},{"name":"hardwrap","in":"query","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","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The license for the repository.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to read the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/participants":{"get":{"tags":["Pull Requests"],"summary":"Search pull request participants","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":[{"name":"filter","in":"query","description":"(optional) Return only users, whose username, name or email address contain the filter value","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"role","in":"query","description":"(optional) The role associated with the pull request participant. This must be one of AUTHOR, REVIEWER, or PARTICIPANT","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"direction","in":"query","description":"(optional), Defaults to INCOMING) the direction relative to the specified repository. Either INCOMING or OUTGOING.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users that match the search criteria.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestApplicationUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/patch":{"get":{"tags":["Repository"],"summary":"Get patch content at revision","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"until","in":"query","description":"The target revision from which to generate the patch (required)","schema":{"type":"string"}},{"name":"allAncestors","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","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'.","schema":{"type":"string"}}],"responses":{"200":{"description":"The patch contents from a repository.","content":{"application/json":{}}},"400":{"description":"The until parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions":{"delete":{"tags":["Permission Management"],"summary":"Revoke all repository permissions for users and groups","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"user","in":"query","description":"The names of the users","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"group","in":"query","description":"The names of the groups","schema":{"type":"string"}}],"responses":{"204":{"description":"All repository permissions were revoked from the users and groups for the specified repository."},"400":{"description":"No permissions were revoked because the request was invalid. No users or groups were provided.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user is not an administrator for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist, or one or more of the users or groups provided does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The action was disallowed as it would revoke the currently authenticated user's permission on the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/groups":{"get":{"tags":["Permission Management"],"summary":"Get groups with permission to repository","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":[{"name":"filter","in":"query","description":"If specified only group names containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of groups and their highest permissions for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPermittedGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a repository administrator for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Permission Management"],"summary":"Update group repository permission","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"The names of the groups.","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"permission","in":"query","description":"The permission to grant","required":true,"schema":{"type":"string","enum":["REPO_READ","REPO_WRITE","REPO_ADMIN"]}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The requested permission was granted."},"400":{"description":"The request was malformed or the specified permission does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not a repository administrator for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as it would reduce the currently authenticated user's permission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Permission Management"],"summary":"Revoke group repository permission","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"The name of the group.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"All repository permissions were revoked from the group for the specified repository."},"401":{"description":"The currently authenticated user is not a repository administrator for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The action was disallowed as it would reduce the currently authenticated user's permission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/groups/none":{"get":{"tags":["Permission Management"],"summary":"Get groups without repository permission","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":[{"name":"filter","in":"query","description":"If specified only group names containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of groups that have not been granted any permissions for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDetailedGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a repository administrator for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/search":{"get":{"tags":["Permission Management"],"summary":"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.\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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"permission","in":"query","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","schema":{"type":"string"}},{"name":"filterText","in":"query","description":"Name of the user or group to filter the name of","schema":{"type":"string"}},{"name":"type","in":"query","description":"Type of entity (user or group)Valid entity types are:\n\n- USER- GROUP","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/users":{"get":{"tags":["Permission Management"],"summary":"Get users with permission to repository","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":[{"name":"filter","in":"query","description":"If specified only user names containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users and their highest permissions for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPermittedUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a repository administrator for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Permission Management"],"summary":"Update user repository permission","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"The names of the users.","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"permission","in":"query","description":"The permission to grant","required":true,"schema":{"type":"string","enum":["REPO_READ","REPO_WRITE","REPO_ADMIN"]}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The requested permission was granted."},"400":{"description":"The request was malformed or the specified permission does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user is not a repository administrator for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The action was disallowed as it would reduce the currently authenticated user's permission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Permission Management"],"summary":"Revoke user repository permission","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"The name of the user.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"All repository permissions were revoked from the user for the specified repository."},"401":{"description":"The currently authenticated user is not a repository administrator for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The action was disallowed as it would reduce the currently authenticated user's permission level.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/permissions/users/none":{"get":{"tags":["Permission Management"],"summary":"Get users without repository permission","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":[{"name":"filter","in":"query","description":"If specified only user names containing the supplied string will be returned.","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of users that have not been granted any permissions for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestApplicationUser"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user is not a repository administrator for the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests":{"get":{"tags":["Pull Requests"],"summary":"Get pull requests for repository","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":[{"name":"withAttributes","in":"query","description":"(optional) defaults to true, whether to return additional pull request attributes","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"(optional) a fully-qualified branch ID to find pull requests to or from, such as refs/heads/master","schema":{"type":"string"}},{"name":"withProperties","in":"query","description":"(optional) defaults to true, whether to return additional pull request properties","schema":{"type":"string"}},{"name":"filterText","in":"query","description":"(optional) If specified, only pull requests where the title or description contains the supplied string will be returned.","schema":{"type":"string"}},{"name":"state","in":"query","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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"order","in":"query","description":"(optional, defaults to NEWEST) the order to return pull requests in, either OLDEST (as in: \"oldest first\") or NEWEST.","schema":{"type":"string"}},{"name":"direction","in":"query","description":"(optional, defaults to INCOMING) the direction relative to the specified repository. Either INCOMING or OUTGOING.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of pull requests that match the search criteria.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequest"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"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.) \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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The pull request data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequest"}}}},"responses":{"201":{"description":"The newly created pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequest"}}}},"400":{"description":"The pull request entity supplied in the request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a pull request between the two specified repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"One of the specified repositories or branches does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}":{"get":{"tags":["Pull Requests"],"summary":"Get pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The specified pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequest"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Pull Requests"],"summary":"Update pull request metadata","description":"Update the title, description, reviewers or destination branch 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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The updated pull request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequest"}}}},"responses":{"200":{"description":"The updated pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequest"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"One of the specified repositories or branches does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Delete pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"A body containing the version of the pull request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestDeleteRequest"}}}},"responses":{"204":{"description":"The pull request was deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"Deleting pull requests isn't supported on archived repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.diff":{"get":{"tags":["Pull Requests"],"summary":"Stream raw pull request diff","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"contextLines","in":"query","description":"The number of context lines to include around added/removed lines in the diff","schema":{"type":"string"}},{"name":"whitespace","in":"query","description":"optional whitespace flag which can be set to ignore-all
","schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A raw diff for the specified pull request.","content":{"text/plain":{}}},"400":{"description":"The currently authenticated user has insufficient permissions to view the specified pull request.","content":{"text/html":{}}},"404":{"description":"The pull request does not exist.","content":{"text/html":{}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}.patch":{"get":{"tags":["Pull Requests"],"summary":"Stream pull request as patch","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A patch representing the specified pull request.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to access the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/activities":{"get":{"tags":["Pull Requests"],"summary":"Get pull request activity","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"fromType","in":"query","description":"(required if fromId is present) the type of the activity item specified by fromId (either COMMENT or ACTIVITY)","schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"fromId","in":"query","description":"(optional) the ID of the activity item to use as the first item in the returned page","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of activity relating to the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestActivity"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/approve":{"post":{"tags":["Deprecated","Pull Requests"],"summary":"Approve pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Details of the new participant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestParticipant"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The pull request is not open.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"delete":{"tags":["Deprecated","Pull Requests"],"summary":"Unapprove pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Details of the updated participant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestParticipant"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist or the current user is not a participant on the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The pull request is not open.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/auto-merge":{"get":{"tags":["Pull Requests"],"summary":"Get auto-merge request for pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The auto-merge request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoMergeRequest"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"Auto-merge pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The result of trying to auto-merge the pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoMergeProcessingResult"}}}},"400":{"description":"An auto-merge request was not submitted for this pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to modify the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The auto-merge setting is not enabled for the repository that this pull request targets.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Cancel auto-merge for pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The auto-merge request was cancelled."},"401":{"description":"The currently authenticated user has insufficient permissions to modify the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The specified pull request is not open.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments":{"get":{"tags":["Pull Requests"],"summary":"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). \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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"count","in":"query","description":"If true only the count of the comments by state will be returned (and not the body of the comments).","schema":{"type":"string"}},{"name":"state","in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"states","in":"query","description":"(optional). If supplied, only comments with a state in the given list will be returned. The state can be OPEN or RESOLVED.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of Comments from the supplied pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestComment"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository or pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"Add new blocker comment","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The comment to add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"responses":{"201":{"description":"The newly created comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"400":{"description":"The comment was not created due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request, create a comment or watch the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, pull request or parent comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The new created name already exists or adding, deleting, or editing comments isn't supported on archived repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments/{commentId}":{"get":{"tags":["Pull Requests"],"summary":"Get pull request comment","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The ID of the comment to retrieve","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, pull request or comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Pull Requests"],"summary":"Update pull request comment","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The ID of the comment to retrieve.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The comment to add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"responses":{"200":{"description":"The newly updated comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"400":{"description":"The comment was not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request, update a comment or watch the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, pull request or comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The comment version supplied does not match the current version or the repository is archived.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"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.\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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The ID of the comment to retrieve.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"version","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The operation was successful."},"401":{"description":"The currently authenticated user has insufficient permissions to delete the comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository or pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The comment has replies, the version supplied does not match the current version or the repository is archived.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/changes":{"get":{"tags":["Pull Requests"],"summary":"Gets pull request changes","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"sinceId","in":"query","description":"The since commit hash to stream changes for a RANGE arbitrary change scope","schema":{"type":"string"}},{"name":"changeScope","in":"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)","schema":{"type":"string"}},{"name":"untilId","in":"query","description":"The until commit hash to stream changes for a RANGE arbitrary change scope","schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"withComments","in":"query","description":"true to apply comment counts in the changes (the default); otherwise, false to stream changes without comment counts","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of unreviewed Changes for the current user from the supplied pull request, including the unreviewedCommits in the properties map.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestChange"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository or pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments":{"get":{"tags":["Pull Requests"],"summary":"Get pull request comments for path","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":[{"name":"path","in":"query","description":"The path to stream comments for a given path","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"fromHash","in":"query","description":"The from commit hash to stream comments for a RANGE or COMMIT arbitrary change scope","schema":{"type":"string"}},{"name":"anchorState","in":"query","description":"ACTIVE to stream the active comments; ORPHANED to stream the orphaned comments; ALL to stream both the active and the orphaned comments;","schema":{"type":"string"}},{"name":"diffType","in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"toHash","in":"query","description":"The to commit hash to stream comments for a RANGE or COMMIT arbitrary change scope","schema":{"type":"string"}},{"name":"state","in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"diffTypes","in":"query","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')","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"states","in":"query","description":"(optional). If supplied, only comments with a state in the given list will be returned. The state can be OPEN or RESOLVED.","schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of Comments from the supplied pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestComment"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository or pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"Add pull request comment","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The comment to add","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"responses":{"201":{"description":"The newly created comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"400":{"description":"The comment was not created due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request, create a comment or watch the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, pull request or parent comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"Adding, deleting, or editing comments isn't supported on archived repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}":{"get":{"tags":["Pull Requests"],"summary":"Get a pull request comment","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The ID of the comment to retrieve.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, pull request or comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Pull Requests"],"summary":"Update pull request comment","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The ID of the comment to retrieve.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The updated comment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"responses":{"200":{"description":"The newly updated comment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestComment"}}}},"400":{"description":"The comment was not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request, update a comment or watch the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, pull request or comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The comment version supplied does not match the current version or the repository is archived.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"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. \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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The ID of the comment to retrieve.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"version","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The operation was successful."},"401":{"description":"The currently authenticated user has insufficient permissions to delete the comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository or pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The comment has replies, the version supplied does not match the current version or the repository is archived.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/apply-suggestion":{"post":{"tags":["Pull Requests"],"summary":"Apply pull request suggestion","description":"Apply a suggestion contained within a comment.","operationId":"applySuggestion","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"commentId","in":"path","description":"The ID of the comment to retrieve.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"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","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestApplySuggestionRequest"}}}},"responses":{"204":{"description":"An empty response indicating the suggestion has been applied."},"400":{"description":"The suggestion was not applied due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to apply the suggestion.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied project, repository, pull request or parent comment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"There was an error applying the suggestion to the source branch. It must be applied manually.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commit-message-suggestion":{"get":{"tags":["Pull Requests"],"summary":"Get commit message suggestion","description":"Retrieve a suggested commit message for the given Pull Request.","operationId":"getCommitMessageSuggestion","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request to generate the suggestion for","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The suggested commit message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestCommitMessageSuggestion"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/commits":{"get":{"tags":["Pull Requests"],"summary":"Get pull request commits","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":[{"name":"avatarScheme","in":"query","description":"The desired scheme for the avatar URL. If the parameter is not present URLs will use the same scheme as this request","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"withCounts","in":"query","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.","schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"ID of the pullrequest, part of the path","required":true,"schema":{"type":"string"}},{"name":"avatarSize","in":"query","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')","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of commits from the supplied pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestCommit"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository or pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/decline":{"post":{"tags":["Pull Requests"],"summary":"Decline pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pullrequest ID provided by the path","required":true,"schema":{"type":"string"}},{"name":"version","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The body holder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestDeclineRequest"}}}},"responses":{"200":{"description":"The pull request was declined.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequest"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The pull request is not OPEN or has been updated since the version specified by the request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/diff/{path}":{"get":{"tags":["Pull Requests"],"summary":"Stream a diff within a pull request","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":[{"name":"avatarScheme","in":"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","schema":{"type":"string"}},{"name":"path","in":"path","description":"The path to the file which should be diffed (optional)","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"contextLines","in":"query","description":"The number of context lines to include around added/removed lines in the diff","schema":{"type":"string"}},{"name":"sinceId","in":"query","description":"The since commit hash to stream a diff between two arbitrary hashes","schema":{"type":"string"}},{"name":"srcPath","in":"query","description":"The previous path to the file, if the file has been copied, moved or renamed","schema":{"type":"string"}},{"name":"diffType","in":"query","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","schema":{"type":"string"}},{"name":"untilId","in":"query","description":"The until commit hash to stream a diff between two arbitrary hashes","schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"whitespace","in":"query","description":"Optional whitespace flag which can be set to ignore-all
","schema":{"type":"string"}},{"name":"withComments","in":"query","description":"true
to embed comments in the diff (the default); otherwise, false
to stream the diff without comments. Not applicable if streaming raw diff","schema":{"type":"string"}},{"name":"avatarSize","in":"query","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","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of differences from a pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestDiff"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"If the request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository or pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/merge":{"get":{"tags":["Pull Requests"],"summary":"Test if pull request can be merged","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The mergeability status of the pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestMergeability"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The specified pull request is not open.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"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.\n\nThe authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.","operationId":"merge","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"version","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The body holder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestMergeRequest"}}}},"responses":{"200":{"description":"The merged pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequest"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to merge the specified pull request","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The auto-merge setting is not enabled for the repository that this pull request targets.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants":{"get":{"tags":["Pull Requests"],"summary":"Get pull request participants","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Details of the participants in this pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestParticipant"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"Assign pull request participant role","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The participant to be added to the pull request, includes the user and their role","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestAssignParticipantRoleRequest"}}},"required":true},"responses":{"200":{"description":"Details of the participants in this pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestParticipant"}}}},"400":{"description":"The request does not have the username and role, or is attempting an invalid assignment.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"Adding reviewers isn't supported on archived repositories","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Deprecated","Pull Requests"],"summary":"Unassign pull request participant","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","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"username","in":"query","schema":{"type":"string"}}],"responses":{"204":{"description":"The update completed."},"401":{"description":"The currently authenticated user has insufficient permissions to update the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"Removing reviewers isn't supported on archived repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/participants/{userSlug}":{"put":{"tags":["Pull Requests"],"summary":"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. \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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"userSlug","in":"path","description":"The slug for the user changing their status","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"version","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The participant representing the status to set, includes the status of the participant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestAssignStatusRequest"}}},"required":true},"responses":{"200":{"description":"Details of the new participant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestParticipant"}}}},"400":{"description":"The specified status was invalid or the currently authenticated user is the author of the PR and cannot have its status updated.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The pull request is not open, or has been updated since the version specified by the request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Unassign pull request participant","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_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"userSlug","in":"path","description":"The slug for the user being unassigned","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The update completed."},"400":{"description":"The request does not have the username.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"Removing reviewers isn't supported on archived repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/reopen":{"post":{"tags":["Pull Requests"],"summary":"Re-open pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The ID of the pull request within the repository","required":true,"schema":{"type":"string"}},{"name":"version","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The body holder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestReopenRequest"}}}},"responses":{"200":{"description":"The merged pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequest"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to reopen the specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/review":{"get":{"tags":["Pull Requests"],"summary":"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.","operationId":"getReview","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of Comments from the supplied pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestComment"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository or pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Pull Requests"],"summary":"Complete pull request review","description":"Complete a review on a pull request.","operationId":"finishReview","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"version","in":"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.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The REST request which contains comment text and participant status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestFinishReviewRequest"}}}},"responses":{"200":{"description":"Getting back the number of published comments and completing the review on a pull request.","content":{"application/json":{}}},"400":{"description":"The request is invalid when there is no request body provided, or the participant status in the request is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request, update a comment or watch the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"There is no pull request review for the user to finish.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The pull request has been updated since the version specified by the request, or reviews cannot be made on pull requests in archived repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Discard pull request review","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The pull request review has been discarded."},"401":{"description":"The currently authenticated user has insufficient permissions to discard the the pull request review","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified pull request or repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks":{"get":{"tags":["Deprecated"],"summary":"Get pull request tasks","description":"Retrieve the tasks associated with a pull request. \n\n**Removed in 8.0**. Tasks are now managed using Comments with BLOCKER severity. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments instead \n\n**Deprecated since 7.2, changed to 404 in 8.0, remove in 9.0.** Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments instead","operationId":"getPullRequestTasks","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/tasks/count":{"get":{"tags":["Deprecated"],"summary":"Get pull request task count","description":"Retrieve the total number of OPEN and RESOLVED tasks associated with a pull request. \n\nDeprecated since 7.2. Tasks are now managed using Comments with BLOCKER severity. Use /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/blocker-comments?count=true instead.","operationId":"countPullRequestTasks","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/watch":{"post":{"tags":["Pull Requests"],"summary":"Watch pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The user is now watching the pull request."},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Stop watching pull request","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"pullRequestId","in":"path","description":"The pull request ID.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The user is no longer watching the pull request."},"401":{"description":"The currently authenticated user has insufficient permissions to view the pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or pull request does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/raw/{path}":{"get":{"tags":["Repository"],"summary":"Get raw content of a file at revision","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":[{"name":"path","in":"path","description":"The file path to retrieve content from","required":true,"schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"A specific commit or ref to retrieve the raw content at, or the default branch if not specified","schema":{"type":"string"}},{"name":"markup","in":"query","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","schema":{"type":"string"}},{"name":"htmlEscape","in":"query","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","schema":{"type":"string"}},{"name":"includeHeadingId","in":"query","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","schema":{"type":"string"}},{"name":"hardwrap","in":"query","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","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The raw contents from a file.","content":{"application/json":{}}},"400":{"description":"The path parameter was not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/readme":{"get":{"tags":["Project"],"summary":"Get repository readme","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"at","in":"query","description":"A specific commit or ref to retrieve the guidelines at, or the default branch if not specified","schema":{"type":"string"}},{"name":"markup","in":"query","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","schema":{"type":"string"}},{"name":"htmlEscape","in":"query","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","schema":{"type":"string"}},{"name":"includeHeadingId","in":"query","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","schema":{"type":"string"}},{"name":"hardwrap","in":"query","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","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The README for the repository.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to read the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/recreate":{"post":{"tags":["Project"],"summary":"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. \n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.","operationId":"retryCreateRepository","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The newly created repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepository"}}}},"400":{"description":"The repository was not created due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/ref-change-activities":{"get":{"tags":["Repository"],"summary":"Get ref change activity","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"ref","in":"query","description":"(optional) exact match for a ref ID to filter ref change activity for","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of ref change activity.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepositoryRefChangeActivity"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The user is currently not authenticated or the user does not have REPO_ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/ref-change-activities/branches":{"get":{"tags":["Repository"],"summary":"Get branches with ref change activities for repository","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"filterText","in":"query","description":"(optional) Partial match for a ref ID to filter minimal refs for","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of branches with ref change activities.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestMinimalRef"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The user is currently not authenticated or the user does not have REPO_ADMIN permission.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/related":{"get":{"tags":["Project"],"summary":"Get related repository","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of repositories related to the request repository.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepository"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to see the request repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The request repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist":{"get":{"tags":["Security"],"summary":"Find repository secret scanning allowlist rules","description":"Find repository secret scanning allowlist rules by filtering.\n\nRepository **Admin** is required","operationId":"search_2","parameters":[{"name":"filter","in":"query","description":"Filter names by the provided text","schema":{"type":"string"},"example":"Access"},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"order","in":"query","description":"Order by","schema":{"type":"string","enum":["NAME_ASC","NAME_DESC"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of allowlist rules","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRule"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was not a correctly formed allowlist rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to view repository rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Security"],"summary":"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.\n\nRepository **Admin** is required","operationId":"createAllowlistRule_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Allowlist rule to create, either the line regular expression or the path regular expression must be present","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The created rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRule"}}}},"400":{"description":"The request did not contain a correctly formed allowlist rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to create repository rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/allowlist/{id}":{"get":{"tags":["Security"],"summary":"Get a repository secret scanning allowlist rule","description":"Get a repository secret scanning allowlist rule by ID.\n\nRepository **Admin** is required","operationId":"getAllowlistRule_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The allowlist rule id.","required":true,"schema":{"type":"string"},"example":7},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested allowlist rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRule"}}}},"401":{"description":"The authenticated user is not permitted to view repository allowlist rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The requested allowlist rule was not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Security"],"summary":"Edit an existing repository secret scanning allowlist rule","description":"Edit a repository secret scanning allowlist rule.\n\nRepository **Admin** is required","operationId":"editAllowlistRule_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The allowlist rule id.","required":true,"schema":{"type":"string"},"example":7},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The updated allowlist rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRule"}}}},"400":{"description":"The request did not contain a correctly formed allowlist rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to edit repository allowlist rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Security"],"summary":"Delete a repository secret scanning allowlist rule","description":"Delete a repository secret scanning allowlist rule with the provided ID.\n\nRepository **Admin** is required","operationId":"deleteAllowlistRule_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The allowlist rule id.","required":true,"schema":{"type":"string"},"example":7},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Empty response indicating that the allowlist rule was deleted"},"401":{"description":"The authenticated user is not permitted to delete repository allowlist rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/exempt":{"get":{"tags":["Security"],"summary":"Get whether a repository is exempt","description":"Check whether a repository is exempt from secret scanning","operationId":"isRepoExempt","responses":{"200":{"description":"True if the repository is exempt from secret scanning, false otherwise","content":{"application/json":{}}},"401":{"description":"The authenticated user is not permitted to check whether a repository is exempt from secret scanning","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Security"],"summary":"Exempt a repo from secret scanning","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":{"description":"The authenticated user is not permitted to exempt a repository from secret scanning","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"At least one of specified repositories have already been previously made exempt.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"delete":{"tags":["Security"],"summary":"Delete an exempt repository","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":{"description":"The authenticated user is not permitted to delete an exempt repository","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules":{"get":{"tags":["Security"],"summary":"Find repository secret scanning rules","description":"Find repository secret scanning rules by filtering.\n\nRepository **Admin** is required","operationId":"search_3","parameters":[{"name":"filter","in":"query","description":"Filter names by the provided text","schema":{"type":"string"},"example":"Access"},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"order","in":"query","description":"Order by","schema":{"type":"string","enum":["NAME_ASC","NAME_DESC"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of rules","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestSecretScanningRule"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was not correctly formed rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to view repository rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Security"],"summary":"Create repository secret scanning rule","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Rule to create, either the line regular expression or the path regular expression must be present","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The created rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRule"}}}},"400":{"description":"The request did not contain a correctly formed rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to create repository rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/secret-scanning/rules/{id}":{"get":{"tags":["Security"],"summary":"Get a repository secret scanning rule","description":"Get a repository secret scanning rule by ID.\n\nRepository **Admin** is required","operationId":"getRule_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The rule id.","required":true,"schema":{"type":"string"},"example":7},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The requested rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRule"}}}},"401":{"description":"The authenticated user is not permitted to view repository rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The requested rule was not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Security"],"summary":"Edit an existing repository secret scanning rule","description":"Edit a repository secret scanning rule.\n\nRepository **Admin** is required","operationId":"editRule_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The rule id.","required":true,"schema":{"type":"string"},"example":7},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The updated rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRule"}}}},"400":{"description":"The request did not contain a correctly formed rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to edit repository rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Security"],"summary":"Delete a repository secret scanning rule","description":"Delete a repository secret scanning rule with the provided ID.\n\nRepository **Admin** is required","operationId":"deleteRule_1","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The rule id.","required":true,"schema":{"type":"string"},"example":7},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Empty response indicating that the rule was deleted"},"401":{"description":"The authenticated user is not permitted to delete repository rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/auto-decline":{"get":{"tags":["Repository"],"summary":"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.\n\nThe authenticated user must have REPO_READ permission for this repository to call the resource.","operationId":"getAutoDeclineSettings_1","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The auto decline settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoDeclineSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the auto decline settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Repository"],"summary":"Create auto decline settings","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The settings to create or update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoDeclineSettingsRequest"}}}},"responses":{"200":{"description":"The auto decline settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoDeclineSettings"}}}},"400":{"description":"inactivityWeeks was not one of 1, 2, 4, 8, or, 12, or the enabled parameter was not included in the request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create or update the auto decline settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Delete auto decline settings","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The auto decline settings have been deleted successfully."},"401":{"description":"The currently authenticated user has insufficient permissions to delete the auto decline settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/auto-merge":{"get":{"tags":["Repository"],"summary":"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.\n\nThe authenticated user must have REPO_READ permission for this repository to call the resource.","operationId":"get_5","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The pull request auto-merge settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoMergeRestrictedSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the pull request auto-merge settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Repository"],"summary":"Create or update the pull request auto-merge settings","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The settings to create or update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoMergeSettingsRequest"}}}},"responses":{"200":{"description":"The pull request auto-merge settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoMergeRestrictedSettings"}}}},"400":{"description":"The 'enabled' field was not provided correctly.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create or update the pull request auto-merge settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The pull request auto-merge settings cannot be modified due to a restriction enforced by the supplied repository's project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Delete pull request auto-merge settings","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The pull request auto-merge settings"},"401":{"description":"The currently authenticated user has insufficient permissions to delete the pull request auto-merge settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"403":{"description":"The pull request auto-merge settings cannot be modified due to a restriction enforced by the supplied repository's project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks":{"get":{"tags":["Repository"],"summary":"Get repository hooks","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","description":"The optional type to filter by.","schema":{"type":"string","enum":["PRE_RECEIVE","POST_RECEIVE"]}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of repository hooks with their associated enabled state.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepositoryHook"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the hooks.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks/{hookKey}":{"get":{"tags":["Repository"],"summary":"Get repository hook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The repository hooks with their associated enabled state for the supplied hookKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryHook"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the hook.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository hook does not exist for the given repository, or the repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Delete repository hook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The hook configuration matching the supplied hookKey and repositorySlug was deleted"},"400":{"description":"The settings specified are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to delete the hook.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or hook does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks/{hookKey}/enabled":{"put":{"tags":["Repository"],"summary":"Enable repository hook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}},{"name":"Content-Length","in":"header","description":"The content length.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The repository hooks with their associated enabled state for the supplied hookKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryHook"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to enable the hook.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or hook does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Disable repository hook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The repository hooks with their associated enabled state for the supplied hookKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryHook"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to disable the hook.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or hook does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/hooks/{hookKey}/settings":{"get":{"tags":["Repository"],"summary":"Get repository hook settings","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The settings for the hook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the hook settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or hook does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Repository"],"summary":"Update repository hook settings","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The raw settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSettings"}}}},"responses":{"200":{"description":"The settings for the hook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSettings"}}}},"400":{"description":"The settings specified are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to modify the hook settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository or hook does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/pull-requests":{"get":{"tags":["Repository"],"summary":"Get pull request settings","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The repository pull request settings for the context repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryPullRequestSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to see the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Repository"],"summary":"Update pull request settings","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The updated settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryPullRequestSettings"}}}},"responses":{"200":{"description":"The repository pull request settings for the context repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryPullRequestSettings"}}}},"400":{"description":"The repository pull request settings were not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to see the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups":{"get":{"tags":["Pull Requests"],"summary":"Get all reviewer groups","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A `page` of reviewer group(s) of the provided scope and its inherited scope.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestReviewerGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository scope supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"Create reviewer group","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request containing the details of the reviewer group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"responses":{"201":{"description":"The newly created reviewer group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"400":{"description":"The request is missing a reviewer group name.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository scope supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The new created name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}":{"get":{"tags":["Pull Requests"],"summary":"Get reviewer group","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the reviewer group to be retrieved","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The reviewer group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The ID supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Pull Requests"],"summary":"Update reviewer group attributes","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the reviewer group to be updated","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"responses":{"200":{"description":"The updated reviewer group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"400":{"description":"The updated attribute does not meet the requirements. E.g. the name exceeds 50 characters, setting name to blank.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository scope supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The new updated name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Delete reviewer group","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the reviewer group to be deleted","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The operation was successful"},"401":{"description":"The currently authenticated user has insufficient permissions to delete the reviewer group in this repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied reviewer group ID.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/settings/reviewer-groups/{id}/users":{"get":{"tags":["Pull Requests"],"summary":"Get reviewer group users","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 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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the reviewer group to be retrieved","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The list of users of a reviewer group.","content":{"application/json;charset=UTF-8":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RestApplicationUser"}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}},"404":{"description":"The ID supplied does not exist.d","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/tags":{"get":{"tags":["Repository"],"summary":"Find tag","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"orderBy","in":"query","description":"Ordering of refs either ALPHABETICAL (by name) or MODIFICATION (last updated)","schema":{"type":"string"}},{"name":"filterText","in":"query","description":"The text to match on.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"The tags matching the supplied filterText.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestTag"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to read the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Repository"],"summary":"Create tag","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The request to create a tag containing a name, startPoint, and optionally a message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestCreateTagRequest"}}}},"responses":{"200":{"description":"The created tag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestTag"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to write to the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/tags/{name}":{"get":{"tags":["Repository"],"summary":"Get tag","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","description":"The name of the tag to be retrieved.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The tag which matches the supplied name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestTag"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to read the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified tag does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/watch":{"post":{"tags":["Repository"],"summary":"Watch repository","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The repository to watch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepository"}}}},"responses":{"204":{"description":"The user is now watching the repository."},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Stop watching repository","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The user is no longer watching the repository."},"401":{"description":"The currently authenticated user has insufficient permissions to view the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks":{"get":{"tags":["Repository"],"summary":"Find webhooks","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"event","in":"query","description":"List of com.atlassian.webhooks.WebhookEvent
IDs to filter for","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"statistics","in":"query","description":"true
if statistics should be provided for all found webhooks","schema":{"type":"boolean"}}],"responses":{"200":{"description":"A page of webhooks.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to find webhooks in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Repository"],"summary":"Create webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The webhook to be created for this repository.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"responses":{"200":{"description":"A created webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"400":{"description":"The webhook parameters were invalid or not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create webhooks in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/search":{"get":{"tags":["Repository"],"summary":"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.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.","operationId":"searchWebhooks","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"scopeType","in":"query","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. ","schema":{"type":"string"}},{"name":"event","in":"query","description":"List of com.atlassian.webhooks.WebhookEvent
ids to filter for","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"statistics","in":"query","description":"true
if statistics should be provided for all found webhooks","schema":{"type":"boolean"}}],"responses":{"200":{"description":"A page of webhooks.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to find webhooks in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/test":{"post":{"tags":["Repository"],"summary":"Test webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"sslVerificationRequired","in":"query","description":"Whether SSL verification is required for the specified webhook URL. Default value is true
.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"url","in":"query","description":"The url in which to connect to","schema":{"type":"string"}}],"requestBody":{"description":"Basic authentication credentials, if required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhookCredentials"}}}},"responses":{"200":{"description":"A webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhookRequestResponse"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to test a connection.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}":{"get":{"tags":["Repository"],"summary":"Get webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"ID of the webhook","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"statistics","in":"query","description":"true
if statistics should be provided for the webhook","schema":{"type":"string"}}],"responses":{"200":{"description":"A webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to get a webhook in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist, or the webhook does not exist in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Repository"],"summary":"Update webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"Id of the existing webhook","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The representation of the updated values for the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"responses":{"200":{"description":"A webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update a webhook in this repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist, or the webhook does not exist in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Repository"],"summary":"Delete webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"The ID of the webhook to be deleted.","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The webhook for the repository has been deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to delete webhooks in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist, or webhook does not exist in this repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}/latest":{"get":{"tags":["Repository"],"summary":"Get last webhook invocation details","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"ID of the webhook","required":true,"schema":{"type":"string"}},{"name":"event","in":"query","description":"The string ID of a specific event to retrieve the last invocation for.","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}},{"name":"outcome","in":"query","description":"The outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered","schema":{"type":"string"}}],"responses":{"200":{"description":"A webhook invocation dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDetailedInvocation"}}}},"204":{"description":"No webhook invocations exist."},"401":{"description":"The currently authenticated user has insufficient permissions to get webhook invocations in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist, or the webhook does not exist in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}/statistics":{"get":{"tags":["Repository"],"summary":"Get webhook statistics","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"ID of the webhook","required":true,"schema":{"type":"string"}},{"name":"event","in":"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","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A webhook invocation dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInvocationHistory"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to get webhook statistics in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist, or the webhook does not exist in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/webhooks/{webhookId}/statistics/summary":{"get":{"tags":["Repository"],"summary":"Get webhook statistics summary","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"ID of the webhook","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A webhook invocation dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInvocationHistory"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to get webhook statistics summary in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The repository does not exist, or the webhook does not exist in the repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/secret-scanning/allowlist":{"get":{"tags":["Security"],"summary":"Find project secret scanning allowlist rules","description":"Find project secret scanning allowlist rules by filtering.\n\nProject **Admin** is required","operationId":"searchAllowlistRule","parameters":[{"name":"filter","in":"query","description":"Filter names by the provided text","schema":{"type":"string"},"example":"Access"},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"order","in":"query","description":"Order by","schema":{"type":"string","enum":["NAME_ASC","NAME_DESC"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of allowlist rules","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRule"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was not correctly formed allowlist rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to view project allowlist rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Security"],"summary":"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.\n\nProject **Admin** is required","operationId":"createAllowlistRule","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Allowlist rule to create, either the line regular expression or the path regular expression must be present","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The created allowlist rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRule"}}}},"400":{"description":"The request did not contain a correctly formed allowlist rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to create project allowlist rules.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/secret-scanning/allowlist/{id}":{"get":{"tags":["Security"],"summary":"Get a project secret scanning allowlist rule","description":"Get a project secret scanning allowlist rule by ID.\n\nProject **Admin** is required","operationId":"getAllowlistRule","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The allowlist rule id.","required":true,"schema":{"type":"string"},"example":7}],"responses":{"200":{"description":"The requested allowlist rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRule"}}}},"401":{"description":"The authenticated user is not permitted to view project allowlist rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The requested allowlist rules was not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Security"],"summary":"Edit an existing project secret scanning allowlist rule","description":"Edit a project secret scanning allowlist rule.\n\nProject **Admin** is required","operationId":"editAllowlistRule","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The allowlist rule id.","required":true,"schema":{"type":"string"},"example":7}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The updated allowlist rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningAllowlistRule"}}}},"400":{"description":"The request did not contain a correctly formed allowlist rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to modify project allowlist rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Security"],"summary":"Delete a project secret scanning allowlist rule","description":"Delete a project secret scanning allowlist rule with the provided ID.\n\nProject **Admin** is required","operationId":"deleteAllowlistRule","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The allowlist rule id.","required":true,"schema":{"type":"string"},"example":7}],"responses":{"204":{"description":"Empty response indicating that the rule was deleted, or not found at this location"},"401":{"description":"The authenticated user is not permitted to delete project rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/secret-scanning/exempt":{"get":{"tags":["Security"],"summary":"Find repos exempt from secret scanning for a project","description":"Find repositories exempt from secret scanning in a project","operationId":"findExemptReposByProject","parameters":[{"name":"order","in":"query","description":"Order by project name followed by repository name either ascending or descending, defaults to ascending.","schema":{"type":"string","enum":["NAME_ASC","NAME_DESC"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of repositories","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepository"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The authenticated user is not permitted to search exempt repositories for this project","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Security"],"summary":"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.","operationId":"bulkAddExemptRepositories_1","requestBody":{"content":{"*/*":{"schema":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/RestRepositorySelector"}}}}},"responses":{"204":{"description":"All requested repositories were made exempt"},"401":{"description":"The authenticated user is not permitted to exempt a repository from secret scanning. No repositories were made exempt.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/secret-scanning/rules":{"get":{"tags":["Security"],"summary":"Find project secret scanning rules","description":"Find project secret scanning rules by filtering.\n\nProject **Admin** is required","operationId":"search_1","parameters":[{"name":"filter","in":"query","description":"Filter names by the provided text","schema":{"type":"string"},"example":"Access"},{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"order","in":"query","description":"Order by","schema":{"type":"string","enum":["NAME_ASC","NAME_DESC"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of rules","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestSecretScanningRule"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request was not correctly formed rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to view project rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Security"],"summary":"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.\n\nProject **Admin** is required","operationId":"createRule","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Rule to create, either the line regular expression or the path regular expression must be present","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The created rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRule"}}}},"400":{"description":"The request did not contain a correctly formed rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to create project rules.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/secret-scanning/rules/{id}":{"get":{"tags":["Security"],"summary":"Get a project secret scanning rule","description":"Get a project secret scanning rule by ID.\n\nProject **Admin** is required","operationId":"getRule","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The rule id.","required":true,"schema":{"type":"string"},"example":7}],"responses":{"200":{"description":"The requested rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRule"}}}},"401":{"description":"The authenticated user is not permitted to view project rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The requested rules was not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Security"],"summary":"Edit an existing project secret scanning rule","description":"Edit a project secret scanning rule.\n\nProject **Admin** is required","operationId":"editRule","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The rule id.","required":true,"schema":{"type":"string"},"example":7}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The updated rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRule"}}}},"400":{"description":"The request did not contain a correctly formed rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to modify project rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Security"],"summary":"Delete a project secret scanning rule","description":"Delete a project secret scanning rule with the provided ID.\n\nProject **Admin** is required","operationId":"deleteRule","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The rule id.","required":true,"schema":{"type":"string"},"example":7}],"responses":{"204":{"description":"Empty response indicating that the rule was deleted, or not found at this location"},"401":{"description":"The authenticated user is not permitted to delete project rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings-restriction":{"get":{"tags":["Project"],"summary":"Get enforcing project setting","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"query","description":"The namespace used to identify the provider of the feature","required":true,"schema":{"type":"string"}},{"name":"componentKey","in":"query","description":"The component key to uniquely identify individually restrictable subcomponents of a feature within the provided feature key and namespace","schema":{"type":"string"}},{"name":"featureKey","in":"query","description":"The feature key to uniquely identify the feature within the provided namespace","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The settings restriction associated with the provided namespace and feature key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProjectSettingsRestriction"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve a settings restriction","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, or settings restriction does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Project"],"summary":"Enforce project restriction","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The project settings restriction to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProjectSettingsRestrictionRequest"}}},"required":true},"responses":{"200":{"description":"The settings restriction was successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestProjectSettingsRestriction"}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a settings restriction","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"A settings restriction with the same namespace, featureKey and componentKey already exists on this project","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Stop enforcing project restriction","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"query","description":"A namespace used to identify the provider of the feature","required":true,"schema":{"type":"string"}},{"name":"componentKey","in":"query","description":"A key to uniquely identify individually restrictable subcomponents of a feature within the provided feature key and namespace","schema":{"type":"string"}},{"name":"featureKey","in":"query","description":"A key to uniquely identify the feature within the provided namespace","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":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to delete a settings restriction","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings-restriction/all":{"get":{"tags":["Project"],"summary":"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.\n\nThe authenticated user must have **PROJECT_VIEW** permission for the target project to retrieve a settings restrictions.","operationId":"getAll","parameters":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"namespace","in":"query","description":"A namespace used to identify the provider of the feature","required":true,"schema":{"type":"string"}},{"name":"featureKey","in":"query","description":"A key to uniquely identify the feature within the provided namespace","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of settings restrictions associated with the provided namespace and feature key","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestProjectSettingsRestriction"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"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","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve project settings restrictions","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings/auto-decline":{"get":{"tags":["Project"],"summary":"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.","operationId":"getAutoDeclineSettings","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The auto decline settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoDeclineSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the auto decline settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Project"],"summary":"Create/Update auto decline settings","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The settings to create or update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoDeclineSettingsRequest"}}}},"responses":{"200":{"description":"The auto decline settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoDeclineSettings"}}}},"400":{"description":"inactivityWeeks was not one of 1, 2, 4, 8, or, 12, or the enabled parameter was not included in the request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create or update the auto decline settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Delete auto decline settings","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The auto decline settings have been deleted successfully."},"401":{"description":"The currently authenticated user has insufficient permissions to delete the auto decline settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings/auto-merge":{"get":{"tags":["Project"],"summary":"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\n\nThe authenticated user must have PROJECT_VIEW permission for this project to call the resource.","operationId":"get_4","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The pull request auto-merge settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoMergeRestrictedSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the pull request auto-merge settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Project"],"summary":"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.\n\nThe authenticated user must have PROJECT_ADMIN permission for this project to call the resource.","operationId":"set","parameters":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The settings to create or update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoMergeProjectSettingsRequest"}}}},"responses":{"200":{"description":"The pull request auto-merge settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestAutoMergeRestrictedSettings"}}}},"400":{"description":"The 'enabled' and 'restrictionAction' fields were not provided correctly.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create or update the pull request auto-merge settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Delete pull request auto-merge settings","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":[{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The pull request auto-merge settings"},"401":{"description":"The currently authenticated user has insufficient permissions to delete the pull request auto-merge settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings/hooks":{"get":{"tags":["Project"],"summary":"Get repository hooks","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","description":"The optional type to filter by.","schema":{"type":"string","enum":["PRE_RECEIVE","POST_RECEIVE"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of repository hooks with their associated enabled state.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepositoryHook"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the hooks.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings/hooks/{hookKey}":{"get":{"tags":["Project"],"summary":"Get a repository hook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the repository hooks with their associated enabled state for the supplied hookKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryHook"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to enable the hook.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository hook does not exist for the given project, or the project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings/hooks/{hookKey}/enabled":{"put":{"tags":["Project"],"summary":"Enable repository hook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}},{"name":"Content-Length","in":"header","description":"The content length.","schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"The repository hooks with their associated enabled state for the supplied hookKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryHook"}}}},"400":{"description":"The settings specified are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to enable the hook.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project or hook does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Disable repository hook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The repository hooks with their associated enabled state for the supplied hookKey.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestRepositoryHook"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to disable the hook.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project or hook does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings/hooks/{hookKey}/settings":{"get":{"tags":["Project"],"summary":"Get repository hook settings","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The hook key.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The settings for the hook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to retrieve the hook settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project or hook does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Project"],"summary":"Update repository hook settings","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"hookKey","in":"path","description":"The complete module key of the hook module.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The raw settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSettings"}}}},"responses":{"200":{"description":"The settings for the hook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSettings"}}}},"400":{"description":"The settings specified are invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to modify the hook settings.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project or hook does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings/pull-requests/{scmId}":{"get":{"tags":["Project"],"summary":"Get merge strategy","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"scmId","in":"path","description":"The SCM to get strategies for.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The merge configuration of the request project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestSettings"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to see the request repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The request repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Project"],"summary":"Update merge strategy","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"scmId","in":"path","description":"The SCM to get strategies for.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestSettings"}}}},"responses":{"200":{"description":"The merge configuration of the request project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestSettings"}}}},"400":{"description":"The repository pull request merge strategies were not updated due to a validation error.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to administrate the specified repository.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified repository does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings/reviewer-groups":{"get":{"tags":["Pull Requests"],"summary":"Get all reviewer groups","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of reviewer group(s) of the provided scope.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestReviewerGroup"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The project scope supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Pull Requests"],"summary":"Create reviewer group","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The reviewer group to be create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"responses":{"201":{"description":"The newly created reviewer group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"400":{"description":"The request is missing a reviewer group name.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The project scope supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The new created name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/settings/reviewer-groups/{id}":{"get":{"tags":["Pull Requests"],"summary":"Get reviewer group","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the reviewer group to be retrieved","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The reviewer group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The ID supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Pull Requests"],"summary":"Update reviewer group attributes","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the reviewer group to be updated","required":true,"schema":{"type":"string"}}],"requestBody":{"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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"responses":{"200":{"description":"A page of changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestReviewerGroup"}}}},"400":{"description":"The updated attribute does not meet the requirements. E.g. the name exceeds 50 characters, setting name to blank.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The project scope supplied does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"The new updated name already exists.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Pull Requests"],"summary":"Delete reviewer group","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The ID of the reviewer group to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The operation was successful."},"401":{"description":"The currently authenticated user has insufficient permissions to delete the reviewer group in this project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"Unable to find the supplied reviewer group ID.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/webhooks":{"get":{"tags":["Project"],"summary":"Find webhooks","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"event","in":"query","description":"List of com.atlassian.webhooks.WebhookEvent
IDs to filter for","schema":{"type":"string"}},{"name":"statistics","in":"query","description":"true
if statistics should be provided for all found webhooks","schema":{"type":"boolean"}}],"responses":{"200":{"description":"A page of webhooks.","content":{"application/json":{}}},"401":{"description":"The currently authenticated user has insufficient permissions to find webhooks in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Project"],"summary":"Create webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The webhook to be created for this project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"responses":{"200":{"description":"A created webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"400":{"description":"The webhook parameters were invalid or not supplied.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create webhooks in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/webhooks/test":{"post":{"tags":["Project"],"summary":"Test webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"sslVerificationRequired","in":"query","schema":{"type":"boolean","default":true}},{"name":"url","in":"query","description":"The url in which to connect to","schema":{"type":"string"}}],"requestBody":{"description":"Basic authentication credentials, if required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhookCredentials"}}}},"responses":{"200":{"description":"A webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhookRequestResponse"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to test a connection.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/webhooks/{webhookId}":{"get":{"tags":["Project"],"summary":"Get webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"ID of the webhook","required":true,"schema":{"type":"string"}},{"name":"statistics","in":"query","description":"true
if statistics should be provided for the webhook","schema":{"type":"string"}}],"responses":{"200":{"description":"A webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to get a webhook in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The project does not exist, or the webhook does not exist in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Project"],"summary":"Update webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"Id of the existing webhook","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The representation of the updated values for the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"responses":{"200":{"description":"A webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestWebhook"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update a webhook in this project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The project does not exist, or the webhook does not exist in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Project"],"summary":"Delete webhook","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"The ID of the webhook to be deleted.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The webhook for the project has been deleted."},"401":{"description":"The currently authenticated user has insufficient permissions to delete webhooks in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist, or webhook does not exist in this project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/webhooks/{webhookId}/latest":{"get":{"tags":["Project"],"summary":"Get last webhook invocation details","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"ID of the webhook","required":true,"schema":{"type":"string"}},{"name":"event","in":"query","description":"The string ID of a specific event to retrieve the last invocation for.","schema":{"type":"string"}},{"name":"outcome","in":"query","description":"The outcome to filter for. Can be SUCCESS, FAILURE, ERROR. None specified means that the all will be considered","schema":{"type":"string"}}],"responses":{"200":{"description":"A webhook invocation dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestDetailedInvocation"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to get webhook invocations in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist, or the webhook does not exist in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/webhooks/{webhookId}/statistics":{"get":{"tags":["Project"],"summary":"Get webhook statistics","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"ID of the webhook","required":true,"schema":{"type":"string"}},{"name":"event","in":"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","schema":{"type":"string"}}],"responses":{"200":{"description":"A webhook invocation dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInvocationHistory"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to get webhook statistics in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project does not exist, or the webhook does not exist in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/projects/{projectKey}/webhooks/{webhookId}/statistics/summary":{"get":{"tags":["Project"],"summary":"Get webhook statistics summary","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":[{"name":"projectKey","in":"path","description":"The project key.","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","description":"ID of the webhook","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A webhook invocation dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestInvocationHistory"}}}},"204":{"description":"No webhook invocations exist."},"401":{"description":"The currently authenticated user has insufficient permissions to get webhook statistics summary in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The project does not exist, or the webhook does not exist in the project.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/repos":{"get":{"tags":["Repository"],"summary":"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. \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":[{"name":"archived","in":"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","schema":{"type":"string"}},{"name":"projectname","in":"query","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.","schema":{"type":"string"}},{"name":"projectkey","in":"query","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","schema":{"type":"string"}},{"name":"visibility","in":"query","description":"(optional) if specified, this will limit the resulting repository list based on the repositories visibility. Valid values are public or private.","schema":{"type":"string","enum":["public","private"]}},{"name":"name","in":"query","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.","schema":{"type":"string"}},{"name":"permission","in":"query","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.","schema":{"type":"string","enum":["REPO_READ","REPO_WRITE","REPO_ADMIN"]}},{"name":"state","in":"query","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","schema":{"type":"string","enum":["AVAILABLE","INITIALISING","INITIALISATION_FAILED"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"A page of repositories.","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepository"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The visibility
parameter contains an invalid value.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/secret-scanning/exempt":{"get":{"tags":["Security"],"summary":"Find all repos exempt from secret scan","description":"Find all repositories exempt from secret scanning","operationId":"findExemptReposByScope","parameters":[{"name":"order","in":"query","description":"Order by project name followed by repository name either ascending or descending, defaults to ascending.","schema":{"type":"string","enum":["NAME_ASC","NAME_DESC"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of repositories","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestRepository"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"401":{"description":"The authenticated user is not permitted to search exempt repositories globally","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Security"],"summary":"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.","operationId":"bulkAddExemptRepositories","requestBody":{"content":{"*/*":{"schema":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/RestRepositorySelector"}}}}},"responses":{"204":{"description":"All requested repositories were made exempt"},"401":{"description":"The authenticated user is not permitted to exempt a repository from secret scanning. No repositories were made exempt.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"409":{"description":"At least one of specified repositories have already been previously made exempt.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/secret-scanning/rules":{"get":{"tags":["Security"],"summary":"Find global secret scanning rules","description":"Find global secret scanning rules by filtering.","operationId":"search_4","parameters":[{"name":"filter","in":"query","description":"Filter by rule name","schema":{"type":"string"},"example":"Access"},{"name":"order","in":"query","description":"Order by","schema":{"type":"string","enum":["NAME_ASC","NAME_DESC"]}},{"name":"start","in":"query","description":"Start number for the page (inclusive). If not passed, first page is assumed.","required":false,"schema":{"type":"number","example":0},"example":0},{"name":"limit","in":"query","description":"Number of items to return. If not passed, a page size of 25 is used.","required":false,"schema":{"type":"number","example":25},"example":25}],"responses":{"200":{"description":"Page of rules","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/RestSecretScanningRule"}},"size":{"type":"number","example":1},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"number","example":25}}}}}},"400":{"description":"The request did not contain a correctly formed search request, see returned error for more details.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to search global rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Security"],"summary":"Create global secret scanning rule","description":"Create a new global secret scanning rule. Global rules are used when scanning all non exempt repositories.","operationId":"createRule_2","requestBody":{"description":"Rule to create, either the line regular expression or the path regular expression must be present","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The created rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRule"}}}},"400":{"description":"The request did not contain a correctly formed rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to create global rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/secret-scanning/rules/{id}":{"get":{"tags":["Security"],"summary":"Get a global secret scanning rule","description":"Get a global secret scanning rule by ID.","operationId":"getRule_2","parameters":[{"name":"id","in":"path","description":"The rule id.","required":true,"schema":{"type":"string"},"example":7}],"responses":{"200":{"description":"The requested rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRule"}}}},"401":{"description":"The authenticated user is not permitted to get global rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The requested rule was not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["Security"],"summary":"Edit a global secret scanning rule.","description":"Edit an existing global secret scanning rule","operationId":"editRule_2","parameters":[{"name":"id","in":"path","description":"The rule id.","required":true,"schema":{"type":"string"},"example":7}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRuleSetRequest"}}},"required":true},"responses":{"200":{"description":"The updated rule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestSecretScanningRule"}}}},"400":{"description":"The request did not contain a correctly formed rule. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to update global rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["Security"],"summary":"Delete a global secret scanning rule","description":"Delete a global secret scanning rule with the provided ID","operationId":"deleteRule_2","parameters":[{"name":"id","in":"path","description":"The rule id.","required":true,"schema":{"type":"string"},"example":7}],"responses":{"204":{"description":"Empty response indicating that the rule was deleted"},"401":{"description":"The authenticated user is not permitted to delete global rules","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/signing/x509-certificates":{"get":{"tags":["Signing"],"summary":"Get all X.509 certificates","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":{"description":"A page of X.509 certificates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestX509Certificate"}}}},"401":{"description":"The authenticated user is not permitted to get X.509 certificates","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["Signing"],"summary":"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.\n\nThe authenticated user must have the ADMIN permission to call this resource.","operationId":"createCertificate","requestBody":{"description":"The multipart form data containing the certificate in a form-field named 'certificate'","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExampleCertificateMultipartFormData"}}},"required":true},"responses":{"201":{"description":"The newly created X.509 certificate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestX509Certificate"}}}},"400":{"description":"The request did not contain a valid X.509 certificate request. See returned error for more details","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"The authenticated user is not permitted to create X.509 certificates","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/signing/x509-certificates/crl/{id}":{"put":{"tags":["Signing"],"summary":"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.\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":[{"name":"id","in":"path","description":"The ID of the issuer certificate.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully started processing CRLs.","content":{"application/json":{}}},"401":{"description":"The authenticated user is not permitted to update X.509 CRL entries","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"There is no X.509 certificate with the given ID","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/signing/x509-certificates/{id}":{"delete":{"tags":["Signing"],"summary":"Delete an X.509 certificate","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":[{"name":"id","in":"path","description":"The ID of the X.509 certificate.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"An empty response if the X.509 certificate was successfully deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestX509Certificate"}}}},"401":{"description":"The authenticated user is not permitted to delete X.509 certificates","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"There is no X.509 certificate with the given ID","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/tasks":{"post":{"tags":["Deprecated"],"summary":"Create task","description":"Create a new task. \n\nRemoved in 8.0. Tasks are now managed using Comments with severity BLOCKER. Call POST /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments
instead,passing the attribute 'severity' set to 'BLOCKER'.","operationId":"createTask","responses":{"404":{"description":"This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/tasks/{taskId}":{"get":{"tags":["Deprecated"],"summary":"Get task","description":"Retrieve an existing task.\n\nRemoved in 8.0. Tasks are now managed using Comments with BLOCKER severity. Call GET /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}
instead. @deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Call GET /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId} instead.","operationId":"getTask","parameters":[{"name":"taskId","in":"path","description":"the id identifying the task","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"put":{"tags":["Deprecated"],"summary":"Update task","description":"Update an existing task. \n\n Removed in 8.0. Tasks are now managed using Comments with BLOCKER severity. Call PUT /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}
instead. To resolve a task, pass the attribute 'state' set to 'RESOLVED'. @deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Call PUT /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}\n
instead. \n\n As of Stash 3.3, only the state and text of a task can be updated. \n\n Updating the state of a task is allowed for any user having READ access to the repository. However only the task's creator, the context's author or an admin of the context's repository can update the task's text. (For a pull request task, those are the task's creator, the pull request's author or an admin on the repository containing the pull request). Additionally the task's text cannot be updated if it has been resolved.","operationId":"updateTask","parameters":[{"name":"taskId","in":"path","description":"the id identifying the task to update","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true},"delete":{"tags":["Deprecated"],"summary":"Delete task","description":"Delete a task.\n\nRemoved in 8.0. Tasks are now managed using Comments with BLOCKER severity. Call DELETE /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}
instead. @deprecated since 7.2, changed to 404 in 8.0, remove in 9.0. Call DELETE /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId} instead.\n\nNote that only the task's creator, the context's author or an admin of the context's repository can delete a task. (For a pull request task, those are the task's creator, the pull request's author or an admin on the repository containing the pull request). Additionally a task cannot be deleted if it has already been resolved.","operationId":"deleteTask","parameters":[{"name":"taskId","in":"path","description":"the id identifying the task to delete","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"This endpoint has been removed as tasks are now managed using Comments with severity BLOCKER.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}},"deprecated":true}},"/api/latest/users":{"get":{"tags":["System Maintenance"],"summary":"Get all users","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.\nGlobal 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
.\nProject 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":[{"name":"filter","in":"query","description":"Return only users, whose username, name or email address contain the filter
value","schema":{"type":"string"}},{"name":"permission.N","in":"query","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.","schema":{"type":"string"}},{"name":"permission","in":"query","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.","schema":{"type":"string"}},{"name":"group","in":"query","description":"return only users who are members of the given group","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of users.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestApplicationUser"}}}},"400":{"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.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"Authentication failed or was not attempted.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"put":{"tags":["System Maintenance"],"summary":"Update user details","description":"Update the currently authenticated user's details. The update will always be applied to the currently authenticated user.","operationId":"updateUserDetails_1","requestBody":{"description":"The user update details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}}},"responses":{"200":{"description":"The updated user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestApplicationUser"}}}},"400":{"description":"The request was malformed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"Authentication failed or was not attempted.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/users/credentials":{"put":{"tags":["System Maintenance"],"summary":"Set password","description":"Update the currently authenticated user's password.","operationId":"updateUserPassword_1","requestBody":{"description":"The password update details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPasswordUpdate"}}}},"responses":{"204":{"description":"The user's password was successfully updated."},"400":{"description":"The request was malformed or the old password was incorrect.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"401":{"description":"Authentication failed or was not attempted.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/users/{userSlug}":{"get":{"tags":["System Maintenance"],"summary":"Get user","description":"Retrieve the user matching the supplied userSlug.","operationId":"getUser","parameters":[{"name":"userSlug","in":"path","description":"The user slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The user matching the supplied userSlug. Note, this may\nnot be the user's username, always use the user.slug property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestApplicationUser"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to view the user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/users/{userSlug}/avatar.png":{"post":{"tags":["System Maintenance"],"summary":"Update user avatar","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":[{"name":"X-Atlassian-Token","in":"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
.","schema":{"type":"string"},"example":"no-check"},{"name":"userSlug","in":"path","description":"The user slug","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Multipart form data containing a single image in a form-field named 'avatar'.","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExampleAvatarMultipartFormData"}}}},"responses":{"201":{"description":"The avatar was uploaded successfully.","headers":{"Location":{"description":"The Location response header which indicates the URL of the avatar.","style":"simple","schema":{"type":"string"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to update the avatar.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"delete":{"tags":["System Maintenance"],"summary":"Delete user avatar","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":[{"name":"userSlug","in":"path","description":"The user slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The new avatar URL if the local avatar was successfully deleted or did not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestNamedLink"}}}},"401":{"description":"The authenticated user has insufficient permissions to delete the specified avatar.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified user does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/users/{userSlug}/settings":{"get":{"tags":["System Maintenance"],"summary":"Get user settings","description":"Retrieve a map of user setting key values for a specific user identified by the user slug.","operationId":"getUserSettings","parameters":[{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The user settings for the specified user slug.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSettingsMap"}}}},"401":{"description":"The currently authenticated user does not have permission to view the settings of this user.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"The specified project, repository, commit, or report does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}},"post":{"tags":["System Maintenance"],"summary":"Update user settings","description":"Update the entries of a map of user setting key/values for a specific user identified by the user slug.","operationId":"updateSettings","parameters":[{"name":"userSlug","in":"path","description":"The user slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"A map with the UserSettings entries which must be updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExampleSettingsMap"}}}},"responses":{"204":{"description":"The UserSettings were updated successfully"},"401":{"description":"The currently authenticated user is not a project administrator.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}}}}