{"openapi":"3.0.1","info":{"title":"Bitbucket Server","description":"This is the reference document for the Atlassian Bitbucket REST API. The REST API is for developers who want to: \n\n - integrate Bitbucket with other applications;\n\n - create scripts that interact with Bitbucket; or\n\n - develop plugins that enhance the Bitbucket UI, using REST to interact with the backend. \n\n You can read more about developing Bitbucket plugins in the [Bitbucket Developer Documentation](https://developer.atlassian.com/bitbucket/server/docs/latest/).","termsOfService":"https://www.atlassian.com/legal/software-license-agreement","contact":{"name":"Bitbucket Server Jira Project","url":"https://jira.atlassian.com/projects/BSERV/summary"},"version":"8.3"},"servers":[{"url":"http://{baseurl}/rest/","variables":{"baseurl":{"default":"example.com:7990","description":"Address of your bitbucket instance"}}}],"components":{"securitySchemes":{"basic":{"type":"http","description":"In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.","scheme":"basic"}},"schemas":{"RestErrorMessage":{"properties":{"exceptionName":{"type":"string"},"message":{"type":"string"},"context":{"type":"string"}}},"RestRepositoryPolicy":{"properties":{"permission":{"type":"string","description":"The permission required to delete repositories. Must be one of: \"SYS_ADMIN\", \"ADMIN\", \"PROJECT_ADMIN\", \"REPO_ADMIN\".","example":"ADMIN","enum":["SYS_ADMIN","ADMIN","PROJECT_ADMIN","REPO_ADMIN"]}}},"MinimalRef":{"type":"object","properties":{"displayId":{"type":"string"},"id":{"type":"string"},"type":{"$ref":"#/components/schemas/RefType"}}},"PageOfRefs":{"type":"object","properties":{"empty":{"type":"boolean"},"isLastPage":{"type":"boolean"},"lastPage":{"type":"boolean"},"limit":{"type":"integer","format":"int32"},"nextPageStart":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"values":{"type":"array","items":{"$ref":"#/components/schemas/MinimalRef"}}},"additionalProperties":{"type":"object","description":"Page of refs"},"description":"Page of refs"},"RefType":{},"RestBranch":{"properties":{"displayId":{"type":"string","readOnly":true},"type":{"$ref":"#/components/schemas/RefType"},"default":{"type":"boolean","readOnly":true},"latestCommit":{"type":"string","readOnly":true,"example":"8d51122def5632836d1cb1026e879069e10a1e13"},"latestChangeset":{"type":"string","readOnly":true,"example":"8d51122def5632836d1cb1026e879069e10a1e13"},"id":{"type":"string","example":"refs/heads/master"}}},"RestBranchCreateRequest":{"type":"object","properties":{"empty":{"type":"boolean"},"name":{"type":"string","description":"Name of the branch to be created"},"startPoint":{"maxLength":40,"type":"string","description":"Commit ID from which the branch is created"}},"additionalProperties":{"type":"object"}},"RestBranchDeleteRequest":{"type":"object","properties":{"dryRun":{"type":"boolean","description":"Don't actually delete the ref name, just do a dry run"},"empty":{"type":"boolean"},"endPoint":{"maxLength":40,"type":"string","description":"Commit ID that the provided ref name is expected to point to"},"name":{"type":"string","description":"Name of the ref to be deleted"}},"additionalProperties":{"type":"object"}},"RestErrors":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}},"RestGitTagCreateRequest":{"type":"object","properties":{"force":{"type":"boolean"},"message":{"type":"string","example":"A new release tag"},"name":{"type":"string","example":"release-tag"},"startPoint":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["ANNOTATED","LIGHTWEIGHT"]}}},"RestMinimalRef":{"properties":{"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}}},"RestPullRequestRebaseRequest":{"type":"object","properties":{"version":{"type":"integer","format":"int32","example":1}}},"RestPullRequestRebaseResult":{"properties":{"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"]}}}}}}},"RestPullRequestRebaseability":{"properties":{"vetoes":{"type":"array","items":{"$ref":"#/components/schemas/RestRepositoryHookVeto"}}}},"RestRefChange":{"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"]}}}}},"RestRepositoryHookVeto":{"properties":{"detailedMessage":{"type":"string","example":"You have insufficient permissions to rebase 'refs/heads/feature-branch'."},"summaryMessage":{"type":"string","example":"Insufficient branch permissions"}}},"RestTag":{"properties":{"hash":{"type":"string","example":"8d51122def5632836d1cb1026e879069e10a1e13"},"latestCommit":{"type":"string","readOnly":true,"example":"8d51122def5632836d1cb1026e879069e10a1e13"},"latestChangeset":{"type":"string","readOnly":true,"example":"8d51122def5632836d1cb1026e879069e10a1e13"},"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}}},"Context":{"type":"object","properties":{"commitMessage":{"type":"string","example":"Merging in latest from upstream."}}},"RestRefSyncRequest":{"type":"object","properties":{"action":{"type":"string","example":"MERGE","enum":["DISCARD","MERGE","REBASE"]},"context":{"$ref":"#/components/schemas/Context"},"refId":{"type":"string","example":"refs/heads/master"}}},"RestRefSyncStatus":{"properties":{"aheadRefs":{"type":"object","properties":{"tag":{"type":"boolean"},"state":{"type":"string","enum":["AHEAD","DIVERGED","ORPHANED"]},"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}},"readOnly":true},"divergedRefs":{"type":"object","properties":{"tag":{"type":"boolean"},"state":{"type":"string","enum":["AHEAD","DIVERGED","ORPHANED"]},"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}},"readOnly":true},"lastSync":{"type":"number","readOnly":true,"example":1331038800000},"orphanedRefs":{"type":"object","properties":{"tag":{"type":"boolean"},"state":{"type":"string","enum":["AHEAD","DIVERGED","ORPHANED"]},"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}},"readOnly":true},"enabled":{"type":"boolean"},"available":{"type":"boolean","readOnly":true}}},"RestRejectedRef":{"properties":{"tag":{"type":"boolean"},"state":{"type":"string","enum":["AHEAD","DIVERGED","ORPHANED"]},"displayId":{"type":"string","example":"master"},"id":{"type":"string","example":"refs/heads/master"},"type":{"type":"string","enum":["BRANCH","TAG"]}}},"RestBuildStats":{"properties":{"failed":{"type":"integer","format":"int32"},"successful":{"type":"integer","format":"int32"},"cancelled":{"type":"integer","format":"int32"},"inProgress":{"type":"integer","format":"int32"},"unknown":{"type":"integer","format":"int32"}}},"RestBuildStatus":{"properties":{"testResults":{"type":"object","properties":{"failed":{"type":"integer","format":"int32","example":1},"successful":{"type":"integer","format":"int32","example":134},"skipped":{"type":"integer","format":"int32","example":5}}},"createdDate":{"type":"integer","format":"int64","example":1587533099278},"updatedDate":{"type":"integer","format":"int64","example":1587533699278},"name":{"type":"string","example":"Database Matrix Tests"},"key":{"type":"string","example":"TEST-REP3"},"parent":{"type":"string","example":"TEST-REP"},"state":{"type":"string","enum":["CANCELLED","FAILED","INPROGRESS","SUCCESSFUL","UNKNOWN"]},"ref":{"type":"string","example":"refs/heads/master"},"description":{"type":"string","example":"A description of the build goes here"},"duration":{"type":"integer","format":"int64"},"url":{"type":"string","example":"https://bamboo.example.com/browse/TEST-REP3"},"buildNumber":{"type":"string","example":"3"}}},"RestMultipleBuildStats":{"properties":{}},"RestRefMatcher":{"properties":{"displayId":{"type":"string","example":"main"},"id":{"type":"string","example":"refs/heads/main"},"type":{"type":"object","properties":{"name":{"type":"string","example":"Branch"},"id":{"type":"string","enum":["ANY_REF","BRANCH","PATTERN","MODEL_CATEGORY","MODEL_BRANCH"]}}}}},"RestRefMatcherType":{"properties":{"name":{"type":"string","example":"Branch"},"id":{"type":"string","enum":["ANY_REF","BRANCH","PATTERN","MODEL_CATEGORY","MODEL_BRANCH"]}}},"RestRequiredBuildCondition":{"properties":{"buildParentKeys":{"type":"array","description":"A non-empty list of build parent keys that require green builds for this merge check to pass","example":["build-key-1","build-key-2"],"items":{"type":"string"}},"refMatcher":{"type":"object","properties":{"displayId":{"type":"string","example":"main"},"id":{"type":"string","example":"refs/heads/main"},"type":{"type":"object","properties":{"name":{"type":"string","example":"Branch"},"id":{"type":"string","enum":["ANY_REF","BRANCH","PATTERN","MODEL_CATEGORY","MODEL_BRANCH"]}}}}},"exemptRefMatcher":{"type":"object","properties":{"displayId":{"type":"string","example":"main"},"id":{"type":"string","example":"refs/heads/main"},"type":{"type":"object","properties":{"name":{"type":"string","example":"Branch"},"id":{"type":"string","enum":["ANY_REF","BRANCH","PATTERN","MODEL_CATEGORY","MODEL_BRANCH"]}}}}},"id":{"type":"integer","format":"int64","example":15}}},"RestRequiredBuildConditionSetRequest":{"required":["buildParentKeys","refMatcher"],"type":"object","properties":{"buildParentKeys":{"maxItems":100,"minItems":0,"type":"array","description":"A non-empty list of build parent keys that require green builds for this merge check to pass","example":["build-key-1","build-key-2"],"items":{"type":"string"}},"exemptRefMatcher":{"$ref":"#/components/schemas/RestRefMatcher"},"refMatcher":{"type":"object","properties":{"displayId":{"type":"string","example":"main"},"id":{"type":"string","example":"refs/heads/main"},"type":{"type":"object","properties":{"id":{"type":"string","enum":["ANY_REF","BRANCH","PATTERN","MODEL_CATEGORY","MODEL_BRANCH"]},"name":{"type":"string","example":"Branch"}}}}}}},"RestRelatedLinks":{"properties":{}},"RestApplicationUser":{"properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}},"ApplicationId":{"type":"object"},"RestChangeset":{"properties":{"changes":{"type":"object","properties":{"values":{"type":"object"},"size":{"type":"integer","format":"int32"},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"}}},"fromCommit":{"type":"object","properties":{"displayId":{"type":"string","example":"abcdef0"},"id":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"}}},"toCommit":{"type":"object","properties":{"committer":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"authorTimestamp":{"type":"integer","format":"int64","example":1359075920},"committerTimestamp":{"type":"integer","format":"int64","example":1449075830},"author":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"message":{"type":"string","example":"More work on feature 1"},"parents":{"type":"array","items":{"$ref":"#/components/schemas/RestMinimalCommit"}},"displayId":{"type":"string","example":"abcdef0"},"id":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"}}},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestCommentJiraIssue":{"properties":{"commentId":{"type":"integer","format":"int64","example":1},"issueKey":{"type":"string","example":"TEST-123"}}},"RestCommit":{"properties":{"committer":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"authorTimestamp":{"type":"integer","format":"int64","example":1359075920},"committerTimestamp":{"type":"integer","format":"int64","example":1449075830},"author":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"message":{"type":"string","example":"More work on feature 1"},"parents":{"type":"array","items":{"$ref":"#/components/schemas/RestMinimalCommit"}},"displayId":{"type":"string","example":"abcdef0"},"id":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"}}},"RestEnhancedEntityLink":{"properties":{"displayUrl":{"type":"string","example":"example.com/jira"},"projectName":{"type":"string","example":"My Project"},"applicationLinkId":{"type":"string","example":"a1b54cs4wsd45"},"projectId":{"type":"integer","format":"int64","example":10000},"projectKey":{"type":"string","example":"MPROJ"}}},"RestJiraIssue":{"type":"object","properties":{"key":{"type":"string","example":"JRA-9"},"url":{"type":"string","example":"https://jira.atlassian.com/browse/JRA-9"}}},"RestMinimalCommit":{"properties":{"displayId":{"type":"string","example":"abcdef0"},"id":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"}}},"RestPageRestChange":{"properties":{"values":{"type":"object"},"size":{"type":"integer","format":"int32"},"isLastPage":{"type":"boolean"},"nextPageStart":{"type":"integer","format":"int32"},"start":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"}}},"RestPerson":{"properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"RestProject":{"properties":{"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"namespace":{"type":"string","readOnly":true,"deprecated":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestRepository":{"properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestClusterNode":{"properties":{"buildVersion":{"type":"string","example":"7.0.0"},"name":{"type":"string","example":"foo"},"id":{"type":"string","example":"d4fde8b1-2504-4998-a0ba-14fbe98edd4d"},"address":{"type":"object","properties":{"address":{"type":"string","example":"node.example.com"},"port":{"type":"integer","format":"int32","example":8230}}},"local":{"type":"boolean"}}},"RestConnectInstalledEvent":{"required":["clientKey","sharedSecret"],"type":"object","properties":{"apiBaseUrl":{"type":"string"},"baseUrl":{"type":"string","example":"https://us-east.bitbucket.example.com"},"clientKey":{"type":"string","example":"atlassian-mirroring-addon"},"key":{"type":"string","example":"connect-mirror-install"},"publicKey":{"type":"string","example":"616161"},"sharedSecret":{"type":"string","example":"424242"},"teamId":{"type":"string"},"teamName":{"type":"string"}}},"RestMirroredRepository":{"properties":{"pushUrls":{"type":"array","items":{"$ref":"#/components/schemas/RestNamedLink"}},"cloneUrls":{"type":"array","items":{"$ref":"#/components/schemas/RestNamedLink"}},"mirrorName":{"type":"string","example":"Saigon Mirror"},"lastUpdated":{"type":"string","format":"date-time"},"available":{"type":"boolean"},"status":{"type":"string","enum":["NOT_MIRRORED","INITIALIZING","AVAILABLE","ERROR_INITIALIZING","ERROR_AVAILABLE"]},"repositoryId":{"type":"string","example":"1"}}},"RestNamedLink":{"properties":{"name":{"type":"string","example":"http"},"href":{"type":"string","example":"https://bitbucket.example.com/scm/awesomeproject/awesomerepo.git"}}},"RestSyncProgress":{"properties":{"discovering":{"type":"boolean"},"syncedRepos":{"type":"integer","format":"int32"},"totalRepos":{"type":"integer","format":"int32"}}},"RestUnknownEntity":{"type":"object","properties":{}},"RestUpstreamServer":{"properties":{"apiBaseUrl":{"type":"string","example":"https://bitbucket.example.com"},"id":{"type":"string","example":"f76a35c5-4592-425d-bf85-b4d9db68e809"},"state":{"type":"string","example":"INSTALLED","enum":["INITIALIZING","PENDING","INSTALLED","UNKNOWN","REMOVED"]},"type":{"type":"string","example":"server","enum":["BITBUCKET_SERVER","BITBUCKET_CLOUD"]},"baseUrl":{"type":"string","example":"https://bitbucket.example.com"}}},"RestUpstreamSettings":{"properties":{"projectIds":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"mode":{"type":"string","enum":["ALL_PROJECTS","SELECTED_PROJECTS"]}}},"RestRefRestriction":{"properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/RestApplicationUser"}},"accessKeys":{"type":"array","items":{"$ref":"#/components/schemas/RestSshAccessKey"}},"groups":{"type":"array","example":["group_a","group_b"],"items":{"type":"string","example":"[\"group_a\",\"group_b\"]"}},"matcher":{"type":"object","properties":{"displayId":{"type":"string","example":"main"},"id":{"type":"string","example":"refs/heads/main"},"type":{"type":"object","properties":{"name":{"type":"string","example":"Branch"},"id":{"type":"string","enum":["ANY_REF","BRANCH","PATTERN","MODEL_CATEGORY","MODEL_BRANCH"]}}}}},"id":{"type":"integer","format":"int32","readOnly":true,"example":1},"type":{"type":"string","example":"pull-request-only"},"scope":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY","GLOBAL","PROJECT","REPOSITORY"]}},"readOnly":true}}},"RestRestrictionRequest":{"type":"object","properties":{"accessKeyIds":{"type":"array","example":[1,2,3],"items":{"type":"integer","format":"int32"}},"accessKeys":{"type":"array","items":{"$ref":"#/components/schemas/RestSshAccessKey"}},"groupNames":{"type":"array","example":["bitbucket-developers"],"items":{"type":"string","example":"[\"bitbucket-developers\"]"}},"groups":{"type":"array","example":["group_a","group_b"],"items":{"type":"string","example":"[\"group_a\",\"group_b\"]"}},"id":{"type":"integer","format":"int32","readOnly":true,"example":1},"matcher":{"type":"object","properties":{"displayId":{"type":"string","example":"main"},"id":{"type":"string","example":"refs/heads/main"},"type":{"type":"object","properties":{"id":{"type":"string","enum":["ANY_REF","BRANCH","PATTERN","MODEL_CATEGORY","MODEL_BRANCH"]},"name":{"type":"string","example":"Branch"}}}}},"scope":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY","GLOBAL","PROJECT","REPOSITORY"]}},"readOnly":true},"type":{"type":"string","example":"pull-request-only"},"userSlugs":{"type":"array","example":["bman","tstark","hulk"],"items":{"type":"string","example":"[\"bman\",\"tstark\",\"hulk\"]"}},"users":{"type":"array","items":{"$ref":"#/components/schemas/RestApplicationUser"}}}},"RestScope":{"properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY","GLOBAL","PROJECT","REPOSITORY"]}}},"RestSshAccessKey":{"properties":{"key":{"type":"object","properties":{"algorithmType":{"type":"string"},"bitLength":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32","readOnly":true,"example":1},"text":{"type":"string","example":"sh-rsa AAAAB3... me@127.0.0.1"},"label":{"type":"string","readOnly":true,"example":"me@127.0.0.1"}}},"permission":{"type":"string","enum":["USER_ADMIN","PROJECT_VIEW","REPO_READ","REPO_WRITE","REPO_ADMIN","PROJECT_READ","PROJECT_WRITE","REPO_CREATE","PROJECT_ADMIN","LICENSED_USER","PROJECT_CREATE","ADMIN","SYS_ADMIN"]},"project":{"type":"object","properties":{"avatar":{"type":"string"},"avatarUrl":{"type":"string","writeOnly":true},"name":{"pattern":"^[^~].*","type":"string","readOnly":true,"example":"My Cool Project"},"key":{"type":"string","example":"PRJ"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"type":{"type":"string","readOnly":true,"enum":["NORMAL","PERSONAL"]},"description":{"type":"string","readOnly":true,"example":"The description for my cool project"},"namespace":{"type":"string","readOnly":true,"deprecated":true},"scope":{"type":"string","readOnly":true,"example":"PROJECT"},"links":{"type":"object","properties":{},"writeOnly":true}}},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"RestSshKey":{"properties":{"algorithmType":{"type":"string"},"bitLength":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32","readOnly":true,"example":1},"text":{"type":"string","example":"sh-rsa AAAAB3... me@127.0.0.1"},"label":{"type":"string","readOnly":true,"example":"me@127.0.0.1"}}},"RestAccessToken":{"properties":{"createdDate":{"type":"string","format":"date-time"},"id":{"type":"string","example":"252973515069"},"name":{"type":"string","example":"My access token"}}},"RestAccessTokenRequest":{"type":"object","properties":{"expiryDays":{"type":"integer","format":"int32"},"name":{"type":"string","example":"My access token"},"permissions":{"uniqueItems":true,"type":"array","example":["REPO_ADMIN","PROJECT_READ"],"items":{"type":"string","example":"[\"REPO_ADMIN\",\"PROJECT_READ\"]"}}}},"RestAccessTokenSettings":{"type":"object","properties":{"maxExpiryDays":{"type":"integer","format":"int32"}}},"RestRawAccessToken":{"properties":{"token":{"type":"string","example":"MjUyOTczNTE1MDY5On2rDbID2EgYpH8AVOECHv0saruQ"},"createdDate":{"type":"string","format":"date-time"},"id":{"type":"string","example":"252973515069"},"name":{"type":"string","example":"My access token"}}},"RestBulkAddInsightAnnotationRequest":{"type":"object","properties":{"annotations":{"maxItems":2147483647,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/RestSingleAddInsightAnnotationRequest"}}}},"RestInsightAnnotation":{"properties":{"link":{"type":"string","example":"http://example.com/my/file/analysis?line=5"},"externalId":{"type":"string","example":"external.id"},"severity":{"type":"string","example":"HIGH"},"message":{"type":"string","example":"This is an annotation message"},"type":{"type":"string","example":"BUG"},"path":{"type":"string","example":"src/some/structure/file.ext"},"line":{"type":"integer","format":"int32","example":5},"reportKey":{"type":"string","example":"report.key"}}},"RestInsightAnnotationsResponse":{"properties":{"annotations":{"type":"array","items":{"$ref":"#/components/schemas/RestInsightAnnotation"}}}},"RestInsightReport":{"properties":{"link":{"type":"string","format":"uri","example":"http://integration.example.com"},"logoUrl":{"type":"string","format":"uri","example":"http://integration.example.com/logo"},"reporter":{"type":"string","example":"Reporter/tool that produced this report"},"details":{"type":"string","example":"This is the details of the report, it can be a longer string describing the report"},"createdDate":{"type":"number","example":1630041546433},"result":{"type":"string","example":"PASS","enum":["FAIL","PASS"]},"key":{"type":"string","example":"report.key"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RestInsightReportData"}},"title":{"type":"string","example":"report.title"}}},"RestInsightReportData":{"properties":{"value":{"type":"object","example":9},"type":{"pattern":"BOOLEAN|DATE|DURATION|LINK|NUMBER|PERCENTAGE|TEXT","type":"string","example":"NUMBER"},"title":{"type":"string","example":"data.title"}}},"RestSetInsightReportRequest":{"required":["data","title"],"type":"object","properties":{"coverageProviderKey":{"type":"string"},"createdDate":{"type":"integer","format":"int64","example":1630041546433},"data":{"maxItems":6,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/RestInsightReportData"}},"details":{"type":"string","example":"This is the details of the report, it can be a longer string describing the report."},"link":{"type":"string","example":"http://insight.example.com"},"logoUrl":{"type":"string","example":"http://insight.example.com/logo"},"reporter":{"maxLength":450,"minLength":0,"type":"string","example":"Reporter/tool that produced this report"},"result":{"pattern":"FAIL|PASS","type":"string","example":"PASS"},"title":{"maxLength":450,"minLength":0,"type":"string","example":"report.title"}}},"RestSingleAddInsightAnnotationRequest":{"required":["message","severity"],"type":"object","properties":{"externalId":{"maxLength":450,"minLength":0,"type":"string","example":"message-1"},"line":{"minimum":0,"type":"integer","format":"int32","example":4},"link":{"type":"string","example":"https://link.to.tool/that/produced/annotation/message-1"},"message":{"maxLength":2000,"minLength":0,"type":"string","example":"This is a bug here because reasons"},"path":{"maxLength":50000,"minLength":0,"type":"string","example":"path/to/file/in/repo"},"severity":{"pattern":"LOW|MEDIUM|HIGH","type":"string","example":"MEDIUM"},"type":{"pattern":"VULNERABILITY|CODE_SMELL|BUG","type":"string","example":"CODE_SMELL"}}},"EnrichedRepository":{"properties":{"properties":{"type":"object","properties":{"defaultBranchId":{"type":"string","example":"refs/heads/master"},"contentHash":{"type":"string","example":"457389a0b871fb61012a7351d09aefc0cf1c57c306449d4b5df4d2f381df8433"},"metadataHash":{"type":"string","example":"11e5cd17e8d74d84a11f2c8a6bbc6ae0a2b69059e54030f49214c94d980364c1"}}},"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestAnalyticsSettings":{"properties":{"supportEntitlementNumber":{"type":"string","example":"SEN-500"},"canCollectAnalytics":{"type":"boolean"},"serverTime":{"type":"integer","format":"int64","example":1640390400000}}},"RestApplicationUserWithPermissions":{"properties":{"effectivePermissions":{"type":"object"},"slug":{"type":"string","example":"jcitizen"},"displayName":{"type":"string","example":"Jane Citizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"emailAddress":{"type":"string","example":"jane@example.com"},"name":{"type":"string","example":"jcitizen"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}},"RestAuthenticationRequest":{"required":["credentials"],"type":"object","properties":{"credentials":{"$ref":"#/components/schemas/RestUsernamePasswordCredentials"},"repositoryId":{"type":"integer","format":"int32"}}},"RestMirrorServer":{"properties":{"lastSeenDate":{"type":"string","format":"date-time"},"productVersion":{"type":"string","example":"8.0.0"},"mirrorType":{"type":"string","enum":["SINGLE","FARM"]},"productType":{"type":"string","example":"Bitbucket"},"name":{"type":"string","example":"Mirror"},"id":{"type":"string","example":"B0F5-CS21-45C2-CCK3"},"enabled":{"type":"boolean"},"baseUrl":{"type":"string","example":"http://vietnam.example.com"}}},"RestMirrorUpgradeRequest":{"type":"object","properties":{"addonDescriptorUri":{"type":"string","format":"uri","example":"https://bitbucket-eu.example.com:7990/bitbucket/rest/mirroring/1.0/descriptor"},"baseUrl":{"type":"string","example":"https://bitbucket-eu.example.com:7990/bitbucket"},"productType":{"type":"string","example":"Bitbucket"},"productVersion":{"type":"string","example":"8.0.0"}}},"RestMirroredRepositoryDescriptor":{"properties":{"mirrorServer":{"required":["lastSeenDate"],"type":"object","properties":{"lastSeenDate":{"type":"string","format":"date-time"},"productVersion":{"type":"string","example":"8.0.0"},"mirrorType":{"type":"string","enum":["SINGLE","FARM"]},"productType":{"type":"string","example":"Bitbucket"},"name":{"type":"string","example":"Mirror"},"id":{"type":"string","example":"B0F5-CS21-45C2-CCK3"},"enabled":{"type":"boolean"},"baseUrl":{"type":"string","example":"http://vietnam.example.com"}}},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestMirroringRequest":{"properties":{"productVersion":{"type":"string","example":"8.0.0"},"mirrorType":{"type":"string","enum":["SINGLE","FARM"]},"productType":{"type":"string","example":"Bitbucket"},"mirrorId":{"type":"string","example":"4f0eb5fc-67fc-48f8-b4a7-87981f026c6a"},"mirrorName":{"type":"string","example":"Bitbucket Mirror"},"addonDescriptorUri":{"type":"string","example":"https://bitbucket-eu.example.com:7990/bitbucket/rest/mirroring/1.0/descriptor"},"mirrorBaseUrl":{"type":"string","example":"https://bitbucket-eu.example.com:7990/bitbucket"},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","enum":["PENDING","ACCEPTED","REJECTED"]}}},"RestProperties":{"properties":{"defaultBranchId":{"type":"string","example":"refs/heads/master"},"contentHash":{"type":"string","example":"457389a0b871fb61012a7351d09aefc0cf1c57c306449d4b5df4d2f381df8433"},"metadataHash":{"type":"string","example":"11e5cd17e8d74d84a11f2c8a6bbc6ae0a2b69059e54030f49214c94d980364c1"}}},"RestRepositoryMirrorEvent":{"type":"object","properties":{"mirrorRepoId":{"type":"integer","format":"int32","example":42},"type":{"type":"string","enum":["SYNCHRONIZED","SYNCHRONIZATION_FAILED"]},"upstreamRepoId":{"type":"string","example":"24"}}},"RestUsernamePasswordCredentials":{"required":["password","username"],"type":"object","properties":{"password":{"type":"string","example":"secr3t"},"username":{"type":"string","example":"user1"}}},"RestSshAccessKeyLocations":{"type":"object","properties":{"projects":{"$ref":"#/components/schemas/RestProject"},"repositories":{"$ref":"#/components/schemas/RestRepository"}}},"RestSshSettings":{"properties":{"accessKeysEnabled":{"type":"boolean"},"fingerprint":{"$ref":"#/components/schemas/SimpleSshKeyFingerprint"},"port":{"type":"integer","format":"int32","example":7999},"enabled":{"type":"boolean","example":true},"baseUrl":{"type":"string","example":"ssh://example.com"}}},"SimpleSshKeyFingerprint":{"properties":{"algorithm":{"type":"string"},"value":{"type":"string"}}},"AdminPasswordUpdate":{"type":"object","properties":{"name":{"type":"string","example":"jcitizen"},"password":{"type":"string","writeOnly":true,"example":"my-secret-password"},"passwordConfirm":{"type":"string","writeOnly":true,"example":"my-secret-password"}}},"ApplicationUser":{"properties":{"slug":{"type":"string"},"displayName":{"type":"string"},"id":{"type":"integer","format":"int32"},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"emailAddress":{"type":"string"},"name":{"type":"string"}}},"EntityHolderRestPullRequestDeclineRequest":{"type":"object","properties":{"entity":{"type":"object","properties":{"comment":{"type":"string","example":"An optional comment explaining why the pull request is being declined"},"version":{"type":"integer","format":"int32"}}}}},"EntityHolderRestPullRequestMergeRequest":{"type":"object","properties":{"entity":{"type":"object","properties":{"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"},"context":{"type":"object"},"message":{"type":"string","example":"(Optional) A descriptive message for the merge commit"},"strategyId":{"type":"string","example":"(Optional) squash"},"version":{"type":"integer","format":"int32"}}}}},"EntityHolderRestPullRequestReopenRequest":{"type":"object","properties":{"entity":{"type":"object","properties":{"version":{"type":"integer","format":"int32"}}}}},"ExampleAvatarMultipartFormData":{"type":"object","properties":{"avatar":{"type":"string","description":"The avatar file to upload.","format":"binary"}}},"ExampleFiles":{"properties":{"files":{"$ref":"#/components/schemas/ExampleJsonLastModifiedCallback"}}},"ExampleJsonLastModifiedCallback":{"properties":{"latestCommit":{"type":"object","properties":{"committer":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"authorTimestamp":{"type":"integer","format":"int64","example":1359075920},"committerTimestamp":{"type":"integer","format":"int64","example":1449075830},"author":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"message":{"type":"string","example":"More work on feature 1"},"parents":{"type":"array","items":{"$ref":"#/components/schemas/RestMinimalCommit"}},"displayId":{"type":"string","example":"abcdef0"},"id":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"}}},"pomXml":{"type":"object","properties":{"committer":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"authorTimestamp":{"type":"integer","format":"int64","example":1359075920},"committerTimestamp":{"type":"integer","format":"int64","example":1449075830},"author":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"message":{"type":"string","example":"More work on feature 1"},"parents":{"type":"array","items":{"$ref":"#/components/schemas/RestMinimalCommit"}},"displayId":{"type":"string","example":"abcdef0"},"id":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"}}},"readmeMd":{"type":"object","properties":{"committer":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"authorTimestamp":{"type":"integer","format":"int64","example":1359075920},"committerTimestamp":{"type":"integer","format":"int64","example":1449075830},"author":{"type":"object","properties":{"avatarUrl":{"type":"string","writeOnly":true},"emailAddress":{"type":"string","example":"charlie@example.com"},"name":{"type":"string","example":"Charlie"}}},"message":{"type":"string","example":"More work on feature 1"},"parents":{"type":"array","items":{"$ref":"#/components/schemas/RestMinimalCommit"}},"displayId":{"type":"string","example":"abcdef0"},"id":{"type":"string","example":"abcdef0123abcdef4567abcdef8987abcdef6543"}}}}},"ExampleMultipartFormData":{"type":"object","properties":{"branch":{"type":"string","description":"The branch on which the path should be modified or created."},"content":{"type":"string","description":"The full content of the file at path."},"message":{"type":"string","description":"The message associated with this change, to be used as the commit message. Or null if the default message should be used."},"sourceBranch":{"type":"string","description":"The starting point for branch. If provided and different from branch, branch will be created as a new branch, branching off from sourceBranch."},"sourceCommitId":{"type":"string","description":"The commit ID of the file before it was edited, used to identify if content has changed. Or null if this is a new file"}}},"ExamplePostMultipartFormData":{"type":"object","properties":{"content":{"type":"string","description":"The hook script contents."},"description":{"type":"string","description":"A description of the hook script (useful when querying registered hook scripts)."},"name":{"type":"string","description":"The name of the hook script (useful when querying registered hook scripts)."},"type":{"type":"string","description":"The type of hook script; supported values are \"PRE\" for pre-receive hooks and \"POST\" for post-receive hooks."}}},"ExamplePreviewMigration":{"properties":{"repositories":{"type":"array","items":{"$ref":"#/components/schemas/RestRepository"}}}},"ExamplePutMultipartFormData":{"type":"object","properties":{"content":{"type":"string","description":"The hook script contents."},"description":{"type":"string","description":"A description of the hook script (useful when querying registered hook scripts)."},"name":{"type":"string","description":"The name of the hook script (useful when querying registered hook scripts)."}}},"ExampleRequirements":{"properties":{"count":{"type":"string","example":"3"},"enabled":{"type":"boolean","example":true}}},"ExampleSettings":{"properties":{"stringValue":{"type":"string","example":"This is an arbitrary string"},"booleanValue":{"type":"boolean","example":true},"doubleValue":{"type":"number","format":"double","example":1.1},"integerValue":{"type":"integer","format":"int32","example":1},"longValue":{"type":"integer","format":"int64","example":-2147483648}}},"ExampleSettingsMap":{"properties":{"string key":{"type":"string","example":"string value"},"boolean key":{"type":"boolean","example":true},"long key":{"type":"number","example":10}}},"ExampleSocketAddress":{"properties":{"address":{"type":"string","example":"node.example.com"},"port":{"type":"integer","format":"int32","example":8230}}},"ExampleStatus":{"properties":{"serverId":{"type":"string","example":""},"currentNumberOfUsers":{"type":"integer","format":"int32","example":2}}},"FileListResource":{},"FilePart":{"type":"object","properties":{"contentType":{"type":"string"},"formField":{"type":"boolean"},"inputStream":{"type":"object"},"name":{"type":"string"},"size":{"type":"integer","format":"int64"},"value":{"type":"string"}}},"Group":{"properties":{"name":{"type":"string","example":"group_a"}}},"GroupAndUsers":{"required":["users"],"type":"object","properties":{"group":{"type":"string","example":"group"},"users":{"uniqueItems":true,"type":"array","example":["user1","user2"],"items":{"type":"string"}}}},"RepositoryHookDetails":{"properties":{"configFormKey":{"type":"string"},"supportedScopes":{"uniqueItems":true,"type":"array","items":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY"]}},"version":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"type":{"type":"string","enum":["PRE_RECEIVE","PRE_PULL_REQUEST_MERGE","POST_RECEIVE"]},"description":{"type":"string"}}},"RestAggregateRejectCounter":{"properties":{"lastRejectTime":{"type":"number","example":1630041546433},"rejectCount":{"type":"integer","format":"int64","example":5},"user":{"type":"object","properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}}}},"RestAnnouncementBanner":{"properties":{"audience":{"type":"string","enum":["AUTHENTICATED","ALL"]},"message":{"type":"string"},"enabled":{"type":"boolean"}}},"RestApplicationProperties":{"properties":{"buildDate":{"type":"string","example":"1358897885952000"},"displayName":{"type":"string","example":"Example.com Bitbucket"},"version":{"type":"string","example":"2.1.0"},"buildNumber":{"type":"string","example":"20220123103656677"}}},"RestApplySuggestionRequest":{"type":"object","properties":{"commentVersion":{"type":"object","properties":{"asInt":{"type":"integer","format":"int32"},"present":{"type":"boolean"}},"example":0},"commitMessage":{"type":"string","example":"A commit message"},"pullRequestVersion":{"type":"object","properties":{"asInt":{"type":"integer","format":"int32"},"present":{"type":"boolean"}},"example":1},"suggestionIndex":{"type":"object","properties":{"asInt":{"type":"integer","format":"int32"},"present":{"type":"boolean"}},"example":2}}},"RestAttachmentMetadata":{"properties":{"id":{"type":"integer","format":"int64","example":1},"url":{"type":"string","example":"test.com/test"},"metadata":{"type":"string","example":"{\\\"A\\\":\\\"B\\\"}"}}},"RestAutoDeclineSettings":{"properties":{"inactivityWeeks":{"type":"integer","format":"int32","example":4},"scope":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY","GLOBAL","PROJECT","REPOSITORY"]}}},"enabled":{"type":"boolean","example":true}}},"RestAutoDeclineSettingsRequest":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"inactivityWeeks":{"type":"integer","format":"int32","example":4}}},"RestBitbucketLicense":{"properties":{"serverId":{"type":"string","readOnly":true,"example":""},"creationDate":{"type":"integer","format":"int64","readOnly":true,"example":1331038800000},"daysBeforeExpiry":{"type":"integer","format":"int32","readOnly":true},"expiryDate":{"type":"integer","format":"int64","readOnly":true,"example":1372493732817},"gracePeriodEndDate":{"type":"integer","format":"int64","readOnly":true,"example":1372493732817},"maintenanceExpiryDate":{"type":"integer","format":"int64","readOnly":true,"example":1372493732817},"maximumNumberOfUsers":{"type":"integer","format":"int32","readOnly":true,"example":12},"numberOfDaysBeforeExpiry":{"type":"integer","format":"int32","readOnly":true},"numberOfDaysBeforeGracePeriodExpiry":{"type":"integer","format":"int32","readOnly":true},"numberOfDaysBeforeMaintenanceExpiry":{"type":"integer","format":"int32","readOnly":true},"purchaseDate":{"type":"integer","format":"int64","readOnly":true,"example":1331038800000},"supportEntitlementNumber":{"type":"string","readOnly":true,"example":""},"unlimitedNumberOfUsers":{"type":"boolean","readOnly":true},"status":{"type":"object","properties":{"serverId":{"type":"string","example":""},"currentNumberOfUsers":{"type":"integer","format":"int32","example":2}},"readOnly":true},"license":{"type":"string","example":""}}},"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":{"srcPath":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"conflict":{"type":"object","properties":{"ourChange":{"type":"object","properties":{"srcPath":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}}}},"theirChange":{"type":"object","properties":{"srcPath":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}}}}}},"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":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"nodeType":{"type":"string","enum":["DIRECTORY","FILE","SUBMODULE"]},"executable":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestClusterInformation":{"properties":{"localNode":{"type":"object","properties":{"buildVersion":{"type":"string","example":"7.0.0"},"name":{"type":"string","example":"foo"},"id":{"type":"string","example":"d4fde8b1-2504-4998-a0ba-14fbe98edd4d"},"address":{"type":"object","properties":{"address":{"type":"string","example":"node.example.com"},"port":{"type":"integer","format":"int32","example":8230}}},"local":{"type":"boolean"}}},"running":{"type":"boolean"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/RestClusterNode"}}}},"RestComment":{"properties":{"reply":{"type":"boolean","readOnly":true},"pending":{"type":"boolean","readOnly":true},"anchored":{"type":"boolean","readOnly":true},"html":{"type":"string","readOnly":true},"anchor":{"type":"object","properties":{"diffType":{"type":"string","enum":["COMMIT","EFFECTIVE","RANGE"]},"lineComment":{"type":"boolean","readOnly":true},"fileType":{"type":"string","enum":["FROM","TO"]},"lineType":{"type":"string","enum":["ADDED","CONTEXT","REMOVED"]},"fromHash":{"type":"string","example":"62a0505e8204115b8b9c8a95bfa264a8c0896a93"},"srcPath":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"toHash":{"type":"string","example":"3cdd5d19178a54d2e51b5098d43b57571241d0ab"},"pullRequest":{"type":"object","properties":{"fromRef":{"type":"object","properties":{"displayId":{"type":"string","example":"feature-ABC-1233"},"latestCommit":{"type":"string","example":"babecafebabecafebabecafebabecafebabecafe"},"id":{"type":"string","example":"refs/heads/feature-ABC-123"},"type":{"type":"string","enum":["BRANCH","TAG"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"toRef":{"type":"object","properties":{"displayId":{"type":"string","example":"feature-ABC-1233"},"latestCommit":{"type":"string","example":"babecafebabecafebabecafebabecafebabecafe"},"id":{"type":"string","example":"refs/heads/feature-ABC-123"},"type":{"type":"string","enum":["BRANCH","TAG"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"participants":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestParticipant"}},"reviewers":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestParticipant"}},"htmlDescription":{"type":"string","writeOnly":true},"closedDate":{"type":"integer","format":"int64","example":19990759200},"createdDate":{"type":"integer","format":"int64","example":13590759200},"updatedDate":{"type":"integer","format":"int64","example":14490759200},"version":{"type":"integer","format":"int32"},"open":{"type":"boolean"},"id":{"type":"integer","format":"int64","example":1},"state":{"type":"string","enum":["DECLINED","MERGED","OPEN"]},"locked":{"type":"boolean"},"description":{"type":"string","example":"It is a kludge, but put the tuple from the database in the cache."},"closed":{"type":"boolean"},"title":{"type":"string","example":"Talking Nerdy"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"path":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"line":{"type":"integer","format":"int32","example":98}},"readOnly":true},"createdDate":{"type":"integer","format":"int64","readOnly":true,"example":1359075920},"author":{"type":"object","properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}},"readOnly":true},"updatedDate":{"type":"integer","format":"int64","readOnly":true,"example":1449075920},"version":{"type":"integer","format":"int32","example":1},"severity":{"type":"string","example":"NORMAL"},"parent":{"type":"object","properties":{"reply":{"type":"boolean","readOnly":true},"pending":{"type":"boolean","readOnly":true},"anchored":{"type":"boolean","readOnly":true},"html":{"type":"string","readOnly":true},"anchor":{"type":"object","properties":{"diffType":{"type":"string","enum":["COMMIT","EFFECTIVE","RANGE"]},"lineComment":{"type":"boolean","readOnly":true},"fileType":{"type":"string","enum":["FROM","TO"]},"lineType":{"type":"string","enum":["ADDED","CONTEXT","REMOVED"]},"fromHash":{"type":"string","example":"62a0505e8204115b8b9c8a95bfa264a8c0896a93"},"srcPath":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"toHash":{"type":"string","example":"3cdd5d19178a54d2e51b5098d43b57571241d0ab"},"pullRequest":{"type":"object","properties":{"fromRef":{"type":"object","properties":{"displayId":{"type":"string","example":"feature-ABC-1233"},"latestCommit":{"type":"string","example":"babecafebabecafebabecafebabecafebabecafe"},"id":{"type":"string","example":"refs/heads/feature-ABC-123"},"type":{"type":"string","enum":["BRANCH","TAG"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"toRef":{"type":"object","properties":{"displayId":{"type":"string","example":"feature-ABC-1233"},"latestCommit":{"type":"string","example":"babecafebabecafebabecafebabecafebabecafe"},"id":{"type":"string","example":"refs/heads/feature-ABC-123"},"type":{"type":"string","enum":["BRANCH","TAG"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"participants":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestParticipant"}},"reviewers":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestParticipant"}},"htmlDescription":{"type":"string","writeOnly":true},"closedDate":{"type":"integer","format":"int64","example":19990759200},"createdDate":{"type":"integer","format":"int64","example":13590759200},"updatedDate":{"type":"integer","format":"int64","example":14490759200},"version":{"type":"integer","format":"int32"},"open":{"type":"boolean"},"id":{"type":"integer","format":"int64","example":1},"state":{"type":"string","enum":["DECLINED","MERGED","OPEN"]},"locked":{"type":"boolean"},"description":{"type":"string","example":"It is a kludge, but put the tuple from the database in the cache."},"closed":{"type":"boolean"},"title":{"type":"string","example":"Talking Nerdy"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"path":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"line":{"type":"integer","format":"int32","example":98}},"readOnly":true},"createdDate":{"type":"integer","format":"int64","readOnly":true,"example":1359075920},"author":{"type":"object","properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}},"readOnly":true},"updatedDate":{"type":"integer","format":"int64","readOnly":true,"example":1449075920},"version":{"type":"integer","format":"int32","example":1},"severity":{"type":"string","example":"NORMAL"},"id":{"type":"integer","format":"int64","example":1},"state":{"type":"string","example":"OPEN"},"text":{"type":"string","example":"An insightful comment."},"comments":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/RestComment"}},"properties":{"type":"object"}},"readOnly":true},"id":{"type":"integer","format":"int64","example":1},"state":{"type":"string","example":"OPEN"},"text":{"type":"string","example":"An insightful comment."},"comments":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/RestComment"}},"properties":{"type":"object"}}},"RestCommentThreadDiffAnchor":{"properties":{"diffType":{"type":"string","enum":["COMMIT","EFFECTIVE","RANGE"]},"lineComment":{"type":"boolean","readOnly":true},"fileType":{"type":"string","enum":["FROM","TO"]},"lineType":{"type":"string","enum":["ADDED","CONTEXT","REMOVED"]},"fromHash":{"type":"string","example":"62a0505e8204115b8b9c8a95bfa264a8c0896a93"},"srcPath":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"toHash":{"type":"string","example":"3cdd5d19178a54d2e51b5098d43b57571241d0ab"},"pullRequest":{"type":"object","properties":{"fromRef":{"type":"object","properties":{"displayId":{"type":"string","example":"feature-ABC-1233"},"latestCommit":{"type":"string","example":"babecafebabecafebabecafebabecafebabecafe"},"id":{"type":"string","example":"refs/heads/feature-ABC-123"},"type":{"type":"string","enum":["BRANCH","TAG"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"toRef":{"type":"object","properties":{"displayId":{"type":"string","example":"feature-ABC-1233"},"latestCommit":{"type":"string","example":"babecafebabecafebabecafebabecafebabecafe"},"id":{"type":"string","example":"refs/heads/feature-ABC-123"},"type":{"type":"string","enum":["BRANCH","TAG"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"participants":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestParticipant"}},"reviewers":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestParticipant"}},"htmlDescription":{"type":"string","writeOnly":true},"closedDate":{"type":"integer","format":"int64","example":19990759200},"createdDate":{"type":"integer","format":"int64","example":13590759200},"updatedDate":{"type":"integer","format":"int64","example":14490759200},"version":{"type":"integer","format":"int32"},"open":{"type":"boolean"},"id":{"type":"integer","format":"int64","example":1},"state":{"type":"string","enum":["DECLINED","MERGED","OPEN"]},"locked":{"type":"boolean"},"description":{"type":"string","example":"It is a kludge, but put the tuple from the database in the cache."},"closed":{"type":"boolean"},"title":{"type":"string","example":"Talking Nerdy"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"path":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"line":{"type":"integer","format":"int32","example":98}}},"RestConflict":{"properties":{"ourChange":{"type":"object","properties":{"srcPath":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}}}},"theirChange":{"type":"object","properties":{"srcPath":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}}}}}},"RestConflictChange":{"properties":{"srcPath":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"type":{"type":"string","enum":["ADD","COPY","DELETE","MODIFY","MOVE","UNKNOWN"]},"path":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}}}},"RestConnectivitySummary":{"properties":{"reachable":{"type":"boolean","example":true},"roundTripTime":{"type":"integer","format":"int64","example":100},"errorMessage":{"type":"string","example":"Unable to connect to the node."}}},"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":{"environment":{"required":["displayName","key"],"type":"object","properties":{"displayName":{"maxLength":255,"minLength":0,"type":"string","example":"US East Mirror"},"key":{"maxLength":255,"minLength":0,"type":"string","example":"us-east-mirror"},"type":{"pattern":"DEVELOPMENT|TESTING|STAGING|PRODUCTION","type":"string","example":"production"},"url":{"maxLength":1024,"minLength":0,"type":"string","example":"https://foo-bar.production/us-east"}}},"deploymentSequenceNumber":{"type":"integer","format":"int64","example":5},"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"}}},"displayName":{"type":"string","example":"US East Mirror"},"key":{"type":"string","example":"PROD-MIR"},"state":{"type":"string","enum":["PENDING","IN_PROGRESS","CANCELLED","FAILED","ROLLED_BACK","SUCCESSFUL","UNKNOWN"]},"description":{"type":"string","example":"Production and mirror environments"},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}},"url":{"type":"string","example":"http://example.ci.org/projects/PROJ/deploy/mirror-deploy/100"},"lastUpdated":{"type":"integer","format":"int64","example":1449075920}}},"RestDeploymentEnvironment":{"properties":{"displayName":{"maxLength":255,"minLength":0,"type":"string","example":"US East Mirror"},"key":{"maxLength":255,"minLength":0,"type":"string","example":"us-east-mirror"},"type":{"pattern":"DEVELOPMENT|TESTING|STAGING|PRODUCTION","type":"string","example":"production"},"url":{"maxLength":1024,"minLength":0,"type":"string","example":"https://foo-bar.production/us-east"}}},"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":{}},"RestDetailedUser":{"properties":{"directoryName":{"type":"string","example":"Bitbucket Internal Directory"},"lastAuthenticationTimestamp":{"type":"number","example":1368145580548},"mutableDetails":{"type":"boolean"},"mutableGroups":{"type":"boolean"},"deletable":{"type":"boolean"},"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}},"RestDiff":{"properties":{"hunks":{"type":"array","items":{"$ref":"#/components/schemas/RestDiffHunk"}},"truncated":{"type":"boolean"},"lineComments":{"type":"array","items":{"$ref":"#/components/schemas/RestComment"}},"source":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"binary":{"type":"boolean"},"destination":{"type":"object","properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"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":{"truncated":{"type":"boolean"},"conflictMarker":{"type":"string","enum":["MARKER","OURS","THEIRS"]},"commentIds":{"type":"array","items":{"type":"integer","format":"int64"}},"source":{"type":"integer","format":"int32"},"line":{"type":"string"},"destination":{"type":"integer","format":"int32"}}},"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":{"createdDate":{"type":"string","format":"date-time"},"updatedDate":{"type":"string","format":"date-time"},"version":{"type":"integer","format":"int32"},"name":{"type":"string"},"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["POST","PRE"]},"description":{"type":"string"},"pluginKey":{"type":"string"}}},"RestHookScriptConfig":{"properties":{"script":{"type":"object","properties":{"createdDate":{"type":"string","format":"date-time"},"updatedDate":{"type":"string","format":"date-time"},"version":{"type":"integer","format":"int32"},"name":{"type":"string"},"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["POST","PRE"]},"description":{"type":"string"},"pluginKey":{"type":"string"}}},"scope":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY","GLOBAL","PROJECT","REPOSITORY"]}}},"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":{}},"RestJob":{"properties":{"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":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}},"updatedDate":{"type":"integer","format":"int64","example":1497657603000},"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":{"createdDate":{"type":"string","format":"date-time"},"severity":{"type":"string","enum":["INFO","WARN","ERROR"]},"subject":{"type":"string","example":"job"},"id":{"type":"string","example":"617"},"text":{"type":"string","example":"Something of interest happened"}}},"RestLabel":{"properties":{"name":{"type":"string","example":"labelName"}}},"RestLabelable":{"properties":{"labelableType":{"type":"string","enum":["REPOSITORY"]},"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestLogLevel":{"properties":{"logLevel":{"type":"string","example":"DEBUG"}}},"RestMailConfiguration":{"properties":{"senderAddress":{"type":"string","example":"stash-no-reply@company.com"},"hostname":{"type":"string","example":"smtp.example.com"},"requireStartTls":{"type":"boolean"},"useStartTls":{"type":"boolean"},"port":{"type":"integer","format":"int32","example":465},"protocol":{"type":"string","enum":["SMTP","SMTPS"]},"password":{"type":"string","example":"password"},"username":{"type":"string","example":"user"}}},"RestMarkup":{"properties":{"html":{"type":"string","example":"

Hello World!

"}}},"RestMeshConnectivityReport":{"properties":{"reports":{"type":"array","items":{"$ref":"#/components/schemas/RestNodeConnectivityReport"}}}},"RestMeshMigrationQueueStateCounts":{"properties":{}},"RestMeshMigrationRequest":{"type":"object","properties":{"all":{"type":"boolean"},"maxBytesPerSecond":{"type":"object","properties":{"asLong":{"type":"integer","format":"int64"},"present":{"type":"boolean"}}},"projectIds":{"uniqueItems":true,"type":"array","items":{"type":"integer","format":"int32"}},"repositoryIds":{"uniqueItems":true,"type":"array","items":{"type":"integer","format":"int32"}}}},"RestMeshMigrationSummary":{"properties":{"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"},"startTime":{"type":"integer","format":"int64","example":1331038800000}}},"RestMeshNode":{"properties":{"rpcUrl":{"type":"string","example":"http://127.0.0.1:7999"},"lastSeenDate":{"type":"number","example":1630041546433},"rpcId":{"type":"string","example":"1"},"name":{"type":"string","example":"My node"},"id":{"type":"string","example":"1"},"offline":{"type":"boolean","example":false}}},"RestMigrationRepository":{"properties":{"migrationState":{"type":"string","enum":["QUEUED","STAGING","STAGED","MIGRATED","FAILED","CANCELED","SKIPPED"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"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":{"reachable":{"type":"boolean","example":true},"roundTripTime":{"type":"integer","format":"int64","example":100},"errorMessage":{"type":"string","example":"Unable to connect to the node."}}},"node":{"type":"object","properties":{"name":{"type":"string","example":"My Node"},"id":{"type":"string","example":"1"},"type":{"type":"string","enum":["BITBUCKET","MESH"]}}}}},"RestPath":{"properties":{"extension":{"type":"string","example":"txt"},"name":{"type":"string","example":"file.txt"},"parent":{"type":"string","example":"path/to"},"components":{"type":"array","example":["path","to","file.txt"],"items":{"type":"string"}}}},"RestPermitted":{"properties":{"permitted":{"type":"boolean","example":true}}},"RestPermittedGroup":{"properties":{"permission":{"type":"string","example":"ADMIN"},"group":{"type":"object","properties":{"name":{"type":"string","example":"group_a"}}}}},"RestPermittedUser":{"properties":{"user":{"type":"object","properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"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..."}}},"RestPullRequest":{"properties":{"fromRef":{"type":"object","properties":{"displayId":{"type":"string","example":"feature-ABC-1233"},"latestCommit":{"type":"string","example":"babecafebabecafebabecafebabecafebabecafe"},"id":{"type":"string","example":"refs/heads/feature-ABC-123"},"type":{"type":"string","enum":["BRANCH","TAG"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"toRef":{"type":"object","properties":{"displayId":{"type":"string","example":"feature-ABC-1233"},"latestCommit":{"type":"string","example":"babecafebabecafebabecafebabecafebabecafe"},"id":{"type":"string","example":"refs/heads/feature-ABC-123"},"type":{"type":"string","enum":["BRANCH","TAG"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"participants":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestParticipant"}},"reviewers":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestParticipant"}},"htmlDescription":{"type":"string","writeOnly":true},"closedDate":{"type":"integer","format":"int64","example":19990759200},"createdDate":{"type":"integer","format":"int64","example":13590759200},"updatedDate":{"type":"integer","format":"int64","example":14490759200},"version":{"type":"integer","format":"int32"},"open":{"type":"boolean"},"id":{"type":"integer","format":"int64","example":1},"state":{"type":"string","enum":["DECLINED","MERGED","OPEN"]},"locked":{"type":"boolean"},"description":{"type":"string","example":"It is a kludge, but put the tuple from the database in the cache."},"closed":{"type":"boolean"},"title":{"type":"string","example":"Talking Nerdy"},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestPullRequestActivity":{"properties":{"action":{"type":"string","enum":["APPROVED","COMMENTED","DECLINED","DELETED","MERGED","OPENED","REOPENED","RESCOPED","REVIEW_COMMENTED","REVIEW_DISCARDED","REVIEW_FINISHED","REVIEWED","UNAPPROVED","UPDATED"]},"user":{"type":"object","properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}},"createdDate":{"type":"integer","format":"int64","example":19990759200},"id":{"type":"integer","format":"int64","example":1}}},"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"}},"commitSummaries":{"type":"integer","format":"int32"},"defaultStrategy":{"type":"object","properties":{"flag":{"type":"string","readOnly":true,"example":"--no-ff"},"name":{"type":"string","readOnly":true,"example":"Merge commit"},"id":{"type":"string","example":"no-ff"},"enabled":{"type":"boolean","readOnly":true},"description":{"type":"string","readOnly":true,"example":"Always create a merge commit"},"links":{"type":"object","properties":{},"writeOnly":true}}},"type":{"type":"string","readOnly":true,"example":"repository"}}},"RestPullRequestMergeRequest":{"type":"object","properties":{"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"},"context":{"type":"object"},"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":{"flag":{"type":"string","readOnly":true,"example":"--no-ff"},"name":{"type":"string","readOnly":true,"example":"Merge commit"},"id":{"type":"string","example":"no-ff"},"enabled":{"type":"boolean","readOnly":true},"description":{"type":"string","readOnly":true,"example":"Always create a merge commit"},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestPullRequestMergeability":{"properties":{"outcome":{"type":"string","enum":["CLEAN","CONFLICTED","UNKNOWN"]},"vetoes":{"type":"array","items":{"$ref":"#/components/schemas/RestRepositoryHookVeto"}},"conflicted":{"type":"boolean"}}},"RestPullRequestParticipant":{"properties":{"lastReviewedCommit":{"type":"string","example":"7549846524f8aed2bd1c0249993ae1bf9d3c9998"},"approved":{"type":"boolean"},"user":{"type":"object","properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}},"status":{"type":"string","enum":["UNAPPROVED","NEEDS_WORK","APPROVED"]},"role":{"type":"string","enum":["AUTHOR","REVIEWER","PARTICIPANT"]}}},"RestPullRequestRef":{"properties":{"displayId":{"type":"string","example":"feature-ABC-1233"},"latestCommit":{"type":"string","example":"babecafebabecafebabecafebabecafebabecafe"},"id":{"type":"string","example":"refs/heads/feature-ABC-123"},"type":{"type":"string","enum":["BRANCH","TAG"]},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"RestPullRequestReopenRequest":{"type":"object","properties":{"version":{"type":"integer","format":"int32"}}},"RestPullRequestSettings":{"properties":{"mergeConfig":{"type":"object","properties":{"strategies":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestMergeStrategy"}},"commitSummaries":{"type":"integer","format":"int32"},"defaultStrategy":{"type":"object","properties":{"flag":{"type":"string","readOnly":true,"example":"--no-ff"},"name":{"type":"string","readOnly":true,"example":"Merge commit"},"id":{"type":"string","example":"no-ff"},"enabled":{"type":"boolean","readOnly":true},"description":{"type":"string","readOnly":true,"example":"Always create a merge commit"},"links":{"type":"object","properties":{},"writeOnly":true}}},"type":{"type":"string","readOnly":true,"example":"repository"}}}}},"RestPullRequestSuggestion":{"properties":{"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"]}}}}},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}}}},"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":{"defaultSettings":{"type":"object","properties":{"capacity":{"type":"integer","format":"int32","example":60},"fillRate":{"type":"integer","format":"int32","example":5}}},"enabled":{"type":"boolean"}}},"RestRepositoriesExportRequest":{"required":["includes"],"type":"object","properties":{"includes":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/RestRepositorySelector"}}}},"RestRepositoryHook":{"properties":{"details":{"$ref":"#/components/schemas/RepositoryHookDetails"},"configured":{"type":"boolean"},"enabled":{"type":"boolean"},"scope":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY","GLOBAL","PROJECT","REPOSITORY"]}}}}},"RestRepositoryPullRequestSettings":{"properties":{"mergeConfig":{"type":"object","properties":{"strategies":{"type":"array","items":{"$ref":"#/components/schemas/RestPullRequestMergeStrategy"}},"commitSummaries":{"type":"integer","format":"int32"},"defaultStrategy":{"type":"object","properties":{"flag":{"type":"string","readOnly":true,"example":"--no-ff"},"name":{"type":"string","readOnly":true,"example":"Merge commit"},"id":{"type":"string","example":"no-ff"},"enabled":{"type":"boolean","readOnly":true},"description":{"type":"string","readOnly":true,"example":"Always create a merge commit"},"links":{"type":"object","properties":{},"writeOnly":true}}},"type":{"type":"string","readOnly":true,"example":"repository"}}},"requiredAllApprovers":{"type":"boolean"},"requiredApproversDeprecated":{"type":"integer","format":"int32"},"requiredSuccessfulBuilds":{"type":"object","properties":{"count":{"type":"string","example":"3"},"enabled":{"type":"boolean","example":true}}},"requiredSuccessfulBuildsDeprecated":{"type":"integer","format":"int32"},"requiredAllTasksComplete":{"type":"boolean"},"requiredApprovers":{"type":"object","properties":{"count":{"type":"string","example":"3"},"enabled":{"type":"boolean","example":true}}}}},"RestRepositoryRefChangeActivity":{"properties":{"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"},"repository":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"origin":{"type":"object","properties":{"scmId":{"type":"string","example":"git"},"hierarchyId":{"type":"string","readOnly":true,"example":"e3c939f9ef4a7fae272e"},"statusMessage":{"type":"string","readOnly":true,"example":"Available"},"partition":{"type":"integer","format":"int32","readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}},"readOnly":true},"archived":{"type":"boolean","readOnly":true},"forkable":{"type":"boolean","readOnly":true},"defaultBranch":{"type":"string","readOnly":true,"example":"main"},"relatedLinks":{"type":"object","properties":{},"readOnly":true},"slug":{"type":"string","example":"my-repo"},"name":{"type":"string","example":"My repo"},"public":{"type":"boolean","readOnly":true},"id":{"type":"integer","format":"int32","readOnly":true},"state":{"type":"string","readOnly":true,"enum":["AVAILABLE","INITIALISATION_FAILED","INITIALISING","OFFLINE"]},"project":{"type":"string","writeOnly":true,"example":"PROJ"},"description":{"type":"string","readOnly":true,"example":"My repo description"},"scope":{"type":"string","readOnly":true,"example":"REPOSITORY"},"links":{"type":"object","properties":{},"writeOnly":true}}},"user":{"type":"object","properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}},"createdDate":{"type":"integer","format":"int64","example":19990759200},"id":{"type":"integer","format":"int64","example":1}}},"RestRepositorySelector":{"type":"object","properties":{"projectKey":{"type":"string","example":"PRJ"},"slug":{"type":"string","example":"my-repo"}}},"RestReviewerGroup":{"properties":{"avatarUrl":{"type":"string","writeOnly":true},"users":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationUser"}},"name":{"type":"string","example":"name"},"id":{"type":"integer","format":"int64"},"description":{"type":"string","example":"null"},"scope":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":2},"type":{"type":"string","enum":["GLOBAL","PROJECT","REPOSITORY","GLOBAL","PROJECT","REPOSITORY"]}}}}},"RestScopesExample":{"properties":{"scopes":{"type":"array","items":{"type":"object"}},"links":{"type":"object","properties":{},"writeOnly":true}}},"RestTestResults":{"properties":{"failed":{"type":"integer","format":"int32","example":1},"successful":{"type":"integer","format":"int32","example":134},"skipped":{"type":"integer","format":"int32","example":5}}},"RestTokenBucketSettings":{"properties":{"capacity":{"type":"integer","format":"int32","example":60},"fillRate":{"type":"integer","format":"int32","example":5}}},"RestUserRateLimitSettings":{"properties":{"whitelisted":{"type":"boolean"},"user":{"type":"object","properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}},"settings":{"type":"object","properties":{"capacity":{"type":"integer","format":"int32","example":60},"fillRate":{"type":"integer","format":"int32","example":5}}}}},"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":{"events":{"uniqueItems":true,"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"statistics":{"type":"object","properties":{},"writeOnly":true},"name":{"type":"string"},"configuration":{"type":"object"},"url":{"type":"string"}}},"RestWebhookRequestResponse":{"properties":{}},"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 \n \n \n \n \n \n \n \n \n \n
URLDescription
/rest/zduThe ZDU REST resource for the server
\n\n### Paths\n\n### `GET` /state\n\n\n\n> Gets the Cluster State\n\nGets the State of the Cluster and the responding Node's information.\n\n#### Responses\n\n##### â–¶ 200 - Returns full JSON representation of cluster state\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
buildInfo\n object\n Represents a Cluster Node and its current state.Any
buildInfo.id\n string\n The id of the Node in cluster.Any
buildInfo.name\n string\n The name of the Node.Any
buildInfo.ipAddress\n string\n The IP address of the Node.Any
buildInfo.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
buildInfo.tasksTotal\n integer\n The total number of active tasks on the Node.Any
buildInfo.activeUserCount\n integer\n The total number of active users on the Node.Any
buildInfo.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
buildInfo.version\n string\n The version of the Node's installed Product.Any
buildInfo.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
buildInfo.portNumber\n integer\n Any
buildInfo.links\n array(object)\n Hypermedia linksAny
buildInfo.links.rel\n string\n relAny
buildInfo.links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"state\": \"STABLE\",\n \"buildInfo\": {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n}\n```\n\n##### â–¶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `GET` /nodes/{nodeId}\n\n\n\n> Gets the Node's overview\n\nGets the requested Node's information.\n\n#### Path parameters\n\n##### ▷ nodeId\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeInDescriptionAccepted values
nodeId (required)\n string\n pathAny
\n\n#### Responses\n\n##### â–¶ 200 - Returns full JSON representation of the cluster node\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
id\n string\n The id of the Node in cluster.Any
name\n string\n The name of the Node.Any
ipAddress\n string\n The IP address of the Node.Any
state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
tasksTotal\n integer\n The total number of active tasks on the Node.Any
activeUserCount\n integer\n The total number of active users on the Node.Any
buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
version\n string\n The version of the Node's installed Product.Any
local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
portNumber\n integer\n Any
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### â–¶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 404 - Returned if there is no content with the given id\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `GET` /cluster\n\n\n\n> Gets the Cluster overview\n\nGets an overview of a Cluster including its current state and composition of Nodes.\n\n#### Responses\n\n##### â–¶ 200 - Returns full JSON representation of the cluster\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### â–¶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `POST` /start\n\n\n\n> Start ZDU upgrade\n\nEnables Upgrading of individual Nodes within the Cluster, allowing a heterogeneous Cluster formation.\n\n#### Responses\n\n##### â–¶ 200 - Returns full JSON representation of the cluster\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### â–¶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 409 - Returned if the cluster is not in a valid state\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `POST` /cancel\n\n\n\n> Cancel ZDU upgrade\n\nProhibits the Upgrading of individual Nodes within the Cluster. All Nodes need to be on the same version before performing this request.\n\n#### Responses\n\n##### â–¶ 200 - Returns full JSON representation of the cluster\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### â–¶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 409 - Returned if the cluster is not in a valid state\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### `POST` /approve\n\n\n\n> Approve the ZDU upgrade\n\nFinalizes the ZDU upgrade and runs specific tasks such as cleanup scripts.\n\n#### Responses\n\n##### â–¶ 200 - Returns full JSON representation of the cluster\n\n###### Headers\n\n_No headers specified_\n\n###### application/json\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n##### â–¶ 401 - Returned if user is not authenticated\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 403 - Returned if the calling user does not have permission to view the content\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 409 - Returned if the cluster is not in a valid state\n\n###### Headers\n\n_No headers specified_\n\n##### â–¶ 500 - Internal Error\n\n###### Headers\n\n_No headers specified_\n\n#### Tags\n\n
\n
\n
\n\n\n### Schemas\n\n#### ClusterStateResponse\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
buildInfo\n object\n Represents a Cluster Node and its current state.Any
buildInfo.id\n string\n The id of the Node in cluster.Any
buildInfo.name\n string\n The name of the Node.Any
buildInfo.ipAddress\n string\n The IP address of the Node.Any
buildInfo.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
buildInfo.tasksTotal\n integer\n The total number of active tasks on the Node.Any
buildInfo.activeUserCount\n integer\n The total number of active users on the Node.Any
buildInfo.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
buildInfo.version\n string\n The version of the Node's installed Product.Any
buildInfo.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
buildInfo.portNumber\n integer\n Any
buildInfo.links\n array(object)\n Hypermedia linksAny
buildInfo.links.rel\n string\n relAny
buildInfo.links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"state\": \"STABLE\",\n \"buildInfo\": {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n}\n```\n\n#### Link\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
rel\n string\n relAny
href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n}\n```\n\n#### NodeInfoDTO\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
id\n string\n The id of the Node in cluster.Any
name\n string\n The name of the Node.Any
ipAddress\n string\n The IP address of the Node.Any
state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
tasksTotal\n integer\n The total number of active tasks on the Node.Any
activeUserCount\n integer\n The total number of active users on the Node.Any
buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
version\n string\n The version of the Node's installed Product.Any
local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
portNumber\n integer\n Any
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n\n#### Cluster\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDescriptionAccepted values
upgradeModeEnabled\n boolean\n If true, it's safe to upgrade the nodes of the clusterAny
state\n string\n The current state of the Cluster.STABLE, READY_TO_UPGRADE, MIXED, READY_TO_RUN_UPGRADE_TASKS, RUNNING_UPGRADE_TASKS, UPGRADE_TASKS_FAILED
originalVersion\n string\n The original product version when ZDU was enabledAny
nodes\n array(object)\n The nodes which form the Cluster.Any
nodes.id\n string\n The id of the Node in cluster.Any
nodes.name\n string\n The name of the Node.Any
nodes.ipAddress\n string\n The IP address of the Node.Any
nodes.state\n string\n The current state of the Node.STARTING, ACTIVE, DRAINING, TERMINATING, OFFLINE, ERROR
nodes.tasksTotal\n integer\n The total number of active tasks on the Node.Any
nodes.activeUserCount\n integer\n The total number of active users on the Node.Any
nodes.buildNumber\n string\n The build number (DB schema version) of the Node's installed Product.Any
nodes.version\n string\n The version of the Node's installed Product.Any
nodes.local\n boolean\n True if this is the local node for the current session; otherwise false for remote nodes.Any
nodes.portNumber\n integer\n Any
nodes.links\n array(object)\n Hypermedia linksAny
nodes.links.rel\n string\n relAny
nodes.links.href\n string\n uriAny
links\n array(object)\n Hypermedia linksAny
links.rel\n string\n relAny
links.href\n string\n uriAny
\n\n##### Example _(generated)_\n\n```json\n{\n \"upgradeModeEnabled\": true,\n \"state\": \"STABLE\",\n \"originalVersion\": \"string\",\n \"nodes\": [\n {\n \"id\": \"string\",\n \"name\": \"string\",\n \"ipAddress\": \"string\",\n \"state\": \"STARTING\",\n \"tasksTotal\": 0,\n \"activeUserCount\": 0,\n \"buildNumber\": \"string\",\n \"version\": \"string\",\n \"local\": true,\n \"portNumber\": 0,\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n }\n ],\n \"links\": [\n {\n \"rel\": \"string\",\n \"href\": \"http://example.com\"\n }\n ]\n}\n```\n"}]},"paths":{"/audit/latest/notification-settings/retention-config-review":{"delete":{"tags":["Audit Notification Settings API"],"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"}}}}}}}}}},"/policies/latest/admin/repos/archive":{"get":{"tags":["Repository 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":["Repository 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":["Repository 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":["Repository 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"}}}}}}}}}},"/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches":{"post":{"tags":["Branch API"],"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":"Project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"Repository slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestBranchCreateRequest"}}}},"responses":{"201":{"description":"JSON representation of the newly created branch","content":{"application/json;charset=UTF-8":{"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;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}},"401":{"description":"The currently authenticated user has insufficient permissions to create a\nbranch. This could be due to insufficient repository permissions, or lack of\nbranch permission for the provided ref name","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}},"409":{"description":"The branch name overlapped with an existing branch","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}}}},"delete":{"tags":["Branch API"],"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":"Project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"Repository slug","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean","description":"Don't actually delete the ref name, just do a dry run"},"empty":{"type":"boolean"},"endPoint":{"maxLength":40,"type":"string","description":"Commit ID that the provided ref name is expected to point to"},"name":{"type":"string","description":"Name of the ref to be deleted"}},"additionalProperties":{"type":"object"}}}}},"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;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}},"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."}}}},"/branch-utils/latest/projects/{projectKey}/repos/{repositorySlug}/branches/info/{commitId}":{"get":{"tags":["Branch API"],"description":"Gets the branch information associated with a single commit from a given repository.","operationId":"findByCommit","parameters":[{"name":"projectKey","in":"path","description":"Project key","required":true,"schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"Repository slug","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","content":{"application/json":{"schema":{"type":"integer","format":"int32"}}}},{"name":"start","in":"query","content":{"application/json":{"schema":{"type":"integer","format":"int32"}}}},{"name":"commitId","in":"path","required":true,"content":{"application/json":{"schema":{"maxLength":40,"type":"string"}}}}],"responses":{"200":{"description":"a page of branch refs associated with the commit","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/PageOfRefs"}}}},"500":{"description":"The request has timed out processing the branch request","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/RestErrors"}}}}}}},"/git/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase":{"get":{"tags":["Pull Requests"],"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"],"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":["Git Tags"],"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":["Git Tags"],"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"}}}}}}}}}},"/sync/latest/projects/{projectKey}/repos/{repositorySlug}":{"get":{"tags":["Repository Ref Sync"],"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 Ref Sync"],"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 Ref Sync"],"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"}}}}}}}}}},"/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/conditions":{"get":{"tags":["Required Builds API"],"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":"getPage","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"}}}}}}}}}},"/required-builds/latest/projects/{projectKey}/repos/{repositorySlug}/condition/{id}":{"put":{"tags":["Required Builds API"],"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":"update","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":["Required Builds API"],"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":"delete","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}/condition":{"post":{"tags":["Required Builds API"],"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":"create","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"}}}}}}}}}},"/build-status/latest/commits/{commitId}":{"get":{"tags":["Build Status API"],"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":["Build Status API"],"description":"Associates a build status with a commit.The state, the key and the url fields are mandatory. The name anddescription fields are optional.All fields (mandatory or optional) are limited to 255 characters, except for the url,which is limited to 450 characters.Supported values for the state are SUCCESSFUL, FAILEDand INPROGRESS.The authenticated user must have LICENSED permission or higher to call this resource.\n\nDeprecated in 7.14, please use the repository based builds resource instead.","operationId":"addBuildStatus","parameters":[{"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":["Build Status API"],"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":["Build Status API"],"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"}}}}}}}}}},"/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/comments/{commentId}/likes":{"get":{"tags":["Comment likes API"],"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":["Comment likes API"],"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":["Comment likes API"],"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":["Comment likes API"],"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","required":true,"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":{}}}}},"delete":{"tags":["Comment likes API"],"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","required":true,"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":{}}}}}},"/comment-likes/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments/{commentId}/likes":{"get":{"tags":["Comment likes API"],"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":["Comment likes API"],"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":["Comment likes API"],"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":["Comment likes API"],"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","required":true,"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":{}}}}},"delete":{"tags":["Comment likes API"],"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","required":true,"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":{}}}}}},"/jira/latest/comments/{commentId}/issues":{"post":{"tags":["Jira"],"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":{"201":{"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"],"description":"Retrieve a page of changesets associated with the given issue key.","operationId":"getCommits","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"],"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":"getForProject","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"],"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"}}}}}}}},"/mirroring/latest/upstreamServers":{"get":{"tags":["Mirroring (Mirror)"],"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)"],"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/descriptor":{"get":{"tags":["Mirroring (Mirror)"],"description":"Returns the mirroring atlassian-connect add-on descriptor for the upstream server identified by upstreamId.
This endpoint should only be called by upstream servers","operationId":"getAddonDescriptor","parameters":[{"name":"upstreamId","in":"path","description":"the upstream server ID to retrieve settings for","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"atlassian-connect add-on descriptor","content":{"application/json":{}}},"404":{"description":"The upstream server could not be found.","content":{"application/json":{}}}}}},"/mirroring/latest/upstreamServers/{upstreamId}/addon/disabled":{"post":{"tags":["Mirroring (Mirror)"],"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":["Mirroring (Mirror)"],"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}/addon/events":{"post":{"tags":["Mirroring (Mirror)"],"description":"Callback method for web hook events this mirror is interested in.
This endpoint should only be called by upstream servers","operationId":"onWebhookEvent","parameters":[{"name":"upstreamId","in":"path","description":"the upstream server ID to retrieve settings for","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"the entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestUnknownEntity"}}}},"responses":{"204":{"description":"an empty response indicating that callback has been processed"},"400":{"description":"The payload was not in the expected format for any of the supported web hooks","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"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/installed":{"post":{"tags":["Mirroring (Mirror)"],"description":"Callback method that should be called when the mirroring atlassian-connect add-on has been installed in the upstream server identified by upstreamId
This endpoint should only be called by upstream servers","operationId":"onAddonInstalled","parameters":[{"name":"upstreamId","in":"path","description":"the upstream server ID to retrieve settings for","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"the event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestConnectInstalledEvent"}}}},"responses":{"204":{"description":"An empty response indicating that callback has been processed"}}}},"/mirroring/latest/upstreamServers/{upstreamId}/addon/uninstalled":{"post":{"tags":["Mirroring (Mirror)"],"description":"Callback method that should be called when the mirroring atlassian-connect add-on has been uninstalled from the\nupstream server identified by upstreamId
This endpoint should only be called by upstream servers","operationId":"onAddonUninstalled","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"}}}},"/mirroring/latest/upstreamServers/{upstreamId}/farmNodes":{"get":{"tags":["Mirroring (Mirror)"],"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)"],"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)"],"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":["Mirroring (Mirror)"],"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)"],"description":"Retrieves mirror 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)"],"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)"],"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)"],"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)"],"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)"],"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)"],"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)"],"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)"],"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":["Mirroring (Mirror)"],"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}},"/branch-permissions/latest/projects/{projectKey}/repos/{repositorySlug}/restrictions":{"get":{"tags":["Repository Ref Restriction API"],"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 Ref Restriction API"],"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 Ref Restriction API"],"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 Ref Restriction API"],"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 Ref Restriction API"],"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 Ref Restriction API"],"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 Ref Restriction API"],"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 Ref Restriction API"],"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"}}}}}}}}}},"/access-tokens/latest/admin":{"get":{"operationId":"get","responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"put":{"operationId":"set","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"maxExpiryDays":{"type":"integer","format":"int32"}}}}}},"responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}},"delete":{"operationId":"delete","responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/access-tokens/latest/projects/{projectKey}":{"get":{"tags":["Project Access Tokens API"],"description":"Get all access tokens associated with the given project.","operationId":"getAll","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":["Project Access Tokens API"],"description":"Create an access token for the project according to the given request.","operationId":"create_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":["Repository Access Tokens API"],"description":"Get all access tokens associated with the given repository.","operationId":"getAll_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":["Repository Access Tokens API"],"description":"Create an access token for the repository according to the given request.","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 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":["Repository Access Tokens API"],"description":"Get an access token for the user according to 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":["Repository Access Tokens API"],"description":"Modify an access token for the user according to the given request. Any fields not specified will not be altered.","operationId":"update_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":["Repository Access Tokens API"],"description":"Delete an access token for the user according to 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":["Project Access Tokens API"],"description":"Get an access token for the user according to 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":["Project Access Tokens API"],"description":"Modify an access token for the user according to the given request. Any fields not specified will not be altered.","operationId":"update","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":["Project Access Tokens API"],"description":"Delete an access token for the user according to 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":["User Access Tokens API"],"description":"Get all access tokens associated with the given user.","operationId":"getAll_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":["User Access Tokens API"],"description":"Create an access token for the user according to the given request.","operationId":"create_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":["User Access Tokens API"],"description":"Get an access token for the user according to 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":["User Access Tokens API"],"description":"Modify an access token for the user according to the given request. Any fields not specified will not be altered.","operationId":"update_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":["User Access Tokens API"],"description":"Delete an access token for the user according to 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"}}}}}}}}}},"/insights/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/annotations":{"get":{"tags":["Code insights"],"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":["Code insights"],"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":["Code insights"],"description":"Retrieve the specified report.","operationId":"get","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":["Code insights"],"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":"set","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":["Code insights"],"description":"Delete a report for the given commit. Also deletes any annotations associated with this report.","operationId":"delete","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":["Code insights"],"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":["Code insights"],"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":["Code insights"],"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":["Code insights"],"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"}}}}}}}}}},"/mirroring/latest/account/settings/preferred-mirror":{"get":{"tags":["Mirroring (Upstream)"],"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)"],"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)"],"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)"],"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)"],"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 is returned. Currently only username/password 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)"],"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)"],"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)"],"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)"],"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)"],"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}/webPanels/config":{"get":{"tags":["Mirroring (Upstream)"],"operationId":"get_1","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)"],"description":"Returns the requested project using its primary key ID.
Since 6.7","operationId":"getById","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)"],"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)"],"description":"Returns a page of repositories enriched with a content hash and default branch","operationId":"getAll","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)"],"description":"Returns a repository enriched with a content hash and default branch","operationId":"getById_1","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)"],"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)"],"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)"],"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)"],"description":"Retrieves a mirroring request","operationId":"get","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)"],"description":"Deletes a mirroring request","operationId":"delete","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)"],"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)"],"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"}}}}}}}}}},"/ssh/latest/keys":{"get":{"tags":["Ssh"],"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":["Ssh"],"description":"Add a new ssh key to a supplied user.","operationId":"addSshKey","parameters":[{"name":"userName","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"}}}},{"name":"user","in":"query","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"algorithmType":{"type":"string"},"bitLength":{"type":"integer","format":"int32"},"id":{"type":"integer","format":"int32","readOnly":true,"example":1},"label":{"type":"string","readOnly":true,"example":"me@127.0.0.1"},"text":{"type":"string","example":"sh-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":["Ssh"],"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}":{"delete":{"tags":["Ssh"],"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/projects/{projectKey}/repos/{repositorySlug}/ssh":{"get":{"tags":["Ssh"],"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":["Ssh"],"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":{"200":{"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 insufficirestSent 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"}}}}}}}}}},"/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}":{"get":{"tags":["Ssh"],"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":["Ssh"],"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"}}}}}}}}}},"/ssh/latest/projects/{projectKey}/repos/{repositorySlug}/ssh/{keyId}/permission/{permission}":{"put":{"tags":["Ssh"],"description":"Updates the permission granted to the specified SSH key to the repository 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"}},{"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"}}}}}}}}}},"/ssh/latest/projects/{projectKey}/ssh":{"get":{"tags":["Ssh"],"description":"Retrieves the access keys for the project identified in the URL.","operationId":"getForProject","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":["Ssh"],"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":{"200":{"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"}}}}}}}}}},"/ssh/latest/projects/{projectKey}/ssh/{keyId}":{"get":{"tags":["Ssh"],"description":"Retrieves the access key for the SSH key with id keyId on the repository identified in the URL.","operationId":"getForProject_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"}}],"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":["Ssh"],"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"}}}}}}}}}},"/ssh/latest/projects/{projectKey}/ssh/{keyId}/permission/{permission}":{"put":{"tags":["Ssh"],"description":"Updates the permission granted to the specified SSH key to the project 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"}}],"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"}}}}}}}}}},"/ssh/latest/settings":{"get":{"tags":["Ssh"],"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"}}}}}}}}}},"/ssh/latest/ssh/{keyId}":{"delete":{"tags":["Ssh"],"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"}}}}}}}}}},"/ssh/latest/ssh/{keyId}/projects":{"get":{"tags":["Ssh"],"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"}}}}}}}}}},"/ssh/latest/ssh/{keyId}/repos":{"get":{"tags":["Ssh"],"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"}}],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"description":"Get all the registered Mesh nodes.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"getAll","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":["Core"],"description":"Register a new Mesh node.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"register","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":["Core"],"description":"Get the registered Mesh node that matches the supplied ID.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"getById_1","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":["Core"],"description":"Update a Mesh node.\n\nThe authenticated user must have **SYS_ADMIN** permission.","operationId":"update_2","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"}}}}}}}}}},"/api/latest/admin/git/mesh/support-zips":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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_4","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":["Core"],"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":"update_1","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. For example, it may be for a different product, or it may have already expired.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}}}}},"/api/latest/admin/mail-server":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"description":"Promote or demote a user'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 Server\ndocumentation 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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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 Server 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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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\nAn explicitly set pull request merge strategy configuration can be deleted by POSTing a document with an empty \"mergeConfig\" attribute. i.e:```{ \n \"mergeConfig\": { \n } \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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":"getAll_1","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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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/users":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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 Stash.\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/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/users/add-groups":{"post":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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 Stash.\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/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"}}}}}}}}}},"/api/latest/admin/users/rename":{"post":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"description":"Retrieve a page of pull requests where the current authenticated 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":"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":["Core"],"description":"Returns the Deployment capabilities of this instance","operationId":"getCapabilities_1","responses":{"200":{"description":"capabilities","content":{"application/json":{}}},"404":{"description":"This instance of Bitbucket Server 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":["Core"],"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":["Core"],"description":"Create a new hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.","operationId":"create_1","requestBody":{"description":"The multipart form data containing the hook script","content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExamplePostMultipartFormData"}}}},"responses":{"201":{"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":["Core"],"description":"Retrieves a hook script by ID.","operationId":"getById","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":["Core"],"description":"Updates a hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.","operationId":"update","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":["Core"],"description":"Deletes a registered hook script.\n\nThis endpoint requires **SYS_ADMIN** permission.","operationId":"delete_4","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":["Core"],"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":["Core"],"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":{"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":{"operationId":"getPullRequestCount","responses":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/api/latest/labels":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":{"201":{"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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/users":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":{"201":{"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":["Core"],"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":["Core"],"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":{"201":{"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"description":"Retrieve the attachment.\n\nThe authenticated user must have REPO_READ permission for the specified repository that is associated to the attachment.","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":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":"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":{"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":["Core"],"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":["Core"],"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":["Core"],"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":"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":["Core"],"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":"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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_2","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":["Core"],"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":["Core"],"description":"Delete a specific build status. \n\nThe authenticated user must have **REPO_ADMIN** permission for the provided repository.","operationId":"delete_2","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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":{"201":{"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":["Core"],"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":["Core"],"description":"Get the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber. \n\nThe user must have REPO_READ.","operationId":"get_3","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":["Core"],"description":"Create or update a deployment. \n\n The authenticated user must have REPO_READ permission for the repository.","operationId":"create","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":["Core"],"description":"Delete the deployment matching the specified Repository, key, environmentKey and deploymentSequenceNumber. \n\nThe user must have REPO_ADMIN.","operationId":"delete_3","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":{"get":{"tags":["Core"],"operationId":"streamRawDiff","parameters":[{"name":"contextLines","in":"query","schema":{"type":"integer","format":"int32","default":-1}},{"name":"projectKey","in":"path","description":"The project key","required":true,"schema":{"type":"string"}},{"name":"srcPath","in":"query","schema":{"type":"string"}},{"name":"autoSrcPath","in":"query","schema":{"type":"boolean","default":false}},{"name":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"schema":{"type":"string"}},{"name":"whitespace","in":"query","schema":{"type":"string"}},{"name":"repositorySlug","in":"path","description":"The repository slug","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","schema":{"type":"string"}}],"responses":{"default":{"description":"default response","content":{"text/plain; qs=0.1":{}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/commits/{commitId}/diff/{path}":{"get":{"tags":["Core"],"description":"Stream the 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":"path","in":"path","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":"projectKey","in":"path","description":"The project key","required":true,"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":"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":"commitId","in":"path","description":"The full ID of the commit within the repository","required":true,"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}/commits/{commitId}/pull-requests":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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","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":["Core"],"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"}}}}}}}}},"head":{"tags":["Core"],"operationId":"findContributing","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":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/default-branch":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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_3","parameters":[{"name":"contextLines","in":"query","description":"The number of context lines to include around added/removed lines in the diff","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"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":["Core"],"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_2","parameters":[{"name":"path","in":"path","description":"The path to the file which should be diffed (required)","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":"projectKey","in":"path","description":"The project key.","required":true,"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":{"201":{"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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"}}}}}}}}},"head":{"tags":["Core"],"operationId":"findLicense","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":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/participants":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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 Server 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":["Core"],"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":["Core"],"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/users":{"get":{"tags":["Core"],"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":["Core"],"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 Server 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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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_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 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":["Core"],"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_5","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/RestApplicationUser"}}}},"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":["Core"],"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_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":"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":["Core"],"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_5","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":["Core"],"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_6","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":{"application/json":{}}},"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 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}.patch":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":{"201":{"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":["Core"],"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":{"201":{"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}/blocker-comments":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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","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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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}/commits":{"get":{"tags":["Core"],"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":["Core"],"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":{"get":{"tags":["Core"],"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_4","parameters":[{"name":"contextLines","in":"query","description":"The number of context lines to include around added/removed lines in the diff","schema":{"type":"string"}},{"name":"projectKey","in":"path","description":"The project key.","required":true,"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":"untilId","in":"query","description":"The until commit hash to stream a diff between two arbitrary hashes","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 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 raw diff for the specified pull request.","content":{"application/json":{}}},"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":"If 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}/diff/{path}":{"get":{"tags":["Core"],"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_5","parameters":[{"name":"path","in":"path","description":"The path to the file which should be diffed (optional)","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":"projectKey","in":"path","description":"The project key.","required":true,"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":"untilId","in":"query","description":"The until commit hash to stream a diff between two arbitrary hashes","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 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 raw diff for the specified pull request.","content":{"application/json":{}}},"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 specified pull request.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/RestErrorMessage"}}}}}}},"404":{"description":"If 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}/merge":{"get":{"tags":["Core"],"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":["Core"],"description":"Merge the specified pull request. \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"}}}}}}},"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":["Core"],"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":{"201":{"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":["Core"],"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":{"content":{"application/json":{"schema":{"type":"object","properties":{"lastReviewedCommit":{"type":"string","example":"7549846524f8aed2bd1c0249993ae1bf9d3c9998"},"approved":{"type":"boolean"},"user":{"type":"object","properties":{"slug":{"type":"string","example":"jcitizen"},"emailAddress":{"type":"string","example":"jane@example.com"},"displayName":{"type":"string","example":"Jane Citizen"},"name":{"type":"string","example":"jcitizen"},"id":{"type":"integer","format":"int32","readOnly":true,"example":101},"type":{"type":"string","enum":["NORMAL","SERVICE"]},"active":{"type":"boolean"},"links":{"type":"object","properties":{},"writeOnly":true},"avatarUrl":{"type":"string","writeOnly":true}}},"status":{"type":"string","enum":["UNAPPROVED","NEEDS_WORK","APPROVED"]},"role":{"type":"string","enum":["AUTHOR","REVIEWER","PARTICIPANT"]}}}}}},"responses":{"201":{"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":["Core"],"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":["Core"],"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, 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":"repositorySlug","in":"path","description":"The repository slug.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The participant representing the status to set, all fields except status are ignored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestParticipant"}}}},"responses":{"201":{"description":"Details of the new participant.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestPullRequestParticipant"}}}},"400":{"description":"The specified status 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 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"}}}}}}}}},"delete":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":"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":"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":{"get":{"tags":["Core"],"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":"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 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}/raw/{path}":{"get":{"tags":["Core"],"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_1","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":["Core"],"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"}}}}}}}}},"head":{"tags":["Core"],"operationId":"findReadme","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":{"default":{"description":"default response","content":{"application/json;charset=UTF-8":{}}}}}},"/api/latest/projects/{projectKey}/repos/{repositorySlug}/recreate":{"post":{"tags":["Core"],"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":{"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"}}}}}}},"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":["Core"],"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":["Core"],"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":["Core"],"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}/settings/auto-decline":{"get":{"description":"Retrieves the auto decline settings for the supplied repository. Project settings will be returned if no explicit settings have been set for the repository. In the case that there are no project settings, the default settings will be returned.\n\nThe authenticated user must have REPO_READ permission for this repository to call the resource.","operationId":"get_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":{"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":"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/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.","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":{"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":"delete_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/hooks":{"get":{"tags":["Core"],"description":"Retrieve a page of repository hooks for this repository. \n\nThe authenticated user must have REPO_READ 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":["Core"],"description":"Retrieve a repository hook for this repository. \n\nThe authenticated user must have REPO_READ 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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"description":"Retrieve the settings for a repository hook for this repository. \n\nThe authenticated user must have REPO_READ 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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"description":"Create a reviewer group.\n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.","operationId":"create_4","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":["Core"],"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":["Core"],"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_5","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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":"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 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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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","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":["Core"],"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","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/test":{"post":{"tags":["Core"],"description":"Find webhooks in this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository to call this resource.","operationId":"testWebhook","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":"url","in":"query","description":"The url in which to connect to","schema":{"type":"string"}}],"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":["Core"],"description":"Find webhooks in this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository 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":"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":["Core"],"description":"Find webhooks in this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository 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"}},{"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":["Core"],"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","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":["Core"],"description":"Find webhooks in this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository 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":"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"}}}},"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":["Core"],"description":"Find webhooks in this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository 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"}},{"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":["Core"],"description":"Find webhooks in this repository. \n\nThe authenticated user must have REPO_ADMIN permission for the specified repository 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"}},{"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}/settings/auto-decline":{"get":{"tags":["Core"],"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":"get","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":["Core"],"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":"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/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.","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":["Core"],"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":"delete","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/hooks":{"get":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"description":"Create a reviewer group.\n\nThe authenticated user must have PROJECT_ADMIN permission for the specified project to call this resource.","operationId":"create_3","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":["Core"],"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":["Core"],"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_4","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":["Core"],"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/repos":{"get":{"tags":["Core"],"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":{"201":{"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/tasks":{"post":{"tags":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"description":"Retrieve a page of users, optionally run through provided filters.\n\n\nOnly authenticated users may call this resource.\n### Permission Filters\n\n\nThe following three sub-sections list parameters supported for permission filters (where [root] is\nthe root permission filter name, e.g. permission, permission.1 etc.) depending on the\npermission resource. The system determines which filter to apply (Global, Project or Repository permission)\nbased on the `[root]` permission value. E.g. ADMIN is a global permission,\nPROJECT_ADMIN is a project permission and REPO_ADMIN is a repository permission. Note\nthat the parameters for a given resource will be looked up in the order as they are listed below, that is e.g.\nfor a project resource, if both projectId and projectKey are provided, the system will\nuse projectId for the lookup.\n

Global permissions

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

Project permissions

\n\n\n- [root]- specifies the project permission\n- [root].projectId - specifies the project ID to lookup the project by\n- [root].projectKey - specifies the project key to lookup the project by\n\n\nExample valid filter: permission.1=PROJECT_ADMIN&permission.1.projectKey=TEST_PROJECT.\n#### Repository permissions\n\n\n- [root]- specifies the repository permission\n- [root].projectId - specifies the repository ID to lookup the repository by\n- [root].projectKey and [root].repositorySlug- specifies the project key and repository slug to lookup the repository by; both values need to be provided for this look up to be triggered\n\n\nExample valid filter: permission.2=REPO_ADMIN&permission.2.projectKey=TEST_PROJECT&permission.2.repositorySlug=test_repo.","operationId":"getUsers_2","parameters":[{"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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":["Core"],"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"}}}}}}}}}}}}